3 ms·
Refactors like this are super cool and often needed but I sometimes have to think why we don't store the easier to read code as well. I know we have git and we
by jtchang 14y ago
Refactors like this are super cool and often needed but I sometimes have to think why we don't store the easier to read code as well.
I know we have git and we can always do a diff to see what changed. What I am talking about is a more holistic view. Being able to search a code base for SwitchRow and then somehow the code comes up where it was refactored into this dynamic programming style.
Git can do this but only if you are actively looking for it. I wish you could do a metacomment on the refactor without cluttering up the code.
- shocks 14y agoBecause if you understand the new code you don't need the "easier to read" code. Constraining yourself to only writing code a beginner can understand is stupid. Maintaining good code and "easier to read for a beginner" code in tandem is a waste of man hours.