Coding Horror

programming and human factors

Why Estimate When You Can Measure?

Wanna lower the noise of your computer? Stop burning 450 WATTS of power to browse the web or send email.

Don't see any moving parts on your gameboy do you? Or your PDA for that matter. If desktop computers were made of APPROPRIATE parts instead of the "my computer has to be faster than yours" parts we'd have silent desktops that run in under 20 Watts of power that cost 150$ and run whatever OS you choose.

Anything short of this and you're doing to noise what we do to heat, moving the problem elsewhere. You could [for example] pump ice cold water over the heatsinks and keep the pump outside, in the basement, etc...

But that's just moving the problem elsewhere and not really solving it.

The solution is more scalable computing or appropriate choices. There is no reason, for example, why the P4 idles at 400Mhz and the AMD64 at 1Ghz other than the design can only scale so far. This matters a bit more in laptops where every mW counts.

-- slashdot poster

I don't really read Slashdot, but someone forwarded this post to me, and I had to laugh. Pointing out the direct relationship between power consumption and noise is accurate enough, but.. 450 watts? I don't think you can realistically build a desktop computer that uses 450 watts!

Kill-a-watt meter

We don't need back of the envelope estimates to show how ridiculous that figure actually is. We can just measure the power usage with our trusty $30 Kill-a-watt watt meter.

For my work PC, which currently contains the following items:

  • Athlon X2 4800+
  • GeForce 6600 video
  • Maxtor 300gb SATA HDD
  • GeForce 5200 PCI video (for 3rd display)
  • 2gb PC3200 DDR RAM
  • generic DVD-ROM

The Kill-a-Watt tells me I'm pulling this much power from the wall socket:

Idle windows desktop118w
Defragmenting hard drive122w
1 instance of Prime95147w
2 instances of Prime95 (affinity set)177w
Battlefield 2 demo172w

Now, that's power draw at the wall socket. About 25 percent of this energy is lost in the power supply as it converts from wall power to something the PC can use. So the actual peak power usage of my work PC is around 132 watts. And that's a fairly beefy PC, probably unrepresentative of the vast majority of current desktops.

It's amazing how much you can infer from such simple, basic data collection:

  • Each "core" of the X2 4800+ consumes 30 watts
  • The GeForce 6600 video card consumes 25 watts
  • The 300gb SATA hard drive consumes 4 watts

We could go a lot farther, but the whole point is that we don't have to. As estimates go, these are backed by supporting data. And that's a lot more useful than the unsubstantiated wild guessing of random Slashdot posters.

Even outside Slashdot there are still plenty of people who will swear up and down that you absolutely must use a 500+ watt power supply for a new high-end computer. Why spread guesstimated misinformation when you can simply measure the power usage with a widely available $30 device?

Estimating is only necessary when you can't easily measure. When you meet people like this, gently urge them to stop estimating and start measuring.

Discussion

Vision Quest

If you asked each member of your team why they were working on what they are currently working on, what would they say? Could they even give you a coherent answer? If they did, would their answers all agree?

All too often, I see developers working without a clearly defined goal. I don't mean a boring 12 page design spec. I'm talking about a simple vision statement everyone can rally around: here's what we're doing, and here's why it's going to rock. Short, succinct, and clear. Like an internal elevator pitch.

In Scott Berkun's new book The Art of Project Management, he notes something I've observed repeatedly: most projects have no vision statement. And those that do are generally mind-numbingly bad:

I've read dozens of vision statements in my career, and there are certain patterns the bad ones share. Lame visions have no integrity; they don't offer a plan, and they don't express an opinion. Instead, they speculate, and avoid the possibility of being wrong. If the vision doesn't take a clear stance on what should happen, the team leaders will never fully invest emotionally in the effort, setting up the project for failure.

Scott also provides a helpful catalog of lame vision statements:

The Kitchen Sink
Maximize our customers' ability to get their work done
Too broad to be useful. This is a mission statement for an organization, not a vision for a project.
The mumbo-jumbo
Develop, deploy, and manage a diverse set of scalable, performant, and strategic knowledge management tools to best serve our constituents, partners, and collaborative organizations, improving the possibility of overall satisfaction among our diverse customer profiles
This is committee-speak jargon. It uses complex language to hide the absence of strong ideas. No one can figure out what this means and therefore it's useless.
The wimp-o-matic
We may eventually consider trying to do something that's kind of better than what we've done before. At least that's what we think our vision should be now. But don't go too far because we think it might change again pretty soon.
Everyone will see how spineless this is. There's nothing for the team to rally around.
What the VP wants
Mr. VP's vision for our corporation is to be the best producer of widgets in mid-size markets, and we will work very hard to live up to Mr. VP's standard, using every resource at our disposal to make this happen.
"I said so" is not a supportable argument. VPs are obligated to provide reasons for important decisions. That's what the vision is for.

As an example – perhaps the canonical example – of a great vision statement, Scott points to the project goals for the original circa-1996 Palm Pilot:

  • Size. Fit into a shirt pocket. Light enough not to feel unwieldy.
  • Cost. Less than a luxury paper organizer ($300 US).
  • Simplicity. As simple as paper. Turns on instantly. Uses simple conventions.
  • Sync with PC. Use the PC as a common point of interaction.

