Live data from Hacker News

Software disenchantment

tonsky.me

71–80 of 98 posts

Re: Software disenchantment

#71
post #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 criti…

Yes, still its a way to set a value. And don't be so sure you can't make an entry in a KVO subscription system in asm - of course at bottom that's exactly what's happening.

I'm disappointed at the zero-attempt-to-understand-the-point digs made on hacker news (like the one I'm responding to). The point is, how is multi-layered abstraction an unalloyed good? Its heavy, slow, complicated to author and explain, and not doing all that much of value.

Re: Software disenchantment

#72

Great article! I've been thinking about this problem since 2006, and there are probably a hundred reasons why things are as bad as they are. Many commenters here have hit upon some: misuse of abstractions (they should be used to save time, NOT save knowledge), insistence on code reuse, etc. To add a few more: treating programming like a form of manufacturing instead of an art, believing that the latest language/tool/…

My buddy Tom says "Lots of people are writing code now. Most of them shouldn't" He's old-school write-it-from-the-bottom-up. His solutions are elegant, bulletproof marvels that fit in tiny devices and run like lightning.

Re: Software disenchantment

#73

People won't pay for efficiency. People buy solutions to their problems (features), not efficiency. If it needs to be efficient, it will be (the games example). The death of Moore's Law may rejuvenate efficient software. BTW If you use old unix tools on a phone, it's super fast (in a terminal emulator like http://termux.com ). Sadly, the idea of abstractions enabling you to think better (like Alan Kay's point of view…

>If it needs to be efficient, it will be (the games example).

Yeeah, no. Definitely a no.

>People won't pay for efficiency. People buy solutions to their problems (features), not efficiency.

Not wrong. Businesses pay for efficiency.

Re: Software disenchantment

#74
I agree with the author’s statement of the factual elements, size of binaries, memory utilization, load speeds, resource intensive simple task applications.

But I disagree with the author’s reasoning and line of thinking regarding the how and why.

The functionality and tome period being referenced for when things were simple and fast referred to a period when your interface was lot resolution or entirely text baed. The action of updating information on the screen and the information on the back end was minimal. Contrast that to today, where you are dealing with a large display with high resolution imaging. You are now talking about a full blown HD gui where your screen updates includes plenty of images, videos, and on the back end, you’re handling edits that may or may not even be local resources, subject to network latencies.

Also, modern computers are basically all multi-user systems under the hood, configured by design to be able to recognize, load drivers for, and initialize any and all devices you might deem fit to stick into the computer. Your text editing is running at the same time the system is performing back end scans, probably running multiple web pages, mini services, etc.

Not saying there isn’t inefficiency or that there isn’t really bad design. But rather than look at it as meaningless, understand the underlying mechanism for why.

Why has no major project taken on the task of a new lean kernel? Why? You can existing kernels and slim them down. Open source means being able to take kernel source, reconfigure it to remove the bulk of the cruft you don’t need, and shrink down your footprint.

It also means you OS doesn’t need to be the size of one or more DVD(s), you can slim it down.

Same thing for compilation toolchains. You can slim it down. You don’t need to include every library you’ve ever loaded onto your compile environment.

There ARE lightweight text editors out there. The heavy weight ones are because people wanted to support all kinds of fonts, formatting, input/output file formats, multi-media, etc. You want to pare that down, you can.

Sure, there are lazy coders out there. But what one person calls extra cruft, another person calls tech debt waiting to happen.

So you write a super light weight piece of code that doesn’t need to incorporate any special libraries because you wrote it all using standard library calls. Yay. Who is going to maintain that when you leave?

You write an application component and forego all of the build toolchain and frameworks that make up so much bulk now, so you hardcore everything. That’s a maintennace nightmare when it gets deployed and other people need to integrate it into a productional stack because no one ever bothered to ready it for CD/CI.

Yes, there is alot that sucks about software design at large. But the author is painting with a broad brush, focusing on one set of pet peeves, as observed, and ignoring the underlying reasons for why those design decisions might be in place.

For build environments: npm, python, runy, golang, etc: you can configure the build environment for your piece of code to require a specific version of npm, dependencies, etc. this would freeze the runtime environment so that as the language at large advances, you aren’t forced into a broken state. This applies to OS package management as well.

The example of DOS being able to run on modern hardware... that is only seeing one facet of the situation. Yes, DOS itself, which is x86 code, can run on modern hardware unchanged.... but that isn’t because of excellent coding. That is because of the massive effort put in by the chip makers to maintain backwards compatibility. In that example, the bulk and legacy stuff just got offloaded to hardware. :/ it works not because it’s great, but because the hardward was designed to allow it to keep working.

Much in the same say that some of the more visible software bloat exists: backwards compatibility, cross compatibility, wide array of hardware compatibility, file and data format compatibility, language compatibility, etc.

The author makes some good points, but I think that the author also has some tunnel vision going on.

Can UI be improved and be less bulky? Hell yes.

Can applications return to their simple roots and be highly performant and low latency, hell yes(as long as you are willing to pare down on optional functionality)

- can we tun fast OS environments on “older” hardware? Yes! But with the caveat that the price you pay is using older libraries, older methods, or having to back-port code yourself.

Re: Software disenchantment

#75
post #5

> Recently our industry’s lack of care for efficiency, simplicity, and excellence started really getting to me, to the point of me getting depressed by my own career and the IT in general. Loading this website resulted in 5.3MB being downloaded over 42 requests.

I block everything but HTML by default. One request, 10.49 KB transferred.

+1 much of the weight/bloat of web pages are: javascript code, massive amounts of media, ADVERTISEMENTS!!!!, etc.

The base html is fairly lightweight. ;)

Re: Software disenchantment

#76
post #68

Earlier quoted context omitted.

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..

You may have caches or other optional buffers you can free. Or you may choose to save or do some other action to save user data. It doesn't solve the fact you don't have memory, but it does let you at least do something about it.

Re: Software disenchantment

#77
One reason for software bloat is DRY principle. From very first steps every programmer told DRY! As a result modern software usually has many abstraction layers (because with many layers you can reuse more code) and hundred of dependencies (instead writing/copying a few lines of code we just add one more dependency, which has it's own dependencies and so on).

Re: Software disenchantment

#78
post #5

> Recently our industry’s lack of care for efficiency, simplicity, and excellence started really getting to me, to the point of me getting depressed by my own career and the IT in general. Loading this website resulted in 5.3MB being downloaded over 42 requests.

I block everything but HTML by default. One request, 10.49 KB transferred.

With images, it's 14 requests, 24 KB, a little over a second. (I block JS.)

Re: Software disenchantment

#79
post #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…

> My "text editor" is a full web browser because I _need_ that for development these days.

I mean, you definitely don't need a full web browser for software development. That's maybe the least worst option you have at the moment (which is sad) but it could be hella smaller.

Re: Software disenchantment

#80
My colleagues (and probably twitter followers) are always sick of me ranting about stuff like this. A few years ago I decided to compile screenshots I'd posted on twitter in the previous single month:

https://blog.dantup.com/2016/04/have-software-developers-giv...

That it happens is bad enough, but the fact that so few care about it is reslly depressing :(

Post reply on HN