Tre
A full day of coding today! The first time for me in a long time, since my previous work had a consulting focus over dev time. It was great to back at it, although it all felt a little rusty. I’m doing Java TTT and Java is new to me, so I was expecting issues with syntax, but on top of that it became obvious quickly that I hadn’t been thinking in this way for a while. I was solving problems and making bits work as my stories required, but not in the way I knew I could/should. So today ended up being a reminder on focusing on the basics, namely:
Do the simplest thing that could possibly work.
And the three rules of TDD.
- You are not allowed to write any production code unless it is to make a failing unit test pass.
- You are not allowed to write any more of a unit test than is sufficient to fail; and compilation failures are failures.
- You are not allowed to write any more production code than is sufficient to pass the one failing unit test.
I am familiar with all of the concepts above, but today admittedly they were not at the forefront of my mind. I found myself producing a board class that could be initialized with a “width”, in order that different sized boards could be used. I did this because I knew that later down the line someone would ask to make it possible to play a 4x4 game. However, that was not the “client” request at this time, and it certainly wasn’t the simplest thing, nor was it the minimum required to pass the one failing unit test.
So, these will be the things to focus on tomorrow and going forward, but for now I’m just happy to be coding again. I did find myself getting stuck without someone to bounce ideas off. Not that everyone in the office wasn’t there to help when I needed, but I think a full day of solo coding was big much for my first day back on it, I will endeavour to get some pairing done during the Waza tomorrow. Hopefully I can break my days up next week with something fresh, and prevent the code blindness setting in!