Hacker News new | ask | show | jobs
by kunglao 2352 days ago
1. If you broke a code, don't generalise it as an inherent problem of clean code. Just find what exactly you did wrong. 2. If the only reason you refactored it was because you felt it's not clean, don't do it - that code doesn't look terrible to me anyway. 3. To do this kind of refactoring you need good test coverage. So, start there. This also makes sure that you understand the specs well enough to refactor. 4. Clean code is good. It's a skill to know what is good code and what is bad code, what is better code and what is worse code and when to give in on clean code and compromise. Practice it.