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

  • Two more machine names

    To add to the themed list: swim-two-birds unthank chorazina chavignolles theleme summerisle triste-le-roy The last one I got today - my first…

  • Tea for dinner

    When I was a kid, the three meals of the day were breakfast, lunch and tea. "Dinner" was used for special meals one went out for, or a big lunch -…

  • Happiness

    She reads Nabokov, she thinks Ibsen's better than Shakespeare, and she's beautiful. She met my daughters, and my immediate family, last weekend, and…

  • 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.