
A plea for lean software (1995) [pdf] - tosh
https://cr.yp.to/bib/1995/wirth.pdf
======
oso2k
Over 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_o...](https://en.wikipedia.org/wiki/Unix_philosophy#Doug_McIlroy_on_Unix_programming)

[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/)

~~~
lmm
I 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.

~~~
maccard
> IMO our industry fetishizes performance to an absurd degree in proportion to
> how bad we are at correctness and basic security.

I completely disagree. Our industry (or at least parts of it) have absolutely
no concern for performance or power consumption (electron is one of the main
culprits here, but the issue existed with Java/swing before,and im sure it
existed before that too). For the most part, our industry is just as bad at
security though, you're right.

I disagree about correctnesd though - correctnesd isnt a binary thing, it's a
scale. Some things matter more for correctness (it's ok if we miss an
animation transition, it's not ok if we have bad rounding in our financial
software). Overall we have a decent grasp of the severity of issues and in
prioritising what to ensure is correct.

------
dchest
Amazingly, 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)

~~~
blt
is there any github mirror of this code base?

~~~
shawn
Oberon 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
Can’t find it in the App Store. Can you link to it?

~~~
shawn
Sure! [https://itunes.apple.com/us/app/oberon-
workstation/id1057155...](https://itunes.apple.com/us/app/oberon-
workstation/id1057155516?mt=12)

~~~
tomcam
NICE!! Cannot wait to use it.

------
combatentropy
Wirth 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)

------
clarkevans
_A 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._

~~~
emodendroket
And 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
I don't think anyone is satisfied with the state of css and javascript.

~~~
emodendroket
What does that mean? Nobody dislikes those things because they'd prefer them
to be more like toy languages.

~~~
0x445442
If by toy languages you mean HTML then that's precisely why I dislike those
things.

I want my browser to be served marked up text with the occasional embedded
hypermedia, that's it.

I don't need fancy layout, I don't need transition effects and I don't need
updated data without making another request to the server. If I wanted all
those things I'd install an app like I do on my phone.

Of course, that spells doom for advertisers and those that rely on advertising
dollars to generate content. But I'd rather pay for content if I think is
worth paying for, like the Wall Street Journal for example.

~~~
cm2187
I agree but what I has in mind is the horrible complexity of css, with 50
different ways to do somethings, making really hard to do simple things like
middle align, etc.

~~~
emodendroket
I can't imagine a replacement with the same capabilities that's a one-man job.

------
kristianp
Another 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/)

------
emodendroket
I 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...](https://www.joelonsoftware.com/2001/03/23/strategy-letter-iv-bloatware-
and-the-8020-myth/)

~~~
bo1024
It's a pursuasive and fun article and feels convincing, because that's just
how Joel writes. But it's kind of funny to imagine the same arguments in any
field but software. "We could have optimized and improved the car's design,
but you would have had to wait two more months and that cost would have been
perceptible. Anyway gas has gotten cheaper, so in 'real' terms the car is
'more' efficient! Fretting about elegant car engineering seems like more of a
mental health problem." Not saying Joel is necessarily wrong, but it would be
nice if software design had some sense of craft....

~~~
emodendroket
Perhaps, but the engineering of physical goods is a poor analogy to software,
considering the relative ease of changing things in software if you decide
they aren't working.

~~~
bo1024
(Also to bdhess) just a note that I'm not trying to say the right thing for a
car is also the right thing for software, just that the contrast between the
design philosophies is funny (haha and/or peculiar).

~~~
bdhess
I don't think there actually is a contrast in philosophies. The philosophies
are the same for each: do a cost/benefit analysis, and then go with whatever
makes the most money.

It just happens that the cost of fixing an automotive defect (i.e., with a
recall) is generally way higher than the cost of fixing a software defect
(i.e., by shipping an update). So the automotive industry invests more heavily
in eliminating defects.

~~~
emodendroket
Certainly the philosophy when you're developing software for medical devices
or rockets is more rigorous and careful, but the speed would be pretty much
unacceptable for, say, Facebook.

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

~~~
leibwiht
I have to ask - does anyone actually use half of the C++ features? Exactly how
much of C++'s 1600-page specification can be attributed to its success?

~~~
tonyedgecombe
Does anybody even understand half of it?

~~~
huhtenberg

        I don't know half of it half as well as I should like; and 
        I like less than half of it half as well as it deserves.
    
        -- B.B.

------
lkrubner
This 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-
proj...](http://www.smashcompany.com/business/the-worst-software-project-
failure-ever)

~~~
informatimago
But 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).

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

------
logicallee
I 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...](https://web.archive.org/web/20090330212446/http://www.google.com/)

Isn't this the way things should be?

[1] [https://discuss.atom.io/t/excessive-memory-problem-seems-
to-...](https://discuss.atom.io/t/excessive-memory-problem-seems-to-be-
settings-view/42538)

\-------------

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!

~~~
hobo_mark
I suddenly got a new Gmail version since a couple of weeks, it is an order of
magnitude slower than what I've used for a decade and loads with a pointless
animation that, by itself, takes seconds before I can even begin to see my
mail. How does one activate this magical Gmail experience you have? If there's
any way.

~~~
logicallee
Sorry, I actually was describing an alternative universe.

>If there's any way.

Hard work by very talented engineers.

------
k__
Somehow 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?

~~~
jcelerier
> 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__
_" 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
Are 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__
Hmyes, 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.

