Coding Horror

programming and human factors

If Loving Computers is Wrong, I Don't Want to Be Right

I happened upon Russ Walter's Secret Guide to Computers around 1993. By then it was already up to the 18th edition.

The Secret Guide to Computers, by Russ Walter

The first version of The Secret Guide was published in 1972 as a self-typed 17 page pamphlet. The latest edition is a hulking 607-page monster, a rambling, zine-like love letter to the computer, in all its manifestations and permutations.

Russ alternately compares computers with drugs:

Computers are like drugs: you begin by spending just a little on them but soon get so excited by the experience -- and so hooked -- that you wind up spending more and more to feed your habit.

Your first computer experience seems innocent: you spend just a little money for a cute little computer. You turn the computer on, tell it to play a game, and suddenly the computer's screen shows dazzling superhuman colors that swirl hypnotically before you. You say "Wow, look at all those colors!" and feel a supernatural high.

But after two months of freaking out with your new computer, the high wears off and you wonder, "What can I buy that's new, exciting, and gives me an even bigger high?" So you buy more stuff to attach to your computer. Now you're in really deep, financially and spiritually. You're hooked. You've become addicted to computers. Each month you return to your favorite computer store to search for an even bigger high -- and spend more money.

Look at me. I'm a typical computer junkie. I've already bought 50 computers, and I'm still going. Somebody help me! My computers have taken over my home. Whenever I try to go to sleep, I see those computers staring at me, their lights winking, tempting me to spend a few more hours in naughty fun, even if the sun's already beginning to rise.

.. and sex:

The computer will fascinate you. It'll seduce you to spend more time with it. You'll fall in love with it. You'll start buying it presents: exotic foods (expensive programs to munch on), new clothes (a pretty little cloth cover to keep dust off), and expensive jewels (a printer and extra disks).

Then the computer will demand you give it more. While you enjoy an exciting orgy with your computer and think it's the most joyous thing that ever happened to you, suddenly the computer will demand you buy it more memory. It'll refuse to continue the orgy until you agree to its demand. And you'll agree -- eagerly!

The computer's a demanding lover. You'll feel married to it.

