DEV Community

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

Collapse
 
dgpickett profile image
David G. Pickett

A good programmer is a dialectic tension between OCD and lazy. Take care of every detail, but do not make details you do not need!

However, procedures and loops that do not fit on the screen are hard to diagnose. Pushing hunks of related details into a subroutine solves that, and allows individualized subroutine testing, which avoids debugging/supporting a huge procedure or loop! It's not much work. It protects you and future maintainers (if your code lives through the ages, which would be amazing) from lots of work!

Collapse
 
ldrscke profile image
Christian Ledermann

Code is suprisingly longlived ;-)

Collapse
 
bashbunni profile image
bashbunni

100% this