Coding Horror: KISS and YAGNI
Coding Horror: KISS and YAGNI
"...As developers, I think we also tend to be far too optimistic in assessing the generality of our own solutions, and thus we end up building elaborate OOP frameworks around things that may not justify that level of complexity. To combat this urge, I suggest following the YAGNI (You Aren't Gonna Need It) doctrine. Build what you need as you need it, aggressively refactoring as you go along; don't spend a lot of time planning for grandiose, unknown future scenarios. Good software can evolve into what it will ultimately become..."
So, so true.
I have a Stupid Stick that I beat people with (including myself sometimes) to make them stop build UBER-Solutions to Simple Problems (USSP). I mean how much code do you really need for a Options dialog that has 1 control on it? I mean really, it doesn't need a Options Framework and SDK.... :|
As I heard somewhere, "Keep it simple in the beginning. It will get complicated all by itself over time..." Also I like Einstein's saying, "Keep it as simple as possible, but no simpler".
Which when I apply it to software development means to not build a uber-framework "just in case we need to add stuff for some reason in the future, here's this cool massive infrastructure of code that took me a week to build when adding the feature could have been done in a hour..."
If you need a framework, then build it. But don't build it JUST IN CASE you need it.
No comments:
Post a Comment