Hacker News new | ask | show | jobs
by mkoubaa 1041 days ago
Experience teaches me that the worst time to use a new design pattern or technique is _right after you learn about it_. The problem in your code base you thought about while learning the pattern was a useful proxy for where it could be applied, but that doesn't mean it's the right fit.

Do it in a scratch refactoring, and wait a week or two before you consider merging it. And make sure you are emotionally as ready to discard as you are to land it.

2 comments

I agree that you should always be ready and happy to discard or refactor code as needed. Requirements change, your assumptions may be wrong.

But in practice I've more often seen the opposite problem, where organizations end up stuck on C++11 for a decade for no technical reason. It's good to explore the new stuff and eventually adopt what you can use.

Better than c++98 which a lot of organizations are still on.
All true, but another trick is to do extensive web searches to see what kind of problems people have had with the new approach.