Saturday, July 28, 2012

Immature Programming

The other day I came upon the following article:

"Microsoft Apologies for "Big Boobs" Coding Gag"

The short story, a Microsoft programmer had put "0xB16B00B5" (i.e. "big boobs") in some Linux kernel code.

I thought this quote in the article summarized my thoughts on the subject
"At the most basic level it's just straightforward childish humour, and the use of vaguely-English strings in magic hex constants is hardly uncommon. But it's also specifically male childish humour. Puerile sniggering at breasts contributes to the continuing impression that software development is a boys club where girls aren't welcome."
I couldn't agree more.

Then I paused for a second ...

While I like to think of myself as having always been the consummate professional, I suppose I was once younger and more immature.  I was once told the following "cool" hex string by an older programmer and put it into some code maybe 10 or so years ago:
#define _MAGIC  0xcafebabe
IMO not as bad as "big boobs", but not exactly good.

So when I was told this "cool" hex string, a younger version of me thought nothing of it.  The fact older colleagues also thought it was cool, probably established the idea this kind of thing was acceptable.

A now older version of me now would pause and think "I probably shouldn't."

So what's the lesson learned now that I'm a tad older?

A) I shouldn't encourage this by teaching it to younger engineers

B) I should never accept them in patches or let them get through code reviews.

Update (8/1/12):

Sigh, the ghost of 0xcafebabe affected me another time somewhat recently.  A colleague of mine had programmed:
When I had to write a new plugin, I copied his code to start the new one.  What did I put at the top of the file?
Well, the best thing I can do is admit the mistake, change the code, and be more conscious of this in the future.

No comments:

Post a Comment