Coding Dojo – Week 3

For our 3rd coding dojo, we implemented the Tennis Kata from scratch.  Before doing the kata, I got a chance to show off a JavaScript implementation using dependency injection (okay, so I cheated and I used TypeScript).  For the record, I was impressed with how easy it was to write working TypeScript code and the Visual Studio tooling around TypeScript is great.

Anyhow, our Tennis Kata implementation turned out to be very challenging.  We decided to implement the observer pattern with the players as the subjects and the scoreboard as the observer.  We ended up thrashing on design for the majority of the dojo, which is okay as we took away these bits of wisdom:

1)We should spend more time understanding the patterns we plan to use prior to trying to use them.

2) We should follow a work pattern where we define our interfaces and object relations in concept, then write the interfaces in code and the object relations using unit tests.  Allow the unit tests to bring the design flaws to the surface.  This work pattern should work for our professional lives as well as it works in the dojo setting.

Between now and the next dojo, I will work on the use case where we treat Players in aggregate as a subject for a scoreboard observer (I will also look to leverage the .NET native implementation of the Observer pattern).  Glynn will work on the use case where the Game is the subject for the Scoreboard observer.  Susheel will work on the use case where the Players individually are subjects for the Scoreboard observer.

My thanks go out to Altaf, Susheel, and Glynn for their contributions to making this dojo a success.

About Chris VanHoose

Principal Software Architect at CT Lien Solutions
This entry was posted in Software Architecture and tagged , . Bookmark the permalink.

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.