This is a guest posting by Jim Holmes
Modern software testers need to be comfortable with code. The days of testers not being able to open up a code editor and understand software fundamentals are thankfully vanishing. As modern testers, we need to embrace a new challenge.
Get TestRail FREE for 30 days!
Kata as a Practice: Creating an Instinctive Flow
Getting to that fundamental competency requires two things: some elementary knowledge, and lots of disciplined practice.
Martial artists have long used kata for developing combat techniques. As Wikipedia says, “The goal is to internalize the movements and techniques of a kata so they can be executed and adapted under different circumstances, without thought or hesitation. A novice’s actions will look uneven and difficult, while a master’s appear simple and smooth.”
Repeatedly working through the small, intentional parts of kata lets students and masters develop muscle memory so that the more significant action becomes instinctive.
Early in its infancy, the software craftsmanship movement seized upon the idea of kata as a practice which could help developers in the same way: create an instinctive flow through the mechanical phases of a software problem, leaving students able to dedicate more critical thought to solving the harder domain aspect of the problem.
Early adopters in the movement looked to small, realistic problems that could be used in the same fashion as martial arts kata: repeat the same problem over and over, learning to flow through the exercise smoothly. As such, software kata around string calculators, bowling game scoring, and other similar practices were born.
These problems lend themselves to the same learning concepts as judo or karate kata. For example, internalizing the mechanics of following the arrange, act, assert pattern for automated tests enables developers to focus on the harder parts of the problem at hand. In the same line, careful attention to the Test Driven Development cycle of red, green, refactor builds the discipline to follow the same critical cycle naturally without thought.
Numerous software kata exist. Dave Thomas, the renowned author and software expert, created a blog series that walks through 21 kata. Robert C. “Uncle Bob” Martin, another well-known expert, wrote the Bowling Game kata years ago. Another great source is at katas.softwarecraftsmanship.org, where you can watch videos of developers working through kata.
So what can you as a tester expect to learn from working kata?
As mentioned above, testers need a basic comfort and level of proficiency in writing, reading, and understanding code. Kata practice is a terrific way to achieve this.
Quickly Master Your Integrated Developer Environment, the Basic Language Syntax and Necessary Libraries
First off, kata help you quickly master your Integrated Developer Environment. Regardless whether it’s Visual Studio Code, Atom, Vim, or something else, kata give you a route to quickly memorize critical keyboard shortcuts and expansion templates. You’ll learn how your IDE helps you automatically best format your written code to follow a language’s idioms. Kata also give you a chance to learn useful window and pane layouts or configurations. Finally, you’ll quickly master executing and interpreting automated tests within your IDE.
Secondly, kata will help you quickly master the basic language syntax and necessary libraries of the language and platform you’re using. You’ll soon grow comfortable with basic constructs of classes, methods, variables, and statements. Constant repetition will help you move past struggles of how to declare arrays of particular types or the initially confusing mechanics of interacting with collections.
Flow control via a language’s if/then/else or do/while constructs can be intimidating and time-consuming to gain proficiency around. A good kata problem can help you move quickly through learning effective structuring and flow handling.
Additionally, good kata get you intimately familiar with popular test automation frameworks. You’ll quickly master the mechanics of creating test methods, and the arrange/act/assert structure of most tests will become second nature to you. A good kata teaches you many different ways to leverage a test framework’s comparison/equivalence capabilities.
As you get better and better at working through various kata, you’ll find yourself developing different patterns of logic and thinking. This maturity is perhaps the pinnacle of kata practice, where you’re so adept at the necessary forms that your mind is freed up to do what you as a tester need your brain to do: focus on understanding the problem’s domains and intricacies, rather than struggling with guessing at statements.
Developing an Instinctual Understanding of how Good Clean Code Appears
Dedicate time each day to working through code kata. You’ll find you quickly become proficient and comfortable with the code. You’ll be a better tester for it, and you’ll be a far better team member.
Jim is an Executive Consultant at Pillar Technology where he works with organizations trying to improve their software delivery process. He’s also the owner/principal of Guidepost Systems which lets him engage directly with struggling organizations. He has been in various corners of the IT world since joining the US Air Force in 1982. He’s spent time in LAN/WAN and server management roles in addition to many years helping teams and customers deliver great systems. Jim has worked with organizations ranging from start ups to Fortune 10 companies to improve their delivery processes and ship better value to their customers. When not at work you might find Jim in the kitchen with a glass of wine, playing Xbox, hiking with his family, or banished to the garage while trying to practice his guitar.
Test Automation – Anywhere, Anytime
- Announcing TestRail 6.3 with Enhanced Jira Integration
- TestRail Leads in the Spring 2020 G2 Grid for Test Management