The Worst Practice in Software Development
Premature abstraction is the root of all evil.
“Premature optimization is the root of all evil.”
— Donald Knuth
Have you heard this saying? Probably yes, but if you are a web application programmer, you probably do not come near algorithms so often. And optimization is usually done by introducing new technology(usually cache). So in this type of programming, there is not so much to optimize, but I can’t count how often I see premature abstraction.
Why is this happening so often?
I partially contribute this to the education system and “traditional approach” to programming lessons. Instead of giving you “Why?” you get “How?”. In my view, programming should not be about OOP, FP, design patterns(GOF), SOLID, and absolute scarcity of “spaghetti code” (avoiding DRY). It is about solving a problem you get to solve. That’s it.
Unclear requirements
In my ten-year experience, I never had everything clear about the task until I finished it. Whenever I think that the job is obvious, I find a few “but” which cost me 80% of my time. So there is no point in trying to write correct abstractions simultaneously with functionality. Just start with functionality.