Hacker News new | ask | show | jobs
by kstrauser 2101 days ago
As a corollary, since the most carbon-expensive part of a computing project is the humans that maintain it, a variation of Amdahl's law says we should optimize for human efficiency if we want to reduce the carbon footprint.

Some things are a no-brainer, like allowing remote work when possible: that's an enormous energy savings.

It also means that development speed is much more important than execution speed in most cases. For example, yes, Python is a "slow" language. But in almost every case, it makes more sense for devs to deploy a website in Python than, say, hand-tuned assembler. The latter may require fewer clock cycles to run, but it's going to require 100x the resources to implement. That gets more difficult to quantify if you're trying to compare, say, Rust vs Go where both require similar amounts of development effort and the end performance is similar, but I think you can reasonably say that modern, high level languages are more carbon efficient than lower level ones that take longer to develop in most cases (like, that might not hold in cases of supercomputing where you're executing the code a gazillion times in parallel).

1 comments

But humans don't hibernate between tasks. I continue living, using about the same amount of energy and oxygen. When one project is done, move on to the next (or have to come up with something else to do).
Sure, but look at the transportation costs alone for getting you to the office and back every day. I'd bet in the common cases where a dev is writing a web app that's not FAANG-scale, you could power the server for 20 years on the energy it takes for you to get to work that one year.

Let's put this in concrete terms: it's surprising how much work you can get out of a Raspberry Pi. An RPi 4 is almost certainly enough to host many small companies' websites until they hit a traffic inflection point. A loaded RPi4 takes about 8 W/h to operate. A gallon of gasoline has about 33 kWh of energy in it, or about 4,000 hours of RPi running time. In other words, a single gallon of gas could run an RPi 4 for about 6 months.

Suppose it takes you a month (or about 20 commuting days) to write your startup's website in Flask, and that it takes you about 1 gallon of gas round trip to work and back. Your car alone just spend about 10 years worth of server power, which is statistically much longer than that website is likely to live.

Now suppose you're a badass programmer who can convert that Flask app into assembler that runs twice as efficiently, and it only takes you 1 month to write it. Now you've spent 40 gallons of gas, and your app can run for 40 years on the amount of energy you spent writing it.

You can fiddle with the numbers a lot, but I think the general point stands: unless your code is very heavily used, it may not be possible to ever break even energy-wise by spending human effort to make it run more efficiently.

Getting to work or staying home has nothing to do with whether I'm writing C or ruby.

For the next 30 years I have to put effort into something, and the number of tasks that need to be done never ends, no matter how quickly I complete them.