Site icon Nick Bradbury

It Sucks to Throw Away New Code

Earlier this year I wrote about the joy of throwing away your code.  It’s true – as a rule, programmers generally love getting rid of old code.  But I discovered a corollary to that rule: it sucks to throw away code that you just wrote.

I know because I had to throw away a ton of code I wrote last week.

You know that upcoming FeedDemon feature I wrote about in my last post, the one which shows where a shortened URL will take you?  Well, in my first design, it didn’t display a balloon tip with the long URL.  Instead, when you clicked a short URL, it took you to a separate preview page that looked like this (click to enlarge):

I spent a few days coding this, but when I sat back and looked at it, I wasn’t wild about how you had to click a short URL to know where it would take you – it seemed like an unnecessary step.  I decided it would be better to show the long URL as you hovered over a short URL, which meant getting rid of the preview page and adding the balloon tips.

I almost didn’t make the change since the idea of throwing away hundreds of lines of freshly-painted code was too painful, but in the end I convinced myself that making the feature more usable was more important than saving my fragile programmer ego.

Perhaps that’s a lesson for other programmers, too?  I’m sure there are countless features in other applications that could be greatly improved, but most developers can’t bear the idea of throwing out recent code (besides, we like to show off by adding new features, not rewriting existing ones).  But you know what?  I’d pay to upgrade several applications I use if the new versions simplified existing features without adding any new ones.

Exit mobile version