Programming for the Planet

A pathway to more environmentally-responsible software engineering

--

By Tim Clifford, Lead Engineering at BCG Digital Ventures

This is a letter to a younger, less environmentally-aware version of myself. Throughout my professional career, I’ve been guilty of most, if not all the environmentally-damaging habits described below. Like most in Western society, this hasn’t been through deliberate actions, but rather a lack of awareness around the problem and the impact of my choices and habits.

However, in recent years my awareness has expanded, leading me to question how we in the technology industry operate and how some common practices can be improved. In writing this, my hope that others will be encouraged to raise their own awareness and change their own behavior.

When confronted with a decision requiring us to reconsider our habits or lifestyle choices, the easy option is to stick our heads in the sand and pretend that, as individuals, we have little or no impact in the grand scheme of things. This is a popular response from those who refuse to fly less, reduce their meat consumption or make other changes required at an individual level. However, there are a number of strong causes and studies showing that personal choices can in fact cause a ripple effect, altering the behavior of others. It’s also worth noting that the richest 10% of the world is responsible for almost half of global emissions. Before assuming you’re personal emissions are inconsequential, try comparing them with people living in other parts of the world.

What’s covered here is by no means an exhaustive list, but rather some of the more obvious aspects I’ve so far been able to recognize in my day-to-day life as a software engineer. As time progresses and I continue to learn more, this list will no doubt grow.

The internet and the devices we use to interact with it is on track to consume 20% of the world’s electricity and emit almost 6% of total emissions by 2025. On a rapidly heating planet, this is unsustainable. As the people building this, we need to be doing what we can to limit our energy consumption and carbon footprint.

Below you’ll find a rudimentary list of ways we can lower our environmental impact. I hope you’ll join me in making some of these changes yourself.

Gadgets

Let’s start with the tools of our trade: All those electronic devices. The laptop, tablet or smartphone you’re probably staring at currently, as well as the plethora of accessories we use.

A recent study found that 20% of American households contain more than ten internet-connected devices. Producing these devices requires huge amounts of precious metals which are mined unsustainably. The manufacturing process releases considerable CO₂, as does the electricity required by our continual recharging. Additionally, at the end of their lives, only a small percentage of these devices are recycled, with the majority ending up in landfill. With the number of smartphones expected to pass 5 billion in 2019, this is unsustainable.

There are a number of people working to improve this. A modular smartphone concept called Phone Bloks has been proposed by a Dutch designer. The idea was initially picked up by Google for mass production, although Google later shelved this (😞). Nonetheless, the concept has served as inspiration for a range of new modular smartphones with replaceable components and even a phone sourced from sustainable, fair trade materials. Although concentrated on smartphones, the production of laptops, tablets and other consumer electronics could also shift to become circular.

But let’s talk about this more practically. Many people carry two phones, one for work and one for personal life. While I completely understand the desire to clearly separate our work and personal lives, this is an unnecessary luxury which doubles our consumption of both natural resources and energy. Smartphones and their apps have evolved to a point where multiple user accounts on a single device is typically possible. Yes, it may mean one or two extra taps when switching between accounts, but this is a price worth paying to literally halve your environmental footprint.

On top of this, many developers opt to upgrade their devices every few years. Last time I was offered an upgrade on my laptop, I jumped at the chance. There was no problem with my old device, I simply wanted the latest and greatest hardware. This was not an environmentally-responsible choice. Researchers recently found that buying a new smartphone consumes as much energy as using an existing phone for an entire decade. We need to start not only optimizing for speed and performance but also to minimize environmental impact.

Next time you’re considering a new device, stop and think — do I really need this? Will this extra half inch of screen space, slightly faster processor or new feature make a significant difference to my life? Or am I simply getting swept up in the prospect of something new and shiny? If and when you do decide for a new device, educate yourself on the environmental impact of each brand and model.

As well as reducing the number of devices we own and the frequency at which we replace them, usage is another area where we can reduce our impact. Heeding the advice of our parents all those years ago to turn it off when you’re not using it or even (*gasp*) to spend less time looking at our screens not only helps the environment but also benefits our health.

