Eco Software Development

With the spotlight on saving the planet from humanity; Campaigners like Greta Thunberg have shown the positive side of what individuals and groups can do. Alongside we have groups like Extinction Rebellion who are also as committed as Greta but take a more direct action, that to some is rather disdainful.

Do software developers have a part to play in saving the planet? Do their employers?

With billions or even trillions of lines of code out there and countless handheld devices and PC’s in the office, there must be some scope for us developers to have some impact.

For example, how many of us use our mobile devices to for some simple purpose and after 10 minutes think ‘My phone feels really hot’. I even have an app to cool my phone back down. So why is my phone getting hot?

Primary reasons are too many apps running in the background, bad batteries, rogue software (malware running) and unfortunately badly written code in addition when some code runs, it uses a lot of machine resources, often quite unnecessarily. Quite often apps have unnecessary alerts running as well.

Users need to be educated to close apps when not in use to stop overheating. In addition do you need all those alerts running, I do not answer my emails immediately and could wait an hour, rather than being advised every 2 minutes, also I hate all the bings, beeps going off. All of these lead to unnecessary use of battery, forcing users to recharge more than once a day.

App developers tend to use more and more pre-written coding blocks and these can be very machine intensive. Think about your code, does it need to use these resources? could you write it better? more environment friendly?

I remember years ago on a an ICL 2904 and its successors, we found that doing a Not Equals check was faster than an Equals check, microseconds saved but when processing a million records it had positive gains. In addition it also actually compiled to less bytes required for the executable, less resources used.

Today is no different, using code and correct variable types can have a positive effect on performance and if a processor is not having to handle stuff it does not really need to, it will stay cooler and reduce it’s heat emissions and battery usage. A good example is always numeric variables; small integers are a lot less strain than a double, if you are only processing a small loop or low value integer numbers. Try some quick experiments yourself. I Did!

The operating systems we use like Android and Apple, Windows are just code bases we use to develop on and while they open up a wealth of opportunities for us the developers to create our masterpieces, do we ask ourselves, ‘have those developers really though about the code from an environmental standpoint’. I suspect it is more about bottom line than the Eco-sphere.

Reducing heat helps reduce our emissions and also the drain on the battery, less charging, means less power consumed.

This in turn reduces our individual Carbon Footprint. One person may only save a few watts, but with 5.5 billion smart phones (2019) using around 2 KW of power per year (1 Charge a day, mine needs 2 charges a day). Lets reduce our charging by just 1 charge a year and we save 30 MW of power. If it was once a month that’s 360 MW.

This figure does not include our PC’s, Laptops, Tablets. So a lot more scope for saving the planet.

I understand as a developer your employers may be resistant to you spending time reviewing code, but with more and more employers saying they want to be greener, why not at least broach the subject.

Perhaps as developers we need a green code charter, it will encompass many of the standards we already use, but could be expanded to encourage things like code reviews and other environment saving idea’s.

I welcome your thoughts on this.

John Ellis FIAP (Cmpn)

Comments are closed.