Live data from Hacker News

Software disenchantment

tonsky.me

61–70 of 98 posts

Re: Software disenchantment

#61
We should split layers and rush out everyone from the room where low-level things are going. Then, at least, the low-level things will not break.

In an ideal world, we should have building bricks, which even end-users should build an app. Instead, we have frameworks, which are only for programmers, and provide only some automatizable patterns (e.g. a web framework finds which code should be run based on URL), or wrappers (e.g. ORM).

Frameworks and libraries _literally_ hide stuff from progrmmers. They even don't know how computers work.

I've written some 256-byte intros, and showed them for my colleagues. They were amazed:

- Wow, which language do you use, Java? Oh, no you must probably can not use even C++, only C. (Solution: you can not use any language, only assembly.)

- Which framework do you use, Unity? Or pure OpenGL? (Solution: you can't use any, you must put every pixel yourself.)

They don't know, what fits in 256 byte. They don't care what they're producing. And it's not their fault.

Re: Software disenchantment

#63
post #38

1) some of these complaints are invalid: yes Linux kill a "random" process when there is no more memory available, but except in 'static' configuration where everything has a known size, what's the alternative? You can have a misbehaving application use lots of memory but it's a normal application whose memory allocation fail, what do you do? 2) this bloat isn't new: I remember being amazed by BeOS responsiveness com…

1) Don’t promise memory you don’t have. On windows VirtualAlloc will fail if it doesn’t have enough page file space to satisfy the request. This allows the application to do something smarter than with the false promise it gets from mmap. 2) Really depends. Applications spend a lot of time in syscalls.

Yup, pretty sure that "overcommit" should never have been the default option (although it is quite easy to disable, comparatively few people know that it even happens).

Re: Software disenchantment

#64
Shit quality of software is easily explained with this formula.

Because unlike in many other industries there are no strict regulations in software, there is no floor for the quality of the products.

So economic forces push quality to the lowest they can get away with.

It's much easier and cheaper to apologise to a customer for a bug and give them a refund than to ensure ahead of time that the bug doesn't happen in the first place.

The worst case scenario is not all that bad so generally businesses only bother to keep the quality high enough to compete but not "unnecessarily high".

If it costs $10k to make an app. You could also always spend $100k to make it more performant and robust. You could also go the other way and only spend $1k and have a slower buggier version. Where do you the line?

We end up reaching an equilibrium state.

Over the long term things get better incrementally. Individual vendors focus on their core objective and rely on those 'free' improvements.

For example a game maker whose game is a bit slow may make a 1 month effort to make their game faster and do what they can. But it's not practical for them to spend 1 year to achieve some sort of perfection state.

Re: Software disenchantment

#65
Article tl;dr: "I believe that apples are more efficient than oranges after all."

I just want to point out that the idea that "modern buildings use just enough material to fulfill their function and stay safe under the given conditions" is fundamentally at odds with the author's subsequent thesis.

Modern buildings don't use "just enough material", because "just enough material" would be _just_ concrete everywhere; it would have been "just wood" 200 years ago, but that's not good enough now. This is exactly the problem: it's not software that is unnecessarily bloated, it's software that has evolved to solve higher order problems, ones that are not simply based in how fast a computer can count to 10. Similarly, the definition of "fulfill their function" in the context of buildings have changed too. That definition changes all the time, even in building codes.

In the modern-building hierarchy of needs, we are way passed the "stay safe" level. We still optimize for safety, sure, but that hardly accounts for your spray foam insulation, HVACs, builtin wireless units, complex built-in cabinetry, complex appliances, and more. Simple things like "electricity" are now part of the definition of fulfilling building function. Go find a 200 year old building and you will find a building that simply does not fulfill today's functions. Even safety standards have and continue to change all the time. You can look at historical building codes and see evolving fire safety (asbestos? NO ASBESTOS!), seismic safety, and more.

