May 12th, 2006

When people mimic the display rather than the actual data

I recall a bug that we were investigating that was being caused by a registry key being set when it shouldn’t have been. But when you looked at the key in Regedit, it say “(value not set)”. Why were we going down the “value is set” branch? A little spelunking with the debugger revealed the reason directly: Whoever set up that registry key wrote the literal string “(value not set)” to the registry! Thus, the value was set, to the string “(value not set)”! We were flabbergasted. The only explanation we could come up with was that whoever created the registry key didn’t understand that the “(value not set)” was shown by Regedit for a key with no value. Instead, they figured “Oh, I need it to look like that, so I’ll set the value to ‘(value not set)’. Now it looks right in Regedit.” Along similar lines, I’ve been told of a system which appeared to have two (Default) values. As you can probably guess by now, what really happened is that somebody created a value whose name was “(Default)”.

The moral of the story is not to confuse what something is with what something looks like.

Topics
Other

Author

Raymond has been involved in the evolution of Windows for more than 30 years. In 2003, he began a Web site known as The Old New Thing which has grown in popularity far beyond his wildest imagination, a development which still gives him the heebie-jeebies. The Web site spawned a book, coincidentally also titled The Old New Thing (Addison Wesley 2007). He occasionally appears on the Windows Dev Docs Twitter account to tell stories which convey no useful information.

0 comments

Discussion are closed.