News for hackers. Stuff that matters.
Re:Principles of Green Software Engineering by BoxOfRain on Wednesday September 22, 2021 @08:51AM (#28615714)
I do wonder how many kW of power things that HN generally disparages as bloated (Electron being the main one people talk about) actually adds up to versus more efficient technologies?
Re:Principles of Green Software Engineering by musingsole on Wednesday September 22, 2021 @09:20AM (#28615975)
If the result or information presented by the most horrendous, energy inefficient, blockchain-backed, cloud replicated app results in a SINGLE person NOT traveling for a weekend, the carbon savings would completely demolish any cost for the software overhead.

/Devil's Champion Argument Incoming/: Facebook's part in effectively coordinating most people in most parts of the world to stay home during the pandemic has probably weighted their carbon ledger forever into the black. Or at least 5 years of dedicated bitcoin mining.

These green engineering ideas are interesting but taking them seriously would be the epitome of engineers optimizing the wrong thing.

Re:Principles of Green Software Engineering by horsawlarway on Wednesday September 22, 2021 @09:31AM (#28616096)
I agree 100%.

Reading through this thread has me damn well convinced that most folks have zero idea how much power things in their homes use.

Re:Principles of Green Software Engineering by BoxOfRain on Wednesday September 22, 2021 @12:49PM (#28618608)
It's interesting, I've been planning to move onto a sailing yacht for a while and part of the planning process has involved figuring out an energy budget which will inform what batteries and charging equipment (solar panels etc) are required to run a WFH (WFB?) setup. I bought a simple plug-in power meter and I was very surprised by the power usage of some things in my life!
Re:Principles of Green Software Engineering by pdimitar on Wednesday September 22, 2021 @11:06PM (#28624845)
Which power meter did you use?
Re:Principles of Green Software Engineering by BoxOfRain on Monday September 27, 2021 @04:42AM (#28668454)
Sorry, didn't see this. It was just a cheap plug-in one off Amazon, probably cost around £20 or so. It does watts, amps, volts and I think AC frequency too.
Re:Principles of Green Software Engineering by horsawlarway on Wednesday September 22, 2021 @09:11AM (#28615882)
I think you're firmly into the realm of diminishing returns by the time you're trying to optimize code that runs on a laptop that has a total power draw of 60ish watts.

Frankly - Using my kettle to make coffee twice a day (~15 minutes of runtime) is the same as running my laptop at full power draw for 5 hours.

Just switching a single lightbulb in your house from standard (~100w) to LED (~20w) more than offsets your whole laptop's power usage, assuming you have lights on while working.

Re:Principles of Green Software Engineering by anonymoushn on Wednesday September 22, 2021 @09:27AM (#28616057)
How many laptops does it run on all day, and does anyone run it on desktops instead?
Re:Principles of Green Software Engineering by horsawlarway on Wednesday September 22, 2021 @09:34AM (#28616130)
Even a desktop only runs about 100w unless you're doing something like gaming. Admittedly, a desktop guarantees you're using another screen, so tack on 60w for the external monitor.

You'd still be better off turning off the lights in a single room, in most cases, or simply toggling the AC up literally 1 to 2 degrees.

Re:Principles of Green Software Engineering by jhgb on Wednesday September 22, 2021 @09:52AM (#28616327)
If I remember correctly, my desktop runs at ~20W idle (went down to 15W before I added two extra memory modules) and ~70W fully loaded. That's a 50W delta per eight cores, so around 7W per fully loaded core.
Re:Principles of Green Software Engineering by pjc50 on Wednesday September 22, 2021 @09:17AM (#28615942)
The laptop power draw is dynamic depending on what you're doing with it, including how heavy the webpages are. But I agree that heating will generally dominate domestic use.
Re:Principles of Green Software Engineering by horsawlarway on Wednesday September 22, 2021 @09:21AM (#28615982)
Sure, but I'm being exceedingly generous with 60w, assuming a modern device that's about the limit of power consumption. To quote phoronix benchmarks on my machine:

Lastly, the battery power consumption varied from about 5 Watts during idling and when the screen was automatically dimmed to as high as 40 Watts under the most grueling benchmarks. On average through under load the power consumption was around 18.1 Watts.

https://www.phoronix.com/scan.php?page=article&item=dell-xps...

Re:Principles of Green Software Engineering by jawache on Thursday September 23, 2021 @11:28AM (#28630611)
If your application is used by 1 million people, does your equation become a lot more interesting?
Re:Principles of Green Software Engineering by sk2020 on Wednesday September 22, 2021 @10:18AM (#28616568)
I think you could end up in a quagmire of trying to calculate all the secondary effects of different production strategies. Maybe another GUI framework uses less power, but maybe it takes more developer hours. How much power do those workstations consume? And their offices or home offices? Or the power consumed by hosted services they use? What about the power to heat their coffee? What country are the developers in and how is their power sourced? Is a kWh of Chinese coal comparable to a kWh of US natural gas?

I don’t think a commissar can correctly compute costs of design and implementation alternatives, and I think permitting an open market and letting prices sort this out is a more viable option.

Re:Principles of Green Software Engineering by hinkley on Wednesday September 22, 2021 @12:24PM (#28618292)
One of the elephants in the climate crisis room is coming to grips with how many watt-hours are appropriate to spend on a task that could be completed with human power alone.

As Denis Leary used to joke, we have exercise machines that mimic normal activities which we refuse to do, so we are all turning into hamsters. Maybe instead of a leaf blower I need a broom with a better design and just count the cardio I'm going go get against my budget for the week.

Maybe, as some people argue, getting down and looking at my plants closely avoids me having to spray fossil-derived chemicals on them based on incomplete information. It's a matter of perspective on whether that time is quality or just a chore. Some cultures elevate certain chores to an art form. Japanese gardening is but one example in one niche in one cultural group, but there are many others.

Re:Principles of Green Software Engineering by sokoloff on Wednesday September 22, 2021 @09:11PM (#28624122)
The primary fossil (nat gas) derived chemical is nitrogen. No amount of you fussing over the plants is likely to replace or substantially diminish their need for nitrogen. It can avoid using weed control products, which are overwhelmingly not fossil-sourced.
Re:Principles of Green Software Engineering by sseagull on Wednesday September 22, 2021 @09:13AM (#28615903)
My guess is not much.

However, there is also the cost of consumers needing to upgrade hardware when things start getting slow again because of these developer choices.

There’s a figure floating around that if consumers kept their phone for 1 more year, that is the equivalent of taking 100,000s of cars off the road. Not sure how reputable that study was though.

Re:Principles of Green Software Engineering by whbrown on Wednesday September 22, 2021 @09:33AM (#28616118)
That simply reflects the fact that 5.5 billion is 55,000 times larger than 100,000.

Anything you do to have even the tiniest effect on the consumption of nearly the entire world's population is going to have a large impact.

Re:Principles of Green Software Engineering by throwaway2016a on Wednesday September 22, 2021 @08:55AM (#28615759)
That's a good point I didn't think of. And one that I think also applies to a lesser extent to websites. It is certainly possible to build a website that makes Chrome use a lot of CPU and network data.

I still think it applies mostly to graphics apps and things like blockchain though. As bad as electron is... would be interesting to measure it with those tools the website lists, though.

Re:Principles of Green Software Engineering by BoxOfRain on Wednesday September 22, 2021 @09:03AM (#28615835)
Yeah my gut feeling is that Bitcoin alone trounces any waste caused by Electron and badly written webapps, but it'd probably still be worth measuring I think. At the very least it'd be another argument on the side of "let's not use Moore's Law as an excuse for writing inefficient software".
Re:Principles of Green Software Engineering by pjc50 on Wednesday September 22, 2021 @09:15AM (#28615921)
Ran across this earlier today:

https://twitter.com/alexhern/status/1440295741835014149

"Something that stood out: TSMC (with 55% of the global market share, per https://theregister.com/2021/06/01/q1_2021_foundry_revenue_t...) uses 5% of all Taiwan's electricity, which is approx 12TWh/yr. Bitcoin's electricity footprint is… 13 times that, at 164TWh/yr (https://digiconomist.net/bitcoin-energy-consumption)"

Re:Principles of Green Software Engineering by goodpoint on Wednesday September 22, 2021 @08:59AM (#28615805)
Tons, unsurprisingly. There are website energy calculators around.
Re:Principles of Green Software Engineering by throwaway2016a on Wednesday September 22, 2021 @09:05AM (#28615845)
I've always been skeptical of those. Especially the ones that do things like measure the brightness of the pixels. For the amount of time someone tends to spend on a single page it seems like optimizing just one page is like a water dropper in an ocean. Whereas, say, Visual Studio for instance is on my screen 6+ hours a day.

But maybe my next web app I'll take that into consideration.

Re:Principles of Green Software Engineering by goodpoint on Wednesday September 22, 2021 @01:24PM (#28619114)
> I've always been skeptical of those.

CPU usage is a very accurate proxy of energy usage. Second to that, network traffic.

Simply ignore pages that use poor metrics.

> Whereas, say, Visual Studio for instance is on my screen 6+ hours a day.

...and some people have private jets, but this is whataboutism.

Re:Principles of Green Software Engineering by throwaway2016a on Wednesday September 22, 2021 @05:14PM (#28621914)
That second part of that comment was very unnecessary. Please don't do that on HN, I even threw you a bone at the end and said:

> But maybe my next web app I'll take that into consideration.

Your whataboutism comment is also off base since the comment you were replying to was asking about bloated non-browser desktop apps so my comment is very much relevant. And the parent to that comment was about software efficiency. If anything you're the one off topic.

It's fair to say: well actually they are very accurate because of CPU usage. You don't have to agree with me. But to result to ad hominem is unnecessary. Let's keep it civil.

Re:Principles of Green Software Engineering by sokoloff on Wednesday September 22, 2021 @09:20PM (#28624187)
Where was the ad hominem attack? Unless the other poster somehow happens to know you have a private jet (which no one else would reasonably know unless you just got oddly defensive about it), I can’t see it.
Re:Principles of Green Software Engineering by throwaway2016a on Wednesday September 22, 2021 @11:21PM (#28624907)
Assuming that is a legitimate question:

Whataboutism is a logical fallacy where a person tries to frame the other as a hypocrite for supporting one view when another view exists.

You probably already knew that but stating it for the sake of anyone who may not.

It is used pretty exclusively by dishonest people and people who have a poor grasp of the topic. Also, to add to it, the car vs plane example is extreme to the point of being condescending. He completely dismissed my point and went straight to assuming I must be either being dishonest or ignorant.

So yes, I took that personal. Especially when my comment was not whataboutism at all, it was actually directly related to the discussion in the parent comment about desktop apps. I apologize for not just letting it go/slide.