If it is too complex, you are probably doing it wrong

If there is one thing experience has taught me, it is that too much complexity

in some code usually means that design is wrong. That does not mean that

everything must and can be as simple as 2 + 2, but complexity should sound some

inner alarm and should make you reconsider your approach.


If basic concept, without all convenience features is hard to follow then it is

most certainly wrong. Adding convenience features can bring some additional

layers of complexity and certainly plenty of code, but they don't usually pose a

significant problem if basic concept is done right.


There are many practices, patterns and advices going around that should help

writing clean and maintainable code, but two stand before all else. Violate

them and you will be in trouble, sooner or later (usually sooner or in the

worst possible moment).



Comments

  1. Agreed ! I'd put one other principle even before those two - OnceAndOnlyOnce. On all levels.

    ReplyDelete

Post a Comment

Popular posts from this blog

Catch Me If You Can - Part II

Delphi 12.1 & New Quality Portal Released

Coming in Delphi 12: Disabled Floating-Point Exceptions