Do you consider your carbon footprint while programming?

A computer runs on electricity and thus contributes somehow to the CO2 emissions. But as the activity of machines are controlled by Software, some say software causes energy waste (which I guess is somehow true given the impact algorithms can have on performance...). Still, I wonder if you guys think about this: Do you consider your carbon footprint while programming?

Did you find this post useful? Show some love!

It's interesting and hard to justify when its economically cheaper for large corporations to crank out multiple replicas on a 'cloud' based server solutions, however thankfully the worlds moving towards a more 'serverless' approach running programs only when required instead of leaving machines on 24/7 to performer operations once an hour or so!

But the main driver behind „serverless” is not energy savings it’s again development speed and less working on ops. Serverless may have CO2 savings but this is only a side effect. Or am I wrong?

Oh for sure its definitely a side effect of a cost-saving measure, but its still a net positive for the environment!

I understand and generally like the sentiment, and effectively that would mean that we create better and more efficient software, which is overall beneficial for users.

I guess this can be done by...

  • Not draining battery due to unnecessary operations (e.g. constant location tracking, performing background operations while app is not being used)
  • Not wasting storage space (which causes more I/O and might force the user into buying additional hard drives)
  • Only run operations if explicitly started or implicitly expected by the end user at any point in time
  • Being overall more mindful of available resources and scale down the demands of the application. (e.g. does my video game really have to max out the GPU's and CPU's abilities for being an enjoyable game?)

But I also want to point out that 71% of the global CO2 output is created by 100 companies. These are fossil oil companies. There is only so much we can do. The real problem is a political one and the greed of a ruling minority that has been aggressively obstructionist and in denial about climate change so far. We need renewable energy and find a way out of the fossil oil industry, which is doomed anyway because it's a resource that is about to run out.

I disagree with the idea that CO2 emissions from information and communication technology is not important. According to the guardian ICT could

create up to 3.5% of global emissions by 2020 – surpassing aviation and shipping – and up to 14% 2040, around the same proportion as the US today

I like the ideas you have and would like to add some more

  1. Performance Budget to control the performance and efficiency spendings during product development. Similarly how cars are being developed to reach a certain „miles per gallon“ ratio
  2. Programming Languages and Libraries we all knew C was fast, but no we know it also saves energy
  3. Compilation/Runtime optimization: in terms of cost/benefit ratio this might even be the best option to make sure the binaries you use have been compiled correctly!

My personal take: I did not think about this at all for years! When it became a problem I was thinking about performance or battery runtime, but even then my thoughts were limited to the code I was writing, not to the global implications. Now I wonder if I as a programmer can help fighting climate change with better code.

Classic DEV Post from Nov 7

Papers We Love!

Let's start a Papers We Love inspired discussion group here on

Valentin Sawadski
Co-founded tado°, Google Launchpad mentor, speaker on Tech and Entrepreneurship

Do you write code almost every day?

Join ❤️