Building software to last forever
herman.bearblog.dev
herman.bearblog.dev
I love this. I wish more software was built with limited scope. Not every application needs to grow larger and change forever.
Think of those tools that you've really enjoyed using - perhaps the mid-range HP calculators, or a great fountain pen or knife, or even a spanner that just fits perfectly. These are all tools that have been designed with a clear idea of their purpose, and their design has focused on that purpose.
A great chef's knife doesn't incorporate a bottle-opener - that could be added but it would be a less usable knife.
Memorable products have long life-spans. Users treasure their fountain pen, often for life. I'm still disappointed at the loss of my HP11C. But who is going to mourn a programming language or front-end that drops out of favour because it's grown unusably big and cumbersome as the designers increase scope. When it comes to their next project, users will consider something cleaner, something that does all but only what they need.
What? Minimalism is very much favoured in HN. Unix-philosophy: do one thing well
I’ve written software that has lasted over 25 years. That’s not forever, but it’s nothing to sneeze at.
I’ve found the secret to long-lasting software, is to use boring tech. Put away the Buzzword Bingo cards.
I've given a talk at work about this one (but it ended up being more about people and kneejerk decision making processes where something cool is picked instead of something reliable), it resonated with a lot of people.
I'm still hoping to get to work with Go again sometimes, I think it embodies the adage pretty well in that it's resistant to change; I'm confident code written today in Go is still going to be the same and working in ten years' time, unlike any other programming language I've worked in.
Less is more. Less but better (to invoke Dieter Rams here). The goal should be a slow, incremental improvement over time, towards perfection.
To get adopted, your "total experience" must be better the status quo.
So, authors of software need "de facto" integrations with other products. To handle features their product doesn't.
Unix utilities do "limited scope" brilliantly.
In, say, the Scala ecosystem... limited scope isn't so brilliant. Sometimes you just can't do limited scope.
Every year the "status quo" in software rises that much higher. Providing a better experience increasingly requires ever more resources to push a project to adoption.
As in Scala the programming language?
I find it is exactly the opposite. Scala is complicated and hard to learn, but if it can do anything well then it is allowing tools/libraries to be well-scoped and composed by the user.
To give an example: In Scala there are 3 libraries: - One for http requests - One for async calls - One for json (de)serialization
Those libraries don't know anything of each other and don't use the same interfaces/types, so by default you have to do some plumbing to make them work together.
But there are 2 more libraries: - One that provides integration of http and json - One the provides integration of http and async
As an end user that wants to build an async web app that uses json, you just have to add those 5 libraries and 5 imports and then everything just magically works out of the box. And it compile-time safe. No reflection or magic things happening. If anything doesn't work out, for example due to version differences, then it just doesn't compile and you adjust the plumbing yourself or update the libraries.
I seriously don't know any even half popular language that supports that. Take Rust for example. Rust has traits and allows you to make whatever types you have become compatible. But you can't write libraries on top of existing ones to do the plumbing for the user who then just picks the plumbing they like.
In Zig, I am using a TLS library that does not perform I/O, it just writes to writers and reads from readers, so using it with io_uring or DPDK or send/recv or pcap files requires 0 additional work.
> In Zig, I am using a TLS library that does not perform I/O, it just writes to writers and reads from readers, so using it with io_uring or DPDK or send/recv or pcap files requires 0 additional work.
Of course. Now imagine you need backpressure (reactive streaming) and writer/reader interfaces don't support that. Can someone provide you a library that you import and then automatically the types of the TLS library change and it works with the new interfaces that it doesn't even know exist? Because that's what I'm talking about.
I'm not sure how "write does not even return until the writing is done" can avoid handling backpressure.
Unfortunately, I have had to add calls to flush() to the TLS library because it was not made with buffered writers in mind. I guess instead of writing flush() a couple of times I could have written a library that wraps a pair of buffered writer and reader in a new reader which flushes the writer if necessary when you read it and wraps the TLS library so that the passed-in reader and writer are automatically wrapped by that new reader. This sounds like a bit much though, since the whole task was to call flush a couple times only during TLS handshakes only if flush was defined.
I agree, but that wasn't really the point that I was trying to make. Even without IO, there can still be different interfaces, such as specific interfaces for errors, attaching meta information like tracing, logging etc.
I don't know how ZIG solves that, but in Java this is a PITA because the language isn't capable enough - so everyone falls back to global runtime configurations, e.g. some file being somewhere that configures it. It doesn't compose and is super hard to debug. And that's just an example.
> I'm not sure how "write does not even return until the writing is done" can avoid handling backpressure.
That doesn't matter. The point is that you are using the reader/writer interface. So if you want to plug this library into another library that works with different interfaces then you now have to convert stuff around by hand all the time.
You could say that everyone should just use "standard" interfaces, but often they don't exist or lack certain properties or it's simply hard to standardize everything. Think about how many libraries for dates/times there are in Java or python.
EDIT: I can see that it might be a bit hard to wrap your head around what I mean because as developers (including myself) we learn to do plumbing all the time and it feels like you just have to do it in almost any language I always used.
For instance, let's say a library uses this interfaces:
def doSomething[F[_]: Monad](param: F[Param]): F[Result] = ...
This allows to provide the effect on the callsite. This could simply by "Id (which means regulary executed code) or it could be async, an error type, something with logging or a combination of all those and more at the same type. The library doesn't know and doesn't care, it only constraints the interface if it needs to.And to add more: typeclasses are usually not enough here, you also need higher kinded types or the whole thing is useless for a lot of meaningful abstractions (such as dealing with errors or async code).
Ok but now everyone who doesn't need that new better experience doesn't get their code broken anymore right? So it isn't a wash, we've gained a benefit.
People still use pens, for example. But if they want to write 100 copies of the same page, they'd much rather use a printer. People use hammers, but if they want to hammer in ten thousand nails, they might start thinking about automatic tools.
It's not the fastest or easiest, but it works, it's reliable, and it's cheap.
Anyway, in the context of software, think of the unix commandline tools; simple, single-purpose tools, a lot of which aren't updated frequently. But using those as lego blocks is directly or indirectly responsible for the multi-trillion industry we're in.
Even they get rewritten and updated and 'bloated' all the time. Compare the original BSD or AT&T tools to the latest GNU tools and you will see that they have been reworked, tweaked and updated countless times with many many new features added. In fact when the GNU tools started to become popular they where regularly accused of unnecessary bloat and being against the spirit and philosophy of Unix.
"All the time" is a stretch. The basic UNIX commands date back to the 70s and while they have grown more and more options over time, change is slow (which is a wonderful thing, to be clear). Yes, there was grumbling when GNU started adding even more options but even that is now decades ago.
As a consumer of the tools (whether by hand or by shell script), they provide a stable base to build on. I have some shell scripts from ca.1990 which still work fine. It's very pleasing to be able to build on top of a solid foundation that just keep working for a long time.
I can't think of a major advance in pen design since about 1965 (Fisher pressurized space pen) and I don't expect any major advances before 2065.
Gel inks? Smaller ball-bearings in the Uniball line? Erasable ink? Not much there.
Also anybody who calls a pen their "daily driver" is probably well served by a vintage fountain pen, a form that arguably was at its peak in the early 20th century.
Honestly a pretty bad example.
To me it implies that since the definition of perfection is always changing, you are continually altering course to get closer to where you want to be.
Sorry for being a pedant, but it's hard to overstate how insignificant this timeframe is compared to "forever". Even if we talk about forever in practical terms of when the earth will be consumed by the sun or something like that. Why not just be honest and say "Built to last a lifetime"?
HN is the last place on earth where anyone should apologise for being a pedant.
Don't.
Keep it up Herman!
Unless you're the IRS.
Apply that line of thinking the other way around ("There is more to US citizenship than holding a passport"). Its horrible by implication.
I'd prefer if nationality was being seen as bureaucratic artifact and not having more meanings attributed to it.
Examples involve Marie Curie who fled to France, but is always considered Polish. Poland didn’t give her a chance to be recognized.
Generally speaking, I would also note that outside of the Americas jus soli isn’t the norm. In South Africa, jus soli is restricted to partial sanguinis laws where the parents of the individual concerned must be South African citizens or permanent residents.
Further, Elon has openly stated the aim to make humans multi-planet, holds multiple citizenships, and views government as a territorial monopoly on the initiation of violence. Based on these three things, I’d say he has little allegiance to any given country, and that he’s more of a nerd who just wants to do stuff without worrying about anything else.
https://www.thesouthafrican.com/lifestyle/why-did-elon-musk-...
For my part, I move ever more determinedly in the direction of self-hosting and actively avoiding becoming a single entity that can fail and take lots of people down with me—avoiding most of the scope of this article becoming applicable.
If anyone has links for their personal sites/blogs, or anything in the vein of software development, feel free to share. I'm eager to build a bookmark folder of them to check in lieu of social media or youtube.
My Product is my Garden https://herman.bearblog.dev/my-product-is-my-garden/
I've sent it to many friends over the years.
> last forever
whatever you say.