Re:There’s No Such Thing as Clean Code
by mbrodersen on Sunday January 30, 2022 @12:32AM
(#30134362)
I refactor all the time and have done it for 25+ years. The result is solid code that is easy to maintain and close to bug free (no bugs in production the last 5+ years).
[ Parent
| on HN ]
Could you describe the process: did you need to justify the time spent on refactoring in any way? ("why known bugs, requested new features should wait until the refactoring is done"--I'm playing devils advocate here. I'm interested, how you justified it before the management if you had one)
Re:There’s No Such Thing as Clean Code
by mbrodersen on Sunday January 30, 2022 @09:57PM
(#30143971)
I never asked permission to do it. I consider refactoring to be part of my job. Small refactorings I do right away when implementing a new feature. Large ones I split into many small steps and work on for months in-between working on new features. Never underestimate the power of making a small improvement every day. I make sure that the long term refactorings never breaks the system or introduce new bugs. I have solid tests in place making sure changes doesn’t change behaviour.