Lastly, don’t forget to recycle or donate any devices you no longer use. The majority of countries have services allowing you to recycle devices for cash or donate them to a worthy cause.

Cloud computing

When we refer to cloud computing, we might think of a fluffy, natural floating body of water vapour. But cloud computing in fact refers to huge server farms which have a very physical presence and real-world impact: Experts predict that data-centre electricity use is likely to increase about 15-fold by 2030, to 8% of projected global demand.

As there are some environmental benefits through consolidating data centers and (I risk losing the majority of people reading if I recommend switching to an internet-free existence), I won’t discuss whether we should or shouldn’t use the cloud, but rather how to use it more sustainably.

Major cloud platform sustainability

Not all clouds are created equal. At the time of writing this, each of the top six providers offer varying levels of carbon neutrality:

  • Google: 100% with offsets
  • Azure: 100% with offsets and energy certificates
  • AWS: 100% with offsets in Dublin, Frankfurt, Oregon, Govcloud and Montreal, elsewhere 30–40%
  • Oracle: 100% with offsets in a few regions however < 30% overall
  • IBM: ~50% overall
  • Alibaba: Data not published

From the above, Google is the clear winner, with Azure a decent second option. If you’re using either of these providers, you’re already doing ok: Their energy consumption comes from renewable sources or is neutralized by carbon offsets. AWS can also be a good option, depending on which data center you’re hosted in. Oracle and IBM currently lag behind, and given China’s strong reliance on coal, Alibaba is unlikely to be an environmentally responsible option.

Non-production environments

How many of us operate one or more non-production environments for testing and releasing our software? These typically sit unused, idle outside of working hours in the evenings and on weekends.

If you have multiple non-production environments, the first question to consider is this: Do you really need more than one? Do these separate environments fulfil markedly different functions, or could they be combined, thereby reducing operating and management costs by one or more orders of magnitude? While business or product requirements may result in the need for multiple dev, staging or QA environments, I’ve seen many situations where this was not the case and additional environments were spun up based on past experiences as opposed to an actual need.

Multiple environments aside, any non-production should be switched off or at the very least scaled down considerably when not in use. AWS even states that most customers could reduce 75% of their costs by doing this. While switching off does require some additional planning, the long term benefits are twofold: Fewer compute resources equals less energy consumption equals reduced environmental impact, while at the same time lowering costs. Whether you’re using VMs, containers or another compute platform, a growing number of solutions are available — paid and open source — to monitor and automate cloud resource utilization. The Kubernetes community are doing some good work in this space, for example: Check out kube-downscaler, which can automatically scale down Kubernetes resources during non-work hours.

Serverless

A serverless or function-as-a-service architecture can reduce your carbon footprint through more efficient use of resources. Machines are not operated directly, instead, a single chunk of self-contained code is executed only on demand. The result is a system which draws compute resources only when required, theoretically also consuming fewer physical resources. The main assumption here is that the cloud provider or framework is better able to schedule and scale our workloads than if we’d attempted this ourselves.

Conferences

Personal development, training and conferences are a huge topic for software engineers. We are extremely fortunate that the majority of us who work for companies full-time are afforded yearly training budgets. We’re able to travel to new places, listen to inspiring talks and meet new people working on similar topics or technologies. Although there are obvious benefits with regard to knowledge sharing, networking and motivation, each conference visit typically requires multiple flights, taxis and hotel stays, all of which increase your carbon footprint. With over 25 million software engineers globally, a number which is growing exponentially, this is completely unsustainable.

I’m not advocating that we stop going to conferences. But instead of travelling internationally, why not visit a conference in your city or which you can get to by public transport? Alternatively, watch the talks online asynchronously. If you’re actually there to learn and not just for a free holiday, this provides the same end result for a fraction of the environmental impact.

Some argue that by not attending a conference in person, we then miss out on the face-to-face networking opportunities. My response to this is: How many people have you met at a conference with whom you’re still in regular contact with today? I personally find the majority of social activities at most conferences either forced or focused on sponsors promoting their products.

