Hacker News new | ask | show | jobs
by ummonk 2148 days ago
The referenced AppSignal post about 13,000 dependencies for a todo list is conflating dependencies required for the build tooling with dependencies that are actually bundled in to the web app.

It's also hilarious that right after referencing the dependency problem in the JS ecosystem the OP then goes and advocates splitting up your library into a bunch of mini libraries. That's exactly how we got into this mess in the first place.

Also, computer speed has definitely gotten faster. There was a time period during which this was not the case, but particularly the switch to SSDs resulted in a massive jump in computer responsiveness. (The previous jump happened when we no longer needed to wait for dial up to establish a connection)

6 comments

I agree with the core point of the article, but I agree with your points as well. The conclusion of the article is definitely wrong.

I recently buddied up with someone who has a CS degree to try and make a desktop app, as a side project. I asked if he is familiar with MariaDB and whether or not he's used C++ ODBC.

Our discussion quickly turned into choosing libraries / existing code. He uses Spring and Hibernate and was bewildered by the concept of tying columns to application variables "manually". After I told him I have some CentOS servers where we could put a shared database, he bought a Windows Server because he "needs a GUI". He added, "Ideally, after it's setup, we'll never even have to remote in to it." For the actual desktop application, he wants to use Electron.

It seems there are two distinct branches of computing emerging - one where performance matters, and one where it doesn't. Performance will always matter in places like the stock market or on IBM mainframes. In the consumer-facing world, All that seems to matter is perceived performance. Slack and Discord seem fast, when you watch how quickly a new message pops up on your laptop screen after you sent it on your phone. They seem egregiously slow when you open up task manager and see just how much overhead the chromium-based engine adds -- but most people won't care.

Applications made for "consumers" tend to be made like a cheap car - corners are cut, the end result isn't pretty, but things in the category are what makes up 90% of ordinary use cases. Slack isn't meant to be open on your work machine while you're compiling code in the same way a Prius isn't meant to chauffeur top-level executives. It doesn't mean that the Prius is bad or unimportant - it will do far more for more people than the entire lineup of many luxury car brands.

But I am damn sure that I'd rather be engineering a Bentley than a Prius.

Edit: In the metaphor, luxury and performance are sacrificed, not efficiency. I probably should've used Fiat Chrysler, but unlike Fiat Chrysler, consumer-facing software has its place. I just don't enjoy working on it myself.

You're right about a lot but I really want to argue against the idea "people don't care." They do care. They care when their phone dies after 2 years and they have to buy a new one because updates have rendered it unusable. They care when the phone/pc/laptop gets hot with only a few tabs open. Polls seem to show people generally care about climate change, and as little as PC's use in energy (relative to transportation and electricity generation for things like heating), they probably would care about this too. Users just don't understand things could be better, especially if they're younger and they don't remember windows 2000 or dos for example. On the other hand, every older person I know curses the newfangled things, even if there are some new connectivity capabilities of modern machines.

And the thing is that connectivity has little shit to do with the layers of abstraction to idk render a button on a screen. Even developers, as your anecdote shows, lack the creativity to imagine better things! Christ if that doesn't show something is wrong than what will?

I’m not even that old (early 30s) and I curse at 99% of the tech I use. Especially tech that we use to build other tech.

I started my career as a software engineer writing C, then C++ working on desktop software. Things made sense back then, and that was just 10 years ago.

I’ve tried contributing features to two Electron-based apps. I gave up on both. I just can’t make sense of it.

I’ve sat down countless times over the last decade telling myself I’m going to teach myself this damn frontend web stuff. I gave up every time. It’s ridiculous.

Young folks who have only been exposed to modern garbage have no idea how good it was before the web took over.

I often wonder how this came to be. How we went from well-documented, efficient, sound APIs and libraries to the monstrosity that we have now. I have nothing to offer though.

> but most people won't care.

Charity Majors said about reliability: "Nines don’t matter if users aren’t happy."

I'd propose an alternative view here: "Bloat doesn't matter if users are happy."

Actually one of my desktop products received very much praises from the customers who (aside of nice features and responsiveness) also loved how few MB big single exe with no dependencies does so much more and faster than 1.5 GB download from the competitor.

My other current product custom made for a customer in C++ is business server that receives various commands over http, does lots of calculations and delivers data that are used to generate a report (I wrote a report generator in JavaScript and it runs on a browser). The whole thing is again single exe that needs nothing but connection to a database. The exe itself is around 1MB vs again gigabytes for the old mess they were using before and is more than 100 fold more performant. The customer was simply shocked when they saw a result.They did not think it was possible.

