A few years ago I bought a book called Deep Work and loved it. A lot of the ideas shared in the book were part of my mindset but I needed the reinforcement. This post is not about that book, but it is about what sometimes happens when I apply the principles of the book and then get distracted.

Two week ago I created a kanban board in my apartment on an actual cork board. I used small post-it notes to write out tasks I needed to complete for 3 projects I wanted to work on through the end of March. I could spend however long I needed to work on each post-it note/task but it would give me something specific to work on each night after work – GREAT. I’m a little type extra so this is necessary.

Well what had happened was that on the way to working on my task I sometimes got pulled into the tooling rabbithole (or hell depending on how you’re feeling that particular day). Clearly this type of learning is common and has it’s benefits. Most of the time I end up focused on command line stuff and never make any REAL progress on my actual project but I’m learning – which definitely counts for something but that is not the deep work and learning that generates expert results!

A good example is an ongoing project to create a simple single page site for myself that will link to all of my other sites, personal & professional. It is a single page so I could totally write it in plain HTML and CSS and be done with it. But one of my tasks was to pick some new tech to test & implement. I’ve used Nunjucks before but started researching static site generators. I realized that I could possibly roll my own static site generator using the Gulp/Nunjucks setup I have and just continue to build on it. I don’t have a good gauge on how long that would take to implement but that is the deep learning I’m into. Win win.

So I started doing some basic project scaffolding and re-familiarizing myself with tools I used in the pass (Atom’s autocompiler package. I could use gulp but I prefer not to if I don’t have to). I needed to use Browsersync for live reloading so I set that up too when I realized that while I don’t need to create a virtual host I definitely prefer that over the “localhost:3000” that is used.

I’ve used WAMP to add a virtual host in the past and have manually edited the files but along the way I thought “there has to be a command line script that will allow me to quickly type in a few paths and the new virtual host will be setup and ready to use.” No more opening two different documents in a text editor with elevated editing privileges… ahhh the beauty of automation.

A few google searches and I found some things I could possibly rework if I spent a little more time learning Bash, but I kept looking and then finally I found what I was looking for! It was a script that was inspired by a string of Github users (all open source erthang). I followed the readme.md trail and looked at the source, studying the modifications. One original user created the script for XAMPP and another for WAMP using Git Bash. I decided to pick up the torch and build on their great work and put my spin on things for the love of WSL. The fruits of my labor are on Github now! Hopefully someone else will go down the same rabbithole I went down and land on my Github repo :-).

I have not spun up a new site with my own static site generator but I learned a few things about bash scripting:

  • how to escape backslashes to allow for what I think would be considered cross platform filename interpolation – otherwise Windows the machine won’t read the file name the way I’d expect it to, very literally.
  • running Windows commands in WSL using cmd.exe /c (I’ve done this before for another script)
  • how to append text to an existing file (now if only I could figure out how to delete text from an existing file from the command line)

I’ve proud of my little scripting modifications. I’ve been getting pulled into similar mini learning adventures over the last few weeks which has definitely stalled my progress on projects but I’m going to look at the bright side of things.

Other tasks I’ll be working through, complementary to the adventure described above include:

Your girl is still working though. I’m just trying to stay low & build …

Leave a Reply

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