Programmer Efficiency vs The Environment

A few weeks ago I read an interesting story over at telegraph.co.uk that said doing 2 google searches produced the same amount of carbon dioxide as boiling a kettle.

This is interesting in itself (imaging the number of people doing google searches - me included - and the amount of carbon dioxide being produced). At around 5:03am this morning in a sleepy haze as I was giving my 1 year old son a hug and putting him back to sleep when an idea popped into my head.  How much carbon dioxide is being generated by all of the inefficient programs running on all of the computers all over the world?

As a software developer I know a little about the history of programming. 20 years ago program efficiency was a big consideration when developing software because the computers we run the programs on where so small and slow. Today however computers are so huge and powerful most software experts suggest that programmer efficiency (i.e. how long it takes a person to create and maintain a program) is more important than computer efficiency (i.e. how fast and how many computer resources your program uses on a computer when it is running). Many lazy developers quote the great Donald Knuth saying “premature optimization is the root of all evil”. I have heard this many times but I have never heard the full quote ““We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil. Yet we should not pass up our opportunities in that critical 3%.” (reference).

So back to my question ... How much carbon dioxide is being generated by all of the inefficient programs running on all of the computers all over the world?

It must be enormous!  With all of the other regulations many countries are putting in place to reduce green house emissions why aren't we seeing regulations put in place about inefficient programs?

I can tell you why, not many people know how inefficient programs are ... sometimes the programmer who writes a program knows, and sometimes they don't. Mostly the reason no one knows is that developing software is a hugely complex task and most developers are just really happy to make the thing work. We rarely go back and say “how can we make our program more efficient” (management probably wouldn’t allow it anyway).

Because of programmers:

  • Are different computers more efficient than others?
  • Are different operating systems more efficient than others? (I won't get into the Linux vs Windows debate here).
  • Are different programming languages more efficient than others?
  • Are different programs more efficient than others? (I bet Firefox is more efficient than Internet Explorer!)

I know large data centers talk about reducing green house emissions but I'm not sure if they are doing it by program efficiency or other means?

I know some web hosts push a zero green house emission policy, but I believe they do that by buying green house offsets.

This is all good and a step in the right direction, but is it up to every individual programmer to make their own programs more efficient for the sake of the environment?

At the end of the day (or at 5:15am as I drift off back to sleep) inefficient software is probably having a huge negative impact on the environment and no one will do anything because software development is just so damn complex.