1. 72
  1. 32

    This is a good read in and of itself, but I found the linked parody of the trolley problem hilarious. Don’t miss it.

    1. 11

      Along the same lines, I recommend comic #106 Trolley Madness from Existential Comics.

    2. 19

      Regarding wasted computations, I think crypto should be at the forefront of the discussion.

      1. 8

        Regarding wasted computations, I think crypto should be at the forefront of the discussion.

        Yeah, access your bank over HTTP instead of HTTPS; it will definitely help save the planet.

        1. 4

          sorry my mistake, by “crypto” I mean the short term for “cryptocurrencies” and not as the short term for “cryptography”.

          somehow in my context “crypto” has become an accepted short term for “cryptocurrencies”, I hope this makes my intentions clear :)

          1. 3

            No, I understand what you meant; I just think it’s very amusing that some people use that word in that way.

        2. 8

          Yeah, I’m disappointed that the author didn’t address cryptocurrencies. It seems as if this is something of a blind spot? Perhaps it’s embarrassing to admit that proof-of-work designs lead directly to wasting lots of labor, but this is not just well-known but often directly apologized for as a feature of proof-of-work!

          1. 3

            Wasting energy is the point :). Performing useful work is just subsidising attackers.

            1. 9

              I agree that the wastefulness is intentional. It’s no different from when folks purchase luxury cars, mansions, private jets, or yachts in order to signal their wealth. And, just like the wastefulness of the rich on these unneeded luxury goods, we can and should critique the wastefulness of cryptocurrencies.

              1. 4

                The luxury cars don’t hurt anybody by existing, while the currencies require ever increasing uses of electricity just to avoid becoming useless

          2. 1

            The energy use of cryptocurrencies accomplishes the valuable goal of allowing people to perform digital economic transactions anonymously and without interference from governments and large corporate entities. It’s not wasted, any more than the aggregate energy used by all computers on earth is wasted.

          3. 8

            It still bothers me personally, though, when they then share what they did with others as a means of inspiring others to do the same. Then more people end up doing something that doesn’t help at all.

            Same. There are better things you can do than optimize your website. You can easily save much more than 47 kWh / year by turning off the lights in rooms you aren’t using. A 10 watt LED bulb on for 8 hours a day uses nearly 30 kWh / year, and your rooms probably have more than a single 10W bulb.

            Looking at sources of greenhouse gas emissions in the US paints a clearer picture. The top 3 are:

            • transportation (28%)
            • electricity (27%)
            • industry (22%)

            That link has plenty more breakdowns if you take the time to read. Get a bike. Drive less. Fly less. Buy local produce. Save electricity. Contact your electricity company and see if you can opt-in to green energy only. Teach other people to do the same!

            And most of all, VOTE! Get other people out to vote. More people voted in the US 2020 election than ever before, but nearly 100 million eligible voters still didn’t vote.

            1. 5

              There are better things you can do than optimize your website.

              That’s a false dilemma… surely someone who does all those better things and optimizes their website has done more than someone who merely does all those better things?

              The existence of better alternatives doesn’t exclude the good of still acting on the “less better” alternative.

              1. 7

                Sure. The classic “not as bad as” rhetoric: there is always a good reason not to change.

                That said, low impact improvements should also be low effort, as to not compromise the ability to deal with higher impact actions.

                1. 1

                  I’d argue that writing more energy efficient code is relatively low effort and (if that code is particularly widely used) can be relatively high impact.

                  1. 2

                    I find it interesting in that in all of these discussions “energy efficient code” is left intentionally vague. I figured it was some sort of stalking horse for Rust, but it was never explicitly stated.

                    1. 5

                      I am looking at papers like Energy Efficiency across Programming Languages, and as a language designer, this paper has prompted me to examine Pascal more closely (I’ve already looked at C and Go as well) to try to understand how I can make my languages more efficient.

                      1. 1

                        Not when I use the term … “more energy efficient code” could be in any language, and it might be as simple as adding a cache in front of a relatively costly request.

                2. 7

                  You had me until the bit about voting. It seems out of place here. Maybe you meant “support leaders who want to reduce greenhouse gas emissions”?

                  1. 3

                    I certainly meant support leaders who want to reduce greenhouse gas emissions, especially by voting for them. :)

                    1. 3

                      It’s not at all out of place; increased participation in a democracy results in greater clarity and force behind the mandate presented to whomever gets elected.

                      What a “leader” wants to do is irrelevant once their electorate has spoken loudly… participation is volume.

                      1. 6

                        It’s out of place for this site, where politics are generally regarded as off-topic.

                        1. 8

                          That “generally” is doing a lot of work here; I see far less “politics” in encouraging people to vote generally than I would in encouraging them to support a particular candidate or agenda, which is what your correction would do… moreover the topic in this case is “things you can do to mitigate climate change that are (in the commenter’s eye) better than optimizing your website” and both “participate in the electoral process” and, indeed, “engage in political activism” are extremely on-that-topic. Trying to broaden this to being a meta conversation about the site generally is wandering off topic.

                    2. 4

                      You brought up a good point regarding LED-lights. Only 9% of domestic electric-usage is for illumination, and didn’t really move at all despite the push for LED instead of incandescent lamps in the last decade. Why is that?

                      People have become complacent. They keep their LED-lights on because they think they’re not wasting energy with it. LEDs still need roughly 15% (~1/6th) of the energy an incandescent lamp needs, and I’ve seen so many houses where people just keep their lights on in every room or have permanent garden illumination (my neighbours for instance, who never go into their garden). Back with incandescent lamps, people tended to turn them or keep them off, so if we assume a 6-fold increase of LED-light-usage, it didn’t really change anything. This might be an observation limited to Germany, but maybe somebody here can relate.

                      What really brings the point home, I think, is the fact that incandescent lamps still emit the superior light (CFR 100, enough said) and are much much more lightweight in resource usage than LEDs. The longer LED-lifespan of “20.000 hours” only relates to the diode itself, while often a capacitor or something else fails much more earlily. My Danish quality lightbulbs are at roughly 10.000 hours now and still working great.

                      Conclusion? I’ll keep using incandescent lights and see light as a luxury that is to be cerished. It’s a problem that people are getting used to “constant illumination” everywhere, because it’s wasteful.

                      1. 3

                        And most of all, VOTE! Get other people out to vote. More people voted in the US 2020 election than ever before, but nearly 100 million eligible voters still didn’t vote.

                        Why bring this up? Not everyone is American. Agree with the rest of your comment otherwise.

                        1. 2

                          Americans who don’t vote as a percentage of total world population appear to be roughly the same as the percentage of web users who will experience a given website without javascript (because of loading problems, or having it turned off).

                          I think it’s fair to discuss both groups, even though they are substantial minorities :).

                      2. 8

                        And “faster code uses less electricity so emits less carbon” is not beyond all reasonable doubt.

                        It doesn’t need to be, it just needs to be a measurable effect. Earlier in the post an argument is made that admits — and indeed hinges on the fact that — it is measurable, but that in the author’s mind the measure is too small to be significant. The author is an assemblage of things too small to be significant… too small to be significant in sufficiently large aggregate is significant. The moral argument, then, moves to where or not the aggregate can be sufficiently large… well people believe they’ve measured an effect and they believe a large aggregate will do manifest good and so they promote a lot of small changes in a bid to get a snowball rolling down a mountain via network effects.

                        That attempt should be lauded, the moment you’ve admitted there’s any measurable effect at all in more efficient code. “Beyond all reasonable doubt” is a straw man and an attempt to set the goal posts vastly further ahead than they actually are or need to be. So is “faster”, but at least most readers can correct that back to “more efficient” at run time.

                        Effectively this whole posts boils down to “I don’t like people moralizing”… which is moralizing.

                        1. 3

                          The problem with “faster code uses less electricity so emits less carbon” is that it’s not beyond all reasonable doubt for the purposes of utilitarianism. There’s a reason Mill avoids trying to calculating the utility of individual actions: there’s so many second-order and third-order effects that can change the balance, and it’s all a distraction from his core ideas of how utilitarianism as a fundamental principle can guide broader society.

                          1. 2

                            Where has it been established that it must be beyond all reasonable doubt? In the passage quoted in the article Mill seemingly rejects — not avoids — the notation that such extensive pre-calculation is necessary at all, and certainly doesn’t seem to propose that anything need be established beyond all reasonable doubt. That standard appears to be a whole cloth addition by the OP… and again, it’s a straw man… a measur_able_ — as opposed to a measured — reduction in energy usage is sufficient to make writing more efficient code a utilitarian good, though there may be additional concerns with where and to what end those savings end up being spent.

                            1. 2

                              Just as one example, making something more efficient can lead to net more consumption: https://en.wikipedia.org/wiki/Jevons_paradox. Something can locally provide “more utility” but remove net utility.

                              Heck, most environmentalism is predicated on exactly that difference between immediate and global utility. “Faster code reduces emissions” is only moral when you recognize that excess carbon emissions, globally compounded over decades, are a problem.

                              1. 2

                                That’s just an attempt to bring “beyond all reasonable doubt” back via an end run and thereby squirm out from having to justify the inclusion of that straw man in the argument to begin with. Leaving aside the fact that Jevons was only right in the short term about coal, from a utilitarian perspective it’s moral to increase efficiency right up until the moment you realize that it’s causing more harmful increased consumption … it is perfectly reasonable for what appears to be moral good today to have been in the hindsight available to the future a moral bad. Many once accepted moral goods turned out to be wrong, in hindsight… from a strictly utilitarian perspective, the answer to that conundrum is simply to act on the moral better when and where you can find it, and to stop acting on that which has been actually revealed to be a moral worse.

                                And all of this hinges on the other straw man employed by the author; “clean code” and “efficient code” do not mean the same thing as “faster code”. I can write code that is more space efficient and by that means reduce its carbon footprint. I can write code that is more time efficient and by that means effect the same. I can also write code that is simply more efficient for others to use, or requires a smaller team and/or less hours of effort to maintain, and by either means give people more opportunity to spend more of their lives in pursuit of other, perhaps greater, moral goods. Sure, lots of those hours might then be spent on increased consumption, but assuming it will is an awfully craven view on humanity. Twisting “clean” and “efficient” to only mean “faster” is to have already capitulated to an (unproven) argument of economics.

                        2. 5
                          1. People feel paralyzed by the ongoing catastrophe and want to use their technical skills to make a difference. Writing faster code is using your skills, right?

                          You can observe this across the software industry in general. Evgeny Morozov set it out well in To Save Everything, Click Here:

                          This never-ending quest to ameliorate…is short-sighted and only perfunctorily interested in the activity for which improvement is sought. Recasting all complex social situations either as neatly defined problems with definite, computable solutions or as transparent and self-evident processes that can be easily optimized—if only the right algorithms are in place!—this quest is likely to have unexpected consequences that could eventually cause more damage than the problems they seek to address.

                          Another example is the theory that you can bring an organisation to its knees if only we deny them access to a particular open source library, or a particular brand of source code control.

                          1. 4

                            One place where code might be able to “help save the planet” is machine utilization. If you can use a machine more efficiently you need fewer of them (ceteris paribus). I expect this would mainly be relevant to data centers that purchase machines in bulk. So hypervisors, containerization, and certain runtimes that are built to fully utilize machines (e.g., BEAM) could, maybe, possibly have positive moral implications by reducing the number of machines that need to be built (mining metals and rare earth elements, manufacturing, shipping, etc.). Even then I would want to see numbers on the actual effects.

                            By chance I stumbled on an article from 2011 that states that 70% of energy consumed by laptops is from manufacturing them. The study used a 2002 laptop so it’s obviously very outdated. If we assume that it generally is about the same today and that it generalizes to servers, mobile devices, etc. then the lesson is that we should avoid replacing our machines as long as possible.

                            On a different note, does anyone know if there are resources on writing energy efficient code? Specifically, it would be cool to optimize for battery life on mobile devices. I get the feeling that there isn’t a lot of public information about this. (Besides, you know, do less.)

                            1. 3

                              Android dev has a couple of resources for this.

                              1. 1

                                Oh, neat! Thanks, hwayne!

                            2. 4

                              I appreciate a rant, but architectural choices absolutely do matter in resource consumption. A personal blog, no, it will have no effect. Designing a distributed storage layer? Absolutely. We should all realize how efficiencies and waste are accounted for.

                              If I have a service written in Python that consumes 100 units and the same service in Rust consumes 9 units. It isn’t just the power, but all of the other resource consumption wrt to those 91 units.

                              Your clean code might not save the planet, but a clean design might.

                              1. 3

                                I will also say that attempting to build an efficient program or website will draw your attention to systemic problems and design flaws in the tools we use. If your one-off project leads to improvements in the systems you use, it may have an impact beyond its direct savings.

                              2. 2

                                I’m really happy that OP exists, so I won’t have to carefully read that post about the morality of optimization and write a refutation of it.

                                1. 2

                                  Suggest ‘rant’ tag: I was totally ranting here

                                  1. 1

                                    Joke’s on you, my code is carbon neutral.

                                    1. 1

                                      My recommendation is that anyone interested in this topic read Peter Singer’s Famine, Affluence, and Morality. I believe it’s fair to call him the intellectual ancestor of the effective altruism movement. The lessons I take away is that the question is more general than global warming, and that many ways of rationalizing a demand for altruism lead to an incredibly demanding set of moral principles (I am stating that neutrally–neither endorsing those principles or attacking them).

                                      Btw: although Singer is a utilitarian, I think people often leap far too quickly to the assumption that these arguments for specific altruistic actions (famine relief or combatting global warming via personal action) depend on utilitarianism (or its abstract form, consequentialism). It’s certainly true that consequentialism gives you a straightforward way to argue for altruistic policies. However, there’s nothing uncontroversially consequentialist about Singer’s pond example. All it requires is that we not be morally indifferent to suffering merely because we did not cause it. Consequentialism gets us that for free, but, in my opinion, it’s a hard premise to deny, regardless of one’s moral theory.

                                      1. 3

                                        It’s worth noting that Mill heavily emphasizes the importance of virtue in Utilitarianism. I think people underestimate the motivating power of virtue ethics!