Hacker News new | ask | show | jobs
by NeutralForest 42 days ago
Software design/architecture is a strange beast. It feels that if you want to learn it, you should spend time in legacy systems and large codebases of rewrite a project 3 times to explore counterfactuals. A lot of books on the subjects are abstract and give such simple examples, they are useless.
5 comments

It's really hard to provide proper guidance on software architecture, because the fundamental deployment strategies differ for each project. For web projects, a lot of people will say Cloud is the best way to deploy, so now you're forced to build your whole project in a "Cloud friendly" architecture.

When I was learning and being formally educated I regularly only had like 50 bucks to my name, I couldn't even afford the cheapest VPS I could find. So for me learning the architectural ideas of using AWS services where you have to setup credit card information to even register was not feasible. After all I already had a computer, why not learn how to deploy from there? Especially after reading about horror stories of people racking up huge cloud bills due to some slip up. So AWS was out of the window. Next I got myself a book about Microservices which was popular at the time, but quickly learned that they are about organizational structure rather than software architecture, so I never had a reason to try that architecture.

I still have no idea how to chose the right architecture or make the "correct" decisions on it. I do whatever works and for some reason it still pays my bills. Currently I just use Laravel monoliths for everything and I am pretty sure this is good enough for most web services out there.

I know the original post wasnt about webapps, it's just where I find myself having the most issues.

>Software design/architecture is a strange beast

Yes. At one point I thought a set of good programs can be composed into a good architecture. Then at another stage- with agile, etc.- I was thinking about evolutionary architectures.

But experience and dealing with different kind of problems and systems work best. Also, I have seen Conway's law hold when many other patterns, principles fail.

Books like Garlan Shaw are good but help if you have some experience. Some other books/ courses like Neal Ford's help, but for me those helped only to know the terms/ ideas. Practice and rewrites, tech-upgrades helped more. Also, books like Michael Nygard's Release It.

> A lot of books on the subjects are abstract and give such simple examples, they are useless

They are abstract because architecture is for dealing with pain, and you can’t explain pain. You need to experience it and reflect on what was done wrong to be in trouble. The examples are like a gentle pinch which does not prepare you for pulling a muscle in your back or having a nail in your foot.

My strategy is to read the books, try to implement the things at least once to get a sense of the costs, and then get back to it once you’re experiencing pain in your project. It may be too late, but you will then learn the lesson.

My example here is: it’s impossible to know what spaghetti code is until you experience it, and are on the hook for its bugs and outages.

We hear a lot about it prior and upon experiencing it I could name it. (Like love, I suppose?)

The abstraction and generic design is part of the point, though. It's not really about writing concrete examples, but experiences and how to be ready to structure based on those experiences.