Mike Lynch (prawnwarp) wrote,
Mike Lynch

Code stink

This morning I had to dive into some code I didn't write to try to figure out why it was [boring technical details of the actual error omitted but it was broken, ok?].

You might have heard the term "code smell" - this code doesn't smell, it stinks. It stinks of many things, chiefly convoluted OO design with about thirteen too many layers of abstraction, and hideous brittleness, and dog poo.

I don't know how programmers can merrily write this stuff and not noticed the stench. Imagine a furniture designer building a chair. The chair has big spikes coming out of the seat. If you sit on it from the right side, it is very uncomfortable. If you sit on it from the left, not only do you get spiked, but the whole chair collapses under you, and a flag comes out of the chair on a spring. The message on the flag says "that was your fault, try again."

The designer would probably notice that there was something wrong with the chair well before any actual users got to try it out, but for some reason (actually I have a pretty good idea of what the reasons are but don't stop me, I'm being rhetorical) programmers will happily release code that is the exact equivalent of the unspeakable chair.
Tags: programming

  • Can't not

    I can't do it today - am refactoring a single component of the e-commerce thing I'm working on, and trying to get it to work and also be more…

  • Do what I goddamn tell you

    I think I'm entering the downswing of my love-hate relationship with Perl. Non-IT people can stop reading now. I just drove myself nuts trying to…

  • Why can't I program?

    It's just not happening today. Why can't I get information out of XML documents using Perl? Why are all the content strings empty when I can see the…

  • Post a new comment


    default userpic
    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.