Category Archives: Software Craft

Software Craft

The Craft of Software Testing

The inaugural issue of the Agile Record magazine includes an article from myself about some thoughts on the craft of software testing. In it I describe my understanding about the craft and how testers may reach a level of professionalism where they know what they’re doing. Deliberate practice is one thing in that equation.

Looking through the magazine, I spotted great articles. Dawn Cannan co-authored with Lisa Crispin an article on being the worst and why it pays off, David Evans has an article on testability and considerations on whether to invest in it or not, Lior Friedman has an article on the agile view on quality, Marc Bless has an article on Scrum forced on an organization, etc. Before listing up all the contents here, go to the Agile Record page, subscribe (it’s free), and get your personal copy.

On the relevance of context

As software testers we use context to point out that not all practices may be used in any situation. This is one of the key principles of the context-driven school of testing. Robert Martin talks about particular practices in the professionals tool-belt that are used in a project based on the particular context of that project. Alistair Cockburn names the same concept Just-in-time methodology construction and defines a large amount of practices and principles to use in software development projects. For me there always seemed to be a pattern behind this concept and I decided to write it up for public discussion.

Lately, I read through the Quality Software Management series from Gerald M. Weinberg. In it, Weinberg discusses differences between the Routine organization and the Steering organization. The key difference between the two organizational cultures lies in following a prescribed way to handle a project and choosing among several techniques and practices based on the current situation. In a Routine organization there is one particular process defined and software projects shall follow this. Of course, project managers take care of following this one process. In the Steering culture there are many processes which may be followed. In a Steering culture the controller of the project chooses among several practices and knows when to adapt by taking the outputs of the previous project phases and feeding this knowledge in to the inputs of the next project phase. A controller of the project may consist of the designated project manager or the project team as a whole.

About two years back my wife amazed me with a similar lesson in a completely different area of life. For my birthday I got a jigsaw puzzle. My wife has over hundred puzzles in the house and she all finished them. When I got to know my wife, we spent several evenings together puzzling. During this period I had adapted a technique from her to get the puzzle started. By sorting out similar shapes and then combining them according to their particular shape-type, she was able to make steady progress with the jigsaws. Therefore I started by doing the same thing. Having finished the outer frame, I sorted the remaining pieces by their shape and started over.

After some hours puzzling, I realized that copying this strategy did not work out for my puzzle at hand. I did not make much progress and had become a bit fed up with it. After reflecting some minutes, I realized that I was stuck by the wrong strategy. The puzzle showed an image of penguins in an icy world. Therefore the pieces contained mostly black and white fragments of that picture. It was a lot easier to first partition the pieces according to the color rather than their shape. My wife applied the strategy by sorting out shapes with more colorful puzzle images, that helped her succeed there, but for the image at hand I had focused on the wrong strategy. After changing it I noticed that I could make much faster progress than before.

Of course, in the story above I had less experience with jigsaws than my wife had. Over the years she adapted several techniques for finishing up a jigsaw and based on the particular circumstances she choses among the several techniques she knows. When I started the jigsaw I had a vague understanding of one of her techniques and foolishly tried to apply it. Just by making myself aware of the situation when things did not turn out, I was able to try out a new approach to follow and add another technique to my repertoire. Similarly in software testing and software development we need to make ourselves aware of the particular situation in our project and reflect over the course of it. When we get aware about problems, we can help ourselves by choosing another technique or practice to follow for the next few weeks in order to improve the overall course. By continuously making ourselves aware of the situation and the context at hand, we can deal with changes circumstances and try out new things if we get lost.

Educational models in historic retrospection

Anna Baik took my recent blog posts and made a reflection on her swimming lessons in a blog post. In short, she stated that up until the age of 11 years she was not taught how to swim properly. Though her teacher insisted on some exam, she wasn’t able to take the test. In the end she did not learn swimming at school, but much later decided to learn how to swim with some advice from a friend. In retrospection I am going to introduce three different models for learning and education and discuss them in some depth.

Continue reading Educational models in historic retrospection

Where is your context?

Just finished reading through the rumble of the year between Matt Heusser and Alan Page on code metrics. Marlena Compton seems to have facilitated the session very well, since I haven’t heard of any casualties. One striking phrase from Alan Page led me to this blog entry:

In my world, code coverage measurement is another tool in the testers toolbox. We use different “tools” depending on what we’re investigating and where we want to guide our discovery process. We always need to use the right tool in the right context.

Thus far I haven’t thought consciously about context. Alan in the above mentioned quotation made me realize that there are multiple contexts to apply context to.

Continue reading Where is your context?

Patterns for Test Automation

