Software application development
This blog is intended to provoke discussion and exchange between like minded software application developers, engineers, architects, project managers - and keen hobbyists too.
Friday 21 November 2008, 9:16 AM
Keep your code clean to make it green
Yesterday, my contribution to the green ecosystem extended to recycling a few beer bottles and shredding some paper for recycling. But then, I received a handful of calls, mails and tweets questioning the green coding concept.
Essentially, I am asking: should developers care about efficiency in code creation from a processing time (and therefore energy consumption perspective) on top of their normal considerations i.e. just building a great app.
Of those that contacted me, one source was interested in looking into whether there is scope to lobby the Brussels ‘Euro-crats’ at the EU to champion the cause of energy efficiency through better software development for mobile Internet devices from smartphones & netbooks. I think the jury is still out on which OS we should be using on our Acer Aspire or Asus Eee – and with open source already doing such a good job for these machines, I don’t see much point in mounting a campaign for cleaner corporate coding in this space.
I asked Tom Raftery, lead analyst, energy and sustainability practice at RedMonk about this subject as he runs a sister site called GreenMonk. Tom pointed me to a positive thought on this subject that suggests that efficient programming is inherently energy efficient.
“Ask a developer what ‘good code’ is and they will very often say that it’s the maximum functionality in the smallest file footprint, smallest RAM requirement and least CPU utilisation – and that is essentially green (or efficient) software.”
Tom’s RedMonk colleague James Governer added, "Tight code is green code. Of course we wouldn't recommend that everyone go back to first-principle coding basics - but clearly thinking about memory and process utilisation up front, and perhaps using environments that are built to take advantage of concurrent low power muliti-core processors is a really good idea."
As I said, I received a bunch of comments on this subject from different sources. Also peppering my inbox was a note from a company called Verdiem who is shouting about a tool called Edison (cute), a “free” energy monitoring application that allows eco-conscious consumers to actively control their PC’s energy consumption. Verdiem, it says here, helps Brits save money on their energy bills and fight climate change by reducing carbon dioxide emissions from homes across the UK.
Apparently you can download this thing for free, but I’ve been trying to get on their web site all morning and it’s a case of “HTTP Error 503. The service is unavailable.” So that’s pretty efficient! You can download it from CNET here though. But it is Windows only so that’s a bit of a poor show anyway isn’t it?
Now correct me if I’m wrong, but humming banks of processors tends to make your average techie feel warm and happy. Getting some of these green coding messages might be harder than some people think. Right, must go and hire that Hummer for my trip to Vegas next week.
Comments on this post
Hi Adrian...interesting subject. Just to zero in on one element of the blog though. We have an acer aspire 9300 laptop at home, and when the time came to replace the hard drive I had the overwhelming urge to put XP back on there, even though vista was doing "ok" . I'm glad I did 'cos now it runs at lightning speed, with every thing fully patched and up to date. I also decided to keep acers empowering technology off the machine and just left it with a clean install, the hardware seems to love this and of course this must save a bundle of energy. Acers superb website has the latest drivers readily available for XP and Vista for each machine and even makes different versions of the bios available. Although I don't recommend anyone flash their bios if what they've got ain't broke.
So, just wearing my lentil sandals while I write my next killer application isn't enough?
This enviro stuff really gets on my nerves and the reason it gets on my nerves is that the politicians are using it to raise tax. They really don't give a flying fish about the planet unless of course the river thames is going to flood their lavish Henley garden. (Which is likely their 2nd home anyway).
There are so many enviro experts and they honestly can't make their minds up what the outcome may be, ice age or earth turning to venus and for me, those are pretty opposite ends of the spectrum.
So, until Microsofts compiler provides me with Environmentally friendly IL, or a Lentil Flavoured compiler comes along, I am not going to worry too much.
Except about the leccy bill....
Thanks Rog & 64BITZ,
I have to say that I don't think I've ever bothered covering enviro issues before... although I do like a good lentil burger if there's plenty of chilli on the side.
I think the green link to the software industry is particularly unproven, wooly and open to question at the moment - but all the more reason to talk about it I suppose.
But .... If you follow Tom Raftery's Tweets he's all over the place speaking on this subject.
As for politicians talking about technology - well, George Bush invented the Internet didn't he? So maybe Obama invented DOS, or was it keyboards? No hang on, maybe Gordon Brown invented SCSI drives - oh rats, now I'm confusing myself.
I'm off to Adobe MAX next week. Now these guys have a cool HQ in San Jose and the canteen is so enviro-friendly that you have to put all your food leftovers in different bins. Maybe everyone does that now and I just need to get out more :-)
AdrianB
Ha Ha yes, we'd be on a lot of trouble with somerset cc if we didn't recycle our glass and cardboard etc. does anyone think we'll crack "abundance of energy for all"? If we do then power consumption won't be such an issue anymore.


