16 ms·
A plea for lean software (1995) [pdf]
- deleted 8y ago[deleted]
- k__ 8y agoSomehow I have the feeling this is mostly the plea of a few purists removed from reality. Since this was published the bloat went on. Why? My take is, most people don't care about small software as much as they care about UX, availability and features. How else would you explain the rise of HTML/JS/Electron and the fall of C++/Qt in the UI world?
- rhencke 8y agoReality is not some immutable force. We all take a role in shaping it. In my current role I work on a very large build chain for a very large software product. I have pushed and chipped away at that build chain over the last three years, and at current measure a clean build now takes an hour and a half, where it used to take eight hours. Why do I care so much about things being lean and small? There are a plethora of tangible benefits, but... maybe eight years ago or so I stumbled across Niklaus Wirth's (author of this article) works, and they struck a chord with me. But I had questions. So... I emailed him. I'm nobody special. I wasn't expecting a reply. But he wrote me back a wonderful reply to my questions, and that, too, has stuck with me over the years. So, I'd like you to keep in mind that that 'plea from a purist removed from reality' had a strong impact in at least the reality for one large software product.
- jcelerier 8y ago> How else would you explain the rise of HTML/JS/Electron and the fall of C++/Qt in the UI world? Does this "fall" really exist though, or is it just the byproduct of extremely intense marketing from the HTML/JS/Electron software authors ? I'm pretty confident that there are more desktop software being written today in Qt than in Electron - but most of the time they don't end up plastered all over the interwebs for the simplest todo-list app.
- k__ 8y ago"I'm pretty confident that there are more desktop software being written today in Qt than in Electron" I'm pretty confident that this is not the case. There may be a huge amount of legacy software still based on Qt, but new stuff? Only if it is performance critical. I mean, who wants to pay a C++ dev for something a web-dev can do?
- dagw 8y agoAre mediocre C++ devs that much more expensive and rare than mediocre web-devs? Certainly in the field I work in (civil engineering) you're probably far more likely to run across someone who can cobble together a simple GUI tool in C++ than you are someone who could cobble together the same thing in Electron.
- k__ 8y agoHmyes, you may be right. I know a bunch of civil engineers who also know some C++. Probably the reason for all these strange UIs in cars these days, hehe.
- robmaister 8y agoMy bet is on there being less friction at the onset. How quickly can you get a cross-platform prototype up as a web app vs Qt? I'd also wager there are more C++ pitfalls than JS pitfalls (or at least the JS ones are less severe/obscure). A less experienced engineer would be able to better maintain the web app than the C++ one IMO. This increases the bus factor. The people who make the decisions care more about those things than the layers and layers of expensive abstractions that prop up web technologies, and how much electricity/battery life that consumes in aggregate. I'm working in game dev. Most of our tools are native UI or in-engine. The heaviness of web apps frustrates me a great deal, but I get why things exist the way they do.
- lkrubner 8y agoThis was written in 1995, just after the failure of the $3.7 billion attempt to modernize software at the FAA. That was the most expensive failed software effort ever. The amount of bloat on that project was astonishing. It’s worth reading about that failure to get some historical context against which this author was writing: http://www.smashcompany.com/business/the-worst-software-project-failure-ever http://www.smashcompany.com/business/the-worst-software-proj...
- informatimago 8y agoBut this continue still todays, with hundreds-of-million dollars or euros projects being thrown away (or that should be thrown away, given their poor state).
- OnlyRepliesToBS 8y agothe last 4 years we've regressed 10
- vlerenc 8y agoSmall Anecdote: A great quote Prof. Wirth made during a talk at the IBM European Networking Centre in Heidelberg somewhen in the late 90s, which I found spot-on already then and very memorable: "Software is getter faster slower than hardware is getting faster." The audience was cheering.
- dchest 8y agoAmazingly, Niklaus Wirth still removes code from Oberon: 20180720 - Update compiler: ORP.Mod.txt and ORG.Mod.txt Cash for base adr of global variables "curSB" has been removed from ORG.Mod. Removal of this optimization makes compiler simpler. https://www.inf.ethz.ch/personal/wirth/news.txt https://www.inf.ethz.ch/personal/wirth/news.txt
- pjmlp 8y agoI got to meet him at CERN back when Oberon was still being pushed by ETHZ and Oberon microsystems. It was a very nice experience interacting with him.
- blt 8y agois there any github mirror of this code base?
- lboasso 8y agoIf you are interested in the Oberon-07 language, I made a port of Wirth's compiler for the JVM, see [0]. Several other implementations exist for different platforms [1]. [0] https://github.com/lboasso/oberonc https://github.com/lboasso/oberonc [1] http://oberon07.com/compilers.xhtml http://oberon07.com/compilers.xhtml
- shawn 8y agoOberon is well worth studying. If you're on macOS, you can get it via the App Store (it's free). As far as github mirrors, I'm not sure there is one. But this looks interesting: https://github.com/Spirit-of-Oberon/ProjectOberon2013 https://github.com/Spirit-of-Oberon/ProjectOberon2013 But you may just want to get the original code and read through the books at http://www.projectoberon.com/ http://www.projectoberon.com/
- tomcam 8y agoCan’t find it in the App Store. Can you link to it?
- emodendroket 8y agoI don't exactly worship at the altar of Joel on Software, but I think his contradictory article is pretty good: https://www.joelonsoftware.com/2001/03/23/strategy-letter-iv-bloatware-and-the-8020-myth/ https://www.joelonsoftware.com/2001/03/23/strategy-letter-iv...
- gHosts 8y agoHe is looking at the wrong metric. It's not how much disk space or ram it takes up. It's certainly not the amount of dollars/megabyte it burns. It's how much mind space of both the user and the developer it takes up. Alas, mindspace is the one thing utterly untouched by Moore's Law for millenia.
- zAy0LfpBZLC8mAC 8y ago... or rather, doesn't take up, resulting in software with tons of broken behaviour (including vulnerabilities) because the developers don't really understand what they are working with sufficiently.
- emodendroket 8y agoTo be fair, he's countering articles that do focus on those exact things (and "Eight Megs and Constantly Swapping" suggests these attacks have a long pedigree). To take his example of Word, I don't think it really affects users negatively that there are tons of features they don't use. If all you want to do is use it like Wordpad, nothing's stopping you, and many users do just that. But if you want to start automating features with VBA, doing extremely complex mail merges, building a bibliography, or all sorts of other great features, they're there for you. And any reasonably-designed software should be designed so that you don't have to know the whole thing inside and out to work on one feature. When I think of software I use often, quite of a lot of it is very complex, fully-featured software, and I'm sure there are many features I never use (e.g., IntelliJ, Chrome, Office, JDownloader). In this respect I really don't believe in the "Unix philosophy," at least for GUI programs.
- informatimago 8y ago
- RcouF1uZ4gsC 8y agoI find an interesting contrast between Niklaus Wirth and Bjarne Stroustrup. Wirth made a bunch of languages that were based on the "right" way to do things: Pascal, Modula, Modula-2, Oberon. The languages either were used and became massively fragmented (see Pascal) or were not used much. Other than Borland (Turbo Pascal and Delphi) no other large company really embraced any of the Wirth languages. Stroustrup, on the other hand, was more pragmatic, and released a language aimed at professional programmers. In addition, instead of creating new languages, he has spent decades evolving C++. As a result, C++ has been in the top 5 of most used programming languages for years (decades?) and forms the critical infrastructure of many of the largest tech companies. In addition, I bet the evolution between C with Classes, and C++17 is pretty comparable in scope to that between Pascal and Oberon.
- informatimago 8y agoApple embraced it, and used Pascal to write the LISA OS and the Mac ToolBox (not the MacOS "kernel" which was written in assembler for speed and memory optimization). Until they switched to OpenStep and Objective-C. PalmOS was also basically a simplified clone of MacOS; I don't know if it was itself written in Pascal, but it kept the same internal Pascal data structures IIRC.
- robotresearcher 8y agoApple was into Pascal through the Apple II, Lisa and early Mac.
- huhtenberg 8y agoMicrosoft was too as evidenced by __stdcall calling convention used in Windows API. [1] https://en.wikipedia.org/wiki/X86_calling_conventions#stdcall https://en.wikipedia.org/wiki/X86_calling_conventions#stdcal...
- lboasso 8y agoGo was heavily influenced by Oberon, in fact Robert Griesemer is a former Wirth's PhD.
- 8y ago
- clarkevans 8y agoA system that is not understood in its entirety, or at least to a significant degree of detail by a single individual, should probably not be built.
- John_KZ 8y agoI don't know if you're quoting this to show the absurdity of the statement or if you really believe it. Nobody understands how a processor is made. Hell, I bet there's almost nobody that truly understands how a plastic cup is made. Do you know how complex the equipment for exploration and drilling oil is, refining, polymerizing, injection molding etc? Do you really think you can find a single man that's able to do this from scratch? And that's an easy case. No system can be understood in it's entirety by anyone. This is because there's no absolute truth to be known, only approximations of varying degrees.
- ngcc_hk 8y agoNot sure. A lot of the world system from basic to very high level need coordination and modular ... you need some principle of operation which hopefully can be evolved over time so we are in the same page from time to time. But no. You cannot ask for all to be understood like that. Trust is a different matter.
- thinkingkong 8y agoUhh no. Systems are so insanely complex that we have to use analogies to explain how they work to other people in our field. Its just not possible to truly understand from high to low level every single component and how they operate. That being said, I truly appreciate and agree with the premise that we should strive for brevity and simplicity _where possible_.
- emodendroket 8y agoAnd yet everyone is voting this claim up from their Web browsers which do not come anywhere near this standard, on operating systems of which the same can be said.
- cm2187 8y ago
- deleted 8y ago[deleted]
- deleted 8y ago[deleted]
- logicallee 8y agoI have to commend Google here for bucking the trend. To give two examples: 1. They recently rolled out an update to GMail that they had worked on for some years. Were these years spent figuring out how to make it fill available memory and processing? No. They were spent figuring out how to streamline. Today, if you visit mail.google.com, the page loads in about the same time as a ping: that is because they got the login page down to just 56 bytes after compression. That is the size of a ping packet. This is an astounding achievement. After logging in, 56 bytes isn't enough to present much of a view, but it does the next best thing: in the space of the absolute limit for a single TPC/IP packet, which is 64KB, the interface is rendered enough to see the latest unread emails, and to make the Compose button active. After a single packet! In my tests this took less than 7 milliseconds. This is enough to render both of the main things one would like to do: compose a new mail, or view the latest mail. In other words, after a single packet is received, a fully functional inbox is presented, and a fully functional Compose link. The TCP/IP packets that follow then load some javascript, but you wouldn't know it from the interface, which stays the same as it loads. I've tried manually throttling the interface after the single packet, when it was bare HTML, and could still click to request a view of mail or compose new mail, getting the result instantly. In all, it is possible to enter and exit gmail while consuming a grand total of 2 KB. To put this into perspective, this represents approximately 0.016% of 1 second of a 100 megabit connection. Wow. 2. The other example I have from Google is Google Chrome. In an era of heavyweight desktop apps like Firefox, Adobe Creative Suite, or text editors like Atom (which uses up to 3 GB just to open a text file)[1], Chrome does the insanely impossible: it uses less than 2 megabytes of memory to fully open, and less than 1 kilobyte of memory on each open tab. Since Chrome has a 32-bit version, I tried running it on an old Pentium I that I had running windows 95. It is a 300 Megahertz computer. While not fast, it was able to open a hundred tabs in about 15 seconds. That is 0.15 seconds for a new tab on a Pentium I. On a modern quad core computer, a new tab is ready by the next screen refresh. And it scales: opening ten thousand tabs takes less than 4.5 seconds and ended up eating 10 megabytes. Wow. To think about the low-level engineering that must have gone into this is just astounding. Firefox chokes on a few dozen tabs. Windows can't even render a window that fast - they must have literally written more efficient low-level code than the built-in window manager for Windows. In a world where software struggles to somehow use up all precious 16 gigabytes of RAM that you have, and eat up every cycle like it's some buffet, it's nice to know that there is some serious capability put behind behind small and lean. It is clearly the right thing. See for your yourself: https://web.archive.org/web/20090330212446/http://www.google.com/ https://web.archive.org/web/20090330212446/http://www.google... Isn't this the way things should be? [1] https://discuss.atom.io/t/excessive-memory-problem-seems-to-be-settings-view/42538 https://discuss.atom.io/t/excessive-memory-problem-seems-to-... ------------- EDIT: three people read what I wrote literally (even though I linked an archive.org link). I was kidding. Unfortunately, I don't have access to a magic GMail. I have to wait 15-45 seconds for the new GMail to load. It is literally the slowest site I use on the entire Internet. The above represents my expression of what I know Google engineers would be capable of. They're smart enough. I believe in them. They can do it!
- oso2k 8y agoOver the years, I've been leaning more and more this way. Designing, writing, developing software using the Unix Philosophy [0], the suckless philosophy [1], cat -v [2], Write Small and Fast Software [3], DJB and libdjb derivatives [4][5] as sources for inspiration, IMO, will lead me to writing more comprehensible, more performant, more secure software. I mention these inspirations when ever I can. And I think software is overdue for a reboot on how we design, write, develop software. [0] https://en.wikipedia.org/wiki/Unix_philosophy#Doug_McIlroy_on_Unix_programming https://en.wikipedia.org/wiki/Unix_philosophy#Doug_McIlroy_o... [1] http://suckless.org/philosophy/ http://suckless.org/philosophy/ [2] http://harmful.cat-v.org/software/ http://harmful.cat-v.org/software/ [3] https://www.fefe.de/dietlibc/diet.pdf https://www.fefe.de/dietlibc/diet.pdf [4] https://www.fefe.de/djb/ https://www.fefe.de/djb/ [5] https://www.fefe.de/libowfat/ https://www.fefe.de/libowfat/
- sureaboutthis 8y agoI find the bloat of recent software comes mainly from the web development area which consists of far too many kids who want to make cat web sites cause they now know "computers and stuff". This trend has led those with small businesses to think anyone can slap together a web site in two weeks and "What does it matter if it's a 10MB download?". This has led to people like me who are strong followers of such philosophies and methods who want more time to analyze the real needs of the business and the technical needs of a web site to get beat down by managers who claim they've never known anyone to take more than two weeks to do anything. (A recent true story.)
- alunchbox 8y agoThat's unfortunately the harsh reality of a business. They always want it done yesterday, never mind arguing the time needed for writing unit tests / E2E or performance & load testing as those don't give "business value". oh, don't even mention refactoring. * can this button do action A? yes move on to B. etc... (don't even look at A anymore) I completely feel you with this one.
- lmm 8y agoI don't think more than a tiny fraction of programmers are capable of writing secure software under such an approach; unix's reliance on unstructured interfaces means misunderstandings and "confused deputy" style attacks are inevitable. IMO our industry fetishizes performance to an absurd degree in proportion to how bad we are at correctness and basic security. I do think we're due a reboot (and to a certain extent we already have one in the (typed) functional programming revolution), but one that focuses on writing software that does what was intended, rather than obsessing over shaving pennies-worth of cycles off program runtimes.
- kristianp 8y agoAnother attempt at minimalism in software was Alan Kay's http://www.vpri.org/ http://www.vpri.org/ , which aimed to develop an OS and applications in less than 20k lines of code [1]. It operated from 2001 to the start of this year. It is also associated with YC's harc [2]. [1] http://www.vpri.org/work/ifnct.htm http://www.vpri.org/work/ifnct.htm [2] https://harc.ycr.org/project/ https://harc.ycr.org/project/
- combatentropy 8y agoWirth has reportedly told the joke that, because Europeans pronounce his name properly ("VEER-t"), while Americans pronounce it as "nickel's worth", he is called by name in Europe and called by value in America. --- https://en.wikipedia.org/wiki/Niklaus_Wirth https://en.wikipedia.org/wiki/Niklaus_Wirth