# Developers Can Save The Planet, Part I: The Problem

François ZaninottoSeptember 21, 2020
#tech4good#sustainability#popular#greenframe

Climate change is threatening the planet because human activity emits too much greenhouse gas. Some people say that digital activity is responsible for a significant share of these emissions. Is it? Let's find out by measuring the CO2 emissions of a developer for a single day.

## How Much Carbon Do My Digital Activities Emit?

When I use a digital device, I consume electricity. Producing this electricity emits CO2. How much? Let's do a ballpark estimate.

In France, where I live, producing 1 kilowatt.hour of electricity emits on average 55g of CO2 equivalent (it's much less than most other countries, e.g. Germany's electricity emits 440g eqCO2/kWh, and the US 450gCO2/kwh, but in return, we have nuclear waste buried underground for milleniums to come). I'll use the 55gCO2/kWH figure to compute my carbon emissions.

Work Laptop Usage: 21g CO2 per day

I use a Lenovo Carbon X1 laptop for most of the day. Analysts estimate a laptop consumes between 60w/h and 100w/h.

• My laptop has a 51Wh battery.
• But it's plugged to the 65W power adapter more than half of the day, to avoid pulling on the battery when I'm at my desk. I'll assume it's plugged 6 hours per day.
• That means I'm emitting 0,065kW x 6h x 55g/kWh = 21,45g CO2 per day with my laptop.
• I use my laptop a good 9 to 10 hours per day, so an hour of work emits 21.45g CO2 / 9 = 2.38g CO2.
• Writing an en email takes me about 5 minutes. That would consume 2.38gCO2/h * 5min / 60min = 0.2g of CO2 per email.
Smartphone Usage: less than 1g CO2 per day

I'm also using my iPhone 8 a lot.

• It has a 1821mAh battery (6.96Wh)
• I need to charge it every day for about 1.5 hours, using a a 5W charger.
• So to charge my phone daily, I emit about 0.00696kWh x 55g = 0.382g of CO2.
• I can watch 2 episodes of Dark on Netflix at home with a full charge. So I'd say watching one episode emits 0,19g of CO2 (less than writing an email on a laptop? Damn, mobile architectures are awesome!)
Gaming: 5g CO2 per day

I own a desktop PC, which I use every once in a while to play video games.

• A modern gaming rig with a good screen uses about 500W when playing a recent game with all details on.
• If I play The Witcher 3 for 2 hours, I emit about 500W x 2h = 1kWh, or 55g of CO2
• I don't play very often (let's say 2 or 3 days a month), so my gaming emissions, by day, are about 55g x 3days / 30days = 5.5g CO2.
Internet Modem: 50g CO2 per day

Oh, and I forgot my Internet modem/router/Wi-Fi hot spot/NAS. It's a single device (a Freebox Revolution).

• It comes with a 60W power adapter.
• It remains plugged about 16 hours per day (my wife insists on turning it off for the night).
• It adds another 0.060kW x 16h x 55g/kWh = 52.3g CO2 to my emissions.
• These emissions are shared with my family, so I should only be accountable for a share of them. On the other hand, we have a similar modem at work, shared with even more co-workers, but it stays on 24h. I think it's a good approximation to consider that I emit about 50g CO2 just for my Internet usage.

Overall, the digital activities I can count probably emit about 77g of CO2 per day:

