Chess TDD 44: Starting the Climb toward En Passant
En passant is going to be a fairly complicated thing to calculate, given the way I’ve implemented this thing so far. And, true to form, I only got a very thin slice going in this episode. Still, it was measurable progress and it’s good that I was able to slice thinly.
What I accomplish in this clip:
- Fixed a mistake in one of my tests that a viewer pointed out.
- Got the first en passant test passing.
Here are some lessons to take away:
- As always, peer review is king.
- Finding a way to carve thin slices off of large problems is an art form and so important. Without this, it’s easy to be overwhelmed by difficult problems.
- When you’re writing a test and you see an unexpected behavior from production code, stop and clarify your understanding. You don’t want to procrastinate with that.
- Edge cases account for a lot of complexity in design, which makes it doubly important to have a comprehensive regression test suite.
- Revisiting a design is really hard without automated tests to cover what you’re doing. This tends to cause designs to calcify in untested codebases, even to the point of avoiding the addition of new functionality that users want.