BBBBlog

Jason Burns – IT Superhero

Procrastination via Optimization (Yak Shaving)

On the path to investigating static site generators for my blog, I ran into a seemingly endless series of optimization tasks.

I installed 11ty, and the first thing I noticed is that my distro (Pop!_OS) has an outdated Node.js. That means I had to install NVM, (Node Version Manager) to install and select the right Node version for the project.

So I grab the script, and realize, oh man, this is a Bash script, and I use the fish shell. This script will error out if I try to run it in my current shell, because it’s not POSIX compliant. The NVM script does need to run in my shell before I can kick off the site generator.

So I started the optimization path of figuring out how to get NVM in fish.

There was a project called Oh My Fish, just like Oh My Zsh, but that seems abandoned and no longer maintained.

Oh My Fish has been unmaintained for years, and certain parts of it may not work for you.

There was a simple script that an individual created, but that required the installation of their Fisher package manager to load their NVM script. It came from a person’s personal Github repo. I decided not to go down that path. I don’t understand fish well enough to start down the package management path with it.

So, I fell back to manually invoking the Bash shell inside my VS Code terminal just to kick off the npm commands. Ugh. A non-optimized path, but this seems to work.

Then, it struck me that if I’m going to have a few terminals open, to a few different places, I should figure out tmux, or, what about this Ghostty project? Ghostty seemed pretty appealing visually and performance wise.

So I get Ghostty installed from a .deb and… immediately it has a script error about the Fish shell integration. Apparently my distro has an older version of Fish, as well.

Solutions are to manually upgrade the Fish shell to a later version with the PPA repository (not ideal), fix the Fish script myself, or….

Here’s where I’m optimizing..

What if I switched BACK to the Z shell everywhere on all devices? I did use it for a while. I still use it on my Mac. But I’d have to convert my Fish aliases and my ssh-agent scripts back to Zsh.

5 hours of watching Z shell YouTube videos later, falling down the rabbit hole of Starship, Powerline10k, and fuck, did I just watch a 2 hour Neovim tutorial? Am I considering Arch, or NixOS? What the hell just happened in my brain?

What was the original task I meant to do?

I think this Yak is well and truly shaved now.

So a few days have now went by and I’ve switched everything to ZSH and Oh My Zsh. I know I could do something like zinit, or even just do all my own custom includes, but with this, the addition of zsh-autosuggest, and zsh-syntax-highlighting, I now have effectively what my old terminal provided. Let’s insert a screenshot.

Look at that, there is even some productivity! I can run the bare bones version of my generator with a few test blog posts.

Screenshot of the Ghostty terminal with Oh My Zsh theme.

I fell down the rabbit hole of theming next, and remembered that I do love a good Catppuccin Mocha. So I setup my Ghostty theme, changed my existing WordPress, and started reading about how folks do modern CSS.

After thinking through all these dependencies on my local machine just to get an NPM project building, I wonder if I shouldn’t have been using a docker environment to do this build? Would that make things MORE complicated, or less? I wouldn’t have to worry about locally installed versions of packages, that would just all be run inside the container.

This project is interesting to me because I feel like I now have a better understanding of the past few decades of development trends. It’s like I’m quickly stumbling through all the road blocks that got us here.


Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.