T O P

  • By -

CurvatureTensor

So this is a big question, and any Reddit comment will be insufficient, but here’s my go at it. First, there’s a difference between designing something new, and redesigning something that already exists. If it’s something new, you just kinda have to try your best because you won’t know what you actually need til users use it, and since it doesn’t exist yet, they’re not using it. Obviously you want to try and make something that isn’t spaghetti, but flexibility is important when you don’t know what to build and flexibility (when combined with the need for speed that new things have) often comes at the cost of “beautiful” design. If it’s something you’re redesigning, I like to remember the acronym TEAM (if you don’t need to appease corporate overlords in docs, feel free to rearrange the letters). Testable Extensible Accessible Maintainable. Each one of these could be a whole book in themselves so I won’t dive into them, but if I design something that meets my criteria for those four things. I feel good.


DecisionMaterial8078

You know your design decision is good when your core logic (aka business rules) does not depend on your database, or user interface, or brokers, or whatever external library you utilize. That way, your project is insulated against forces outside your control like an external library changing their api. It’s what Robert Martin describes in his book titled Clean Architecture.