Something in last night’s Friday Coding Zoom struck me. I need to think about this and try it.
Last night, Tuesday, was our Friday Coding Zoom Ensemble. I noticed something.
I’ve written often about GeePaw Hill’s “Many More Much Smaller Steps” advice. And I’ve been trying to take it to heart in my own work. What I learned last night was that Hill seems to take steps far smaller than mine. I’ll make up an example to describe what happened.
We were working on some code with a bunch of cases and one bit looked kind of like this:
elseif someCondition then doThisThing computeThatThing doThisOtherThing elseif someOtherCondition then ...
Now it seemed to me that those three lines wanted to be in a separate method … on another class. I would have cut them, made a call to the new method, created the new method, pasted the lines in, fixed up the names. Done.
Hill moved just one line to the new method. Tested. Committed. And so on, one at a time.
Many More Much Smaller Steps. No, smaller than that.
I don’t think even Hill would move half a line, but I’m not sure of that …
Very interesting. I must try even smaller than what I think is the smallest reasonable move, to see what happens.