This question already has an answer here:
I have a question, to explain that, what better than an entirely fictional example?
Let's say you are a young developer just being employed in a firm.
All data is stored in a huge database (let's say 500+ tables with billion rows).
Your boss ask you to make some consolidation queries stuff.
So, you start making your query and, during the development process you learn a lot of conditions to add to your query.
Result? Your query works pretty well, result asked is correct but is slow and not very easy to understand.
Why? Cause the query, due to a lot of modifications became very complicated.
After that, with checking that with a colleague who work in the firms since years, he wrote the same query than you but... easier to learn and faster to execute.
So, in fact the main question is: how can we limit this useless complexity ? How can make code more logic in fact?
Actually, my initial idea was to draw activity diagrams of code to see where are bottlenecks but I think a better approach is possible.
Looking for Books, Links, Ideas, Approaches, Methodologies...