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.
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.