News for hackers. Stuff that matters.
Re:Energy Efficiency across Programming Languages [pdf] by open-source-ux on Wednesday September 30, 2020 @04:52PM (#24643694)
When I look at other industries I see efforts to reduce energy consumption. A lot of programmers, in contrast, couldn't care less. The most popular languages are the least energy efficient and most resource intensive. But they make life easier for developers, or as programmers love to say 'more productive'.

When performance is an issue in running programs, a common response is: hardware is cheap, just add another energy-guzzling server or use a more powerful computer.

This attitude is embarrassing when you consider that in every other industry there is a push for reduced resource usage and lower energy consumption. The programming field is the exception.

On the other hand, when it's programmers who are on the receiving end of slow, resource intensive apps, they'll complain loudly. This industry is rife with hypocrisy.

Re:Energy Efficiency across Programming Languages [pdf] by Jtsummers on Wednesday September 30, 2020 @05:08PM (#24643863)
IT-centric orgs definitely care. In my second (post-college, full-time) job I got to see the effect of this directly as truck loads of old server equipment were replaced with about 1/10th the hardware. In their case, predominantly by making good use of virtualization so that applications could share hardware. They cut their power consumption by more than 90% by upgrading to newer machines as well (which were more efficient, while still being faster than the old ones).

This broad brush view that the IT industry doesn't care is absurd, they have to pay bills too and efficiency reduces those. They may not be motivated by environmental concerns, but the costs are very much obvious to them and they do address it with improved efficiencies where possible.

Re:Energy Efficiency across Programming Languages [pdf] by cellularmitosis on Wednesday September 30, 2020 @10:37PM (#24646709)
> A lot of programmers, in contrast, couldn't care less.

You really think the problem is the programmers?

Here's a homework assignment for you: approach the product managers in any given software company and pitch a new development practice, which will improve UX through superior performance, reduce AWS bills, and save the planet, all for the small cost of doubling all product release timelines. Then come back here and report their response.

Just try not to take it personally when they laugh you out of the room.

Re:Energy Efficiency across Programming Languages [pdf] by user5994461 on Wednesday September 30, 2020 @05:15PM (#24643950)
There is absolutely an objective to reduce the use of compute resources. Especially in the current era of AWS/google cloud where you pay $50 per core per month.

Companies care very much about resource usage past some amount of machines. They don't think in terms of power consumption or environmental footprint though, but in real dollars (the costs of hardware/cloud) that is highly correlated.

Kubernetes is the latest trend in spite of being an overcomplicated mess, precisely because it's an overcomplicated mess that can deploy and pack services more efficiently onto (less) resources.

Re:Energy Efficiency across Programming Languages [pdf] by easde on Wednesday September 30, 2020 @08:05PM (#24645653)
> The most popular languages are the least energy efficient and most resource intensive.

This is mostly incorrect. Of the top 10 programming languages on GitHub [1] only Python, Ruby and PHP are commonly used with an interpreter. The rest are all AOT or JIT compiled. I also suspect a large fraction of the Python projects are also data science / ML projects that heavily use packages like NumPy and TensorFlow that offload most of the work to highly optimized math libraries.

I also suspect if you were to look into the programming languages used by the companies with the most servers, they would skew more towards languages like Java and C++, or custom things like Facebook's Hack / HHVM.

[1] https://madnight.github.io/githut/#/pull_requests/2020/2

Re:Energy Efficiency across Programming Languages [pdf] by jpxw on Wednesday September 30, 2020 @05:25PM (#24644084)
I’d be interested to know at what point the energy required for me to write in C (with a significantly longer development cycle, and thus more commutes, more time powering the office, more time running test harnesses, etc) would be outweighed by the gain in its energy efficiency over <insert other language>.
Re:Energy Efficiency across Programming Languages [pdf] by saagarjha on Wednesday September 30, 2020 @05:28PM (#24644121)
A lot of "I'm not productive in $LANGUAGE" is often "I don't know $LANGUAGE" very well, not "$LANGUAGE is inherently worse". However, if you subscript to the idea of blub programming and such take a look at C++ or Rust.
Re:Energy Efficiency across Programming Languages [pdf] by Jtsummers on Wednesday September 30, 2020 @05:38PM (#24644252)
"It takes me longer in $LANGUAGE" != "I'm not productive in $LANGUAGE"

Some things are just faster to develop in some languages because they have different baseline capabilities. Try parsing and processing a lot of text input in C versus the same task in Perl. Assuming similar competency in both languages (hell, you don't even have to be fully competent in Perl for this, just not a total novice) and the Perl solution will come out faster unless you've already spent a lot of time doing specifically text parsing and processing in C (which is not its primary use-case for many, if not most, day-to-day C programmers).

Re:Energy Efficiency across Programming Languages [pdf] by jcelerier on Wednesday September 30, 2020 @05:33PM (#24644184)
> with a significantly longer development cycle,

is that the case though. I used to work in a company where we developped some apps in C++/Qt/QML and some others in Electron and for similar apps the development efforts were pretty much the same

Re:Energy Efficiency across Programming Languages [pdf] by pfdietz on Wednesday September 30, 2020 @08:34PM (#24645889)
There seems to be a trend toward using MORE computing power, if it saves on programmers. Continuous integration, fuzzing, other high volume automated testing techniques, all the various applications of machine learning.

If a programmer costs $200K/year, that salary could support about 300KW continuous power use at average US industrial electricity rates (about $0.07/KWh). So if you could spend (say) 20 KW to increase programmer productivity by (say) 10% you'd be coming out ahead.

Re:Energy Efficiency across Programming Languages [pdf] by wmf on Wednesday September 30, 2020 @05:20PM (#24644020)
Application code appears to be a small fraction compared to storage, databases, and various operational overhead: https://m.signalvnoise.com/only-15-of-the-basecamp-operation...