mht.wtf

Computer science, programming, and whatnot.

Simplicity as a Value

November 11, 2023 back to posts

I used to think that simplicity is good because of the other values it often brings:a simple system is easier to write; a simple system is easier to build; a simple system is more portable; a simple system is easier to debug and reason about; a simple system performs well; a simple system is easier to change. The word "simple" does some heavy lifting here, and I found that I would often use these as a metric for if something was simple or not. In other words, these weren't the result of simplicity, they were the definition.

I have since found that I don't actually need any of these values to be true for me to value simplicity. It's not that I don't care about how easy the system is to debug, how easy it is to extend, or how fast it runs, but all of these are universally good qualities. Nobody would prefer a system that's hard to debug over one that is easy to debug, all other things equal. I still think that simplicity very often brings these advantages1, but among the advantages is simplicity itself.

My definition of simple has also changed a lot over the years. When I was starting out, Java's ArrayList felt simple, but handling arrays2 felt awkward and complicated; "buffer" was a scary word. When I learned Python, it's syntax was simple, but requiring the python interpreter was not3; I couldn't just copy over my program to another computer and run it there. When I read K&R, C felt very simple, but when I tried to even build some C projects I found in the wild, my experience was very different4. These days I'm mostly excited about low(er) languages, like Rust, Zig, and Hare; programming in these languages feels simple because of how they map to my mental model of my computer. The code that I write that I'm happiest about is the simple code.

I guess I simply value simplicity.

Thanks for reading.

Footnotes

  1. Further, I think it often gives an 80% solution for all of these values. If you want to really maximize, say, speed, readability, debuggability, portability, and all the other -abilites will suffer.

  2. A sidenote: when learning about arrays, I could not for the life of me see any use-case for it. ArrayList made perfect sense, since it was a list you could put stuff in, but I did not see the value of having a fixed-size list of things. Tangentially, I also wanted to string interpolate myself a variable; with int a1, a2, a3; int i = 3; I wanted to be able to write a3 = 0; as a{i} = 0;. I don't remember how long it took to see the connection.

  3. In hindsight, it is curious that my biggest problem with Python was that I needed the interpreter as opposed to just being able to copy a .exe, when this is also true for Java, my first language. For some reason, the lack of ahead-of-time compilation made a very big difference for me.

  4. Here's some keywords: autoconf, glibc, cmake, dependency management, dynamic libraries, macros.

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License