Parallelizing Capistrano

On a recent project we ran into a situation where we needed a more advanced way of parallelizing Capistrano tasks than just using the parallel method it already sports. To jog your memory, parallel can run arbitrary shell commands in parallel on different servers. So if you wanted your webserver to already restart the processes while you restart your background processes, you can do it like this:

Mocking Is So 2008

Pat Maddox recently published a blog post on mocking called “You Probably Don’t Get Mocks.” I wanted to write something on my experiences with mocks for a while now, so here’s good reason to finally do so. I’m a recovering mock addict, if you will, so this is my retribution of things I learned over the last 18 months, and how my testing workflow changed with them.

Keep It Simple

It seems to be common sense these days to throw a search engine, a database slave or an external cache at your application in even the earliest stages of a project. Let me just give you my two cents on the issue, and why I think that’s a bad idea.

When Overusing self Turns Into self.pity

There’s something I see in lots of projects is an overuse of self. Sure, it looks a lot nicer than this, but its overuse can clutter code quite easily. Here’s a rather simple example.

Hello From Jekyll

I got a little sick of having to maintain an unmaintained blog engine (I’m looking at you SimpleLog), so I did what all the cool kids are doing, I switched the blog to using Tom Preston-Werner’s excellent Jekyll. I threw in a few tweaks of my own, and tweaked my Rakefile and Apache to support things that SimpleLog can do, but the static nature of Jekyll can’t. Thankfully, the URL format of both is pretty similar, so it was pretty easy to set up redirects from the old URLs to the new ones.