Follow @RoyOsherove on Twitter

Video: (part 6 - Total n00b mistakes) Go Game Engine with TDD and Pair Programming

If you calculate by hours, this might be called “the first session of the 2nd day” of Raymond and me working together.
This was by far the most frustrating one of the 6 we’ve had so far. all the other sessions are here, and the source code.
  • We start out the session with a weird behavior by the tests (they fail on my machine and pass on Raymond’s . So we debug right out of the gate. 
  • see 0:01:45 for NCrunch telling me where to look for the bug and me glaring at that like an idiot and not getting it.
  • see 0:02:00 to see how good test naming helps me wade through the bunch of failing tests and get a “meta” understanding about their complexity, and I’m able to choos a really simple on, and realize the bug might be not related to a specific scenario. This is a HUGE time saver for idiots like me who didn’t get the hits from the tool on the first go, and need to start manually figuring things out.
  • At some point we debug the wrong test. Seriously.
  • Near the end, we discover that we had a bug in the way we fill the board all along. We switch the x and y positions of the board DSL for tests, and it’s biting us in the ass two sessions after we did it.
  • Both of the bugs (in the start and in the end of the session) we had in this VERY frustrating sessions, were to do with our FillBoard method - a piece of logic in our tests. That’s what happens when you have logic in tests, and we should have been more careful and test that. One bug had to do with how we split the strings, and the other was in how we add stones. 10 lines of code, 90 minutes of frustrations X 2 people.
  • see 1:22:20 to see our VERY slow realization that we might have switched out X-Y positions on the board in our helper method. it takes me two minutes to “get” it, while Raymond patiently explains to me and my slow brain why he’s right. And then, two minutes later (1:23:50), it hits me and the horror on my face is just… human.
  • In the last 3 seconds I forget to turn off my camera. But I’m too tired to notice.
  • Inspite of all this, we still get some s#!t done, and knock off a couple of features like winner by counting cells.
  • We end up with a partial feature of multiple cells (only one to the right), but we now have something to aspire to finish in the next session.


Faking static methods in Moq, FakeItEasy and NSubstitute might be closer than imagined

Video: (part 5 - A Test DSL) Go Game Engine with TDD and Pair Programming