Coding Horror

programming and human factors

Revisiting "How Much Power Does My Laptop Really Use"?

Back in 2006, I examined the power usage of my Dell Inspiron 300M laptop. It was the first ultraportable I ever owned, and I fell in love with it. I stuck it out as long as possible on that wonderful little laptop until the true heir to the ultraportable throne was unveiled: the Dell XPS M1330. The specs are much better, as you'd expect after almost five years. But what about power consumption? How much has that changed? Let's find out.

One of the key weapons in my geek arsenal is the Kill-a-Watt electricity usage monitor. Here's an action shot of me using it while building a PC:

Kill-a-Watt showing 220w power usage

I see that there's a newer, more advanced Kill-a-Watt model P4600 on the market now, but the modest P4400 I own is only 24 bucks and works plenty well enough for me. I know, I know, I'm always encouraging you to buy more crap. But this is something I really do use quite regularly. Here, I'll prove it:

And here I am today using it again. It's awfully handy to know how much power the stuff around your house is using. So let's get down to brass tacks on this laptop. Here are the specifications of my Dell XPS M1330:

  • Intel Core 2 Duo 2.0 GHz processor
  • 2 GB RAM
  • 32 GB solid state hard drive
  • 13.3" 1280x800 LED backlit display
  • NVIDIA GeForce Go 8400M GS video
  • Windows Vista Ultimate

It's not the world's fastest laptop, to be sure, but totally respectable for an under 4 pound ultraportable. Here are some baseline power usage measurements:

Laptop off, battery charging 54w
Laptop off, battery disconnected 0w
Laptop off, sleeping 0w
Laptop on, idle at Windows desktop 20w

I should point out that I'm using a very clean install of Vista, with most of the unnecessary background stuff disabled. I left the laptop in a typical real world configuration; screen brightness is at maximum, WiFi is enabled and connected to an access point, power management is set to the default of "Balanced". I let the machine quiesce for an hour at the desktop so all those background processes Vista loves to run were idle.

All the below tests were run with the laptop connected to AC power and the battery physically removed from the machine.

How much power does the LCD display use?

LCD brightness 7 (max)20w
LCD brightness 619w
LCD brightness 518w
LCD brightness 0-417w

How much power does the hard drive use?

HDD idle20w
HDD defragmenting23w

How much power does the onboard WiFi use?

WiFi disabled17.5w
WiFi enabled20w
WiFi bandwidth test24w

How much power does the CPU use?

CPU idle20w
CPU running one prime95 torture test50w
CPU running two prime95 torture tests63w

How much power does the video card (GPU) use?

GPU idle20w
GPU running rthdribl55w
GPU running ATITool 3D warmup40w

(The ATITool number is the more accurate one, as this particular 3D warmup "fuzzy cube" test exercises the GPU while only loading the CPU to about 14%, whereas the rthdribl test loads the CPU to around 50%.)

How much power does the integrated DVD drive use?

DVD idle20w
DVD spinning with disc inserted25w
DVD copying33w

How much power does the integrated CPU fan use?

CPU fan off20w
CPU fan low21w
CPU fan med/high22w

Realize that the Kill-o-watt is a fine instrument, but it's not scientifically precise. It's the overall percentages and patterns we're interested in more than the absolute numbers. The results are different than last time, yet the rules of laptop power consumption haven't fundamentally changed. Here's the data in chart form, with minimum and maximum power draw I measured for each component. The number in red is the difference between the two.

laptop power consumption chart

The top consumers of your laptop's power are the CPU, the GPU, the DVD, and WiFi -- in that order. So, armed with this data, how do we maximize our laptop battery life?

Some of this is fairly obvious. When you're on battery:

  1. Don't do anything with 3D graphics (gaming, etc)
  2. Avoid using DVDs
  3. Turn down the screen brightness 1 or 2 notches
  4. Avoid CPU intensive web pages or programs
That will get you most of the way there. It's tough to reduce your use of wireless on a laptop without sacrificing the essential laptop quality of portability. Beyond that, keep a serious eye on your CPU usage; you desperately want to avoid CPU intensive programs and websites while on battery. They'll kill your battery life far faster than anything else you can do with your laptop.

You could run Task Manager all the time, which shows a tiny graph of your CPU usage in real time. But do you really want to think about this? I recommend clicking on the little battery icon in the taskbar and explicitly enabling Vista's "Power saver" mode whenever you're on battery. This automatically enforces a CPU usage throttle of 50 percent. On a dual-core CPU, giving up one core is usually no big deal for most tasks.

