DEV Community

Discussion on: I work hard in order to avoid work - My view on refactoring

Collapse
 
honatas profile image
Jonatas de Moraes Junior

Refactoring is an art, as much as programming itself. If you do it wrong though, you will be changing the code for worse. That's why most managers hate that word - its a lot of time spent with no gain whatsoever.

However, when done correctly, not only it saves money (because time is money and refactored code takes less time to mantain), it also makes the devs happier because the work gets done easier and this ends up saving even more money.

I believe refactoring should be part of the daily dev routine, but taken with a grain of salt. Learn the technicques and understand the true reasoning for it, or else you will just be wasting time.

Collapse
 
nombrekeff profile image
Keff

Yeah I totally agree. As many things in life, if done incorrectly or without knowledge, can result in bad outcomes.

I also think good refactoring skills go side by side with your coding ones, like any other skill it's gained over time and practice. So we should try, as managers or not managers, to not hate on it and try to teach it better 😅

Thanks for the addition!