Chuck Greb
1 min readSep 12, 2018

--

Hi Steve,

Thanks for the reply. I could have been more specific with my commit message example.

Refactoring a presenter to handle a button click is totally legit, but only if that button already existed, and the click triggered the same overall behavior. If the button is a new component, or the behavior when it is clicked has changed, it is no longer a refactor.

Really there are only two reasons to modify software. First is to change behavior (add a feature, fix a bug). The second reason is to improve design.

There lots of reasons to improve the design of your program including making it more readable, testable, or extendable. Another (more specialized) reason is to optimize resource consumption.

In my experience, it’s best to work on these two kinds of modifications individually (changing behavior vs. improving design) whenever possible. It’s when I try to do them at the same time that I really start getting into trouble (especially in a legacy system lacking tests) !

Hope that helps :)

--

--

Chuck Greb
Chuck Greb

Written by Chuck Greb

Mission-driven engineering leader. Community organizer. Digital minimalist.

No responses yet