I don't own a watch or a TV. I have a printer, but I only turn it on when I need to print something. My piano has a silent system. I looked at my power adapters drawer to check if I forgot other digital devices. I saw one for my DSLR camera (which I don't use often these days) and one for my Bluetooth speaker (which I charge twice a week). It's a bit harder to estimate my usage of these devices, so let's just assume that they increase my emissions by 25% (probably an exaggeration, but I don't want to miss anything), and we end up with 77g x 1.25 = 96.3g.

So let's settle on 100g of CO2 per day due to my digital usage. Depending on your equipment and usage, your mileage may vary of course. If you play more often, own a TV, keep your devices plugged all the time, or use a powerful computer as your main device, your emissions can easily be twice or three times that.

As a developer, I want to develop energy-efficient apps so that I can help reduce the overall digital footprint. Let's be super optimistic and target a 25% increase in power efficiency thanks to great programming. That means that I can save about 100g x 25% = 25g CO2 per day. That sounds great!

## Digital Emissions Are A Drop In The Ocean Of Human Activities

How much does 25g of CO2 per day represent when compared to other human activities?

According to Our world in data, an average French person emits about 5.3 metric tons of CO2 per year. That's about 5300kg / 365 days = 14.5kg CO2 per day. Yes, kilograms.

So if I buy a new tee-shirt, I cancel 5000g / 25g per day = 200 days of effort. Let's face it: saving 25 grams of CO2 by careful programming when an average person emits 14 kilograms of CO2 equivalent per day is like spitting in the wind.

And indeed, the digital sector accounts for only 4% of global greenhouse gas emissions according to The Shift Project.

So digital usage is not a particularly large CO2 emitter. Then why should developers care about climate change?

## The Hidden Cost Of Digital Usage

Wait, numbers do not match. I calculated that I emit 100g of CO2 per day, but 4% (the ICT share according to the Shift Project) of 14.5kg (average CO2 emissions of a French person according to Our World In Data) is 580g - five times more. What did I miss?

My estimate for an email is 0.2g of CO2, when Carbon Literacy estimates it' about 4g. An order of magnitude more.

My estimate for video streaming is 0,19g of CO2 per hour, while the Shift Project calculated that video streaming emits 400g of CO2 per hour. That's about 1,000 more!

Most of the estimates are based on the worldwide figures for CO2 emissions of electricity production (350g per kWh versus 55g in France), but that doesn't explain all the difference.

Something is missing in my estimates. Something big, hidden in plain sight. Where is the "dark matter" of the digital footprint?

### We Use Digital Services More Than We Think

I computed that 1 email emits 0.2g of CO2. But I write dozens those per day, and I receive more than a hundred. Many of these emails contain images, some even have heavy pdfs attached.

Also, I don't clean up my email account very often. I'm a Gmail user, and clicking the "archive" button is so much more reassuring than clicking on "delete". The result is that my Gmail account stores more than 16,000 emails. Each of these emails costs in storage and replication.

But emails cost nothing when compared to a video. I watch tutorials and TV shows on YouTube, NetFlix, and Arte.tv (best TV channel on earth). I'm not the only one: Video streaming accounts for 80% of the world's data traffic.

Oh, all my programs use AI one way or another (e.g. Gmail suggests words while I'm typing). Training a single AI model emits as much carbon as five cars in their lifetime.

Finally, entertainment and social media take a huge part of our life - and from a very early age. Today's children are spending an average of seven hours a day on entertainment media, including televisions, computers, phones, and other electronic devices, according to the American Academy of Pediatrics.

### Client-Side Is Just The Tip Of The Iceberg

I estimated the electricity consumption of my devices, but for most tasks, I achieve on a laptop/smartphone, many other devices on the Internet are involved. GSM radio towers, network repeaters, servers at CDNs, load balancers, firewalls, web servers, filers, databases for primary data, and analytics, these all consume electricity when I'm sending an email.

According to a study published by the Shift Project, only 35% of the electricity consumed by electronic devices come from terminals - the devices I use directly. The other 65% comes from data centers, network installations, communications, etc. So when I estimate that a task consumes 100W of my electricity, in total it consumes about 300W of electricity.

And although I know the carbon emissions of my electricity, I don't know the carbon emissions of the US server that stores a copy of my emails. You know, for the NSA.

### Device Manufacturing Emits A Huge Amount Of Carbon

And until now, I've only counted the carbon emissions linked to my usage of digital goods. When assessing environmental impact, specialists use a methodology called Life-cycle assessment, which takes into account... everything from and to nature for a product system.

This includes raw materials extraction, transportation, product manufacturing, distribution, usage, and recycling. And when looking at life-cycle assessments of digital devices, I realized that usage only accounts for 55% of the environmental footprint (according to the same study published by the Shift Project). So 45% of emissions come from device manufacturing and transport.

Let's take a few examples.

These numbers are huge. Most of these devices require rare metals, and mining these metals requires a huge amount of resources and energy. Electronic devices are often manufactured in Asia (where electricity is mostly coal-based), transported across the world, and sometimes by plane (e.g. when you order a laptop online).

The embodied carbon emissions of laptops are decreasing (producing a laptop used to emit 400kg of CO2 in 2010), but the embodied carbon emissions of mobile phones is increasing (the iPhone X embodies 93kgeqCO2 while the iPhone 4 embodied 25kg). Overall, embodied emissions go up.

This means that before you start using a piece of electronic equipment, it has already emitted 70% of its lifetime CO2. So the best you can do to avoid emissions is to avoid buying or renewing an electronic device in the first place.

### We Waste A Lot

A lot of CO2 emissions from digital products are caused by products we don't actually use.

Many electronic devices are turned on even when we don't use them. The electricity they consume while idle isn't negligible at all. In fact, 75% of the electricity consumption of digital devices occurs when they are inactive. This energy is simply transformed into heat.

I thought that more recent devices waste less energy. Well, not necessarily. Wireless charging, for instance, is super inefficient. It takes 47% more electricity to charge a smartphone with a wireless charger than with a regular charger.

I have a spare phone inside a drawer, just in case my main phone dies. I'm not the only one. As of 2020, there are about 8.3 billion phones in the world - but only 5.2 Billion people (66% of the world population) have a mobile phone. Many of us have more than one phone.

And we change our devices very often. Batteries wear out in 18-24 months on average, and they are often glued to the phone frame. Replacing the battery is a tedious task, requires special equipment, and sometimes costs about as much as buying a new one. So we buy new phones when the battery dies. In the process, we throw away a perfectly working phone.

In 2016, the world generated 44.7 million metric tonnes (Mt) of e-waste (as much as 4,500 Eiffel Towers). Where does all the e-waste go? Only 20% is recycled through appropriate channels, so the vast majority ends up... in landfills.

## Why Should Developers Care?

OK, I grossly underestimated my CO2 emissions, so let's trust the experts. I probably emit 580g of CO2 each day because of my digital consumption instead of 100g. But still, it's only a tiny fraction of the 14,5kg I emit every day. So why should I care?

### Software Is Responsible For Most Emissions

CO2 emissions linked to digital break down as follows:

• 45% for production
• 20% for terminals usage (desktop, laptop, mobile, TV, console)
• 19% for data centers usage
• 16% for networks usage

When we use terminals, data centers, and networks, we do that through software (I use this word in a generic way, including servers, web, and mobile apps).

So 55% of my daily CO2 emissions are controlled by software. It means that software emits 319g CO2 per day and per person.

### It's Growing Fast

Digital activity currently accounts for 4% of the carbon emissions worldwide, but it's growing 9% per year. That's fast: according to the rule of 70, it means it's going to double in the next 7,7 years. At 8%, digital will then emit as much as cars.

Companies are more and more data-driven. They captured about 45 ZettaBytes of data so far (one ZettaByte is equivalent to a trillion gigabytes). The global datasphere expands quickly, because companies seldom clean up their data lake, and they pour loads of new data into it every day.

Video games increase in size at a crazy rate. 100GB is common for a triple-A title these days. In 1998, the fantastic Tomb Raider 2 could easily fit in a single CD-Rom: it weighted 246MB. 22 years, 500 times bigger. And with 4K gaming and VR, why should this trend change?

Another study estimates that digital emissions will represent 14% of total CO2 emissions by 2040. It's not a tiny fraction anymore.

### Software Is Eating The World

The programs we write are everywhere, from cars to pregnancy tests. Software developers are currently in high demand for a good reason: everybody wants more software.

It's not going to stop. GitHub, the most popular version control platform, has 40 Million developers. 10M of these are new users, who joined in 2019.

There will be more and more software, emitting more and more CO2.

## Software Developers Are Responsible For Software

A program developed by a software engineer is executed many times. Either because it is used for several years, or because it's used by many people.

For instance, I wrote a library to generate random data called Faker. As of today, it's been installed 116 Million times and probably executed a hundred times more. If each execution of Faker emits a milligram of CO2, I'm now responsible for 11,6 Metric tons of CO2 emissions. Had I designed Faker to be just a bit more energy efficient in the first place, the effects would already be huge today.

So a single line of code can have a tremendous impact.

Also, we are the only ones capable of doing it. Who better than a programmer can argue with a product manager about the carbon impact of a specific feature? Who better than a developer can optimize an algorithm to divide calculation costs? Who is going to develop software to profile and optimize the energy efficiency of other software, if not developers?

## Conclusion

Our intuitions about climate change are often wrong because it's a complex matter. But we can get a good understanding by looking at a few key numbers.

Here are the 3 key takeaways from this article:

• A French person emits 14,5kg per day (and more in most western countries)
• 580g of these emissions come from digital activity, and it's growing fast
• About 55% of digital emissions come from software.

Developers have a huge responsibility for the problem of digital carbon emissions. They have a huge role to play in the solution, too.

Now, let's go save the planet. Check the second part of this article to see the solutions I propose.

Note: Many sources linked in this article are in French, apologies. It's hard to find English sources about French emissions!

Did you like this article? Share it!