Sloppy code mayhem

Today I got a bug reported. Shit happens, bugs as well.
I get very nervous when a bug impacts the user in an evident way, so I start working on it immediately. And then, there it is, covered in mist, the Pandora’s box.

We can summarize bugs in three major categories, by the way they impact morale.

a) the WTF bugs. The ones that “Oh my God WHY I haven’t noticed”, but they end up in an easy fix.
b) the OH SHIT bugs. The ones that have a relevant, long-term effect, and you have literally no idea on how to fix them, at least as long as you’re in your panic time.
c) the OMG I’m FALLING INTO A BLACK HOLE bugs. These are an obvious consequence of sloppy work, they live in sloppy code, feed themselves with sloppy data, in a sloppy flow.

Here it is, case C, right in front of my eyes, the day before the deployment of a relevant release no one really wants to deploy.

You have no choice but fixing it, but as soon as you touch it, you start a terrifying journey into a stupid, stupid world, where nothing makes sense, and everything has been built specifically to “kinda work”. It’s a film set for a western movie, where the whole town is made of cardboard and there’s literally nothing behind the front-of-houses.

To fix this kind of a mess, you need to burn down whatever that piece of crap touched and build it right. And it’s horrible.

But who the hell wrote this stuff in first place? Well, you.
See, coding is self-discipline in the first place, and as most things with “self” in it, it’s easily disturbed and implies a lot of things that can mess it up. Like self-esteem. And most selfies.
Hurry is your enemy. If, in a hurry, you code something faster than you thought you could, beware.

Of course, there will be people in suits pulling your leg to have you deliver that super feature in time, if not earlier.
Sure, there will be customers nervously replying “It’s not what I intended, give me what I want now”.
Accepting there’s a minimum standard in quality you can’t go below is the first step. Applying it every time is a journey where you may still fail this rule here and there, but at least you’ll be safe most of the time.

But a “do it right or don’t do it” when it makes sense, is worth your sanity. It’s an investment.
Work toward lowering the expectations on your speed while still providing accurate estimates, and raise the expectations on the quality you introduce. Sure, quality is harder to sell, people won’t grasp it immediately, but this is an investment as well. Being the most reliable coder in the hood is something that will pay off.

For what concerns me, this is going to be a hell of a day…


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.