Disclaimer: sorry for abusing the term as boring is mentioned too many times in this boring article!
Boring code and architectures
We have acronyms as SOLID, INVEST, KISS, DRY,... I made one on myself: BORING.
And what does BORING acronym means? Well, really not an acronym, is just boring. Aburrido. Ennuyeux.
Because I am thinking, no, not thinking,... I solemnly state that boring code and architectures are the most important development principle.
That good code should be mostly boring. Maybe I'll write a manifesto...
How to boring
The key for boring code is using the right abstractions, tools and idioms.
There's no problem in Computer Science that can't be solved by adding another layer of abstraction to it.
Cool or creative code is seldom needed. We should be honest: 99% of our problems are not a new deep learning library or controlling a spaceship; most of us develop a REST API, database access, we filter lists, validate inputs,... in this areas the business problems are the hard and complex thing, but the technologies to apply are not R&D.
Also be lazy
Lazy developers find a way to do things easier and, yes, boring.
Standing on the shoulders of giants
The key point is that creating really boring code and architectures is not easy.
The Law of Leaky Abstractions
The important thing is to master the abstractions, language idioms, tools and architecture principles.
Ah! don't underestimate the abstractions. Because abstractions have leaks as Spolsky explain here
And people don't mastering abstractions are dangerous: they fail, do "cool" things, clever but not clean code and such things.
Overengineer
All engineer will have a dangerous trend to over-engineer
and apply "all the tools I know"...
Well, at the end doing BORING code is not easy!
Overzealous Adopter Syndrome
Bacause of this I have seen tremendous generic abuse, optional misusage,
weird functional interfaces, model entities in libraries or
maven module-abuse, or reimplementing RFCs intead of search
for the proper library...
Finally
Actually, the key is be boring and a bit lazy and at the same
time use just the minimal needed toolset without beeing
a cowboy.
So you have to learn a lot, read a lot of blogs, books, and go to a huge number of conferences and beeing all the they preparing just for...
DOING YOUR CODE AND ARCHITECTURE A BORING THING.
Yes, that is the hard part of an architect/engineer.
A list of boring things
This
- Boring architectures as hexagonal.
- Boring frameworks: as Spring Boot.
- Your language collections and idioms.
- Boring tools as lombok, apache, mapstruts,...
Top comments (0)