Marrying a computer is much groovier than marrying a person: computers are good at "getting it on" (they make you feel all electric and tingly) and they never argue (they're always ready to "do it", except when they "have a headache").

I wanted to call this book "The Sexual Guide to Computers" and put a photo of my computer wife and me on the cover; but some communities still prohibit mixed marriages. That cover would be banned in Boston, which is where I've lived. So I had to play cool and say "Secret" Guide to Computers. But here's the real secret: this book's about sex.

If you marry a computer but already married a human, your human spouse will call you a "bigamist" and feel jealous of the computer. Your marriage to that human can deteriorate and end in divorce.

Although it's primarily targeted at novices, I distinctly remember one long winter weekend in 1993 reading the entire Secret Guide cover to cover. Walter's enthusiasm rings through on every page. His no-nonsense, no-budget D.I.Y. ethos outshines any number of polished, soulless commercial books.

Russ is an interesting guy; there's a tiny biography of him in the "about the author" section of this book review. He also has the audacity to publish his phone number in the book, and encourage people to call him, any time, 24 hours a day, with only a few strings attached. His book is completely self-published under a "copywrong" license. And evidently he means it: he offers a CD-ROM version with the unabridged text of the book in various formats, and semi-authorized versions of the text are available all over the web. One of them even has a higher pagerank than his own site, which is unfortunate.

For more enthusiasm that borders on insanity, Russ offers samples of his books online. You can read 24 chapters of the latest edition of the Secret Guide, as well as 24 chapters of the companion book, Tricky Living. I long ago gave away my copy of The Secret Guide, but Russ is exactly the kind of guy I love to support, so I'll be buying new copies.

I also own Charles Petzold's book, Code. It's another love letter to the computer.

Code, by Charles Petzold

Instead of a long, rambling love letter, Code is a collection of elegantly written sonnets. It has an austere layout, filled with beautiful diagrams. It gently guides you through the history of the computer, at the lowest and most fundamental levels, from Babbage to modern times. But it's no less urgent in its affections.

Code is at the absolute opposite end of the spectrum from The Secret Guide. There probably aren't two more different books on the planet. But if you think Charles Petzold's any less dedicated than Russ Walter, consider this: which one has a Windows tattoo? And which one wears a witch's hat and red kimono over a monk's habit and roller skates to computer fairs? Well, sometimes love makes you do crazy things.

I'm with Petzold and Walter. If loving computers is wrong, I don't want to be right.

Discussion

Keeping Time on the PC

I have something of a clock fetish. My latest acquisition is a nixie tube clock from my wife, as a Christmas gift.

Nixie Tube Clock

My computers aren't just giant calculators, they're also clocks. Unfortunately, my nixie clock is a much more reliable timekeeper than any of my PCs are.

There's a clever PC time drift graph on this webpage derived from the difference between JavaScript time on the client, and the server time the webpage was sent to the client. It's not super accurate, because the resolution is only 1 second, and the time required to send the page to the client is a variable. But it's plenty good enough to illustrate my point:

Time Drift of Desktop PCs, in seconds

PCs aren't very accurate timekeepers. The distribution of times reported here is a little disturbing, as are the giant peaks on the extreme left and right of the graph. The PCs with wildly inaccurate clocks outnumber those with accurate clocks about 2:1.

PCs with correct time (+/-5 sec)~3000
PCs whose internal clocks are more than 8 minutes off~7000

You certainly won't mistake PCs for atomic clocks any time soon. I've noticed that my Media Center PC in the living room is losing a lot of time. It's frequently a minute or more off, even with internet time synchronization turned on in the Windows control panel.

date-and-time-properties.png

Right now it's fairly accurate, but Windows just performed its internet time sync. Normally you may not care if your PC's clock is off by 5 seconds or even a few minutes. But clock accuracy is important for a PC designed to record television shows that start and stop at specific times.

One way to "fix" a skewed PC clock, at least one that's connected to the internet, is to have it synchronize often with a reliable internet time source. Unfortunately, there's no visible UI in Vista or XP to change the synchronization schedule. MSKB article Q223184 appears to have a frequency setting, but this only applies to computers on a domain. On a domain, clients time sync with the domain controller-- a dedicated server. Of course, servers are still PCs, so their clocks aren't any more accurate than the one inside your desktop. However, servers tend to be synchronized much more aggressively with authoritative time sources. Compare this graph of observed webserver times to the one I presented earlier:

Time drift for webservers, in seconds

My computer isn't on a domain. Browsing around the registry keys, I found a SpecialPollInterval setting under the W32TimeTimeProvidersNtpClient key which looked promising. I did a web search and found this worldtimeserver.com page which confirms my finding. I changed the setting, stopped and started the w32time service, and it worked. The same page also describes how to add more NTP time server sources through the registry or at the command line. So my clock drift problem is solved, for the moment.

But this fix only addresses the symptom, not the problem itself. Why are PC clocks so inaccurate? Part of it is by design. An extremely accurate real-time clock isn't necessary for your PC to function, and adding one would probably add cost that OEMs like Dell, HP, and Apple don't want to bear. Most manufacturers opt for the "good enough" solution:

The real-time clock (RTC) built into most machines is far from reliable. Unless its battery dies or it encounters a Y2K problem, it does a fairly good job of remembering the time while the computer's power is turned off -- as long as you don't leave the computer off more than several hours, and don't care if the clock is wrong by a minute or two...or three...or more. The resolution of most PC real-time clocks is one full second, and most RTCs drift considerably over time. It is not unusual for an RTC to gain or lose several seconds or even minutes a day, and some of them -- while still considered to be operating correctly by the manufacturer-- can be off by an hour or more after a week or two without correction.

To be fair to the manufacturers, the real-time clock inside your PC is good enough for most purposes. One research study (pdf) corroborated this conclusion:

A typical accuracy of 35ms with respect to the UTC scale is attainable from almost any PC connected to the internet. This performance can be considered adequate for the vast majority of real-time data acquisitions, even in professional applications.

PC clocks should typically be accurate to within a few seconds per day. If you're experiencing massive clock drift-- on the order of minutes per day-- the first thing to check is your source of AC power. I've personally observed systems with a UPS plugged into another UPS (this is a no-no, by the way) that gained minutes per day. Removing the unnecessary UPS from the chain fixed the time problem. I am no hardware engineer, but I'm guessing that some timing signal in the power is used by the real-time clock chip on the motherboard.

There is an entire class of software problems, bugs, and exploits involving the system clock. Whether it's set to the wrong time, or it's drifting too quickly or slowly, the results can be unexpected or possibly painful. Here are a few I can think of offhand:

  • You can't sync your clock with a NTP source if the clock is already too far out of date. How ironic.
  • Some versions of Windows will fail during the setup phase with a cryptic error if the clock is set to a very old date.
  • Kernel hacks can speed up or slow down the clock to facilitate cheating in online games, as related in this article. I remember this exact hack happening in the original Counter-Strike; there was suddenly a player on the map running around at breakneck speeds, gunning everyone down before they could respond.
  • Some encryption techniques and login mechanisms (Kerberos) will fail if the system clock is too far out of sync.
  • A recent Vista activation hack involved setting your system's date back in the BIOS prior to install.
  • It's theoretically possible to attack servers by measuring their clock skew. I'm extremely skeptical of this particular attack, but clock skew is an interesting fingerprint.

I haven't even touched on the tricky issue of synchronizing events between PCs, each of which will have their own idea of what time it is, and how fast time is advancing. This can lead to some problems, as noted in the NIST document Configuring Windows 2000 and Windows XP to use NIST TIme Servers (pdf):

The time clock in the computer is used to keep track of when documents (files) are created and last changed, when electronic mail messages are sent and received, and when other time-sensitive events and transactions happen. In order to accurately compare files, messages, and other records residing on different computers, their time clocks must be set from a common standard. It is particularly important that computers that are networked together use a common standard of time.

We tend to think of time as an absolute, a universal interval that is the same everywhere. But inside the PC, time is a malleable material. We can go forward into the future, back into the past, or even change the rate of time's passage. This is something that's easy to forget when you're developing software, and it can definitely come back and bite you.

Discussion

On the Use of Cliches

This Gawker post on blog cliches hits very close to home. It's an "annotated list of words, phrases, and terms that have long overstayed their welcome in the media-blogosphere." I'd have to agree. I'm guilty of a few of these, too.

  • Best. [ultimate thing or experience.] Ever/Evar.
  • [undesirable counter-example], not so much.
  • FTW, O RLY, lol, FTL, OMG, FWIW, btw, PWND, ROTFL, etc.
  • [negative experience, situation, or description]; I just threw up a little bit in my mouth.
  • [purposefully non-ghetto statement], yo.
  • [undesirable conclusion]. Oy.
  • [amazed paraphrase of opposing position]. Seriously? Seriously?
  • What's next? [outlandish scenario]?
  • I'm looking at you, [example of complaint].
  • Um, [condescension]?
  • [Argument], wait for it, [rhetorical flourish].
  • [Undesirable experience] made my [sensory organ] bleed.
  • [adjective]-y goodness
  • [any word]-gasm
  • [x] is the new [y].

There are a bunch of good suggestions in the comments as well:

  • Let me see if I have this straight. [outlandish scenario].
  • No, really.
  • I heart [object, person, place, or thing].
  • [statement]. Meh.
  • Mr. [Blank]y Mc[Blank]erson
  • I want those (x) [minutes, hours, days] of my life back.

Some of these catchphrases are fun – in moderation. But you have to be aware that you're using a common catchphrase, and you should use it selectively and judiciously. Most people don't realize how often they're using a catchphrase, which is why they become overused and cliche in the first place. Using a catchphrase is like ending a sentence with an exclamation point: rarely necessary, but when it is, time it for maximum impact.

If you're worried you might be inadvertently relying on cliches in your writing, try cutting and pasting some of your prose into the online clich finder. It's based on the Associated Press Guide to News Writing.

I try to avoid cliches in my speaking and writing by intentionally mixing things up. I refrain from using the same words, the same phrases, the same stuff too often. There are a million ways to communicate any idea. Why limit yourself to narrow, predefined patterns of thinking, writing, and speaking? Stretch a little. Explain it a different way this time. Rephrase. Restate. Riff on the topic.

Using cliches is fine; just be sure you aren't using them as a substitute for real communication.

Discussion

Is your PC capable of Hi-Def?

As I recently discovered, playback of high definition video is very demanding. You'll need a beefy PC to achieve the holy grail of maximum 1080p (1920x1080) resolution playback. Here are the minimum system requirements according to Cyberlink:

  • Very fast single core CPU (3.2+ GHz Pentium 4, 2.0+ GHz Pentium-M, 2.4+ GHz Athlon 64), or almost any dual core CPU
  • NVIDIA 7600gt or better, or ATI X1600 or better
  • 512mb system memory, 256mb video card memory
  • for digital HDMI output, a certified video card with HDCP support and a HDMI connector

If you're wondering how your system stacks up for high-definition video, Cyberlink offers its BD / HD Advisor software, which runs through the requirements checklist automatically. Here's how my current home theater PC scored:

cyberlink hd advisor screenshot

Cyberlink's tool is helpful, but it's also a subtle sales pitch for their PowerDVD Ultra HD playback software, which was just released a week or so ago. That's fine by me; I already use PowerDVD to enable DVD playback through Windows Media Center. It's the least problematic of all the DVD software I've tried, and believe me, I've tried all the major players at one point or another.

Most of the system requirements for Hi-Def are reasonable, but the CPU requirement is off the charts, even by modern gaming standards. Those insanely high CPU requirements are there for a reason. I can personally vouch for that. Although the Pentium-M chip in my home theater PC is overclocked to 1.75 GHz and has a full 2 megabytes of L2 cache, it can't play 1920x1080 (1080p) content without massive stuttering. It's possible the GPU could offload some of the work from the CPU, but getting GPU decode acceleration working is a crapshoot at best. Fast dual core CPUs are cheaper and certainly simpler than dealing with the hassle of offloading the decoding to the video card.

For most modern systems, all you'd have to do is..

  1. Drop in a new video card, one with HDMI output and HDCP support. There are a number of these on the market now; just look for the certified models with the HDMI connector. You will pay a premium over the standard DVI and VGA models, but it's not prohibitive. Capable HDMI+HDCP video cards can be found for under $150.
  2. Add a HD-DVD or Blu-Ray drive. Internal Blu-Ray drives go for around $699 now. Unfortunately, there are no commercially available internal HD-DVD drives available at the moment, only the (amazingly cheap) external $199 Xbox 360 add-on, which also works on the PC.
  3. Purchase HD playback software, such as Cyberlink's PowerDVD Ultra. No high-def playback capability is built into any OS that I'm aware of.

My HTPC uses an analog VGA connection, so it neatly bypass any HDCP requirements. I don't need to buy a new video card unless I want digital output; my old workhorse Radeon 9600 has 256 megabytes of memory and enough muscle to handle very high resolution analog video playback. But then there's this ominous disclaimer on the Cyberlink page:

Note: Some Blu-ray Discs or HD DVD titles may require a digital output instead of analog. In this case, the digital output requirements listed above must be satisfied in order to play those titles.

Scary stuff. Gotta plug that pesky analog hole eventually, I suppose.

Most of this is moot to me, as my home theater PC is currently connected to my EDTV plasma, which is only capable of 800 x 480. It's a perfect resolution for DVDs, but high-def, it ain't. Still, I like to think that this system would be capable of 720p (1280x720) playback if I had a reasonably cheap HD or Blu-Ray drive to drop into the drive bay.

Discussion

Will your next computer monitor be a HDTV?

Instead of one giant monitor, I'd rather have multiple moderately large monitors. I'm a card-carrying member of the prestigious three monitor club. But giant monitors have their charms, too; there is something to be said for an enormous, contiguous display area.

But large monitors tend to be inordinately, prohibitively expensive all out of scale to their size. Consider Apple's monitor line:

30" Apple Cinema HD Display2560 x 1600$1,999
23" Apple Cinema HD Display1920 x 1200$999
20" Apple Cinema Display1680 x 1050$699

30" is nice, but you're paying 2x the price of the 23" for 1.7x the number of pixels. And then there's that insanely high resolution. Additional resolution is always welcome, of course, but resolution has some pitfalls of its own. Greg Vederman, the editor of PC Gamer magazine, explains:

30-inch wide-screen displays are all the rage right now - seems like everyone wants one, and when people post saying that they've purchased one, the crowd does a lot of "oooh-ing" and "ahhhh-ing" over it. But, folks, I'm starting to think that the far more affordable 1920x1200 24-inchers are the true sweet spot. Not only is 1920x1200 a more easily attained resolution for most modern video cards, but counter-intuitively, text and fonts are larger on 1920x1200 24-inchers than they are on 2560x1600 30-inchers. You read that right: you'll have to sit closer to a 30-inch monitor than you will a 24-inch monitor in order to comfortably read text.

Vista is more scalable than XP, but it's still a far cry from a vector-based, PDF style environment where everything scales perfectly to 1200 DPI or better. We still live in a bitmapped world.

But something very interesting is happening: the emergence of inexpensive LCD high-definition televisions. Greg Vederman relates his experiences:

I've been running my PC on a 37" 1080p HDTV (Westinghouse LVM-37W3) since yesterday morning in anticipation of a review I'll be doing soon, comparing it to a couple of the newest 30" monitors from Dell and HP. I have more testing to do, but barring some sort of catastrophic failure in the next several days, I'm sold on this TV's fitness as a PC monitor. It has a terrific picture, multiple input options (VGA, DVI, component, composite, S-Video), and costs hundreds less than any of the 30" monitors on the market today. Plus, with the Westi, I can comfortably kick back in my office chair and read cnn.com without straining my eyes. (30" monitors run at 2560x1600 natively, and I'm starting to think that that res is simply too high for "typical" use.)

[this HDTV] proves that at least some of the new, smaller, 1080p sets give PC monitors a real run for their money.

This compares quite favorably with the largest Apple display:

37 inch LCD HDTV apple-cinema-hd-monitor.jpg
Westinghouse LVM-37W3 HDTV
1920 x 1080, 37"
$1,099
Apple Cinema HD Display
2560 x 1600, 30"
$1,999

If you can deal with the lower DPI-- and like Greg Vederman, I'm not convinced the higher DPI of 30" computer monitors is always a good thing-- then LCD HDTVs look like an outstanding deal for large monitor enthusiasts. They're larger, and due to economies of scale, should always be substantially cheaper than computer monitors, too.

Assuming you can fit it on your desk, that is. Here's a customer-submitted picture from Amazon of the 37" Westinghouse on the Ikea Jerker desk. For reference, I have three 20" LCD panels in the same area on the exact same desk.

Discussion