Windows Vista power management plans

For even more battery life protection, you can edit the Power Saver plan configuration to set "minimum processor state" to something lower than 50%. Even 25% would be more than enough power for most things I do on this laptop.

Discussion

Donating $5,000 to .NET Open Source

Way back in June of last year, I promised to donate a portion of my advertising revenue back to the community:

I will be donating a significant percentage of my ad revenue back to the programming community. The programming community is the reason I started this blog in the first place. The programming community is what makes this blog possible. It's an open secret amongst bloggers that the blog comments are often better than the original blog post, and it's because the community collectively knows far more than you or I will ever know.

So, what's significant? Let's start with $5,000.

I've personally benefited most from the .NET open source community, which I feel is radically under-served by Microsoft, so I'll be contributing this money to one or more .NET open source projects to maximize its impact. And what's even more exciting is that I have a verbal commitment from Anand Iyer, a MS Developer Evangelist, for Microsoft to match my contribution. That makes a cool $10,000 we will be contributing to support open-source .NET projects!

As much as I abhor advertising, I'm tremendously excited to have the opportunity to share my advertising revenue with the larger .NET programming community. For me, that's the tipping point. Giving back to the community is what makes the pain of advertising worthwhile.

You may be wondering why I'm singling out .NET here:

Why am I focusing on .NET open source projects? In short, because open source projects are treated as second-class citizens in the Microsoft ecosystem. Many highly popular open source projects have contributed so much to the .NET community, and they've gotten virtually no support at all from Microsoft in return. I'd like to see that change. In fact, I'll go even further-- I think it must change if Microsoft wants to survive as a vendor of development tools.

I originally had grand plans of dividing the money up a few different ways, and setting up a voting system to determine which projects were awarded the various grants. I even considered a March Madness college basketball themed set of brackets and finals and everything. After agonizing over this process for months, I've decided that's too complicated. There are almost a hundred contenders, all of which have to be mapped to the criteria I defined for the grant:

  1. The project must use an open source license.
  2. The project must use a commonly available method of public source control.
  3. The project must provide public evidence that it accepts and encourages code contributions from the outside world.

I'm exercising my executive privilege and keeping it simple. I'm picking a winner and they get the whole $5,000.

The winner is still based on voting, of a sort; I did a word count on the comments to my original post. One project was mentioned over and over again in the comments, and it met all three criteria.

I'm proud to announce that this year's $5,000 .NET open source grant goes to ScrewTurn Wiki.

$5,000 check to ScrewTurn Wiki

This is like one of those exaggeratedly giant checks you see people winning on TV; it's for promotional purposes only. There's no actual check. The real money is being sent via wire transfer to Dario Solera, the ScrewTurn Wiki project coordinator. What's Dario going to do with this money? You'll have to ask him. That's not for me to decide. There are no strings attached to this money of any kind. I trust the judgment of a fellow programmer to run their project as they see fit.

