Hacker News new | ask | show | jobs
by giuliomagnifico 1339 days ago
This is not a code issue, everything that use power is harming the planet, but the solutions listed there are not to write better/different code but simply switch the times and other things that only mitigate the problem.

Anyway better than nothing.

2 comments

I disagree. It doesn’t take 10mb of code to put a few lines of text to the screen. This occurs because:

1. Site owners want to track everything with really aggressive spyware.

2. Many developers are grossly incompetent and will blatantly tell you a few lines of text cannot be written to screen for less than a billion dependencies riding on the largest most trendy frameworks (plural).

That is millions of wasted CPU cycles per millions of users per day, which doesn’t also include the data centers than consume more power and water than the nearby city where people live.

People who decide to write big web applications that run on the cloud using Python instead of basically any language should be harshly censured.
I'm not sure about "harshly censured", but I have actually started looking at Python alternatives with the explicit goal of energy efficiency.

Another route I've been keenly pursuing is aggressively reducing download sizes in web apps I build: JS, images, HTML, CSS, the lot. No web fonts. I'm exploring Svelte as a means to reduce the JS component too, so client energy consumption due to JS ops is reduced.

These can all seem like trivial micro-optimisations, but "cloud computing" is a bloated monster. Billions of web app interactions per day and a few kB here and there soon add up.