Robert C. Martin brought up a blog entry yesterday called The Polyglot Tester. He argues about the Behavior-driven development style of automated tests the table style encouraged from FIT, Slim, RobotFramework and others. While I’m not going to jump into the discussion which of the existing tools is better, worse or more suitable to do some job, here are some references to patterns for test automation, which I came across.

Continue reading Patterns for Test Automation

People Learning

Nearly everything in software involves some humans doing the job. Today I got a phone call:

Caller: Do you have some resources for me?
Me: Sorry, I don’t have resources for you here. Just people.

Reflecting back on my university years it’s interesting to notice, that we teach computers to learn just like humans, in order to replace humans by computers. But, while we’re doing so, we treat people like things. In addition most of the time people in the software get treated as resources, who can be sent to some course, get a degree or a certification, come back and know everything – inwards and outwards. Sure, this is how it works, of course. Maybe they will be inventing some injections in the near future. Then people – sorry – resources can be as productive all the time without the need to send them to trainings. Now THAT would be an improvement.

This is not how it’s going to work. Let me try to transport this concept to teaching swimming – one of my leisure activities I need in order to gain work-life balance. When setting up a swimming course like most of the projects I’ve been in to, this would look somehow like the following. In Germany the first certification is the “Seepferdchen” (tiny seahorse). By the time the kids know one to two techniques, are able to swim 25 meters (we use metrics here!) continuously and can jump from the edge of the pool right into the water. They can dive and fetch some rings from 1.2 meters depth (metrics!). That’s it.

Now, this is the basic certification a swimming student needs. By then he has the knowledge how to swim through the pool. Ok, let’s put her on a project – a swimming contest. She made her grade with an A, so we better have her sent to the national swimming competition. Of course she knows how to train for the event. Ready, steady go…. What do you think will happen?

Right, when battling the 100 meters against Michael Phelps or Alexander Poppov or Mark Spitz your kid will drown. Why? Because it lacks practice. It does not know how to swim properly with the resistance from the water. The experience of the water pressure is known to her, but not how to use it for her advantage. In addition the muscles has not been built properly to beat with world class swimmers like the ones I mentioned.

There is a pattern we observe each holiday season. Parents sent their kids to our swimming course, because they are going for two weeks to the sea and the kids need to be able to swim by then. Of course, six weeks are enough for anyone to learn to swim. After telling the parents that we have a waiting list for new kids, they take it disappointed to have to wait for a free place. In the end when the kid gets their certification (remember the seahorse), they take the kid with them for their holidays. Why is this dangerous? The kid has just practiced in a safe environment without waves and without streams. The kid knows how to hold their face above the water for some time, but without having the right condition to do it over time when the waves take them out far to the sea. Basically all that certification says, that the kid is able to do basic swimming without saying anything about the abilities.

I hope I raised the point for practicing far enough by now. In order to survive the waves of the software development projects to come, you need to practice your abilities. You need to train and have your programming and testing muscles being built up right in shape in order to survive the streams of the tar pit (see Brooks’ The Mythical Man Month) of software development projects.

But keep in mind that there is no pattern or schedule for people learning. In fact some kids take more than a year to learn enough to get the seahorse certification, others may be able to do the practices for it in just ten weeks. There is no way to have them scheduled on a certain date, because each kid has their own pre-requisite of moving behavior and familarity with water. Compare two kids. The first one has taken baby-swimming courses right after birth and is very comfortable with the element. The other one has nearly survived a fall into the local pond at age of three. The first one is likely to take a shorter period of time for learning how to swim. The second is more likely to have fears against the element that need to be removed before the kid can get trained on the techniques. So, it’s likely to take a longer period. My considerations are not guarantee, though. (On another note I would be happy if I got told about certain fears before starting to work with the kids sometimes.)

I hope it’s obvious to see the similarity to people learning how to test software or how to develop software. People differ in learning styles and learning speeds, but people learn. The difference is to get the hook on the past experiences of the people good enough for them to take the step beyond that gap to the new models you’re providing. Therefore a good learning approach is to settle for multiple models of your teachings in order to get as many people as possible and make them able to refer to your model as well.

Multiple facets

As a swimming trainer I was taught that I reach some of my students with some exercises, some of my students with some tactile impulses while some others need to be taught the model by showing them my movements. Keeping in mind that “correct” is an interpretation from some human, I don’t think there is one and only one correct path to teach anyone anything. People vary in their ways of getting the hook on something.

That said I don’t believe in the single solution of a training model. I believe that we need multiple ways in our toolset to teach people what we’re actually doing. People perceive some of the lessons we teach them by one or more of the following:

  • formal training classes
  • reading a book
  • failure on the job
  • failure in some save environment like a training session
  • watching an experienced professional doing some work
  • (positive) on-the-job experience

