Irrational Exuberance!

Wherein I Rewrite My Blog a Fifth Time

May 20, 2016. Filed under blog

For reasons which are not obvious even to myself, when I have a bit of time and am going through a period of change, I tend to end up rewriting my blog. It's kind of amazing that this is my fifth total rewrite of the software running this blog, the previous iterations of which (from latest to oldest):

  1. A move from Blueprint CSS to Bootstrap CSS, but still relying on my hacked together Sisyphus codebase (which I never really touched after it met the bare requirements to run the site, meaning it was essentially just a hacked together prototype for its entire lifespan, RIP Sisyphus). This was in 2014.
  2. A total rewrite from my first horrible Lifeflow blog engine to my second horrible blog engine, Sisyphus. This was in 2011.
  3. The second iteration used "Lifeflow" which was essentially my project for learning how to use Django and more generally my first experience with web development in general. Neither the CSS nor the code was anything approaching pretty. Sometime late 2007.
  4. The first iteration was a Wordpress blog, probably in early 2007.

The rewrite is about 1350 LoC in Go (tentatively titled Icarus, because all blog engines should have pessimistic references to greek mythology), replacing about 800 LoC in Python. I think the Go rewrite is probably simpler though, both in the sense that Go abhors concise syntax, and also in the sense that it relies mostly on standard libraries and is not relying on a heavy weight library like Django (which the Python version was).

Although this certainly doesn't represent a grand accomplishment in Go, I'd say that I've finally written enough Go over the past few months to have an opinion about it, and that opinion is pretty positive, although it's still IMHO a pretty crummy text processing language (much like Erlang, which is just bad at strings in my opinion).

On the other hand, it's pretty liberating to be able to run Nginx fronting the Go server and stop messing with Nginx fronting Apache with mod_python (I know, I know, but it was 2011 when I put together the VPS configuration for the previous iteration, at which point mod_wsgi was early and uwsgi was even earlier, I would use uwsgi with Nginx at this point if I was redoing it).

I'm still relying on Redis, as the source of truth for the important is in a Git repository, and it's mostly just serving as a materialized view and some analytics data (one of the design constraints was to be able to copy over the RDB from the previous iteration and have it work "as is", to eliminate an annoying migration step).

Anyway, hopefully this will be the start of more frequent posting. :-)