more instant wisdom

The delete key is your friend. The less code you have, the less code you have understand, the faster the remaining code runs, and your builds will be done sooner. Omit needless junk, aggressively get rid of crap you don’t need, trash that “someday maybe this will be useful” stuff.

The probability of a disk failure is directly proportional to the amount of code that you have checked out but not committed. (I really like source code control systems that make branches and undo operations natural and cheap).

There is a special place in Hell reserved for engineers whose code works the first time.

Effective code review practice #1: “Of course we think that #define is clever.” [Sound of shotgun racking a fresh round, and a dog whines in anticipation]. “We’ll give you five minutes of keyboard time to clean it up to our satisfaction, or a fifty yard head start, your choice.”

When the clueless HR type on the other end of the phone (who is doing screenings) asks if you know “Object-oriented, real-time programming,” just say “Yes.” Don’t try to explain. They think they are asking you if you know how to do “Garbledly shuggoth rumplestiltskin-sh’bop,” and explaining that shuggothery and sh’bop are really aspects of the same narkle-qwerty-doo-wah-wah is just going to make them think you don’t know what you’re talking about. I’m just sayin’.

Author: landon

My mom thinks I'm in high tech.

8 thoughts on “more instant wisdom”

  1. And this new entry proves that this is the best blog known to mankind. Bravo, Landon..once again you have made my day 😛

  2. Very nice!

    Additional code peeve: One ternary operation is okay. I personally prefer you stick with IF/THEN structures for readability but I’ll let one go. Embedding ternaries within each other is grounds for immediate execution. 🙂

  3. Ternary: We string them up by their “?”s and colons and leave them there for a few weeks. It’s only fair. The birds do most of the cleanup.

  4. Less lines of code = less bugs for the testers to find.

    Oh, and ternary operators…

    I once swore blind I would KILL anybody I ever found who wrote something like this:

    IF ( a ? b : c ) THEN …

    And then one day about 2 years ago I had a devilish problem on a small embedded micro which was short of resources. I struggled for days to find a way to do what I wanted to do without using the construct above. Couldn’t.

    So I did it and wrote 20 lines of comments explaining what it did, how, and why this method was preferable to anything else.

    Most sins can be forgiven by application of descriptive and explanatory comments.

    But this:

    nurgle_counter = 1; /* Initialise the nurgle counter to 1 */

    Requires the author to be taken out and slowly tortured.

  5. cant beat one of my fellow cs student’s

    int main() /*this is main what returns int*/


    seriously….i cried a bit.

Leave a Reply

Your email address will not be published. Required fields are marked *