Users are happy until they saw better :)

Today bloat doesn’t matter, tomorrow you’re are a fat dinosaur

Sure, but... that confirms this view.
This view is more akin to working class parents telling their children to become a builder because “people have always been building”.

You should not outsource your main product. And if your product is a chat application that is supposed to be fast and always on the background, then you’re outsourcing your main area of expertise.

> "It seems there are two distinct branches of computing emerging - one where performance matters, and one where it doesn't."

The unfortunate corollary being that the prevalence of developers who treat it as if it doesn't makes it darned hard to find one who treats as if it does when you need one.

> "Applications made for "consumers" tend to be made like a cheap car"

Not really a great analogy. The Prius has a reputation for quality and reliability; it's often seen used in taxi fleets, where those qualities are a must. Luxury cars often have high maintenance requirements and poor reliability since cost is not a concern to their owners.

> Luxury cars often have high maintenance requirements and poor reliability since cost is not a concern to their owners.

This is absolutely a nit and does not disqualify your overarching statement at all, but generally these attributes are due to the constraints of technology-- for example, fitting large, high performance engines necessarily increases the frequency of maintenance intervals as well as the difficulty (and therefore, cost) of maintenance. If luxury car manufacturers could make cars with the handling and performance characteristics of their flagship models but with the maintenance costs and intervals of a Toyota Corolla, they absolutely would.

This tends not to be why luxury models are unreliable in practice.

Luxury models are used by the manufacturer as a proving ground for the tech they're going to filter down to the mass market models next. Luxury model customers are relatively price-insensitive but want to be able to show off shiny features, so they get the exclusive new tech that's not been tried at scale yet. Thus the unreliability. It's not the technical constraints, it's the maturity of the technology.

The main reason Priuses are used as cabs are local regulations, i.e. airports not allowing non-hybrid cabs, etc. For passengers experience is sub-standard compared to regular cabs.
What’s substandard about a Prius? They’re fantastic cars.
Good post. I would add that since Moore's law is over, I think the long-term prospects for crap like electron and discord are not good. Future phones and laptops will (almost certainly) never be orders of magnitude more powerful for regular workloads, so assuming that people will want to do more and more with these devices, it seems that software that burns millions of cpu cycles and gigabytes of ram just to put some pixels on the screen and send some http packets will eventually get squeezed out of the marketplace.
unfortunately, now the most messaging apps (teams, slack, signal come to mind) pack their UI with electron
I have to say I don't really get the analogy with Bentley vs Prius. Engineering the Prius seems like it's both more challenging and rewarding. Constraints are tighter and expectations of reliability are higher, and efficiencies are more important - in fact, the Prius is all about efficiency.

