Live data from Hacker News

Software Architecture Is Overrated, Clear and Simple Design Is Underrated

blog.pragmaticengineer.com

121–130 of 218 posts

Re: Software Architecture Is Overrated, Clear and Simple Design Is Underrated

#121
post #5

First 1-3 years of coding, I just coded to get sht done. I got a lot of sht done. Next 4-8 years, I started getting cute with it and applied all kinds of design patterns, Factory, Abstractions, DI, Facade, Singleton you name it. It looked cute and felt good when it all worked but it was a juggling act. There was usually like 2-3 files to touch just to do one thing. UserFactory, UserService, UserModel, User, you get t…

It looks like you were applying design patterns "just because". Obviously this is not a good thing.

A better approach is to take some time and think about all the requirements of your project, and to take into account what requirements might be added later. With that in mind, you can choose the abstractions that you need, and from there start coding. That way, your design patterns start working for you instead of against you.

Re: Software Architecture Is Overrated, Clear and Simple Design Is Underrated

#122
post #5

First 1-3 years of coding, I just coded to get sht done. I got a lot of sht done. Next 4-8 years, I started getting cute with it and applied all kinds of design patterns, Factory, Abstractions, DI, Facade, Singleton you name it. It looked cute and felt good when it all worked but it was a juggling act. There was usually like 2-3 files to touch just to do one thing. UserFactory, UserService, UserModel, User, you get t…

This mirror my experience too. I think at its core the issue is that code duplication is irrationally seen as a bad thing. But from my recent experience of the last few years with ultra minimalists approach making a change to a non abstracted code is so much faster. Yes it’s boring and feel unsophisticated, but when you only have flat functions vs an architecture tightly coupled to a business process, it’s a matter o…

I have come to a similar conclusion lately, though I would say "code reuse" as a goal is the problem. Someone said you shouldn't aim for code reuse, but avoid duplication, which seemed to sum it up better for me.

Re: Software Architecture Is Overrated, Clear and Simple Design Is Underrated

#124
A big problem IME is people tend to define "simple" as "written in a style I prefer". For example you can extract a series of 10 obviously-related methods from some 2000-line God class into their own class, but have others who are used to a more procedural coding style complain that the indirection is "hard to read" because they need to open a new file. This despite the facts that others find the God class "harder to read" because it contains 2000 lines of code doing everything under the sun, and that class is objectively harder to maintain/change for everyone because nobody knows what things are necessary to change to achieve some goal, because there are no logical boundaries between code functions so you can't tell what needs changing without reading everything.

Cue endless bikeshedding in the name of "simplicity", which nobody is using an objective metric to define.

Re: Software Architecture Is Overrated, Clear and Simple Design Is Underrated

#126
It changes. When you don't understand the problem, yes, simplicity is your best bet. Keep the code clean, clear, because you are going to have to change it a lot. As the understanding of the problem increases, and this does not always happen since sometimes the problem changes too quickly to be understood, then a good architecture can make an enormous difference.

Re: Software Architecture Is Overrated, Clear and Simple Design Is Underrated

#127
One of the best design decision we come up with for a cluster configuration synchronization feature between nodes of our appliance born during an ad-hoc conversation between 3 senior engineers. We made the decision in like 2 hours. No long and unnecessary meetings with architects or week-long planning. It was made for a 1 million dollar deal and we finished in a couple of months. You could probably guess how the "architecture" looked like; we downloaded the config files from a web server running inside the cluster. That's it.

Re: Software Architecture Is Overrated, Clear and Simple Design Is Underrated

#128
Software Architecture just is, regardless of how you rate it.

Your software is going to have an architecture, whether you make conscious decisions about this architecture or not.

In the absence of a coded/codified architecture, your architecture is going to be implicit in the code. Currently there is very little choice in this, as we don't really have a useful way of putting the architecture in the code.

So your choice is either (a) implicit in the code or (b) implicit in the code + explicit in non-code documents. Neither of these are good choices, opinions differ about which is less bad, and those opinions also vary with the project and with experience.

Of course, the choice would go away if we architecture were a code artefact.

Re: Software Architecture Is Overrated, Clear and Simple Design Is Underrated

#129
post #63

Let’s see how the OP’s system looks in 20 years. Then we’ll see how clear and simple it has remained. The OP is railing against a culture that never existed. Banks software architects are not in their offices smoking cigars and making UML diagrams that they send to coders, only to realize later that they made the wrong trade off. What happens is: You design a system for what it’s supposed to do. You do it the way the…

It's pretty rare these days that systems are maintained for that long. More than likely there'll be a rewrite every few years anyway to keep up to date with $EXCITING_NEW_TECH.

Yet there is COBOL code still running.

Re: Software Architecture Is Overrated, Clear and Simple Design Is Underrated

#130
post #61

Earlier quoted context omitted.

Out of curiosity what kind of projects are that small? I guess I have hobby projects that are that small, but all my professional work is large, enterprise systems that wouldn't fit in 10 files if they tried. Makes sense when things are so small to only use what you need. Sounds like you made a reasonable decision for the kinds of things you work on. But when you get past a certain size actual architecture becomes ve…

I find 90% of the complication in large enterprise projects come from the developers trying to write too much architecture and not enough simple, boring, imperative code. At the moment I'm staring at a validation framework and 6 layers of validator inheritance who's job it is to verify that one number is bigger than another one. That's just for one tiny part of the overall system, nearly everything has to be in some…

The enterprise project I have been on for quite a while now is overengineered, but the overengineering was done by some really smart people with years of overengineering experience. It works and isn't quite an unmaintainable, dangerous monster, but as someone who is very much in the short, simple, readable code camp, it drives me nuts.
Post reply on HN