The 7th Deadly Sin: Sloth Programming

As I work here on my laptop I have a bunch of apps open but they are idle, not opened since yesterday:  a word processors, spreadsheets, two email clients, two web browsers with 34+ tabs full of html, java, and flash.  Today all I’m using today TextEdit (writing this blog post) and iTunes (currently playing some Rodrigo Y Gabriela), and I’m reminded of something Sun’s CEO, Jonathan Schwartz, said – “Most modern user-applications are over-served by Moore’s Law.”  What he means is that getting yourself more memory and a faster processor isn’t going to make iTunes play your songs any differently or your email tool do something interesting while waiting for your slow fingers to type the next character in your sentence.


Frankly, the work I do most of the time (reading email, reading web pages, creating word documents and spreadsheets, listening to iTunes) would be perfectly well served by my 7 year-old PowerBook G4 (and it was way back then).  What annoys me is that I’m running on a modern 2 GHz Intel Core 2 Duo, by all rights a screaming machine, and my computer is doing NOTHING right now, yet the system is running at 64% of max!

Faster processors and larger memory have made software developers LAZY BASTARDS!  They write big fat bloated apps that have memory leaks galore.  My modern machine easily has 8x the processing power and 4x the memory of my old laptop, and that lets me run more apps at once, but not too many more because while “idle” they continue to suck up more and more resources.

The only truly “active” app on the list is iTunes, in 5th place and using only 3.2% of 1 CPU.  Safari, which I haven’t touched in 2 hours is choking up 97% of 1 CPU.  WTF?!


Dear programmers of the world… Being “green” shouldn’t just be about recycling your soda bottles and writing software to run the smart grid, it should be about not wasting ANY resources, including the “free” ones like the unused memory and CPU cycles on my laptop.  I could argue that efficient, clean code would consume less CPU, meaning less power consumption, saving battery life, which in turn means less electricity is used charging the laptop, but it shouldn’t just be about that.   You should be embarrassed that your app runs amuck and requires your customers to restart it (or worse, reboot the whole machine) periodically to clean up after you.

Imagine if other objects in your life worked like that.  Suppose that if you left appliances on for more than a week they began to consume more and more resources (electricity), after two weeks your refrigerator might be sucking up 80% of the entire capacity of the wires coming to your home, the toaster would be getting hot even though you haven’t used it since last Tuesday’s breakfast, pretty soon you’d have to go unplug your devices, or even trip the main breaker to reset everything and get your electricity usage back down to the tiny percentage of resource utilization that is warranted by idle devices.  You wouldn’t tolerate that!  Nor should you of your software!

Moore’s law doesn’t give you carte blanche to write sloppy code.

My dream is of a day when I can get away with a cheaper, lower-power laptop because there just isn’t anything I need it to do that warrants a more powerful device.  As my freshmen comp-sci professor used to say “All computers wait at the same speed.”   Frankly my typing just isn’t fast enough to wear out a dual core 2 GHz box, even with a little flamenco music on the side.


And the 8th deadly sin is… PIZZA!

~ by brianherman on November 12, 2009.

One Response to “The 7th Deadly Sin: Sloth Programming”


    Worth the read. One lesson a day. Read ’em aloud to the developers and tell there will be a quiz after lunch.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: