5 ms·
This is a false dichotomy. On one end, you have "overarchitects everything so much that the code is soon unmaintainable" and on the other end you have "architec
by stavros 2y ago
This is a false dichotomy. On one end, you have "overarchitects everything so much that the code is soon unmaintainable" and on the other end you have "architects the code so little that the code is soon unmaintainable".
Always write the simplest thing you can, but no simpler. Finding that line is where all the art is.
- keepamovin 2y agoThat's not a "false" dichotomy, that's an actual dichotomy: it's a real thing. Reading your comment, even tho you don't say it, I get the feeling you'd be with the rallying cry, "Bikeshedders Assemble!" hahaha! :)
- mkl 2y agoIt's a false dichotomy because it falsely implies there are only two options. Better than either are the other options which lie in between.
- keepamovin 2y agoOh, I see. That's a good point. But I don't think hu3's comment was suggesting there's only two options, just illustrating some possible margins to describe the landscape. Maybe stavros' was hallucinating that strawman reduction in there, is what I think. Like you don't have to say it's a false dichotomy unless that's the only way you read it. The existence of something between the margins, should be obvious. Anyway, haha! :)
- Paul-Craft 2y agoWell, it almost always becomes an actual dichotomy soon, for sufficiently large values of "soon."
- keepamovin 2y agoYes, the compounding effects of previous architectural decisions, but not if you take a balanced path, guided by awareness of the two extremes. So it needn't. Hahaha! :)
- hiAndrewQuinn 2y agoIt's cliche, but I really do feel reading the Art of Unix Programming gave me a very good sense early on for how to walk this line carefully. Unix programs are high quality - but they're also, ideally, small, and written with an eye to compositionality with the rest of the ecosystem. The best architecture is in the middle, and often the best first draft is a simple series of pipes. https://www.catb.org/~esr/writings/taoup/html/ https://www.catb.org/~esr/writings/taoup/html/
- udev4096 2y agoThat's a really good book. Thanks for mentioning it
- fifilura 2y ago(Honest question) What is the difference between this microservice architecture that gets a lot of hate here?
- ywain 2y agoI'm not the person you're replying to, but here's my take: even though the two look conceptually similar, Unix programs are just a lot simpler. All programs run on the same machine, they read their input, execute, produce output which is piped to the next program, and terminate. Want to change something? Change one of the programs (or your command line), run the command again, that's it. Microservices are a lot more complicated. You'll need to manage images for each of the services, a fleet of servers on which the services will be deployed, an API for services to communicate together, etc. In many (most?) cases, a monolith architecture will be a lot simpler and work just fine. Once you reach the scale at which you'd actually benefit from a microservice architecture (most companies won't ever reach this scale), you can start hiring devops and other specialists to deal with the additional complexity. What actually gets hate, I think, is not microservices themselves, but the fact that microservices are often used in contexts where they are completely unnecessary, purely because of big tech cargo culting.
- Karrot_Kream 2y ago
- lelanthran 2y agoIME, it's easier to fix the latter than the former, if only because there is a limit to how large the latter can be possibly become. Small projects are easier to fix than large projects.
- erhaetherth 2y ago> Always write the simplest thing you can, but no simpler. I don't think so. Time and time again the client will insist on stuff like "the customer only needs a single email address/phone number" but you're going to pay for that one later if you do the simple thing and add an "email" column. Same for addresses. And a whole bunch of other stuff...you need to normalize the heck out of your DB early on, even if you don't need it now. The code you can mostly make a mess of, just choose a good tech stack.
- blowski 2y agoGo down the simple path to start, and refactor to a more complex solution when it makes sense to do so. If experience tells you the client is definitely going to ask for it later, add a “break condition” that tells you when you need to upgrade. You can put entry points into the code - comments, interfaces - to make it easier to do the upgrade.
- stef25 2y agoNormalise the DB from the get go (doesn't really require much effort), then charge for the fact that "actually we have a customer who has 2 email addresses".
- izacus 2y agoIn many many cases this doesn't work and it crashes and burns the whole project/startup company when its necessary. Sometimes messing up your fundamental architecture means that you hit a refactoring your company won't survive (while your competition grabs all the customers who wanted that feature your architecture doesn't allow). This is where experienced lead engineers earn their worth - they understand which parts cannot be fudged and fixed later and need to be there from the get go.
- amoe_ 2y ago> You're going to pay for that one later if you do the simple thing and add an "email" column You'll only pay if the project survives long enough for that new requirement to actually surface, which often it won't.
- eru 2y ago> Always write the simplest thing you can, but no simpler. Finding that line is where all the art is. As much as I love simplicity, optimising for peak simplicity isn't always a good use of your time. Simple enough is often good enough.
- boznz 2y agounmaintainable is a weird word used far too much. There are genuine ways it can become unmaintainable of course but the main use I have seen people use it for is "I don't want to understand it and would rather rewrite it"