Hacker News new | ask | show | jobs
by rTX5CMRXIfFG 1588 days ago
I haven't read any of the books on architecture recommended in this thread, but I learned how to manage software complexity by:

1. Counter-intuitively, being deeply interested and reading about a topic in natural science. Software is complex because it is a system, and especially if you're using a programming language with plenty of OOP features, you're going to benefit a lot from understanding how nature separates properties and functions into organic matter, how they work in concert to achieve a particular effect, and how they compose each other to scale up from the atomic to the cosmic scale; or

2. If you can't be bothered to learn about topics beyond programming itself, then practice unit testing. As a matter fact, attempt to write unit tests for your old code. If you can't make the unit test run, then that's life slapping you in the face to tell you that your code is way too tightly-coupled.

By the end of the day, doing any of the above things (but more so, both!) will teach you the true essence of KISS.

1 comments

The nature approach sounds intriguing, any pointers on where to start or what to read?
It has to be a topic of interest specifically for you, otherwise you’ll probably just get bored and stop halfway through. For me it was exercise science. It was a super fascinating and mind-opening journey for me from skeletal muscle contractions to how the body burns calories, to how to program weight training exercises, how to make my own diet program and throwing away all the hype around it, etc.

I can imagine that for others it might be just straight up neuroscience, or something zoology if you like pets, or physics. The idea is to try to see these natural phenomena as running code, and to think of how nature designed and wrote the code to make it all work. I can see how the approach sounds absurd, but maybe video game developers would be able to relate to what I’m saying since (I assume) they do a lot of world-building and have to make simulations of real-world objects.

No, doesn't sound absurd at all - there are even explicit connections between this type of "organic" complexity and the software world, like evolutionary algorithms and agent based models, for example. A while ago, I looked into the topic of complexity in a general way and found a biology book called "Structures of Complexity: A Morphology of Recognition and Explanation" by Rupert Riedl, which is very in-depth on the biological approach to complexity. In fact a little to in-depth for quick extraction of practical concepts.

But looking at something personal and concrete like exercise makes total sense, thanks!

It doesn't even have to be nature -- I learned a lot about managing complexity from The Death and Life of Great American Cities which is about city planning!
Ah, Jane Jacobs.. had that in my reading list for a very long time, but that's an interesting point with regards to complexity .. thanks!