Home United States USA — software TDD: From Katas to Production Code

TDD: From Katas to Production Code

87
0
SHARE

Katas are a way to break down the learning and not overload developers trying to learn technical practices, such as TDD.
Join the DZone community and get the full member experience.
TDD has been a subject of interest for practitioners at least for the last ten years or so, even before that if we take into account the eXtreme Programming practices and the agile manifesto.
Despite its claimed popularity today and its symbolism of quality the practice of writing the test before production code is still uneven. It varies based on the practitioner’s context, past experiences, and the practitioner’s learning path.
We could elaborate further on the uneven knowledge of TDD starting from the formal education on the subject, therefore, it might require even more discussions about its applicability. Is it possible to teach effectively TDD without professional project experience? Some might argue that it is possible, while others will say the opposite.
Despite great content published by renowned publishers such as O’Reilly, packt, # Addison-Wesley Professional Computing Series, Apress, and Manning the practice of TDD is still a challenge, even the best books, the best examples, cannot automatically translate its content to the unique problems that practitioners face on the daily basis.
Katas are a tool that might be used to fill in this gap for both: formality in learning TDD and uniqueness problems that practitioners face.
Practicing with katas is not a replacement, it can be understood as an aid instead.
Practitioners have tried different approaches to internalize test-driven development. Despite the effort, the mismatch between training and production code exists.
The patterns found in practicing Katas are close to green field projects. In the day-to-day, it is most likely that practitioners will join a brownfield project that is not that friendly to maintain. There are books that focus only on this aspect of things, for example, Working efficiently with legacy code by Michael Feathers, Refactoring: Improving the Design of Existing Code by Martin Fowler, Refactoring to Patterns by Joshua Kerievsky, and many more.
The patterns that practitioners use for Katas but are usually a mismatch with production code that frequently appears together are:
There are different approaches that one might take to write code, what is usually shared across the source code is the technique of splitting problems and then combining all the pieces to solve the problem.

Continue reading...