If you do decide to fly to a conference, try to fly direct (takeoff is the most fuel-intensive part of the flight), fly with a more carbon-efficient airline, and consider carbon offsetting your flight. Although not a perfect solution, carbon offsetting still reduces your impact when flying. When I fly I use atmosfair or myclimate, both not-for-profits which adhere to international standards.

Travelling for work

If you’re flying frequently for work, similar thinking should apply. Do I really need to fly halfway around the globe for this two-hour meeting and then fly back again? Or could we achieve similar results with a video conference? I agree, face-to-face interactions are still preferable to their digital counterparts, but we are at a stage now where environmental impact must be prioritized over social niceties.

If a work trip is proposed that could instead be a conference call or reached via train rather flying, make the suggestion. Even if it’s not possible this time, you’ll at least be raising awareness for the future. If you do end up flying, push for the business to offset the carbon. This not only reduces the environmental impact but also illustrates to employees they aren’t completely ignoring the topic.

When travelling for work, cars can’t be left out of this equation. If you’re driving a car to work each day, you can reduce your impact here by switching to public transport or convince your team to try some remote days — if team setup allows.

Swag

Companies love swag. With each new product or brand launch comes the swag — branded clothing, bags, socks and whatever else. I’m not suggesting doing away with these completely, as teams typically love them and they bring a variety of positive cultural aspects.

Instead, if your team or company is considering something like this, make sure to assess the supplier’s environmental credentials and make sure the product has a long shelf-life. There are new options appearing each day — clothing made from recycled materials or organic cotton or bags made from recycled plastic bottles, for example.

The same goes for conferences. These are typically overflowing with goody bags full of branded, cheaply-made drink bottles, laptop bags and pens. We choose to collect these items but inevitably end up disposing of them shortly after (or even during) the conference. Don’t take them, and encourage the conference organisers and sponsors to reduce the waste being produced.

Companies and products

This is a slightly meta topic, but still relates to a multitude of areas where we can have a positive impact.

The software we write, test, deploy and operate is likely powering a product or company. Have you ever stopped to consider the effect is the company or product you’re contributing to has on the environment or society in general? Building software is typically quite an abstract endeavour, making it easy to forget that the bytes and pixels we’re pushing will eventually materialize in the physical world somehow. Consider this process holistically, and if you can identify negative aspects — for example, part of a product that might contribute to destroying the natural environments, wasting resources or polluting our air or water — call attention to them. Beyond it being a morally correct thing to do, companies that embed sustainability into their business are shown to be more productive and viewed more positively by customers.

If you’re interested in what other companies are doing in this space, here’s a few nice examples I’ve stumbled across recently:

Summing up

Nice work on making it this far! Hopefully these pointers come in handy on your journey toward a more environmentally friendly existence. We’re continuously bombarded with new evidence of just how serious climate change is. It’s scary and it can be tempting to simply pretend it’s not happening and hope that the rest of society will somehow figure it all out. But each time you make positive lifestyle changes or bring attention to things which can be improved, those around you will take notice and your behaviour will encourage them and others to do so too. The behavior of those around us is shown to unconsciously affect our own habits. Another fascinating human study related to this is goal contagion.

Technology and the software that drives it is at the forefront of discourse around global warming, both as a driver of carbon consumption but also as a means by which to be smarter and more efficient in our behavior. For every pointless data center contributing to emissions there’s a blockchain-powered supply chain company seeking to help consumers make more sustainable choices. If we are smart, technology has massive potential to help solve many of the problems we face today. However, if we continue leveraging it in support of consumerism, it will only help to magnify our problems. It’s up to us as developers to make the difference.

Interested in working with us at BCGDV? Want to find out more? See our current vacancies.

Find us on Twitter @DV_Engineering.

--

--

BCG Digital Ventures - Part of BCG X
BCG Digital Ventures Engineering

BCG Digital Ventures, part of BCG X, builds and scales innovative businesses with the world’s most influential companies.