Skip to main content

Mike Kreuzer

Two weeks of code

February 7, 2017

I'm two weeks into my hundred days of code & yesterday I produced my first tangible output: publishing Zine as a gem, and pushing the code up on Github Codeberg (see below). I feel pretty chuffed to have finally published a Ruby gem. Fifteen years from the pickaxe book to a gem, there's hope for us all.

Zine as it says on the pack is yet another blog aware static site generator. I already have one of these things that I wrote two years ago, the thing I'm using right now, and there are literally hundreds of competitors, so apart from the satisfaction of having a gem to my name it's probably worth thinking about what I'm aiming to get.

So far what I've got may seem small, some layout changes: jump to content, links to Ripley & to GitHub; and an index for the tag pages (I've wanted that for the longest time). All will be visible on this site, soon, it's close to ready for production, but not quite there yet. What I will gain though is far greater, it's a tool completely optimised for me.
 
The frustrations in going back to Ruby have been few, but they're there - the decrepitude of some parts of the Ruby standard library/core (eg RSS, & WEBrick), the complexity involved in async/threading, things just taken for granted in other languages, and lastly some of my own habits which seem to come out more in Ruby than other languages…
 
One of the things I wanted out of this was code that would be easier to change & maintain, to get that I need to prune the data that's being passed around & decouple things a bit, and then seriously take to each & every file with reek & rspec. I've been in the habit forever of working in sprints - charging ahead with code for a week or two, then backfilling with architecture, docs & tests, a sort of "it's probably green, let's hope so/green & refactor" cycle, rather than "red/green/refactor". That's worked out ok, but the code in the first two weeks can be a bit gnarly.

Onwards any way, tests up next. Really pretty happy I committed to this thing.

Update November 2023: I've taken my code off Github, this code's no longer available there; but is now on Codeberg instead.