Site icon Nick Bradbury

Start Coding Like a Cowboy

Given that I’ve been blogging since 2002, you’d think I would’ve written about software development many times. As it stands, though, I’ve written very few posts about programming. I think a big reason for this is because when I’m coding away like a madman, I don’t blog (or do much of anything else!) – and when I’m not coding, I don’t feel like writing about it.

But I’m in the middle of another coding frenzy right now, and this time I’m going to open the kimono by talking about a “memetracker” feature I’m considering for a future version of FeedDemon (screenshot). I enjoy memetrackers like Tailrank and Techmeme because they let me know what people are talking about, but I’d like to have a memetracker that looks only in feeds I’m subscribed to in FeedDemon. Not only would this inform me about popular topics, but it would also let me read multiple posts about the same topic at once so I don’t have to read them one-at-a-time as I come across them.

So, given that I’m supposed to be a seasoned, old school programmer, you probably think that I first sketched out some ideas for how this feature should work, and then followed some sort of formal design process before coding it.

Nope. I went straight to coding. No design. No plan. No nothing.

Now, before you label me a cowboy coder, let me explain. See, many times I’ve followed a more formal design process, only to run into some unforeseeable problem that stops me in my tracks once I start coding. More often than not, my logical design fails to predict the irrational behavior of some external process or service. For example, I’m sure I’m not the only aggregator developer who scrapped his initial design after discovering that a huge number of RSS feeds aren’t valid XML (“but I planned to use an off-the-shelf validating XML parser, dammit!”).

Rather than face that torment, I’ll often start coding away for the sole purpose of running headlong into the cruel wall of experience. FeedDemon’s memetracker is a good example of this, since I’ve already had to start over due to problems that I couldn’t have anticipated.

Here’s the fun part: a week or two from now, after I’m comfortable that the memetracker is working as intended, I’ll then throw the code away and start a more formal design approach. Cowboy coding is a great way to find problems, but it’s no good for commercial software – you’ve got to write well-thought-out code unless you’re willing to be buried in bug reports. So the goal here isn’t to complete a feature quickly (although that’s often a side effect), but instead to discover the gotchas up-front so you can design the feature correctly.

PS: I should add that I have no idea when this memetracker feature will make it into FeedDemon – it’s still in the hacking stages, so it may be a while before it appears.

Exit mobile version