I have been publishing articles and links rather intermittently on this site for just over a year now. While I’m not the most prolific blogger, I do try to make sure that the stuff I post here is of good quality. I won’t ever post something here that I don’t think will be of some use to me personally in the future. I am currently in the process of learning how to manage my time so that I can post content more regularly. The goal is two-fold: 1) I’d like to increase my readership and 2) I’d really like to improve my writing skills.

A few weeks ago I sat down and tried to figure out exactly what I was doing with mjijackson.com. I wasn’t satisfied with the quality of the site, and, being the kind of person who tends to take an all-or-nothing approach at just about everything I do, I sat down to figure out if I should keep the site going or if I should abandon it altogether. There are way too many neglected blogs on the net, and I certainly don’t want to contribute to the digital waste.

Enter WordPress

As of about a month ago I was using the famous WordPress publishing platform to manage my content. When I first chose WordPress, I didn’t really put a lot of thought into the decision. It was the obvious choice for me, being primarily a PHP programmer at the time, and with such a large community it seemed to be the safest and quickest option. Also, I didn’t want to take the time to learn the intricacies of blogging platforms before I started writing, so that ruled out writing my own platform from scratch.

As I considered the fate of this blog, I tried to identify reasons why I don’t post content as often as I’d like. Of course part of the problem is my personal level of dedication to the site, but I quickly realized that another large part of the problem had to do with the software I was using. I just didn’t enjoy using it, for several reasons.

First, WordPress has always felt very slow to me. Even on a dedicated VPS with barely any traffic, the web site just seemed to pause for a second to think before sending back any content. I never really understood why it should be so slow, especially when hardly anyone was actually visiting the site. I can’t point to any single bottleneck in the code, but that’s just how it feels to me. Big and slow.

Second, despite the fact that WordPress includes Michel Fortin’s port of Markdown, the two still don’t play very nicely together. I’m sure it has something to do with the whole Text Flow vs. Markdown clash, but I just don’t have the time to look into it. When it comes to text formatting, WordPress definitely tries to do way too much right out of the box.

Then there’s the admin interface. I don’t think I’ll ever quite understand why the WordPress devs decided they could do better than the folks at Happy Cog, but I felt a huge loss of desire to use the software when they ditched Happy Cog’s beautiful design for the 2.8 interface. The gray is so uninspiring and ugly, it’s actually very difficult for me to actually have the desire to log in and use it!

Exit WordPress

Thus, I determined for better or for worse that my beloved WordPress blogging platform had to get the axe. But what would I use instead?

I looked at a lot of different alternatives including Expression Engine, Movable Type, Tumblr, and even Mephisto, but they all seemed just a tad overkill for what I really needed. And besides, there was no real guarantee that I wasn’t going to end up with the same problems I was experiencing with WordPress.

In the end, every pre-packaged piece of software asks you to learn some new templating system along with a new way of organizing your content. To tweak everything to be just the way you like it can take weeks, assuming it’s not your full-time gig.

Time for Something Else

After giving it a good think I decided the easiest thing to do would be to roll my own simple blogging system using the powerful tools available in the Ruby community.

I realize this probably sounds a bit crazy to someone who doesn’t write code for a living. I mean, why write your own platform when there are so many freely available? Surely the amount of time required to write your own blogging system far outweighs the time it takes to learn the intricacies of one of the others, right? The answer: you’d be surprised.

The requirements of my custom blogging platform were very simple. With it, I wanted it to be able to:

  • Use Markdown for all of my writing
  • Provide syndication via Atom
  • Give readers the ability to search and browse archives of old posts
  • Assign tags to posts
  • Assign alternate URL’s to posts that are merely commentary about someone else’s writing
  • Be very fast

The Tools

Using Sinatra and his friend Rack, I was able to implement most of the above functionality in about a week’s worth of spare time. I used Builder to create my Atom feed and standard ERB for my templates. It was a breeze to implement Ferret for searching and indexing, especially given the wealth of documentation available.

For speed, I set up a Thin cluster behind Nginx and I cache everything I can on the client using HTTP’s Last-Modified header. It feels very snappy right now, but if this proves to be too slow in the future I can always generate cached versions of the HTML files and put them in a place where Nginx can find them and serve them quickly without ever resorting to the cluster.

I deploy the entire project to my slice on Slicehost using Capistrano and manage the repetitive tasks with Rake. I write all of my posts in a text editor and save them as flat files that are formatted later using RDiscount.

Every single tool that I mentioned in the last three paragraphs (with the exception of Nginx) is an open source Ruby library. Let me just say that Ruby has some absolutely fantastic tools for web development!

Now I have a fast blogging system that is custom built to suit my tastes in about 800 lines of Ruby code. There is no black box, no magic going on behind the scenes. I know every single thing that is happening and exactly how it’s happening. If something breaks, I’ll be able to figure it out very quickly. If some cool new web service comes along that I want to subscribe to, I don’t have to go hunting for a plugin that suits my tastes. Instead, I can easily roll it into my own system without too much hassle.

Perfect.