(Also, the point about your someone "with a CS degree" - it's completely irrelevant that they had a CS degree, AFAICT. It mostly comes down to their prior experience, and they clearly didn't have a lot of it. That's mostly orthogonal to education.

I also wouldn't pick C++ for a CRUD app, not without very specific requirements. I'd choose C# if there's no existing web app, but if there's an existing web app, or there's going to be one, Electron makes a lot of sense.)

> It seems there are two distinct branches of computing emerging - one where performance matters, and one where it doesn't.

The thing is - there is no need to address performance if it does not matter. That would lead you to Knuth:

"The real problem is that programmers have spent far too much time worrying about efficiency in the wrong places and at the wrong times; premature optimization is the root of all evil (or at least most of it) in programming." - Knuth

So I think there is actually a dial: if performance matters you turn it one way and optimize as necessary; if it doesn't go onto the next project that is fighting to get out of your head.

Please do not take this (Knuths statement) out of context. It is necessary read the whole text to understand this sentence. It has nothing to do with whether performance matters.
but sometimes performance is dependent upon your framework, so before you start you will need to know your quantity structure
There's another type of consumer-facing computing where performance matters: embedded computing on small, weak devices.

These are also very cheap devices, but they rarely have the resources to run something as bloated as an Electron app.

>Slack isn't meant to be open on your work machine while you're compiling code

meant by who ? Because I certainly keep slack open while I am compiling. And it seems to me that it is meant to be kept open in the background while you do other stuff.

I wish slack seemed fast for me. It's like typing into molasses.
Dual Core and Quad core were also massive improvements in performance.
In my experience what the switch to SSDs resulted into was Windows 10 becoming practically unusable on a mechanical HDD. Comparing how long the OS needs to start up, launch applications, etc on my laptop with Win10 vs a much older laptop with Win8 (the first and last time Microsoft bothered to optimize Windows the last decade) is night and day and that older laptop originally came with Vista!

When i first installed Win8 on that laptop i was so impressed i even took a video[0] of it (and yes, it seems like they kept that performance in 8, though sadly by 8.1 it became slower).

[0] https://www.youtube.com/watch?v=Ti3LQHXZ0Qg

The same happens on Macs. Starting Safari on an HD-based Mac is painfully slow.
At Microcenter you can buy a house brand SSD hard drive with 128G on it for $58 and boot from that and store all your other files on a D:\ regular hard drive. That is how I set up my son's Windows 10 gaming rig.
Yeah, my main PC is all SSDs. I might replace my laptop's mechanical disk with an SSD but i use it very rarely. If anything i use my retro(ish) PC more often than my laptop so i'm thinking i might buy a cheap SSD for that instead :-P.
Just know you can run a full Linux desktop experience on top of twenty-year-old spinning rust just fine. Micro$oft drooped the ball big time if one needs a ssd just to use a OS.
they optimized for current hardware, sacrificing some performance on outdated hardware.

I'd rather windows uses my SSD to the fullest, than that it makes concessions to spinning disks.

How is Windows using SSD to its fullest? All it seems to be doing is taking advantage of the greater speed to perform more I/O that it didn't do before which negates any performance improvements the SSD brings.
I'm not sure this is the right take, as I don't believe it's a matter of choosing to optimize for SSD vs. HDD's. Disks got faster, so the bar for baseline acceptable performance got higher.
It needs a SSD drive to boot faster. Otherwise it takes a few minutes instead of seconds.

Windows 10 is for newer hardware anyway, it runs slow on older hardware.

You are completely missing their point. "For newer hardware" means slower. I remember how Windows 7 was so well-designed that it actually ran faster on my all of my old XP machines than XP did. It was a step up in performance, not a step down.

In 2018 Microsoft disbanded the Windows team and moved engineering efforts to its cloud and AI teams. Windows 10 is on life support by engineers who aren't intimately familiar with its codebase. Performance and usability will only degrade in this situation and the specifications of newer hardware don't excuse constant deterioration in performance.

It was a re-org, those engineering teams just moved to be under CAI or ED. The people are still there.
All non Azure MS products are legacy now.

Windows 10 is probably slow on HDDs because it's updating a load of UWP apps in the background, resmon.exe disk tab will show what's going on.

There are countries where you will live with that $58 dollar for 2 weeks (or more). Maybe not everyone has the money to buy a SSD.
Responsiveness in terms of keypress latency has gotten much worse over time.
you should include a reference: https://danluu.com/input-lag/
that was one of the most enraging non-political things I've read in years
Well, that is an awesome read, thanks!
For a more succinct tldr of the same thing:

https://mobile.twitter.com/id_aa_carmack/status/193480622533...

Back in the '70s I worked on machines with head-per-track disks. SSDs begin to bring that responsiveness back.
The referenced AppSignal post about 13,000 dependencies for a todo list is conflating dependencies required for the build tooling with dependencies that are actually bundled in to the web app.

The point is that a dependency is a dependency, and making software needlessly complex in any way is bad.

I've run into this a lot with open source stuff (not even JavaScript, just native code): I want to fix/modify something, and I know it's open-source, so it should be easy, right? After looking at the sprawling dependency tree, and the effort it would take to set up a build environment --- which might not even give me the same output as the original binaries, which are working perfectly fine except for the part I want to change --- I decide I'll just find the locations with a debugger and patch the binary directly.

tl;dr: the complaint is equally valid when applied to build tools, which are themselves also software and becoming bloated.

"Effort to set up a build environment" is pretty much exclusively a problem with C and C++ code. Pretty much every other language has standard build tooling. e.g. with JavaScript you can 'npm install' and you're set.
Unless of course the developer uses yarn or whatever npm alternative is popular this week. The last time I tried building an electron app, it just spit pages of dependency errors at me and I gave up.
Sure there are two types (or more?) of dependencies, but at the end of the day the AppSignal app requires those +13,000 dependencies in order to work properly (first to build it, and then to run it). That's horrendous.
How many dependencies do we need to put food on the table? Perform a surgery? Or make an optically flat piece of glass?

I believe all pieces of technology have similar dependency graphs.

You might be missing the point. A hospital in which surgeries are performed should hopefully already contain all dependencies required for a surgery. So when a new surgery is starting, the hospital staff should not need to run out and get more supplies.

In the same way, the "dependencies" required to build my hardware aren't counted in that number. What counts is the extra stuff that isn't already part of the running system.