If you have the urge to add complexity, just go home early
I just read "How (not) to write Factorial in Java" by Bill Woody, and his conclusions really resonate with me. Read below (emphasis mine):
The biggest complaint I have with many Java developers is that they develop a whole bunch of really bad habits. Specifications are unclear, or they think someday the code may need to be extended into a different direction. So they write a whole bunch of overblown architectural nonsense, sight unseen, thinking that the additional crap someday will help out and make things easier.
(...) Because a year from now they wade through all this excess baggage written at a time when they thought they understood the domain of the problem (but clearly didn't), instead of having simple code (...) that they can revise as needed, they wind up with the most over-engineered pile of nonsense that no-one can possibly understand.
So please, do us all a favor: if you have the urge to add complexity because "someday we'll need it, I just know it!", or because "it’s not sufficiently flexible enough" or "we need reusability in our code" or (God help us!) because it’s "cool" – just go home early. Watch some cartoons. Rent Inception on DVD.
And stop creating extra work for us in the future for no good reason.
I'm Santiago L. Valdarrama
I work as an Engineer Manager at Levatas, and specialize in building scalable and fast enterprise software applications.