Though we don’t make much use of tactile experiences in the software world as I may need as a swimming trainer, there are multiple facets of learning. Based on cultural aspects and diverse background from people there is multiple responsiveness to certain aspect on software development education. This also holds from my perspective for software testers – and I believe for nearly all jobs.

Over the course of this year I got to learn about Coding Dojos. The arrangement there is to have people from the audience brought in to some time-boxed hands-on experience in a save environment. The second aspect is watching two experienced developers developing code. This arrangement sets up people for various learning facets. The more ways we try to set up the learning, the broader our learning audience will be.

The interesting part here is that people can gain experience while they are work. They can be taught what they may need tomorrow. Since the learning is based on a broad set of tools enabling learning, we make sure to include more people – more people that may need more diverse techniques for learning. The concept behind Coding Dojos is very impressive, and it works.

The question that struck me nearly all year is, “May we use this idea also for training testers?” For quite some time I knew there is some way, but I didn’t know my model about. Then something happened that made it very clear for me. More on this in the next blog entry in this series on learning and education.

On Education

Last Friday I visited my old university where I studied up until just four years from now. The place where I learned how to learn. It was amazing how little changed beside the fact that students nowadays get charged a whole lot more money for their education. In Germany currently there is a rough discussion about these fees and that the universities do not take care for the educational side properly. The graduation celebration I visited last Friday was accompanied with a talk from a previous mentor of mine. He had some data on how education had changed over the last decade and made a comparison between the old Diplom courses and the new Bachelor and Master system. Reflecting over the past years and that talk, I came to the realization that there seems to be a gap in our industry currently.

What did I see or hear that leads me to this conclusion? Reflecting back four years from now I knew nothing about software testing. Over the last years of my study I concentrated on pattern recognition, like face-detection in images, and my diploma thesis handled about hand gesture detection in human-robot interaction scenarios. Back in April 2006 I joined a team of great testers and needed to learn software testing. Thus far I had not participated in a course on software testing. The team I was working in was doing a whole bunch of software test automation using shell-scripts. Over the course of the next few years I did learn how to teach myself what software testing is about. I learned that software test automation is software development, I learned that exploratory and sapient tests are very worth the effort, when accompanied with the right organizational methods, and I learned a whole bunch about Craftsmanship and Cooperative learning sessions.

In general I would conclude that I learned almost eighty percent of the stuff I need on a daily basis right after leaving the university, while the material I learned in university is not that relevant for me any more. As a software tester I don’t need to know how a wrenches for robot hand motorics work, since I don’t need them. Multi-layer perceptrons are not an option for me. Learning algorithms like AdaBoost and online and offline algorithms are not needed in order to test software. Well, I wouldn’t claim that the rough six years I spend at the university were wasted, but I feel that I dd not learn the right things there.

Recently I noticed that there seem to be others who feel just like me. The Software Craftsmanship conducts coding dojos and programming katas to teach the apprentices what the universities are not teaching them. Design Principles like SOLID and Design Patterns are taught on a on-the-job training between Journeyman and Apprentices. For software testers there are similar things happening, i.e. James Bach and Michael Bolton created a Rapid Software Testing class, Cem Kaner has also great courses. Yet, besides Cem Kaner and other distinct persons we do not seem to have reached the universities with our efforts. When I took a course named “Software Praktikum” back in the year 2000, people were talking about test-driven development and that new movement called eXtreme Programming, but no one really taught us something about it.

When I took a look on the course material nowadays I found out that the situation had been improved over the last few years. Nowadays students get offered test-driven development courses, some Design Patterns and maybe some Refactoring. Unfortunately I did not run across a testing course at my university.

Therefore I concluded that I would like to do something on this as part of a New Year’s resolution. Personally I want to help people understand software testing, help them grow into the craft and hopefully get a better tester than I am. There are a lot of movements currently going on, and I think based on my past I can be a contribution to these movements. This is all I want to say for now. If I made you curious about more, you may want to subscribe to my feed, as I will be digging deeper here shortly.

My Long Road

Yesterday I finished reading through Apprenticeship Patterns – Guidance for the Aspiring Software Craftsman from Dave Hoover and Adewale Oshineye. Personally I met Ade at the Software Craftsmanship conference in London earlier this year and participated in his session on Mapping personal practices. After I came back I used the format for Personnel development. Since May I have a video from Ade open in my browser tabs on How to walk the long road, which I still haven’t seen, yet. So, just after finishing the book, I decided to describe my personal development as a reflection of the last four years of my life using the pattern language provided in the book. So, here it is.

Continue reading My Long Road