Hacker News new | past | comments | ask | show | jobs | submit login
Ask HN: Why is there no effort to codify architecture principles?
5 points by runninganyways on Dec 10, 2019 | hide | past | favorite | 5 comments
We usually get some guidelines from the overall architecture of the application but after that it always seems to be a free for all. I think we can all do better.

Like, math books are chocked full of techniques to handle specific situations. But imagine if instead of using those techniques we just invented our way through each problem. That's how I think programming is. Because, perhaps we don't have a rich enough vocabulary to describe what we are doing and so every day people solve the same problem in many offices. But if architecture were more codified we could just look up how to do something.

Maybe there could be a site that listed abstract solutions that people could vote and leave comments on. So, for example, someone might leave a comment saying that the solution doesn't scale well. If you need something that scales consider solution_93748.

I think this could help developers create better architected code because we could offload some architecture tasks to the hive mind. What do you think?




Architecture principles are codified. For day to day programming, you're looking for design patterns. The main reference is the Gang of Four's Design Patterns: Elements of Reusable Design (https://springframework.guru/gang-of-four-design-patterns/). If you're looking for more of a systems architecture, the architecture of open source is a good resource: http://aosabook.org/en/index.html


I really like that first one. Yeah that's what I was talking about.I've seen more often than not programmers just learn language syntax but very little about architecture aside from, for example, how to use MVC. Also, for example, we might pride ourselves on memorizing http response codes but I would do a double-take if a developer said to me maybe we should try a decorator pattern here.

I guess they are more codified then I realized and I'm definitely going to read through that list.


> "Maybe there could be a site that listed abstract solutions that people could vote and leave comments on"

Sometimes all you need is the right jargon to search for. "Design Patterns" is the thing you're looking for. They help you express architecture in common abstract concepts.

https://sourcemaking.com/design_patterns


I think it’s all about workflow. The closer you bring feedback to the developer, the more likely they are to follow guidance.

Linters and prettiers are a perfect case study. Saying don’t do X doesn’t work. But preventing you from doing your work unless you do X (and helping you do it) works really well.

We need linters for architecture patterns — but of course this is really hard to do in practice.


Isn't that what design patterns are? you have books for OO design patterns, enterprise patterns, even microservices patterns, with code examples and everything. Most of them go far beyond the overall architecture.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: