Monday, 27 June, 2005

Does system configuration really have to be this difficult?

If I were to formalize my approach to debugging, the first rule would be "identify the cause of a problem before you attempt to fix it."  Poking around making changes that might possibly fix the problem without first stepping through the code and seeing where things go wrong exposes you to several risks:  you can make the problem worse, you can create other problems, or you can mask the original problem temporarily only to find it reappear at some later time.  Unless you know what's causing a problem, you cannot reliably say that you fixed it.  The worst thing that can happen is to have a bug "just disappear."

That rule holds for debugging other things, too.  You wouldn't start randomly replacing parts on your car to eliminate a squeak, or go out and buy a new battery without first testing and re-charging the existing one.  The process of debugging is methodical:  locate, as closely as possible, the cause of the problem, and then change one thing at a time until the problem is solved.  Any other approach is a waste of time and an invitation to cause more problems.

As computers and operating systems have become more complicated, it's become increasingly difficult to locate the causes of problems.  For any given set of symptoms, there are untold possible culprits.  Is it a hardware or software problem?  Is the problem with the driver, the application settings, or a conflict with another program or device in the system?  I've seen Microsoft Word crash because of a bad video driver.  Why the video driver should cause an application program to crash is beyond me, but it is (or at least it used to be) fairly common.

Of all the subsystems I've had trouble with over the years, sound has been the worst.  In the 13 years or so since I've had sound on the computer, the only one I never had trouble with was the original SoundBlaster that I bought in 1992 or 1993.  Low audio, excessive hiss, inoperative microphone, IRQ and driver conflicts, application conflicts or poor application software, you name it and I've probably experienced the problem.  I have no idea why the sound subsystem has to be so difficult.

Today I was trying to use the integrated SigmaTel sound hardware on my laptop to record some speech, and I couldn't get any audio.  My first suspicion was that the microphone was bad, so I tried a different one.  No dice.  I booted my old system and plugged my headset into that.  The microphone worked like a champ.  So the problem is with the laptop.  I poked around in the settings, but didn't find anything promising.  A quick search of Dell's support site revealed that there is a new driver (released on June 20) that addresses some problems.  Downloading and installing the new driver didn't fix the problem.  Then I ran the diagnostic utility.  It showed that the hardware was working fine, and when I ran Sound Recorder again it actually recorded my voice.

Why did running a diagnostic change the behavior of the sound subsystem?  Will I have to run the diagnostic so that it can perform some magic every time I want to use the microphone?

When people learn that I program computers for a living, they often ask me if I can help them with a problem.  My standard response these days is:  "I just program these machines.  I have no idea how to actually use them."  They laugh, but there is quite a bit of truth in that statement.  I like for things to make sense, and as time goes on there is less and less sense to be made out of configuring my computer.  Maybe I'm just getting old.