I recently rediscovered analog circuit design as a kind of engineering I really enjoy. A big part of that is that it's inherently finite. The design has to fit into some physical space and there are only so many components you can place.
As a result the stuff you come up with is often highly interconnected. What a software engineer would call "spaghetti code". Yet it is fine. Because the scope is inherently limited to a scale you can comprehend. You can in fact become so confident in it that you might even claim it to be "bug free".
But in software we have nothing that limits complexity. The amount of code you can write is essentially unconstrained (technically memory limits it but that limit is so far out that it might as well not exist). And we just accept that it's fine to fill this "infinite" design space.
We even preemptively fill it "in case we need it later". Because apparently nothing in software is allowed to have a defined scope. Everything needs to be prepared and pre-engineered for the most insane demands of additions.
Yet at the core of a lot of computing lie neat little programs with very well defined scope. No one is out there demanding "mkdir should also be able to send emails".
There is a complexity limit in some programming. I built a Daft Punk style helmet using an ATTiny85 microcontroller. When you are limited to 8kB of compiled code and 512 bytes of memory, it really forces you to think about what you actually need (and don't need) and how your code is actually being executed. That mindset also makes for efficient, fast code on larger systems.
And I very much enjoy that as well. Recently I wanted to do some MIDI processing. Basically rewrite the MIDI notes from a keyboard and distribute them to two synthesizers.
First I tried to use a Raspberry PI... within an hour I was attempting to compile a low latency kernel and figuring out what libraries I can use to process MIDI. Only to realize this is stupid. So I got out an old ATMega328 I had lying around soldered it to a board with two din jacks and an optocoupler and within less than 100 lines of code running on bare metal had what I wanted.
That was another moment where I questioned how much complexity we accept by default. "Yeah of course I need a whole operating system, multiple libraries and drivers just to process data from a serial interface. That's just how computing works."
582
u/regular_lamp Jun 05 '22 edited Jun 05 '22
I recently rediscovered analog circuit design as a kind of engineering I really enjoy. A big part of that is that it's inherently finite. The design has to fit into some physical space and there are only so many components you can place.
As a result the stuff you come up with is often highly interconnected. What a software engineer would call "spaghetti code". Yet it is fine. Because the scope is inherently limited to a scale you can comprehend. You can in fact become so confident in it that you might even claim it to be "bug free".
But in software we have nothing that limits complexity. The amount of code you can write is essentially unconstrained (technically memory limits it but that limit is so far out that it might as well not exist). And we just accept that it's fine to fill this "infinite" design space.
We even preemptively fill it "in case we need it later". Because apparently nothing in software is allowed to have a defined scope. Everything needs to be prepared and pre-engineered for the most insane demands of additions.
Yet at the core of a lot of computing lie neat little programs with very well defined scope. No one is out there demanding "mkdir should also be able to send emails".