Workshop: Coding Dojo Challenge – SOLID design principles
In this hands-on session we will be looking at how the design of our code affects how easy it is to write tests for it, and how applying SOLID design principles helps with testability. We’ll be looking at several small pieces of code where the author has broken one or more SOLID principles, and trying to get that code safely covered with unit tests. Along the way we hope to learn more about good design and what makes for maintainable code.
We’ll be stepping into the Coding Dojo together, which is a safe place designed for learning, where it doesn’t matter if we make mistakes. In fact all the code will be thrown away afterwards. You should feel free to experiment, try out different styles of test, and get feedback from your peers.
We’re taking a simple, bounded problem, where the code basically works, and the requirements are largely understood. The idea is to practice your design and refactoring skills, and have fun doing it. We’re trying to provoke that “aha!” experience where you realize how much the simple demand to write the tests first can improve the design of the code you end up with. The intention is that after the session you’ll be better motivated and equipped to improve the design of the production code you write.