A vision statement isn't just marketing weasel-speak – it's the soul of your project. And who wants to work on a project with no soul?

Discussion

Athlon X2: Dual Core Present

I've talked about Multiple Core CPU Futures, but how about the dual core present?

Athlon X2 4800 and Task Manager

The Athlon 64 X2 is now widely available in both OEM and retail* packaging, ranging from the 4200+ to 4800+. AMD just released a cheaper Athlon 64 X2 3800+ at under $400. As a developer, you will not find a CPU that compiles code faster. In fact, it's not even close. So what are you waiting for? You'll certainly need something to counteract VS.NET 2005's higher system requirements.

* The retail package includes, by far, the best stock heatsink I've ever seen-- it's a thin-fin aluminum affair with copper inlay and two heatpipes. If you can get the retail box for not much more than the OEM, it's definitely worth it. And you get an AMD X2 sticker, too. A STICKER!

Discussion

Steve Ballmer: Sweatiest Billionaire Ever

Steve Ballmer has four words for you: I. LOVE. THIS. COMPANY. A colleague recently pointed me to a Steve Ballmer video I hadn't seen before; the one where he pitches Windows 1.0. All three of the Ballmer videos are essential viewing for any Windows developer:

I love the fact that Steve Ballmer is a billionaire 12 times over, and yet he isn't afraid to get up on stage and make a complete and utter ass out of himself. You have to respect a man with that much unbridled enthusiasm. I certainly can't see staid, boring old Michael Dell dancing around on stage, screaming about how much he loves his company at the top of his lungs. Steve Ballmer is unique:

Steve Ballmer can be so zealous in expressing his enthusiasm that once his vocal cords required surgery after he screamed "Windows, Windows, Windows" continuously at a Japan meeting in 1991. When Microsoft celebrated its 25th Anniversary in 2000, CEO Ballmer popped out of the anniversary cake to surprise the audience. His wild screaming and dancing on stage at an employees convention was caught on a widely-circulated video known as "Dance Monkeyboy." A few days later at a developers conference, a sweat-soaked Ballmer repeatedly chanted "developers" at least 14 times in front of the bemused gathering. Beyond his jovial image, this second cousin of famous comedian Gilda Radner is known to be a shrewd businessman with a flair to grab opportunities when they come.

Ballmer has also called Linux "communism" and the GNU GPL "a cancer". He advocates Digital rights management and has said that "DRM is the future."

Linux may have Tux, but we've got Ballmer. Pudgy cartoon penguin versus sweaty screaming billionaire? C'mon. That's not even close.

Discussion

What if it was infinitely fast?

When it comes to performance, there's always a bottleneck. The question is, which bottleneck? That's why one of the more interesting back of the envelope calculations is to ask, "what if it was infinitely fast?"

One way to make something infinitely fast is to make it a no-op. Instead of doing work, it does nothing. This is also known as "null driver" in hardware circles. It shows how fast your hardware could be given the limits of the underlying operating system infrastructure. Standard 2D graphics operations in Windows have been equal to null driver performance since about 1999:

Modern graphics companies concerned about 2D performance take something called a NULL driver -- a graphics driver than accepts the low level rendering commands but does no rendering work whatsoever -- and see how close they can come to its performance. Companies like Matrox are basically almost at the NULL driver performance in all situations.
This probably says more about Windows overhead than it does about actual 2D performance.

Gary Tarolli was the CTO of 3dfx Interactive. Their Voodoo series of add-on video cards pioneered real time 3D graphics on the PC. Gary had this to say about infinitely fast 3D hardware in 1998:

I just want to put in a few cents here. I know Voodoo2 relieves the CPU of triangle setup processing, however, that is all it relieves the CPU of. If a game is taking up 80% of the CPU time, which is not that uncommon, then even if we replaced our hardware with INFINITELY fast hardware, you only get a small increase in performance (1.25x). Voodoo2 isn't infintely fast, so the results are even smaller. Each game takes up a different amount of the CPU, so you will see different results for different games.

It's hard to imagine the CTO of a hardware startup actually answering questions about the product he designed in the newsgroups. Only in 1998, I guess.

AnandTech's review of the first affordable solid state hard drive offers a tantalizing glimpse of infinitely fast storage devices-- and some new bottlenecks we couldn't see before:

BenchmarkTimes faster
Business Winstone1.02x
Content Creation Winstone1.03x
Windows XP Boot Time1.5x
Battlefield 2 level load time1.3x
Photoshop CS load time1.7x
MS Outlook 2003 load time1.0x
693mb file copy3.8x

It's an interesting experiment. Kudos to Gigabyte for making a 4gb solid state hard drive affordable. All you need is $70 for the i-RAM device itself, and 4gb of PC3200 DDR RAM (at current pricing, $90 x 4). Sure, "under $500" isn't exactly cheap, but relative to other solid state hard drives, it's an incredible bargain.

Unfortunately, Having an infinitely fast solid state hard drive doesn't do a whole lot to improve raw performance. It's probably best used as a device to reveal where all the other performance bottlenecks are.

Discussion