Tracking down bugs

One of the hardest aspects of writing code is debugging it when it doesn’t want what you expect. In one of my past jobs, I was given the task of making a server stable which meant finding a bug buried in thousands of lines of code that I really didn’t understand. No one gave me a timetable on doing this, so I worked at it for over 4 months if I recall correctly. Turns out the problem was a bug in a driver that we didn’t even control; I put in a workaround and moved on.

Today I spent over 4 hours working with an excellent QA engineer to track down a bug; he did everything I asked him to do, sent me logs, reinstalled software, tried on a second machine, etc. Turns out that if I had read the log a little closer, I would have been able to fix the bug in minutes instead of hours. Having a QA resource like this makes it so much easier to find stupid bugs.

Stuffit Archives and .hqx encoded files

Stuffit products have been on my Macs for years and have done a wonderful job of compressing and decompressing. Stuffit Expander shipped with all versions of the Mac up until OS X Tiger. Now that zip is built into the OS and even has extensions for keeping the Mac resource fork (newer applications don’t use the resource fork anymore), I haven’t been able to come up with a reason to keep Stuffit Expander around except to deal with files I download that are still in .sit and .hqx formats. I find that some companies are still putting files on their websites with these extensions; if the app doesn’t have a resource fork, zip it. If it does or you want to customize the look, use a disc image (.dmg) and let a user download that. I think by now users are used to using disc images. Also, the disc image doesn’t need to be zipped or .bin put on the end; just make sure your web server serves up the .dmg file as application/octet-stream.

Passing off Windows software as Mac software

It amazes me that companies recompile their code to work on the Mac (either using cross platform GUI libraries or trying to make a Mac interface without basically ever using a Mac) and expect Mac users to not be offended when no real effort is put into making the app look like it belongs on a Mac. In one app I ran today they even used a screenshot of a Windows dialog in the dialog! As a die hard Mac user, I avoid software that is done this way as much as possible as it doesn’t instill confidence in me if they can’t provide a Mac user experience which really wouldn’t take all that much time. This is similar to my complaint about Palm applications in an article I wrote called “Common User Interface Mistakes. Some Real World Examples” published for the PalmSource Developer Conference, May 2003. In that article, I used screenshots to point out errors in user interface according to the Palm OS guidelines. One line that I really like from the article is:

If a developer didn’t care enough to spend an extra hour fixing the user interface and making it adhere to guidelines, did he or she cut corners when developing the application? This isn’t to say that an application with a good user interface operates better than one with a poor user interface or that a good application can’t have a poor user interface, but it may be indicative of the quality of the application.

HTML Email

Yesterday I received a message from the Palm developer program; it looked liked there was nothing in the message, so I poked around and found that it was an HTML formatted email. I’m a bit of a luddite when it comes to HTML email in that I completely oppose it. I go to great lengths to only display plain text email in Mail.app. I think my aversion to HTML email goes back to when I worked on Eudora with Steve Dorner. Steve opposed many things and he didn’t believe that HTML belonged in email which makes a lot of sense to me. One of my arguments against it has always been that I don’t want the sender of a message to force how the message should be viewed on me, in particular, the text color, text font, and text size. This argument doesn’t hold much water if you think about it; every website I visit forces me (more or less) to view it how the author intended. However, in most cases, people don’t go overboard in websites to display stuff in 20 point bold, red type, like I’ve seen in email. Why people do this, I have no idea.

I’m sticking to viewing plain text email.

GPS for Running

One of my goals is to eventually run a marathon (not sure if this will ever happen). In my reading today, I came across a press release from Garmin announcing Mac OS X support for their products. This is pretty cool and as I was reading about their support for the Forerunner 305 training GPS, I said to myself, I have to have one of those. It’s pricing ($350 on Amazon), but combined with their web site, you can overlay maps, elevation data, heart rate information, etc. Once they have OS X software, this will be killer. However, in the meantime I think it will be a decent device even if I have to hook it to my Windows box.

Stupid Patents (including software patents)

Today I read that Cingular has patented a way of generating an Emoticon (smilies, etc.). This seems insane that a patent be granted on something that has been in use for years. Cingular may have put a slight spin on it, but the Patent and Trademark Office doesn’t seem to have a clue about what constitutes a new idea. Speaking of patents, I’m not a fan of software patents as a simple idea that a developer codes up one day thinking that he is clever only to find out that he has violated a patent. If I patented every idea I came up with when writing code, I would never have time to actually write code as I solve problems and it really doesn’t matter how I do it in code, so I use lots of different techniques in order to get the job done. Hopefully the Patent and Trademark Office will learn to only patent really clever ideas and not stuff made up to extort money from others.

Bluetooth and the Intel iMac

After I setup the new iMac, I started testing it. One of the things I did was try to send a file from a Palm to the iMac via Bluetooth. Hmmm…didn’t work. Start thinking about this and turn off the Bluetooth keyboard and mouse. Presto, the file transferred without problems. Turned keyboard and mouse back on and it stopped working. This doesn’t bode well for our software; people already blame us for every problem on their machine, now I’m sure someone will say they can’t sync with a Bluetooth keyboard and mouse even though it is quite possibly not our problem. Lovely.

Other People’s Code – Open Source

I think that open source software (with license agreements that let me use it in commercial applications even if it means contributing my changes back) is great. We use it extensively in my work and have contributed back our changes as required in one component. Another component we use has proven to be a constant thorn in my side that I’m almost at the point that I’m going to scrap the code and write it myself; however, it does stuff that I don’t know how to do. I’ve had to fix this particular bunch of code twice in the last week. On a positive note, it keeps me employed.

New iMac

I picked up a new 17″ iMac running the Intel Core Duo today to do testing and development. I didn’t realize until I got home that I had the wireless keyboard/mouse model which wasn’t a big deal as it was only $60 more (the box doesn’t indicate this…not even the label, unless you can decode part numbers). Setting it up took a few minutes, but the wireless keyboard and mouse was kind of weird as it took awhile for the Mac to discover the keyboard and mouse after I figured out how to put in the batteries.

As I always use disc images for development so that I can wipe down a hard drive and start over, I plugged in my external 120 GB FireWire drive, partitioned it, booted from the CD and attempted to install the software. It failed. Turns out I had to switch from the Apple Partition Scheme to the GUID Partition Scheme. Yeah, that was an easy one to figure out.

I haven’t played much with the machine, yet, but will do so later after I finish imaging the drive.

Bluetooth Vodoo

I think that the concept of Bluetooth is great; allow devices to connect without wires. While there are standards on what to do, in my experience it just doesn’t work right all the time. With my cell phone, I still can’t get a headset to function properly. In dealing with software, I spent the last several days tracking down an issue customers were having with our software. As far as I can tell, it was Apple’s implementation of Bluetooth that got messed up on some people’s machines which caused our stuff to stop working. Of course, people blame us. Some day maybe I won’t have to fight technology to use it.