Patrick M Brennan
Home | Writings | Resume | Links | RSS Feed
A Proud Member of the Reality-Based Community
About Me : I'm a grownup nerd living in the Boston burbs. I write computer programs for a living and plays for fun. I'm married to a wonderful woman, and we share a nice little house with our daughter and our cats. I'm a humanist, a technologist, an artist, and an idealist. I believe in reason, freedom, love, equality, and democracy. (Did I mention that I'm an idealist? I did, OK.) I'm also a pragmatist and an empiricist. I reject ideology and dogma, especially when they conflict with practical facts (i.e., pretty much always). I particularly hate willful ignorance, which tends to go hand-in-hand with ideology and dogma.
Like the alignment of the planets, this blog gets updated as I have the time, inspiration, and inclination to do so.

Thursday, January 13, 2005

No, Dice

if (threshold = salary_sucks) { goto=dice.com(); } else { suck.it.up; } end

I just saw this ad online. I assume that it was meant to impress coders, but it had the opposite effect on me. I looked at this ad and I saw seriously broken code.

This code seems to have been meant to look like one of the C-derived object-oriented languages: C++, C#, Java, or JavaScript. It's broken in a lot of ways:I thought about rewriting the code to express a more coherent idea, and do it with plausible code, but this is the best I came up with:

if (You.canWriteCode()) {
   You.writeCode();
   You.salary = BigBucks;
} else {
   You.writeAdCopy();
}

posted by Patrick Brennan 4:13 PM | link

0 comments

Patrick M Brennan Programmer, Playwright, Righteous Geek