Aug 23

Stupid mistake: Forgetting to return a value

No matter how long you’ve been programming, you’re bound to hit a problem at some point which takes you multiple hours or days to fix, and which turns out to be a simple mistake on your part. This post is the first in a new series I’ll be writing on stupid programming mistakes I’ve made in the past (and that I’m not particularly proud of).

A couple of days ago, I hit a problem when testing the LAN Bridger central server, which is hosted on a Linux box. I do most of my development and testing on Windows, though, so as a result the LAN Bridger server runs on both Windows and Linux for ease of debugging. From time to time, and especially toward the end of a release cycle, I typically have to compile and test the server thoroughly on Linux to make sure everything works.

I usually do all of my testing with debug builds (contrary to Ken’s beliefs). Once I’m sure everything runs smoothly and I don’t get any assertions or erratic behavior, I turn to release builds. In this particular case, the server worked flawlessly for debug builds, but exhibited a rather strange behavior for release builds. Read more…

Aug 12

Reflections on Hungarian notation

Coding style is very sensitive subject. The war on Hungarian notation, for instance, has been going on for ages and is still very much alive.

A few days ago I stumbled upon Herb Sutter’s latest remarks on his personal preference and some of the comments to his post sparked my interest. Read more…

Aug 10

I recently talked about how third-party applications sometimes have a bad influence on other applications. In this post, I’ll continue that series.

I just got a new laptop from work preloaded with the usual stuff such as an office suite and antivirus software. I tend to prefer manually installing only the software I need when I get my hands on a new computer, but since this was for work I was pretty limited in what I was allowed to do with it. So, I just shed a tear and then went along pretending I was happy.

Not surprisingly, it didn’t take long before I started noticing problems. Read more…

Feb 11

Be careful who you blame

Don’t you just hate it when people mistakenly blame Windows and Microsoft for operating system crashes? I do. Most people don’t realize that it’s often the fault of a third-party component such as a kernel-mode driver. It must be rough for Microsoft — or any operating system developer, really — to deal with being blamed for others’ faults.

The other day I caught myself making the exact same mistake, although in a slightly different setting. For quite some time, I’ve been having issues with Outlook 2003/2007. The application would hang for 30-60 seconds at startup and every time I received more than one e-mail. Outlook would always become responsive after a while, though, so I just ignored the problem and did other things during the wait.

This unresponsive behavior was particularly annoying if I was just opening Outlook to look up a particular e-mail and instead had to wait around for the application to load. I would see the same behavior if I received multiple e-mails and tried viewing the first one while the others were still downloading. Read more…

Jan 22

I expect you to log my data, sir

I’ve been struggling with this one for a while now, and after I lost yet another chat log I’ve finally had enough.

When I first started instant messaging way back in the days, I used Windows Live Messenger (or MSN Messenger as it used to be called). Even though Microsoft has added quite a few features that I find irrelevant and completely useless, and file transfers never seem to go any faster than 1 kB/s, I’ve stuck with it for the sake of compatibility with the majority of my IM friends, who also happen to use Live Messenger.

However, over the past few months I’ve noticed a disturbing trend in how Live Messenger stores my conversations: a conversation is only stored to disk once the chat window has been closed. That is, Live Messenger doesn’t log the conversation continuously like any other application would, but instead relies on the user to indicate that he’s finished. Read more…