Quattro
End of the first week!
Today was great, again. I had a plan to ensure I paired with someone today, and fortunately that’s just about all I did all day! I paired with Robert, a prospective apprentice on my Java TTT. We were working through the input validation problem I had left from the previous day. We ended up spending quite a bit of time not really getting anywhere, but after a bit of time Uku popped over to see how things were going and saw the problems we were facing. He gave us a bit of guidance on breaking the problem down, and it soon became clear what was required.
Later in the afternoon, I posed the question to him about what he saw when he first came over, and why he made the suggestions he did.
The method and problem we were dealing with was complicated to tackle mentally all at once, since it involved a number of loops. So his focus was to extract bits we knew worked into other methods so we no longer needed to worry about them. Then the only issue left was knowing the best way to tackle a variable assignment in a loop with with Java.
Instead of loops within loops with if
statements for assignment, he suggest
a while(true)
loop, and then force return from that loop with the assignment.
That made it easier to debug, because it was no longer a mystery where the
variable was being assigned. I had thought that a while(true)
loop was a hack
and we both sort of agree that it is, but seemingly returning from such a loop
early is a sensible way to deal with variable assignment in nested loops.
I’m glad I asked the question, because things like that are a real learning opportunity. In the afternoon we were in Waza time. I spent a bit of time refactoring my TTT and then Uku came over again. We had talked previously about my coding paralysis, due to concerns about getting things perfect before starting to build. Pairing with Uku on a small project idea I had really help avoid that paralysis and we made some good head way getting the project underway. We also had an interesting conversation about the differences and applicability of London vs Chicago style testing. I want to investigate this further and possibly do a little Zagaku on it soon.