Archive for June, 2008

“The Dangers of Auto-Replace”

Monday, June 30th, 2008

The humorous consequences of an automated editor.

“E-Mail After the Rapture”

Monday, June 30th, 2008

I’ve always liked Bruce Schneier, a very well-known security professional. Earlier this month, he tackled the thorny question of how You’ve Been Left Behind, a post-Rapture service for those who believe in that Christian concept, secures the information that you give them to ensure that it won’t be stolen or prematurely released.

If you’re not a believer, some of the comments below his article are rolling-in-the-aisles funny. (There’s one that mentions a parody site that’s quite humorous.) If you are a believer, I’d suggest simply reading the article itself.

Goodbye, Windows XP

Monday, June 30th, 2008

A sad farewell to Windows XP. It wasn’t the greatest, but it was a lot better than the piece-of-excrement successor that Microsoft is trying to force on everyone right now.

“Making vinyl records the old-fashioned way”

Monday, June 30th, 2008

It seems that the LP is making a comeback, thanks (indirectly) to the iPod.

“#ifdef Considered Harmful”

Saturday, June 28th, 2008

This is an old (1992) paper on writing cross-platform C programs, but it’s useful nonetheless. A lot of the problems highlighted in it have all but vanished over the intervening years, but the general ideas are still valid, even on Windows machines. (Have you ever tried writing a non-trivial Windows application, using the raw Win32 API, that’s portable between Win9x and NT-based systems? “Fun” doesn’t begin to describe it.) The solutions that they suggest are good ones, though the Boost libraries and projects like wxWidgets go a long way toward making them unnecessary.

#ifdef or #if defined?

Thursday, June 26th, 2008

One of my co-workers discovered an interesting item in the #ifdef/#ifndef entry of the help files for Microsoft Visual C++ 2005:

These directives are provided only for compatibility with previous versions of the language. The defined( identifier ) constant expression used with the #if directive is preferred.

(Update: The same statement is in the help file for Visual C++ 2003. I don’t know about Visual C++ 6.0, the version immediately prior to the 2003 release.)

Preferred by whom? And why?

The two are practically identical in use, and I tend to use both — “#if defined” is good for testing multiple things on a single line (combined with && or ||), “#ifdef” is more concise when you only need to test one thing (which is usually the case). So what’s the reason to “prefer” one over the other? A ‘net search doesn’t turn up any indication of one.

Microsoft doesn’t control either the C or C++ standards, so they can’t remove #ifdef from them. They also can’t unilaterally remove it from the compiler without irritating practically all of their customers (which they really can’t afford to do any further). Where do they get off claiming that one is “preferred”? It sounds to me like the kind of playground-bully attitude that Microsoft has become infamous for.

Paper Spam!

Thursday, June 26th, 2008

A friend of mine noticed that an envelope had been slid under his apartment door yesterday, containing a hand-written note:

Hi!

Every time I see you I think how beautiful and georgious you are and want to get to know you better.
Don’t get me wrong, I just want to be your friend.

If you are interested, I am your neighbor. My name is Travis and my phone number is [removed to protect the not-so-innocent].

Call me!

My friend is most decidedly heterosexual, and says that he “could not shred the thing fast enough!” :-)

My first thought, on the other hand, was that the message was very generic and could have equally well been sent to anyone — the hallmark of spam. I imagined someone desperate writing these out in mass quantities and papering the entire building with them, floor by floor, relying on the statistical likelihood that someone would bite… I really should stay away from my spam folder. :-)

“San Franciscans prep monument to US prez”

Tuesday, June 24th, 2008

The “George W. Bush Sewer Plant.” How fitting.

“Yes! It’s the Knight Rider satnav!”

Monday, June 23rd, 2008

This sounds cheesy in the extreme, but I want one anyway. :-)

“The Ultimate Code Kata”

Monday, June 23rd, 2008

Jeff Atwood has a good article on using practice-programming to continually hone your programming skills:

Contrary to what you might believe, merely doing your job every day doesn’t qualify as real practice. Going to meetings isn’t practicing your people skills, and replying to mail isn’t practicing your typing. You have to set aside some time once in a while and do focused practice in order to get better at something.

I continually stretch my programming skills, seeking out new and better ways of doing things and trying to find ways to incorporate them into my code. When the project I’m working on doesn’t lend itself to that sort of thing, or I find a neat-sounding technique that doesn’t fit with whatever I’m doing, I write a small test program to play with it, or (if I can’t immediately spare the time) make a note to do it later. I’d like to practice with another programmer as he suggests as well, but I just don’t know that many personally, and none of the ones I do seem to have the interest (or the time) for “mere” practice.

Designing and writing software isn’t something I do to make a living, it’s something I do because I love doing it. Being able to make a living at it is merely icing on the cake.