3 ms·
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 though
by mkoubaa 3y 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.
- tomcam 3y agoAll true, but another trick is to do extensive web searches to see what kind of problems people have had with the new approach.
- TillE 3y agoI 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.
- bluGill 3y agoBetter than c++98 which a lot of organizations are still on.