8 ms·
A Plea for Lean Software (1995)
- deterministic 3y agoPlease stop blaming the tools, companies, users, God, your neighbour, politicians, capitalism, or whatever else developers traditionally like to blame for low performance software. The truth is that developers are responsible for developing slow software. Nobody else. So if your code is slow, take responsibility for your own work and fix it! Learn how to make your code fast. Listen to developers who know how to write fast software (game developers for example). You might learn something. But most importantly pick architectures that are fast by design. Most popular architectures are not and never will be. A single modern server is unbelievably powerful and can do an enormous amount of work if you code it well.
- ChrisArchitect 3y ago(1995)
- ChrisArchitect 3y agoAnd a more recent heavily discussed rendition: A 2024 Plea for Lean Software https://news.ycombinator.com/item?id=39049956 https://news.ycombinator.com/item?id=39049956
- devwastaken 3y agoWe need something that dictates how commercial software can be distributed, installed, and what it can automate and do without your consent. Software increasingly adds itself to "run at startup" automatically. Nobody needs to have a bunch of startup user interface apps. It is completely unnecessary and has little purpose other than data collection. A work VPN I have to use requires a startup background service. I'm not even using it, it does not need the service to operate at boot. Steam service does this too, as do many other applications. Microsoft will remove my group policy that disables their useless and performance destroying antivirus. The software that is one of the big 10 in causes for why windows laptops are trash. FYI AV's are humorously easy to bypass. Adblockers and browser settings are more effective. On MacOS I can just disable these easily. On windows, I need auto runs to ensure, and either the application breaks (steam) or it'll turn itself back on. "A plea for windows' demise". Preferably the rest of Microsoft with it.
- tpmoney 3y agoThinking about this recently and I’m wondering if part of this is that OS developers have stopped providing common services as part of the OS and part of it is that many apps aren’t coded to the native services the OS provides in the first place. Most apps that throw a startup process in the background are probably aiming for (in part) an auto update service. Why don’t OSes provide a service that an app can register a URL to check for updates at? Yes the App Store does this for apps installed there, but outside the App Store there’s no way to do that and to my knowledge nothing like that exists for Linux or windows (barring the few things that seem to be available in windows updates). The other part of course would be even if the OSes did provide this, who would write code for it? Maybe electron would have a function to register with the os native endpoint but until/unless they did, would any electron devs code for it or would they keep writing their own services?
- hugryhoop 3y agoHe was calling 1995 text editors which used 4 MB of RAM incredibly bloated compared to the lean software of his youth which ran in 32 KB. Now we do the same, but we look at the text editors of 1995 which used 4 MB of RAM as incredibly efficient and well made, paragons of craftsmanship. Things never change, the old generation fights the new one and calls it stupid.
- Qwertious 3y ago>Now we do the same, but we look at the text editors of 1995 which used 4 MB of RAM as incredibly efficient and well made, paragons of craftsmanship. That's because the text editors don't exist in a vacuum; the 4MB-RAM text editor would be slow on a 1995 computer but blazingly-fast on a 2024 computer. VS Code is slow and annoying to use, and RAM is just a more measurable symptom of that.
- thejosh 3y agoI don't care about memory usage for editors as much I care about input latency and responsiveness. Jetbrains (IDEA IntelliJ, Pycharm, etcetc) put a lot of effort into making their IDE low latency as it was getting to a point of being almost ridiculous. Their editor is built in Java, and they run on their own runtime as they have so many hacks and tweaks to make it work as a desktop app as well (font rendering, etc). Pavel Fatin has a [great article](https://pavelfatin.com/typing-with-pleasure/ https://pavelfatin.com/typing-with-pleasure/) about typing latency and his work around implementing this in IntelliJ, well worth a read.
- nox101 3y agoThat 1995 text editor didn't handle unicode. Didn't edit all the languages of the world. Didn't handle emoji. Didn't do auto-complete. Didn't replace colors in CSS with their actual color and popup an inline editor to edit them. They didn't edit remotely (editing remotely is not the same as tmux + vim). VSCode not only edits the files. When you're in a terminal on the remote machine and type 'code somefile', somefile opens on your local machine. When you start a web server in the VSCode terminal, VSCode auto forwards it to your local machine. I'm not saying old editors weren't more efficient but the stuff editors handle today got more complex. LSP servers do way more analysis than any 1995 editor and they do it in an editor agnostic way. It costs more memory but it also lets us all jump into the future faster rather then every editor having to implement their own for every language.
- michaelt 3y agoI've come to suspect the normal way large companies are organised makes performant software almost impossible. Features are celebrated and make money - whereas performance can be gradually salami-sliced away, with nobody advocating for it. If you can add a feature and it adds just 50ms to a 300ms pageload - it's unlikely anyone is going to block its release on performance grounds. And once the feature is released, there's no removing it. This means performance gradually ratchets slower and slower - until it becomes intolerable. And by then, different performance issues will be everywhere in the codebase, so fixing them will seem an insurmountable challenge. Far cheaper to ignore the problem. "Jira is only slow because customers insist on creating tickets"
- marginalia_nu 3y agoThere's a lot of overhead and inefficiencies in how large companies do anything. It's hard to organize thousands of people well. It's the social equivalent of the old 'Command-line Tools can be 235x Faster than your Hadoop Cluster'[1] conclusion. You put a hundred developers on a project and you'll generously get twice the meaningful output of ten developers (but 50 times the LOC; as demanded by conway's law). The upside is that this makes it all the more feasible for a small group or even single individual to be surprisingly competitive. Peak productivity per person is probably is probably found in a self-organized 1-3 person team. [1] https://adamdrake.com/command-line-tools-can-be-235x-faster-than-your-hadoop-cluster.html https://adamdrake.com/command-line-tools-can-be-235x-faster-...
- mirekrusin 3y agoPeople take holidays, get sick and change jobs - having 1-3 ppl team means you'll hit brick wall that will hurt sooner or later, more so if at least one of devs was really good.
- marginalia_nu 3y agoThis is a real concern if you're looking at it as someone who is managing people... but a 1-3 person team does not need a manager to tell them what to do, and generally is not hired but spontaneously organized. It's an inherently more unpredictable way of working, but that definitely cuts both ways. There are definitely more risks, but also far greater payoffs in terms of what you can do working in this fashion. The principle of ensuring predictable velocity across a team comes a cost of limiting maximal produtivity amongst talented individuals.
- baal80spam 3y agoElectron entered the chat.
- deleted 3y ago[deleted]
- Dwedit 3y agoI blame Firefox and other web browsers which deny loading JS files if your page was loaded from file://. If you could simply run an HTML file from your hard drive and have a fully functional web application, you wouldn't need Electron.
- mjburgess 3y agoThey would also, presumably, need to provide a whole native OS api for a variety of syscalls (etc.) that wouldnt otherwise be supported.
- crabmusket 3y agoExactly. Electron provides a backend which allows filesystem access, device access, etc. which a plain web app cannot get access to.
- Bene592 3y agoThey could ship a web server that listens on 127.0.0.1 and launches the standard browser
- deleted 3y ago[deleted]
- cxr 3y agoNot sure what you're referring to. Files opened from disk in Firefox aren't forbidden from running JS.
- Dwedit 3y ago
- DerCommodore 3y agoInteresting
- naruhodo 3y agoTest your software on shitty hardware. It's great that your development computer has 32 cores and 64GB of RAM. But your users aren't so lucky.
- RedShift1 3y agoThis 1000x. Every developer should get a Pentium 3 500 MHz and 256 MB of RAM and figure it out from there. And yes I dogfood, I have a small 15 year old laptop with a Core 2 Duo CPU and an old Via C3 500 MHz industrial PC where I test my stuff on.
- maccard 3y agoHonestly, even just an i5 with 16GB ram with YouTube running in the background, an iPhone 11 if you're making an iPhone app and a galaxy S10 if you're making an android app.
- nercury 3y agoI would argue that the bloat comes when the performance impact is not perceivable compared to the development time. The easiest optimization strategy is just to load it all up into the memory. Compare that to other strategy like catching partial file data, and it's obvious why the simpler solution is often chosen. Another example that comes to mind is vector art vs baked art. You can render nice icons as vector art. Or you could ship perfect baked icons for all possible size variations. There are clear trade-offs here. One of them wastes more CPU cycles, and another one wastes storage space and download time.
- maccard 3y agoLoad what all up into memory? That doesn't solve the N+1 problem, or chained async methods. It causes caching issues (what if something else changes the files you're working with?).
- dang 3y agoRelated: “A Plea for Lean Software” by Prof. Niklaus Wirth (Non-PDF Version) - https://news.ycombinator.com/item?id=33203181 https://news.ycombinator.com/item?id=33203181 - Oct 2022 (2 comments) A Plea for Lean Software (1995) [pdf] - https://news.ycombinator.com/item?id=27661559 https://news.ycombinator.com/item?id=27661559 - June 2021 (137 comments) A plea for lean software by Niklaus Wirth [pdf] - https://news.ycombinator.com/item?id=27617277 https://news.ycombinator.com/item?id=27617277 - June 2021 (1 comment) A Plea for Lean Software (1995) [pdf] - https://news.ycombinator.com/item?id=24059704 https://news.ycombinator.com/item?id=24059704 - Aug 2020 (137 comments) A plea for lean software (1995) [pdf] - https://news.ycombinator.com/item?id=17872400 https://news.ycombinator.com/item?id=17872400 - Aug 2018 (100 comments) A Plea for Lean Software (1995) [pdf] - https://news.ycombinator.com/item?id=8537970 https://news.ycombinator.com/item?id=8537970 - Oct 2014 (3 comments) Niklaus Wirth: A Plea for Lean Software (1995) [pdf] - https://news.ycombinator.com/item?id=8301511 https://news.ycombinator.com/item?id=8301511 - Sept 2014 (12 comments)
- cpach 3y agoAlso this one by Bert Hubert: A 2024 plea for lean software - https://news.ycombinator.com/item?id=39315585 https://news.ycombinator.com/item?id=39315585 - Feb 2024 (240 comments)
- lproven 3y agoHuh. That's my transcribed/edited version of Prof Wirth's paper from my blog. Thank you, @thunderbong. I just thought it might be more readable than the various PDFs floating about. I have had emails from blind readers of El Reg saying that some PDF versions are inaccessible. Not my own writing, obviously. All I did was transcription.
- simpaticoder 3y agoVery few people ever even attempt to write "lean software". The definition is a little nebulous, but "software without bloat" is a good one. This means that you have few dependencies, and the ones you have themselves have few dependencies, for a starter. But right there you have the first problem, which is that dependencies grow stronger with the number of users, and the number of users grows with applicability, hence the rise of dependencies that no-one uses more than 20% of, but everyone uses a different 20%. Even if you do tree-shaking or something so that you at least don't pass on the complexity you're not using, it still doesn't feel lean, because you're cognitively bloated, so to speak. Then, if you rewrite the library (because extracting your 20% is going to be very painful) you can make it simple and small, but no-one is going to use it but you and so it will remain weak, tightly coupled to the one project that uses it, because it doesn't offer the breadth of features people need. The other reason software bloat persists is because knowing enough about the runtime of your software to even be offended by the presence of bloat is exceedingly rare. Repetitious and pointless tasks abound in modern software, where work is done at one layer and then thrown away and redone by another, repeated N times. But to even know about this requires that you understand your runtime and what its doing in your case, and in our industry, ignorance is (economic) bliss, where "go along get along" is richly rewarded and any aesthetic or moral objection to how things are done is harshly punished. Strong and real social and economic forces drive bloat and punish the individual that would combat it. Which is why those who make the (at some level, doomed) attempt to fight bloat deserve at least our respect and some honor, since they will not only not receive thanks, they will be actively attacked by those who (correctly) perceive their work as a challenge to the status quo, and hence dangerous, unwanted, and a target.
- deterministic 3y agoNot my experience. I write high-performance business/enterprise software every day and get rewarded for it. Keeping the architecture simple but fast by design makes everything so much easier and productive. I really wish developers would take responsibility for their own low performance code instead of blaming everybody/everything else.
- crq-yml 3y agoIt's more nuanced than that. A large share of software bloat is tied to awkward combinations of device convergence and modularity. I'll give an analogy with pens: * Dip pens and brushes, the original inking tools, rely on the user having a pot of ink available and some fine-pointed object capable of holding the ink. It's very simple, but this two-piece design limits situational use and requires the tip to be scrubbed off like used silverware. But you are relatively unlimited in what you put in the ink and the style of the nib, making it one of the best artist's tools even today. * Fountain pens innovated by creating a reservoir inside the pen, and a feed mechanism. This creates a modular pen body, allowing the user to customize a body with different inks, reservoir mechanisms(cartridge, piston, etc.) and nibs. However, the ink has to be liquid enough to gravity feed, and cleaning the pen and fixing feed issues is a more involved process, making fountain pens reputed as a temperamental platform with many tradeoffs for portability. Disposable ballpoints and markers devised a one-size-fits-all solution: make refills be the "whole pen", comprising tip and reservoir, and leaving the body as just a shell. This has allowed the designs to become very intensively engineered, with customized gel ink formulas, rubberized marker tips, etc. However, most of these designs are not made for longevity in some dimension - gel refills dry up, oil-based refills fade, marker tips get smashed. As well, there is a limited range of line styles achievable from a ball or marker. Lastly, there is a recurring Kickstarter scam in which a "printer pen" is demonstrated, with selectable RGB color. Besides the fact that this product doesn't really exist, it would make the pen into something even more complex than a fountain pen. So in solving technical problems, I think computing necessarily converges on answers similar to how pens are engineered: if you want it to be very simple and exacting, it's a dip pen, and you have to "plug it in" each time. If you want it to be easy-use, to last a while and to get out of the way, you want a pack of Bic ballpoints. If you want some mix of those things, you end up in the space of markers or fountain pens. But software lets us make the RGB pen, actually have it work and be used by people. And that is a problem, because now our expectations are that nobody should have to use a dip pen ever again, when a large part of the population didn't even get exposed to them and lacks the agency to choose.
- ThouYS 3y agoyawn, imagine hating layers of abstraction. lol, lmao even
- scotty79 3y agoI've been using pc computers for nearly 30 years and they are faster today than the've ever been. Of course not thousands times faster. Just slightly faster. The biggest kick was SSDs. My computer could be way faster but it's fast enough that I don't care to remove from autostart the software that doesn't need to be there. I think that's the reason of software not keeping the pace with hardware in terms of speed. It's just fast enough and if you make it faster people just pile up stuff to make it as slow as tolerable for them.
- 1vuio0pswjnm7 3y agoIf software getting larger is a sign of "progress", then someone could write a 2TB text editor right now and call it the most advanced editor ever written. Because inevitably, some day, editors with reach 2TB, right?
- Traubenfuchs 3y agoIn the future, with an Apple Vision Max 16, we achieved full and perfect immersion. Text editors now come with 3D environments you can "sit in" while writing text on your virtual, haptic feedback keyboard. One extreme definition 3D environment has the size of 1 TB. As a minigame, the jungle one comes with a realistic tiger that you can tame, like a tamagochi. If you ignore the tiger, the object containing its affection values will remain null, causing a nullpointer (and crashing the 3D environment) eventually as the text editor tries to check if you fulfilled the requirements for the tiger stripe font you can get if your affection levels with the tiger are high enough.
- ginko 3y agoNo worries. Once we integrate LLMs in text editors we'll get there in no time!
- 1vuio0pswjnm7 3y ago"modern" == bigger
- vendiddy 3y agoI lament how bloated software has become but take hope that there has been counter cultural movement for fast software. bun for the js runtime zed for text editors superhuman for email Nothing is perfect, but I hope the market starting to value performance will lead product teams to prioritize performance.
- epanchin 3y agoWalled gardens like Apple’s App Store could charge app developers based on resource usage. At the very least they could add a resource (battery especially) usage traffic light. That said, it would encourage small apps rather than efficient apps.
- tpmoney 3y ago> Walled gardens like Apple’s App Store could charge app developers based on resource usage. They’re taking enough heat charging for (what they claim is) the costs of the services they do provide. The absolute hurricane of doom saying that would be sparked by charging for the resources the app uses on the users machine would probably take down the internet for a day or two.
- rramadass 3y agoA lot of current day Application Software is of course very much bloated. But on the other hand things at the System Level have gotten so much more complex and complicated that some of the "bloat" is actually "necessary infrastructure". The above was brought home to me long ago when i compared/read Marc Rochkind's Advanced Unix Programming 1st vs. 2nd edition; You really get to see the evolution of the OS and why it has gotten so big. With modern Cloud based distributed systems things have gotten much more worse in both dimensions of "Essential vs. Accidental" complexities.