FacebookTwitterGoogle+Share

HERE’S YOUR DAMN BLOG BRAD

This post was written by Shaun.

I’ve noticed a strong tendency among programmers to be extremely judgemental of other people’s code. It seems you can’t throw a rock without hitting a programmer who is rolling his eyes at someone elses code. I have never had a conversation about debugging, refactoring, maintaining or expanding a previously developed code base without someone questioning the abilities of the people who were working on it before.

Surely there aren’t that many bad programmers out there? I think there’s something about the solitary nature of programming, and the sometimes deeply personal notions of style and elegance that cause people to turn their noses at other people’s code. It doesn’t take much work to see it in action. Visit any forum where coding comes up as a topic of discussion. Inevitably some squabble will break out about the proper way to address a common problem, or even the proper way to format your whitespace. Even while being helpful people are belligerent. Read any response to a common beginner question and you’ll almost always see at least one person chastising the rookie programmer asking the question for one reason or another.

And if you program, ask yourself how many times you’ve made excuses for your code when showing it to others. How many times have you apologized for the state it is in, or mentioned that you were rushed and that you would “clean it up” later. Why, if the code works, are we so afraid that others might see it? Because we know that inevitably there will have been better way to do something we’ve done? An easier approach, a library call we didn’t know about, a faster algorithm? We want to pretend like we knew that all along, we just hadn’t gotten around to implementing it yet.

I personally have given up on being judgemental. I think a big reason why is because I’ve been forced into writing bad code enough times now that I understand why good people will write bad code. It’s somewhat liberating to just make something work, performance and maintainability be damned. I still get nervous when people look at something I’ve made though. I still make excuses. But, that’s probably because other people are jerks and not as understanding as me.

 

Comments

  1. Karl says:

    I think programmers lack of a sense of limitations. Everyone believes that if you are truly a good programmer, and not just some wannabe coder wearing a mask of goodness, you will be invincible. You will be able to achieve the impossible and do it in time which is not only finite but also half of that which is alloted for the task.

    And perhaps we all feel we are capable of this, because we believe we are good programmers, and because we have the inherent programming trait of laziness. We say we can do this, but we say to ourselves that we don’t want to — because e.g. the code was not intended for other people to see, or this is not a project we care about but just something we were hired to do.

    I do believe good people can write good code. I have written some many fine algorithms that just make me look at them and go “man, that’s awesome, and so elegant.” Somebody else would probably have a different opinion. The problem is perhaps that these things usually exchange one thing for another — algorithmic elegance for clarity of code, memory usage for speed, any combination of factors that take a lot of intelligence to deal with in a manner appropriate to a given task. I would say, that fouling these up is excusable.

    However, often times we see bashed out code written without regard for available functionality, documentation, maintainability, or even buffer overflows. We have all written this code, due to time constraints, lack of care, or lack of knowledge about our environment. And we all look down on this code because we recognise it for what it is: a horrible piece of donkey poo that will probably result in a number of people’s days or weeks being utterly ruined due to systems failing from lack of scalability, products being taking down for work due to lack of maintainability, or credit cards being stolen by some hacker who happened to find a way to see the source code and just laughed, and laughed, and laughed.

  2. Brad says:

    wtf buffers can overflow now? :S

  3. J.R.P says:

    There is a bad programmer at my work. I wish i was allowed to throw rocks at him.

  4. Brad says:

    alternate solution: maybe don’t drive him to work?? 😛

You must be logged in to post a comment.