Relearn and Remember

This is a general lesson I learned and it is a story. It’s also about software. Eventually. I swear!

I went to the pharmacy to get a new pack of astma medicine. I had been to the doctor recently, because I felt like my astma had been getting worse. I had gotten short of breath from trivial exercise, like cycling a bit fast. That doesn’t normally happen.

Image: Inhaler.

“Do you know how to take the medicine?” asked the woman behind the counter. I had heard that question before. I had always politely declined their offer to show me how to use the inhaler—after all, I had used it for years—but this pharmacist was friendly and grandmotherly and when I said that I had been taking the medicine for years she said that maybe I had forgotten how and she made it sound like a friendly suggestion instead of accusatory and doubtful. So I said yes. Please. Maybe I have forgotten.

I paid for the medicine, she put it in a bag and said “come with me here”.

“Behind the counter,” I said, and in the storage there was a plastic inhaler that made a squeaking sound when inhaled. She told me I was inhaling wrong. I breathed in too quickly and let out a tiny breath immediately after, she said. I looked too far up when I inhaled, but at least my breath was deep enough.

I had known the correct way of inhaling when I had first started taking the medicine, but as taking the medicine became a habit I had overdid some things (don’t look down became look up) and forgotten why I did certain others (holding my breath after inhaling soon seemed inefficient and I stopped doing it, blowing out the medicine before it had a chance to work) and my whole way of inhaling had become corrupted.

I have started doing Test-Driven Development (TDD) fairly recently and the reasons for and mechanics of the practice are still very clear to me. But so were the reasons for and mechanics of inhaling correctly. Eventually the habit will become normal, lose its significance, and then I will start forgetting important details.

When I start doing TDD wrong, I will need to be reminded of how to do it right—just like the apothecary reminded me of how to inhale right. But even when I was inhaling wrong I was certain I was doing it right, and I only got help when I started notificing the symptoms of doing it consistently wrong for an extended period. Chances are the same will be true for my practicing TDD if I don’t do anything about it.

Katas are “the detailed choreographed patterns of movements practised either solo or in pairs.” Originally used for training combat techniques, Katas are now used as training for many other activities (theater, tea ceremonies, martial arts—mainly from Japan, the country where the concept originated).

Katas are repetition of core movements, and are used to learn and internalize. They are used by masters as well as novices, and for masters they serve the purpose of constantly refreshing and reminding of the mechanics of and reasons for the practice so they never forget what’s important and so they never let their execution become corrupted.

Pragmatic Dave Thomas introduced CodeKatas some years ago, saying, “It helps to have talent. But ultimately, greatness comes from practising.” Katas have become a fairly well-known concept in the world of software development and people have even written katas specifically for TDD, making it easy for me to refresh and train my TDD knowledge.

Katas make it unnecessary (if performed regularly) to do periodical stops to relearn a skill, because they constantly keep the mechanics fresh in the mind. Continuously doing katas keeps skills from corrupting.

I’m going to write down an inhaling kata. And I’m going to start doing TDD katas today. Join me in constantly relearning and remembering.

I tweeted a bit about katas recently.

Sign up for more blog posts like this. It takes 10 seconds.

And don’t forget to inhale right …

Gif: How to use an inhaler, courtesy of House MD


Now read this

Pseudo-Code Job Adverts

if(you == "Developer") { ContactUs("+4500000000"); } Are you familiar with those job ads targeted at developers that are partly written in (bad) pseudo-code? I previously covered one ad written entirely in C# (but the original ad has now... Continue →