News for hackers. Stuff that matters.
Re:Our Code Is Harming the Planet, We Need Carbon Aware Desi... by giuliomagnifico on Sunday October 23, 2022 @04:45AM (#33305520)
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.

Re:Our Code Is Harming the Planet, We Need Carbon Aware Desi... by fazfq on Sunday October 23, 2022 @05:15AM (#33305651)
People who decide to write big web applications that run on the cloud using Python instead of basically any language should be harshly censured.
Re:Our Code Is Harming the Planet, We Need Carbon Aware Desi... by austinjp on Sunday October 23, 2022 @05:33AM (#33305721)
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.

Re:Our Code Is Harming the Planet, We Need Carbon Aware Desi... by throwaway0asd on Sunday October 23, 2022 @06:41AM (#33305975)
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.

Re:Our Code Is Harming the Planet, We Need Carbon Aware Desi... by rwmj on Sunday October 23, 2022 @05:09AM (#33305623)
https://dl.acm.org/doi/10.1145/3533028.3533308 A paper where the authors use machine learning (ML) to optimize latency and hardware usage of Apache Flink dataflow programs. There's a paper in preparation from the same authors where they're looking at ML to reduce energy usage.
Re:Our Code Is Harming the Planet, We Need Carbon Aware Desi... by xigoi on Sunday October 23, 2022 @05:10AM (#33305628)
Clickbait title. The article is not about writing carbon-aware code, but about where to run large-scale applications.
Re:Our Code Is Harming the Planet, We Need Carbon Aware Desi... by lvxferre on Sunday October 23, 2022 @05:12AM (#33305634)
As another poster said, that isn't a code issue.

You know what is a code issue though? "I dun need no optimazashun, I'm a faithful beleevur in Moore's Law, in the fuchur ppl will run my junk XD". Every single of those needless operations that your software does consumes electricity, without actually improving the life of anyone. Those will pile up because it isn't just you, it's software developers from the whole world doing this kind of stuff, with software run by almost everyone in the world.

It's fine to not care too much about efficiency when you're just solving some local issue with a dirty bash script, that you'll run exactly once and forget about it. However, software developers should have a bit more insight that needlessly wasting everyone's electricity.

Re:Our Code Is Harming the Planet, We Need Carbon Aware Desi... by togaen on Sunday October 23, 2022 @05:17AM (#33305668)
Problem: cloud computing is hurting the environment.

Solution: a new cloud computing service to add on top of your existing cloud computing services.

Brilliant.

Re:Our Code Is Harming the Planet, We Need Carbon Aware Desi... by Am4TIfIsER0ppos on Sunday October 23, 2022 @06:03AM (#33305815)
Pointless animation on that page - wasting cycles - needless carbon spent. Vile hypocrites.
Re:Our Code Is Harming the Planet, We Need Carbon Aware Desi... by nathanaldensr on Sunday October 23, 2022 @10:08AM (#33307123)
"Good for thee but not for me!"
Re:Our Code Is Harming the Planet, We Need Carbon Aware Desi... by stjohnswarts on Sunday October 23, 2022 @07:11AM (#33306074)
Use compiled binaries everywhere! End the hegemonic AntiGreen opression of dynamic languages! ;) . CORE - compile once, read everywhere is here to save us
Re:Our Code Is Harming the Planet, We Need Carbon Aware Desi... by l3uwin on Sunday October 23, 2022 @07:20AM (#33306108)
Drops in the bucket while data-centers burn most of their consumed power in cooling, ups bleed, and idle unused capacity before a single line of code is run.
Re:Our Code Is Harming the Planet, We Need Carbon Aware Desi... by bell-cot on Sunday October 23, 2022 @07:31AM (#33306140)
With all the bloat-tastic web sites there are these days... What if a browser or plug-in displayed a little animated "Electric Meter" icon, which showed how power-sucking the site you were currently viewing was? With a few customization options (title, colors) users could re-label it as "battery sentry", "bill miser", "earth saver", or whatever floated their boat.

Seems like something that could really appeal to Joe Average User.

Re:Our Code Is Harming the Planet, We Need Carbon Aware Desi... by hdjjhhvvhga on Sunday October 23, 2022 @07:48AM (#33306213)
It looks like most comments here ridicule the idea. I think it's something that for some reason is discussed more in Europe than in the USA.

Basically, the point here is that (1) if any given computation can be performed in several ways, and one of them consumes less energy, you should strive to use it, (2) if you can get a similar result by using significantly less energy, you should consider it.

The reason for that is the scale: at this point we can not ignore the fact that the number of computing machines in everyday use is so high that even small changes that impact a large number of them also impact the whole environment. So obviously we are talking mainly about biggest players mainly. But not only: if your small library or app becomes so popular everybody starts to use it, you can make a difference, too (plus your users will love you - nobody likes resource hogs).

Re:Our Code Is Harming the Planet, We Need Carbon Aware Desi... by twelve40 on Sunday October 23, 2022 @07:53AM (#33306239)
Europe can start by ditching those idiotic cookie warning popups. I bet that alone can power a small country size of Denmark!
Re:Our Code Is Harming the Planet, We Need Carbon Aware Desi... by ekianjo on Sunday October 23, 2022 @08:01AM (#33306287)
Delivered by a page needing 4+ Mb for something that's mostly just text. Well done showing us how to save the planet!
Re:Our Code Is Harming the Planet, We Need Carbon Aware Desi... by vfclists on Sunday October 23, 2022 @08:29AM (#33306420)
Use Nim instead of Rust and C++. Shorter compile times.
Re:Our Code Is Harming the Planet, We Need Carbon Aware Desi... by metta2uall on Sunday October 23, 2022 @08:32AM (#33306441)
Nice to see an article on environmental impacts but it seems to be missing the "approach" of simply using less energy.. For example:

1. Generating less logs & expiring them more quickly 2. Including fewer third-party SDKs 3. Using lower-resolution images & videos 4. Not encouraging people to buy unnecessary goods through marketing..

Re:Our Code Is Harming the Planet, We Need Carbon Aware Desi... by dsvr on Tuesday October 25, 2022 @11:40PM (#33339551)
Here's an example of how an existing (and maybe the oldest?) language but with "new armor" can significantly lower the carbon footprint:

Writing Green Software - Is Our Code Unfriendly to Environment - https://dev.to/velydev/writing-green-software-is-our-code-un...