Clean code won't save the planet
buttondown.email
buttondown.email
I don't feel like I'm asking that much but for some reason websites insist on using HD videos as site background, autoplaying livestreams, newsletter popups and more.
No need to argue about saving the climate - not using Netflix or YouTube would indeed make a much larger difference - but just do it for our sanity. I swear the only reason I'm not clinically insane yet is because browsers have tabs which let me load websites in the background. And that's with an internet connection that, while not the fastest, is far beyond anything certain remote regions have access to.
How about we keep sites lightweight so more people around the world have access to information and education, in turn improving more than just the climate.
For other websites though, it eats your limited data allowance if you are in a unlucky country (even at home if you are in a worse country, thank goodness for unlimited home connections here).
Somehow the Wikipedia design doesn't seem to be suffering from that. (And that's probably a good thing.)
TLDR: News sites for reading news has certainly got heavier.
Now I feel like computing is ageing with me
I think a better perspective is this: the impact per time unit of clean code is vanishingly tiny.
If you actually care about the environment, then it's orders of magnitude more effective to write "dirty" code, and then use the free time it gives you to do things that actually make a difference: volunteering, lobbying, raising awareness, writing to representatives, working and donating the $ to environmental groups, etc.
The question isn't about whether something is a net positive or not, it never has been. The question is, is it the biggest positive you can achieve with your limited time/resources.
Which is where the author is right -- focusing on clean code (unless you're Netflix-scale) is a massive time and energy suck away from action that can make a much larger difference.
Technical debt is recognized for a reason - it costs.
Not caring about things like these leads to modern websites using 10s or 100s of megabytes of data and considerably more cpu cycles for no real reason aside from ads, analytics, and developer friendliness, resulting in degraded performance on older laptops and mobile networks, etc.
Things like optimizing and caching docker builds do make a difference at scale for organizations.
One of the post titles referenced in the article is "This website is killing the planet." In fact, some people are actually saying exactly this, even though about 10 people went on HN to claim otherwise despite direct references to people saying it.
You then stripped the "some" out -- _while quoting the response_ (!!!) and asking for more examples. Are you making a different claim now? Because the response was certainly sufficient for your original one.
The views espoused on that blog are -extremely- fringe and not indicative of sentiment in any meaningful capacity. What value does it add to this discussion to point and go "look! at least 3 people are claiming this opinion"? It's arguing for the sake of arguing.
The vast majority of people don't care about wasting computational resources, let alone care about the ecological impact of a website.
Compare this to LED lighting, where everyone takes proud in reducing the foot print: lighting is about 2% of the total energy consumption and domestic lighting is about a third of this.
I would like to request a serious citation on that, it is an absurdly high number and 2030 is 10 years away.
It's difficult to find global data for the last few years, but there are several studies suggesting about 5% for data centers. Given that networking is the major source of consumption with 40+% of IT consumption, this would indicate more than 10% today.
Edit: A few years ago, when Google still wasn't evil, they published an article on why Mercator projection was chosen for Google Maps. The estimated savings regarding all the global views per year were impressive!
First of all, Electricity consumption != Energy consumption
So although very important, Electricity is around 35-40% of the global emissions. https://www.vox.com/2015/3/31/8319859/electricity-vs-energy
Second, the best number right now for all the ICT sector is around 5% in electricity, which is equivalent to 2% in emissions. One single guy in a super fatalistic scenario is projecting a worst case situation for 2020 of 20% of electricity which it we assume the same distribution as today it would be equivalent to 8% of the world emissions, a 4X growth in 10 years. Even that is not going to happen.
https://www.nature.com/articles/d41586-018-06610-y
> Data centres contribute around 0.3% to overall carbon emissions, whereas the information and communications technology (ICT) ecosystem as a whole — under a sweeping definition that encompasses personal digital devices, mobile-phone networks and televisions — accounts for more than 2% of global emissions. That puts ICT’s carbon footprint on a par with the aviation industry’s emissions from fuel. What could happen in the future is hard to forecast. But one of the most worrying models predicts that electricity use by ICT could exceed 20% of the global total by the time a child born today reaches her teens, with data centres using more than one-third of that (see ‘Energy forecast’)1. If the computationally intensive cryptocurrency Bitcoin continues to grow, a sharp rise in energy demand could come sooner rather than later
There's very different data, as well, e.g., from a SIA/SRC report:
> For this benchmark energy per bit, computing will not be sustainable by 2040, when the energy required for computing will exceed the estimated world’s energy production. Thus, radical improvement in the energy efficiency of computing is needed.
https://www.semiconductors.org/wp-content/uploads/2018/06/RI...
One way to tackle this is reducing the number of bits moved.
But millions of people making millions of small changes might save the planet. Refusing to do anything at all unless it makes a huge change is not helpful.
Millions of people make small changes to distract themselves from changes that would make a real difference. Not doing anything may at least have a chance of making them aware that something must be done.
You'll notice this phenomenon in lots of areas, first of all fitness.
But that's just my opinion.
However, a certain amount of activity is required to maintain a minimal amount of fitness. Smart training can even take, in worst case, one hour a week.
What I typically observe in people who refuse to do even the bare minimum of activity, is that they find a "non-activity", and pretend it works.
What they're actually doing is instead to find something that takes virtually no effort while giving the illusion that they've absolved the duty.
Very typical non-activities: walking and climbing stairs.
(This is a bit complex suject of course, because if we take somebody who sits 24/7 on a chair/couch, of course walking is better than nothing - but I'm referring to the principle)
However, this is a bit odd in context. If one considers a population where 60%+ of the population has 30%+ of bodyfat percentage, then it's impossible to define what constitutes fitness - even one flight of stairs, in a sense, requires a decent amount of training.
In at least northern Europe, hiking is relatively common for elderlies (people in their 60s) - and this amounts to hours of walking in rough terrains, so definitely, for a person who's not (considerably) overweight, and hour of walks in the city is... a walk in the park.
This year has been the perfect experiment: Through massive, massive, restrictions in our normal life we managed to reduce CO2 emissions by what, 30%? Say we could do it even better if everyone became vegan and only rode bicycles and we reduce them by 70%. Awesome. That about triples the time we have until we need to reach net zero emissions. It probably also crashes the economy that's supposed to pay for the modernization and replacement of our whole energy infrastructure.
most likely 4-6% by the end of the year is europe goes back to the same lockdown as in march.
To reduce that to needed levels by 2050 (to reach the 2°C by 2100 "best" scenario), you need -5% every year since last year. Its in the bag for 2020 at least, so that's great.
Essentially it boils down to “sometimes, things help”. No need to qualify or quantify “when”, “which things” and “how much” they help by.
If you want to argue that website fonts or whatever have a meaningful impact on climate change, then argue it, with actual data, or statistics, or anything more than bs “we’re all in this together” platitudes.
I see it as a particular type of green-washing where people can feel like they’re acting pro-socially while actually making trivial differences in the actual issue. The time and attention of people isn’t infinite, by getting people to invest in ideas that don’t work, you actively take away from ideas that do.
It follows that scaling them would only waste more time.
The most efficient solution is to implement some market pricing mechanism for carbon, and have consumers automatically enact change through the existing, legible process they use for making decisions: comparing prices.
The amount of bandwidth saved just from having those set indexed locally is most likely worth it.
Or why doesn't Chrome upon install locally cache all of Google fonts and maybe a few other key CDN files (jquery, etc)?
Just thinking out-loud.
Because that'd give them less opportunities for tracking everyone across the internet.
However, two major points are forgotten:
1/ clean code is about downsizing huge websites with millions or hundred of millions of users. Starting with your side-projects is a good way to learn to code clean.
2/ electricity consumption is not the right metric: the devices' time of life is. The heavier the code, the sooner we need to replace our hardware to keep up. It's both true on the front and the back sides.
Most of the CO2 and damages to biodiversity come from the hardware. The life time of a computer ought to be 15/20 years. With choice of high durability of components, repairs made easy, upgrades as well, plus second-hand markets: a gaming computer bought today ought to be an quite decent office computer in 15 years.
On the data centers' side, economic incentives are huge for operators to reduce energy consumption, both on servers and bandwidth. The gains have been incredible in the last ten years.
Maybe a server that Google wants to replace because its datacenter is full could be resold, maybe not to a competitor but to a family as a home central server. Running the family's NAS, media server and IoT hub.
To code clean is mainly a fight against hardware obsolescence.
Electricity consumption matters only for hugely used websites PLUS hugely-used frameworks like WordPress that run tens of millions of websites of smaller audience.
I would even go beyond this: person time is the right metric. Code will be read many more times than it is written. Even if code is functionally equivalent and bug equivalent, the clean version will be easier to maintain, add features to, port, optimize and debug. Taking the care to craft clean code is worth it for this reason alone.
Programmers, broadly, tend to be people who like simple metrics of success that require complex solutions to achieve, and they deeply enjoy optimizing the hell out of those solutions ("optimizing", here, applying to anything from speed to memory usage to expressivity to safety). This is well and good: for the most part, it makes us good at our jobs.
But this feeling of "strict improvement" can be so intoxicating as to take on the sensation of being a moral virtue. It can feel like a universal imperative. So instead of admitting that the code most of us write has no moral bearing whatsoever (beyond basic professional integrity), and that for the code that does have moral bearing, the way it's used is more relevant than how well it's crafted, we rationalize our feelings by contriving an argument for why these things that feel like they matter so much to us, actually matter to the world.
In my experience the healthier mindset is to detach that pleasure of craft from any kind of real-world meaning. If it's meaningful to you, that's enough. You don't need to justify it beyond that.
These things aren't static, and you can't just have e.g. an understanding of theoretical algorithmic efficiency and call it a day, even if you couple that with an understanding of e.g. CPU tech at time t.
Various levels of abstraction of course fuzzy things up further. You'd then have to understand not only how things work at the low level, but also how your particular layers of abstractions affect things.
With today's tech stacks, that becomes nontrivial real fast.
With that said, yeah, writing at least superficially efficient code isn't really much harder than writing grossly inefficient code if you have a good base understanding.
[1] In this case, in terms of energy efficiency, which is even harder to judge without specific knowledge. Time efficiency is easier to test.
There's your mistake - you assume that a) people care, and b) they are competent. Usually at least one is false.
In the end that’s fine, there was a point in my life when I had to prioritize things, and I chose to prioritize making money to support a family. It’s not my absolute priority job wise but it’s the reason I keep working whenever I get discouraged.
And I have a good family, and while I might get a chance to make some other legacy someday, I am pretty happy with my legacy being my family.
But I do try to keep some sight of the good of the wider world, and so I try to be generous as much as I can.
This doesn’t necessarily maximize my impact, I think the swirling tides of history make any long term impact calculations a bit arbitrary, but it gives me a life that most of the time I can be proud of, and that is more than enough
So the author, by switching to local fonts, reduced the carbon emissions of the Internet by 0.000000056%.
Well yeah, one person switching to low-impact techniques on a low-traffic site won't change much. But (as with any other positive intervention), if lots and lots of people (say 50 percent of website owners, by traffic volume) reduce their footprint by 40 percent of so -- then that's a different story now, isn't it?
According to the Carbon Fund you can offset your CO2 emissions for $10 per metric ton.
Red herring, different topic. It's agreed by now that, whatever benefits offsets may bring (and this is hotly debated) -- we absolutely have to reduce emissions at the source as well.
If that point isn't 100 percent clear by now - then there's not much left to talk about, now is there.
> According to the Carbon Fund you can offset your CO2 emissions for $10 per metric ton. US citizen produce an average of 16 ton per year. So you can solve global warming by just 160$ per year per head, it's really not a big deal.
For me this 10$ per CO2 ton is extremely misleading. It maybe correct for now, but as soon as more people try to offset their CO2, the price will skyrock, because there isn't many 10$ per ton opportunity for CO2 offsetting.
Does anyone have a list of carbon-neutral VPS hosts?
Is it possible to build a carbon-neutral SaaS app, given all the dependencies we have on SaaS providers these days?
Yes, with carbon offsets: https://www.treehugger.com/best-carbon-offset-programs-50764...
WIRED "green report card" for the big cloud providers: https://www.wired.com/story/amazon-google-microsoft-green-cl...
Amazon's 2025 goal for 100% renewable: https://sustainability.aboutamazon.com/environment/the-cloud...
A registry of SaaS providers that respect the environment would be very useful.
Edit: Typo
While utilitarianism can be useful -- of course we should consider the outcome a policy -- I think it's a dead-end as a replacement for a bedrock moral philosophy. Utilitarians answer the question of "what is the good?" with "whatever maximizes the good". Sounds like kicking the can down the road to me.
Hannah Arendt:
> This perplexity, inherent in all consistent utilitarianism, the philosophy of homo faber par excellence, can be diagnosed theoretically as an innate incapacity to understand the distinction between utility and meaningfulness, which we express linguistically by distinguishing between "in order to" and "for the sake of." Thus the ideal of usefulness permeating a society of craftsmen—like the ideal of comfort in a society of laborers or the ideal of acquisition ruling commercial societies—is actually no longer a matter of utility but of meaning. It is "for the sake of" usefulness in general that homo faber judges and does everything in terms of "in order to." The ideal of usefulness itself, like the ideals of other societies, can no longer be conceived as something needed in order to have something else; it simply defies questioning about its own use. Obviously there is no answer to the question which Lessing once put to the utilitarian philosophers of his time: "And what is the use of use?" The perplexity of utilitarianism is that it gets caught in the unending chain of means and ends without ever arriving at some principle which could justify the category of means and end, that is, of utility itself. The "in order to" has become the content of the "for the sake of"; in other words, utility established as meaning generates meaninglessness.
Utilitarianism isn't, ever, in practice, a replacement for "bedrock moral philosophy", though this is a common strawman. Utilitarianism is a term for a feature of a "bedrock moral philosophy" (that it's rules involve maximizing some function of outcomes), distinguishing moral systems with that feature from ones which view right/wrong as inherent features of acts (or, more rarely, of other things, like individual actors) independent of outcomes.
Optimization doesn't matter as much.
These are my own thoughts and observations based on watching a litany of issues play out in tech and in the public from 2016-2020.
There are three types of arguments you can make: moral, descriptive, and normative. I won't dive too deep into these but if you're unfamiliar you should look at how these compare. The gist of it is that descriptive arguments talk about the state of things but don't attempt to produce a direction or judgement. Normative and moral both establish intended direction. Normative seeks to compare against the status quo, or a baseline that is widely accepted. Moral issues require no baseline for comparison and are most often phrased as "ought to be" and attempt to infer some things about people and things on both ends of the problem.
If you haven't noticed by now, the only thing that actually seeks to cast judgement on people are moral issues. Moral issues have a side effect of producing "oh, I'm/you're a bad person if I/you don't do/agree with this". These moral arguments are extremely useful in drumming up support for short term change, but are often fraught with grandiose language and extrapolation that aim to smooth over where people could object. Combining that with the intentional fallout of objecting, it makes moral arguments increasingly difficult to refuse. The long term fallout of this is that people eventually realize that the language was grandiose and feel misled, especially as predictions don't come true.
In my own experience, the astro-turfing of net neutrality is a great example here. Almost none of the claims came true, even if they did it was in very limited contexts that even professional advocates have a hard time trying to extrapolate. Does this mean that the argument for a net neutrality spirited framework is totally debunked? No, it just means that people over-promised and under-delivered in business speak. Regular people probably call this lying, misinformation, etc but I hesitate to assign intent to the deception.
Moral arguments also have a side effect which is empathy exhaustion. If every issue is a moral issue then eventually you'll have to separate yourself from the constant aura of morality, especially if you occasionally or even regularly have to face times where you object to something that is presented as a moral issue.
Another side effect of moral issues is because they don't usually subscribe to a baseline, or they subscribe to a maximalist baseline, so they require a lot more debate to take effective action on. Worse, they aren't fully debated and then outcomes which were supposed to improve life "for all of us" begin negatively impacting people and our way to deal with that is to prioritize people and their pain. This churn I think produces a lot of the descent that you read on HackerNews.
I don't know where the lines or thresholds lie. It sucks that we're even here, but I think what I've learned is we need less moral arguments and more normative and descriptive. Unfortunately, both of our political parties, which are now entirely interwound into societal issues as well, have their own morality and advocate their positions as such. It looks like a game of tug of war, except that rope fraying in the middle is the people affected by a given issue.
Some pretty cool data in there :)