hardscrabble 🍫

By Max Jacobson

Psst. Check out my RubyConf 2017 talk, There are no rules in Ruby.

blog posts

jekyll 2

06 Sep 2014

I just finished updating my blog to Jekyll 2.0. It looks the same, but the code is nicer.1

The marquee feature is that Jekyll now knows how to compile Sass and CoffeeScript. I was already using those languages, but relying on a complex Guardfile to accomplish it. I’m pleased to delete that.

Like all files Jekyll processes, Sass and CoffeeScript files must have YAML at the top of them, though no YAML data is actually required to be there, just the hyphens where the YAML would go. That’s an awkward requirement which I hope goes away.

The other thing I got to delete was some boilerplate configuration in the head of every page and post, in which I would tell Jekyll that posts should use the post layout and pages should use the page layout, so it knows which layout to use. Now I just tell it which layout to use for posts and which to use for pages once in the global configuration file, which is much nicer.

The last new thing I want to explore is using GitHub-style code blocks. I’d prefer to use the triple backtick over the liquid tag. This is supposed to be possible but I couldn’t get it to work perfectly – code blocks were generated, but lost the syntax highlighting so I decided to leave it for now.

The creator of Jekyll, GitHub co-founder Tom Preston-Werner, recently left GitHub after being investigated about very unprofessional behavior. Four months earlier, the Jekyll project was distanced from him a bit when the source code was moved from his personal account to an organization account dedicated to Jekyll and related projects. This is normal and reflects that the project outgrew him, and that he’s not the main maintainer anymore. When Jekyll 2.0.0 was released, Preston-Werner’s name was buried in a wall of thank-yous.

I feel slightly weird using Jekyll because of who created it. I’m glad it doesn’t follow the naming pattern of toml and tomdoc at least.

  1. The diff says I deleted 3623 lines, but it’s not as amazing as that sounds because 3263 of them are from a CSS library that I realized I don’t use anymore. 

when your disk fills up, who are you?

06 Sep 2014

I got into technology in large part because I was drawn to the Mac community. I started reading blogs about apps and productivity. That occupied a lot of my mind during college in particular, when I was struggling with procrastination and wanted to find some silver bullet app to save me.

During that time I heard of a neat app called DaisyDisk which analyzes your Mac’s disk and breaks down exactly where your data is on your computer. It can help you remember about huge files you totally can delete or games you don’t play anymore and can easily re-download if you want to again. I had a 2006 MacBook with an 80 GB hard drive (the cool black one) that I needed to constantly bail files out of. DaisyDisk’s colorful, powerful interface was a life saver and, for me, a benchmark for how cool an app could be.

It was updated fairly recently and seems to still be great. I just re-downloaded and ran it on my 128 GB MacBook Air:

my daisydisk results

Fast-forward to a few months ago, and I’m at work as a web developer and my coworker comments that the disk on one of our production Linux servers is nearly full, and we need to find something to delete. I knew DaisyDisk wouldn’t work in the command line but didn’t know what to suggest. He remembered something called ncdu and ran it and I had immediate, rippling acid flashbacks to DaisyDisk! ncdu is a tool that runs totally in the command line with a nice interface and accomplishes the same goals and supports the same workflow:

  1. start the app
  2. wait while it analyzes your disk
  3. see your top-level directories sorted by how much disk space they use
  4. let you drill down and see the same for all sub-directories
  5. let you delete culpable files right from its interface

Here’s what it looks like:

my ncdu results

Kind of the same!!

It would have been hopelessly intimidating and weird to me a few years ago but for the me that I am today (someone who sometimes uses Linux) I can’t help but find it much cooler.

ncdu can be installed on a Mac via homebrew with brew install ncdu or on Linux with sudo apt-get install ncdu.