> I totally disagree one million percent! If you are on my team and you want to rewrite code I wrote (cause it sux) then do it! Don't ask, just DO IT! DO IT NOW! Have a blast, tear it apart, rewrite all my shitty abstractions and see if you can do it better. If the result is better code, then awesome! I learn something and the software gets better. If the result is worse code, then awesome! I'll tell you why, you'll learn something and your improved understanding will allow you to write better code.
I see your point of view.
There is a need to detach from your code while still being passionate in programming.
The key is the mindset: programming so that people enjoy what you're programming and not just for the sake of programming.
Also, to note, the refactor presented should objectively serve the same cause/requirement better than current code.
I've been a lead myself here and what danabramov nailed is that he realized this:
> My code traded the ability to change requirements for reduced duplication, and it was not a good trade.
I see your point of view.
There is a need to detach from your code while still being passionate in programming.
The key is the mindset: programming so that people enjoy what you're programming and not just for the sake of programming.
Also, to note, the refactor presented should objectively serve the same cause/requirement better than current code.
I've been a lead myself here and what danabramov nailed is that he realized this:
> My code traded the ability to change requirements for reduced duplication, and it was not a good trade.
His refactor is a form of premature abstraction