The Responsibility of a Developer with regards to Climate Change

2019/08/13
Photo by Alto Crew on Unsplash.

Photo by Alto Crew on Unsplash

God, this is getting really annoying!

If you follow along all the news presented about climate change, or climate breakdown or climate collaps etc etc you might find that nearly everything you do now is problematic, because it emits co2 into the athmosphere.

You might find that you take a vital role in destroying this planet by heating it up or that your lifestyle and the whole of how your society is organised is fundamentally wrong because it is by far not sustainable.

You might. Maybe you don't.

So I embraced a lot of that. I try not to drive with the car, stop eating cow and pig, avoid plastic and unneccessary garbage etc etc It gets annoying really quick. And it takes all the convenience I was used to. Because now there is this new dimension to things that makes everything problematic: emitting co2. Everything. Even streaming some porn. And that is annoying. At least now, to me. Maybe it gets better in time.

But I have kids and I want them to have an environment as close to the one I am having the privilege to enjoy. So I accept that annoyance it brings, trying to live while emitting as few co2 (and other greenhouse gases) as possible. People say we must act quick, otherwise we are fucked, so I am trying to do my best now.

Turns out I am a developer. I write bad software that gets tested intensively, that maybe runs in a production environment in some datacenter, that might be used by customers with their digital devices to fulfil some questionable purpose Different numbers go 'round. Some say digital infrastructure accounts for 3.7% of worldwide co2 emissions. Whatever the correct numbers might be, computers need power, generating that power emits co2. My bad software takes part in that, from the moment i write, compile and test it through all of its lifetime, once deployed. I do analyze web- and mobile-app-traffic to calculate ad impact, and god, we run some highly inefficient bullshit in production. You better don't ask! And we are not alone in the industry. And you might question the purpose of ads altogether. Wasting precious ressources for such bullshit seems very, very inappropriate to me right now.

I want to leave as small a footprint as possible in the world, but by producing shitty software hogging shitty CPUs burning precious energy for ads, I take part in the fuckery that brought us here. That brought us droughts, floods, wildfires, melting polar caps etc etc. I take part as a producer of digital bullshit as much as a user of digital bullshit takes part in it.

Responsibilities

I do think we, as software developers (and all the other related job descriptions), as producers of digital bullshit, have the following responsibilities when it comes to climate change:

  • We need to make sure that the least amount of machines/CPUs/resources in general is wasted on business problems we need to solve. Every more efficient solution (in terms of computing resources) to a business problem you face is a good thing. Can your digital bullshit run on one small machine? I bet It can. You need a failsafe deployment? Use two small machines. Every machine you don't have to occupy should make you proud, and it should be an essential KPI measuring the success of your team.
  • Aim for the most efficient solution. And even if finding a very efficient solution might lead to code that is hard to grasp or read, even if it takes a lot of time and thinking and even if all that finally makes your product more expensive because developer time is the biggest part of the bill, you should push through all levels of hierarchy in your company to make resource efficiency an asset of good software and to make management allow you to take time on getting there.
  • You should not produce software and never run anything that doesn't make sense. Don't work for any company just because you need the money. The market is very much in favor of us developers right now. Use that to make a difference.
  • And don't try to solve everything with software. It doesn't work like that. Just don't write a web- or mobile-app where a pice of paper would suffice. Nobody gives a shit about your side-project, go plant a fucking tree. The slight boosts in workday efficiency are not worth the energy that is consumed using it.
  • Learn new languages that have super-efficient runtimes, support zero-cost abstractions etc etc, like Rust, Go, Pony etc etc and avoid interpreted bullshit like python or ruby that has been optimized for minimizing developer time. Development time shouldn't be the main concern anymore, resource efficiency should. If you find something that makes you productive and produces highly efficient programs, use it. There is no excuse! And if you are not productive at the start, hang in there and shape the tools to become productive.
  • Learn about efficient data structures and algorithms. You ever used a trie, a bitmap, a count-min-sketch? Learn the shit out of the existing literature! This is your fucking responsibility! This is actually the reason why you earn so much money in the first place. Not because you know webpack, but because you are expected to know deeply efficient algorithmical magic.
  • Learn about low level stuff like cache locality, SIMD, GPU programming etc etc Knowing your CPU gives you tons of stuff that can make your program run orders of magnitudes faster, look at e.g. simdjson. Performance equals saved CPU cycles.
  • Learn how to write good benchmarks for your code and in your language of choice. Execute them regularly and experiment with different approaches.
  • Allow yourself to have the following thought: Maybe a monolith is more efficient than a kubernetes-based microservice architecture.
  • Answer those questions for yourself:
    • Does it really need to be some expensive machine learning algo? Isn't there an if/then/else chain or a simple heuristic that might work quite well enough?
    • What again do we run those spark-jobs on terabytes of data in huge clusters for?
    • Do you need to run all that CI shit on every commit of your PR? Can't we somehow run tests locally in a verified environment and just report the results? Your machine is running already anyways, no need to spin up another one.
    • What the hell am I doing here again? Our ecosystem is collapsing!

But after all, if you think it through, your income depends on the success of the product you produce. And if your product is successful, it will have lots of traffic and will consume lots of resources and emit lots of co2. You gonna find yourself in a conflict of interest. My job is tied to emitting more and more co2. You can either leave it all behind and quit (which is a very tempting thought to me) or you can take on that challenge and make your stuff as efficient as possible, because someone else taking your job would surely suck at it