This is the point. To say that Windows 95 is 30MB discounts the years of improved process space isolation, memory protection, Spectre mitigation, that, if missing, would cause enormous public backlash about why Microsoft doesn't care about security. Windows 10 is 100x larger because WE asked for it to be. WE wanted WiFi, VPN, IPv6 switchover and tunneling all added to our network stack. WE wanted GPU enhanced UI threads. WE want haptic feedback and touchscreens and predictive text and predictive multi-touch pixel accuracy for our touchscreen laptops. This extra complexity exists because our standards changed. A text editor isn't just something that renders ASCII anymore-- heck, it's not even just for rendering characters. My "text editor" is a full web browser because I _need_ that for development these days.

Extra complexity is a feature not a bug. We built computers specifically to do this stuff, not in spite of it. The abstractions and complexities aren't getting in our way, they are literally the things we are building. Does performance suffer? Maybe, but that's because we are explicitly paying into functionality. If you wanted a fast text editor, obviously a black-and-white screen that only renders 256 characters will be faster than VS Code, go ahead and use that software, but you're not getting the other things you probably want. Your very next complaint will undoubtedly be "how do easily I diff my Git branches?" -- and this is how software becomes more complex.

Welcome to progress.

Re: Software disenchantment

#66
post #51

Love this article. I gave an internal talk recently that was about the sad state of programming right now. How we used to set a variable in assembly language: mov [foo], ax How we do it in React / Redux // constants.js export const SET_FOO = 'SET_FOO' // actions.js import { SET_FOO } from './constants' export const setFoo = foo => ({ type: SET_FOO, payload: foo }) // reducer.js import { SET_FOO } from './constants' c…

This is extremely hyperbolic, and I'm sure you know this. Here's how you set a variable in React:

const foo = 1;

What you're doing in your complicated sample is not _just_ setting a variable, you're also exposing it to a KVO subscription system that you could never represent succinctly in ASM.

What's sad is how programmers communicate programming concepts right now, with quick digs and hot takes and zero actual critical thought to what is being compared. I'm disappointed that you're spreading FUD in your internal talks.

Re: Software disenchantment

#67
post #64

Shit quality of software is easily explained with this formula. Because unlike in many other industries there are no strict regulations in software, there is no floor for the quality of the products. So economic forces push quality to the lowest they can get away with. It's much easier and cheaper to apologise to a customer for a bug and give them a refund than to ensure ahead of time that the bug doesn't happen in t…

This isn't an economic issue, it's an efficiency issue.

There are 3 competing ideas: Fast, cheap, quick. You get to pick 2. We're picking cheap and quick because "fast" comes for free on a longer-term timeline. You can argue with whether or not this is the right choice, but this is the choice society is making, and IMO it would work better than taking significantly more time to build something that is only 10% faster. It's more efficient to let hardware manufacturers solve the fast problem when the differences are on the order of 5-10% a year but the time-to-release problem is on the order of 50-100% differences in development times.

Re: Software disenchantment

#68
post #38

1) some of these complaints are invalid: yes Linux kill a "random" process when there is no more memory available, but except in 'static' configuration where everything has a known size, what's the alternative? You can have a misbehaving application use lots of memory but it's a normal application whose memory allocation fail, what do you do? 2) this bloat isn't new: I remember being amazed by BeOS responsiveness com…

1) Don’t promise memory you don’t have. On windows VirtualAlloc will fail if it doesn’t have enough page file space to satisfy the request. This allows the application to do something smarter than with the false promise it gets from mmap. 2) Really depends. Applications spend a lot of time in syscalls.

1) it doesn't really solve the issue except if you can allocate everything you need at startup: if you need more memory but someone else had a bug which used all the memory you also have a problem..

Re: Software disenchantment

#69
One of my friend pretend that we - software engineers - should work as mechanical engineers. They have a documented, standardized, and limited set of screws, nuts, ... and they build anything with it. This allow to develop CAD tool to assemble, verify, simulate, ... On our side, we have thousands of implementations of basic SW blocks (fifo, mutex, ...), or even "bigger" concepts (server, reader/writer, state-machine ...). What do you think ?

Re: Software disenchantment

#70
Absolutely agree with the author. I care about my program's efficiency because some day somebody compares my software and competitors and write an article that my software is faster than other. It's a direct influence on my business. Furthermore, I like to write efficiency programs. It's my engineer nature. It's right for me.
Post reply on HN