(Microsoft's $5,000 grant will be handled independently; details will be forthcoming soon on that.)

I won't lie to you. It was easy to promise this grant money when I was essentially getting paid twice -- once by my previous employer Vertigo Software, and again by my blog via advertising revenue. That increasing sense of guilt over "double dipping" was one of the reasons I felt compelled to quit. But now that I have to cover the mortgage -- a crazy California mortgage no less -- with revenue from my blog, and the unknown future revenue from our upcoming stackoverflow.com, it's a bit scarier.

But I figure if it isn't a little scary, it's not worth doing.

And I have found that you get back what you give, many times over.

It's a small gesture, I know. But I believe in this stuff. I wouldn't have kept banging out entries on this blog for the last four years if I didn't truly believe in the power of programmers collectively building useful stuff together. Here's to Dario Solera, and all the ScrewTurn Wiki programmers -- and to the spirit of every programmer who has ever helped build something for the programming community.

And who knows -- maybe next year we'll even do this thing again.

Discussion

We Don't Use Software That Costs Money Here

Whenever the regular expression topic comes up, I unashamedly recommend the best tool on the market for parsing and building regular expressions -- RegexBuddy. But there's one tiny problem.

RegexBuddy costs money.

I've always encountered vague resistance when recommending commercial tools that I considered best of breed. The source of that resistance was spelled out for me by Henrik Sarvell in this comment he left on Rob Conery's blog:

Yes, I also have to brush up on the regex from time to time. We don't use software that costs money here, and last time I checked regexbuddy wasn't free.

People usually don't state their preferences this boldly. I, for one, applaud the honesty.

I've recommend Beyond Compare before; it's a fantastic file and directory comparison tool. It's not expensive, but it's not free, either. Which means many programmers I recommend it to will beg off and go install the free WinMerge comparison tool instead.

It's tempting to ascribe this to the "cult of no-pay", programmers and users who simply won't pay for software no matter how good it is, or how inexpensive it may be. These people used to be called pirates. Now they're open source enthusiasts.

(Update: This paragraph was intended to be tongue in cheek, but has been widely misinterpreted. Dan summarized my opinion in the comments: "in the past, if someone told you they used software and didn't pay for it, the only plausible interpretation was that they were a pirate, because all good PC software cost money. Now there's also good software available for free, so that assumption is no longer correct.")

But there's something else going on here, too: the free software alternatives keep getting better every year. Consider how immature Linux development tools were in 2000 compared to what's available today: Eclipse, Subversion, MySQL, Firefox. These tools either didn't exist, or have come astounding distances in closing the gap between their commercial counterparts in eight years.

PHP usage 2000 to 2007

PHP was dangerously close to a joke language in 2000, but you can barely go anywhere on the web today without running into something huge built on PHP. I could say the same thing about MySQL -- a toy database in 2000, but a totally credible free alternative to Oracle and SQL Server today for most uses. The competitive pressure of free products on commercial tools intensifies every year. It's relentless. And to be honest, I feel many of the commercial alternatives aren't evolving fast enough to stay ahead of their free competition.

The onus is on the commercial tool vendors to prove that they provide enough value to warrant spending money. In the case of Beyond Compare, the vendor has taken so long to ship version 3.x of their software that some of the free comparison tools have matched and even exceeded its feature set in the meantime -- as you can see in this amusingly titled comparison of file comparison tools. Resting on their laurels is a luxury they no longer have.

It's entirely possible for commercial development tools to survive alongside the strong, vibrant -- and now firmly established -- ecosystem of free tools. But it won't be easy, as Steven Frank points out in The First, The Free, and The Best:

A free program need not be glamorous or even completely bug-free. It can garner a respectable following simply by not costing anything.

I've seen many times people struggle and struggle on with a clunky freeware app just because they're not willing to pay $20 for a significantly better alternative. There's nothing wrong with that particular brand of masochism. People prioritize differently, and money is more valuable than time to a whole lot of people. It's Capitalism in action.

The people who are most tenacious about exclusively using freeware whenever possible are usually incredulous that anyone would buy a commercial product when a free alternative is available. I've heard many times, "how can you guys make a living when free command line file transfer clients are included with the OS?"

Beyond Compare was the best compare tool by far in 2005 -- an easy justification for spending thirty bucks on a compare tool. But no longer. They have to claw their way back to the top and become the best again in the face of endless free competition.

If you're neither first nor free, there is still a way to carve out a niche for yourself: have a better application than everyone else.

Quality is the third leg of the axis. A free app may not be worth what you paid if it doesn't work right, or works so clumsily that you have to re-read the help file every time you use it. The first app may be OK, but resting on its laurels of first-ness and not moving forward.

This phenomenon isn't limited to development software, although I think it's particularly vicious there due to the peculiarities of the audience: the type of people who would buy development tools are also exactly the same people who could potentially build them.

You may wonder how anything survives online in the face of free competition. Don MacAskill of SmugMug -- a pay photo sharing website -- offers this advice:

It turns out that people are happy to pay [for web photo sharing], and have been happy to pay for the last four years. The reason is that our pay service eliminates a lot of the baggage and a lot of headaches that at least some percentage of the population doesn't want. Quite of a few of the big brands have shut their free sites down. They shut them down without notice. It turns out that it's sort of like a death spiral. When you offer accounts for free, some garbage comes in with the good stuff. People will upload porn or whatever. So you end up hiring people to work at your company to filter out the bad stuff. I know Photobucket and Webshots and some of the other guys have an entire room full of people who, all they do all day is watch the photos that are coming in and say yes or no, this photo is OK or not.

But inevitably, some of the junk slips through, and then the people who are using your service who don't have any junk see their photos side by side with the junk, and get up set and leave. Or even worse yet, some of your advertisers (because if you're free you're likely ad supported) see their ad right next to something disgusting or that damages their brand or something like that. So they bail. So eventually, your customers and your advertisers tend to run away screaming. Or you're left with a demographic which isn't a very important demographic for advertisers, or who wouldn't be likely to upgrade. So it gets kind of nasty.

I knew Don from his days in the gaming industry at Ritual Entertainment. I finally got to meet him at last year's MIX conference, and I thoroughly enjoy reading his blog. It's a case study in how you can beat 'free' by understanding the weaknesses of your free competition.

It won't be easy for commercial software or subscription websites. If past history is any indication, beating the free alternatives is going to get progressively more difficult every year. Kevin Kelly offers eight generative qualities that are better than free. I'm not sure it has to be that complicated. Free is indeed a competitive advantage. But free is also a weakness: it is cheap, mass-produced, and the same for everyone. Don and Steven make a compelling argument that some people are willing to pay for a premium experience.

So the salient question, then, is this: do you understand what it takes to build the premium experience that trumps your free competition? And can you deliver it?

Discussion

Rediscovering Arcade Nostalgia

I think I spent most of my childhood -- and a large part of my life as a young adult -- desperately wishing I was in a video game arcade. When I finally obtained my driver's license, my first thought wasn't about the girls I would take on dates, or the road trips I'd take with my friends. Sadly, no. I was thrilled that I could drive myself to the arcade any time I wanted. I distinctly remember my first encounter with each watershed game of the arcade era: my first Space Invaders, my first Pac-Man, my first Donkey Kong, my first Galaga, and so on. I kept a running mental inventory of where each unique arcade machine I discovered was in order to feed my burning arcade urges. I was always strangely eager to visit the unimaginably tacky tourist trap South of the Border because that was the only place I had ever found that had my beloved Crazy Climber. I can't say I know every single game on the KLOV, but I'm no stranger to many of them.

I can also attribute my career in software development to arcade games. Like many software developers, my introduction to programming was my Dad telling me if I wanted to play video games at home, I had to write them first. Tough love hurts. Home game consoles were the gateway drug of choice for parents who imagined their children as young programmers, a sneaky way for parents to trick their lazy game-playing kids into learning BASIC. And who can forget the more obvious mutant crossovers, like the Atari 2600 BASIC Programming cartridge?

atari-2600-basic-programming-game-program

I'm trying to imagine what it would be like to key in a BASIC program on these hideous Atari Keypad controllers.

Atari keypad controller

Oh, and you can't save any of your brilliant up-to-63-character programs, either, which had to be a little disheartening. If you were unfortunate enough to receive the Atari Basic Programming cartridge as a gift intended to launch you from gamer to programmer -- instead of an actual computer -- my condolences.

It's probably not surprising, then, that many adult geeks have a lifelong fascination with arcade nostalgia. As with any other hobby, it can be taken to extremes. Like, say, for example, if you were to add an arcade wing to your house and dub it Luna City. Could happen.

Unfortunately for you, I'm a classic enabler. If you have any interest in vintage arcade gaming at all, I'm warning you -- don't read any further. I've spent a solid decade pursuing my arcade obsession as an adult armed with full time jobs and disposable income, with varying degrees of commitment and success.

Let's start with the cheap and satisfying route. These large format, high resolution color coffee table books on arcade history are a wonderful trip through our shared geek heritage. I had tremendous fun bringing them in to work and paging through them with my coworkers. Writing about them now made me pull them down from my bookshelf and start flipping through again myself. They are, in short, why coffee tables were invented.

Supercade: A Visual History of the Videogame Age 1971-1984

supercade-a-visual-history-of-the-videogame-age.jpg

High Score!: The Illustrated History of Electronic Games

high-score-the-illustrated-history-of-electronic-games.jpg

They aren't technically about arcade games, but Classic 80s Home Video Games: Identification & Value Guide and The Encyclopedia of Game Machines are in the same vein, also outstanding, and worth a look.

But these games beg to be played, not merely read about. The next inevitable step on the journey is to discover MAME, the venerable multiple arcade machine emulator. It's nothing less than a geek rite of passage. It is the acid test for any new hardware platform, whether it's a phone, a PDA, or even a digital camera: can we make it run MAME?

DC265 camera running MAME

Soon after discovering MAME, any true geek develops the irresistible urge to build real arcade hardware so they can fully enjoy these classic arcade titles the way they were meant to be played. Now that I'm thinking about it, I actually question the credentials of any geek who hasn't felt compelled to build hardware for MAME at some point. I've done it myself many times. My first true arcade build was my home MAME cocktail kit.

But the biggest and best build I've done to date is the SlikStik standup cabinet and authentic arcade monitor, through the generous patronage of my previous employer, Vertigo.

MAME Cabinet: Verticade

SlikStik is sadly defunct, but the cabinet lives on.

These are only two of several possible arcade cabinet form factors. It's not as complicated as it looks. The BYOAC site is an excellent resource, as is the outstanding Project Arcade: Build Your Own Arcade Machine book. Arcade control hardware is actually fairly simple, for the most part; it tends to be of the simple binary push button type. I've also taken a cheap USB gamepad and soldered a salvaged arcade controller together myself, as Bill Bumgarner describes. It's just downright fun to browse through the Happ Controls website and play with all the cool arcade hardware they offer.

If you don't want to invest the time and effort into building your own arcade controls, the best, least expensive off-the-shelf arcade controls right now are the X-Arcade series. They've finally gone fully USB, which means they're compatible with pretty much everything, Mac or otherwise. It drove me absolutely bonkers that for years, the accepted standard arcade control interface was a lousy PS/2 keyboard connector. The controller itself still shows up as a USB keyboard, which I find quite silly in this day and age, but at least it's progress.

There are a few different flavors, depending on how much you want to spend, and what kind of games you're into. The flagship model is the X-Arcade Tankstick, which bundles two sets of player controls and a trackball for $200.

X-Arcade Tankstick

They also offer a two-player controller sans trackball for $130, and a single-player joystick or standalone trackball for $100. I own several of these, and the build quality and feel is arcade to the bone. The included pinball flipper buttons on each side are a nice touch for a pinball simulator enthusiast like me.

If you're looking for something radically simpler, the Competition Pro USB joystick is a good choice. I've been happy with mine, but you do have to give up on the idea of playing any game with more than 2 buttons. It has to be imported from Europe, but it's not expensive.

competition-pro-joystick.jpg

Or at least it wasn't expensive. After browsing around for a bit, I'm not even sure the Competition Pro USB is available for sale at any price, anywhere. Options for inexpensive USB arcade controllers are pretty limited and often sketchy; I encourage you to look at the known quality of the X-Arcade controllers if you're at all interested.

I warned you. It's an addiction. Now where did I put my Pac-Man Operator's License? Oh yes, there it is.

Pac-Man Operators License

See you on level 256. Who knows, you might even learn something along the way.

Discussion

Help Name Our Website

As I work on UI prototypes for the new web venture, I've been brainstorming names for the web site we're building. I've surveyed some of the finest minds in the software developer community (for very small values of "fine"), and we've come to a collective realization: naming a website is hard. Really, really hard.

You begin to have a new respect for all the crazily-named Web 2.0 startups. And then there are the domain names which must not be named. Some of them are actually serious. What were the people who named experts-exchange.com thinking? I'm not so sure they were.

We've racked our collective brains, and this is the best we could do. We'd like your input to see if we're on the right track. Vote for the name that best embodies what you'd like to see on a software developer community website.

(voting is now over; the winner was stackoverflow.com)

humbledeveloper.com 563 8%
fellowhackers.com 302 4%
gosub10.com or gosubten.com 334 5%
writeoncereadmany.com 157 2%
humbleprogrammers.com 179 3%
privatevoid.com 934 14%
cargocultdevs.com 109 2%
dereferenced.com 755 11%
bitoriented.com 492 7%
algorithmical.com 301 4%
corecursion.com 96 1%
metaprogramming.com 373 5%
stackoverflow.com 1,721 25%
understandrecursion.com 35 1%
shiftleft1.com 102 1%
(other) 442 6%
6,895

I can't quite talk about what this developer community website will do yet, but we think it's going to be somewhat unique. It sure helps to put a name on it first.

We appreciate all feedback, even if it's of the "they all suck" variety. In that case, vote for the (other) option and leave your ideas in the comments or email me directly. You can use the clever as-you-type search at Instant Domain Search to figure out what's available. I'm warning you: it's a wasteland out there. You'll have to be pretty clever indeed to come up with an interesting, simple name that isn't taken -- or, worse, domain-squatted.

Update: If you're curious what the website will do, in broad terms, this recent audio interview I did with Thirsty Developer explains.

Commenters also pointed out some excellent articles on naming:

Discussion