False Beliefs in Software Engineering
I must write my code to be as flexible and extensible as possible.
This line of thinking is often instilled in students by professors: Don’t just solve the problem you’re trying to solve. Generalize and solve the class of problems it belongs to. The goal is to require as little change to your code as possible to enhance it in the future and to make code as re-usable as possible.
This is certainly a laudable goal, but in a lot of cases, the additional flexibility simply will never be needed. As a result, you’re introducing more complexity than is necessary into your code. And this makes things harder for future maintainers due to the necessary additional layers of abstraction. (I don’t think I ever heard my computer science professors say the words “future maintainers” once in any of my classes.)
99% of the code you write will not be used by anyone else. Just because you post it on github or whatever doesn’t change that. Don’t write a command line tool as though you’re writing a library. The tool’s code should be as problem-specific and small as possible.
A must read Quora answer by Damien Sorresso.