Slashdot Mirror


Bad Programming Habits We Secretly Love (infoworld.com)

snydeq writes: Breaking the rules can bring a little thrill — and sometimes produce better, more efficient code. From the article: 'The rules are more often guidelines or stylistic suggestions, not hard-and-fast rules that must be obeyed or code death will follow. Sure, your code might be ridiculed, possibly even publicly, but the fact that you're bucking conventions adds a little bit of the thrill to subverting, even inadvertently, what amounts more often than not to the social mores of pleasant code. To make matters more complex, sometimes it's better to break the rules. (Shhhh!) The code comes out cleaner. It may even be faster and simpler.' What bad programming habits can't you (or won't you) break?

7 of 497 comments (clear)

  1. Documentation by PvtVoid · · Score: 5, Funny

    From TFA:

    my friend wired together an Eliza-like AI to his editor, and voilà, every function had a few lines of "documentation." The boss wasn't smart enough to understand that the lines meant nothing, so my friend was off the hook. His code was officially documented. I think he even got a promotion!

    He should have been shot.

  2. Re:"The code comes out cleaner"? by EllisDees · · Score: 5, Funny

    Does it trump the "make the code work" rule?

    --
    -- Give me ambiguity or give me something else!
  3. Re:You're the problem by Anonymous Coward · · Score: 4, Funny

    Back during Y2K updates to our code base, we'd occasionally have to deal with code written by an ex-employee, who we'll call John. It was so bad that every time someone opened a file he had worked on you'd hear a loud "FUCK! Another John file!" over the cubical walls.

  4. Re:"The code comes out cleaner"? by Mikkeles · · Score: 5, Funny

    Ah, the "No True Clean Code" fallacy.

    --
    Great minds think alike; fools seldom differ.
  5. Re:Lessons by internerdj · · Score: 5, Funny

    "Think of newspaper headlines when commenting. Don't make somebody read the whole article to know what the article is about." You_won_t_believe_the_three_things_this_method_does(), This_method_just_announced_it_was_running_for_the_GOP_presidential_nomination(unsigned int year), Five_ways_to_make_your_integers_long(), ...

  6. Re:You're the problem by Translation+Error · · Score: 4, Funny

    Any fool can see that.

    --
    When someone says, "Any fool can see ..." they're usually exactly right.
  7. Re:You're the problem by jandersen · · Score: 4, Funny

    ...who we'll call John...

    ...a contractor I'll call Paul

    Right, so who's going to come up with George and Ringo to make up the full set?