Ask HN: will the RAM shortage finally make programmers write lean code? The thread's answer is a tired 'no'

With DRAM prices spiking, someone asked whether developers will reach for tighter algorithms. The 235-comment reply was a near-unanimous Betteridge's-law no, for one reason: client RAM is a tragedy of the commons, and nobody is rewarded for saving it.

In brief

The recurring diagnosis: the bloat is architectural, not algorithmic. Bundling Chromium to ship a chat app is the problem, not your choice of data structure.

Where optimization will actually happen, per a big-tech engineer in the thread: server-side, where RAM is a line item, and mostly by 'stop doing stupid stuff', not fancy algorithms.

The question, and the wall it hits

The Ask HN is simple: with the current memory-price crunch, will programmers start writing more memory-efficient code — reaching for "more advanced algorithms and data structures that use less memory"? The 235-comment thread answers with a near-unanimous no, and the reasoning is about incentives, not ability. The clearest statement of why came from a founder who ships desktop software for a living:

"The main place RAM usage is going to get optimized is on the server side, because the client's RAM is a tragedy of the commons. If you're reducing RAM usage while your competitor adds features then the extra RAM saved by your app will just be silently allocated to theirs" — Mike Hearn, founder of Hydraulic

Where it will and won't happen

An engineer inside a large company confirmed the server-side exception — and punctured the romantic idea that this means clever algorithms:

"At my $dayjob (one of the big tech companies) we're already planning a major goal next year of optimizing server code to reduce RAM requirements… In practice I expect most optimizations will come from 'stop doing stupid stuff' and not 'use fancy advanced algorithms.'" — a big-tech engineer reporting from inside the planning

The diagnosis the thread kept returning to is that the waste isn't in your code's complexity class at all:

"Algorithms and data structures aren't the problem, bundling Chromium to make a chat app is the problem." — a commenter on where the bloat actually lives

And the cynical one-liner that summarized the whole incentive structure:

"Not unless you get promoted for writing more efficient code." — Xe Iaso, software engineer

Cost lands on the wrong desk

The thread's logic is airtight and a little bleak. Efficiency happens where the person who can fix it also pays the bill. On a server, RAM is the operator's cost, so the crunch becomes a budget line and someone gets a mandate to trim it. On a user's laptop, the RAM belongs to the user, the cost is invisible to the vendor, and any byte you save just gets spent by the next Electron app in the tray. The memory shortage will produce leaner backends and exactly zero lighter desktop apps — not because engineers can't, but because no one ships the quarter where they did.

Get breakdowns like this every day

The top Hacker News stories, unpacked — by email, Telegram, or RSS.

Next story · 23 of 30 Read more
🚀Tech

Linux finally deleted strncpy after six years and 360 patches, and a programmer who saw it born called it 50 years late

The kernel removed a C function that's been quietly producing bugs since the 1970s. In the thread, the man who first met strncpy half a century ago, and the creator of the D language, agreed on one thing: they always found a bug wherever it appeared.

★ 108 · 💬 80 · phoronix.com · 3 min