Left brain thinking to building great code

T Ashok
High Performance QA

--

Summary
This is the fourth article in the series of twelve articles “XII Perspectives to High Performance QA”, outlining interesting & counter intuitive perspectives to high performance QA aligned on four themes of Language, Thinking, Structure & Doing.

In this article under the ‘THINKING’ theme, we examine how a logical ‘left brained’ thinking plays a key role in the activities we do, as a producer of brilliant code from the QA angle.

Testing is about perturbing a system intelligently and creatively shake out issues that may be present. How do we know that all the issues have been shaken out is indeed a challenge. A logical thinking approach to identify good and erroneous situations is seen as necessary to justify the act of completeness of validation. It is also seen as necessary to be creative and use the context to perturb the system. Finally, injecting a dose of randomness to perturbation is seen as the final straw to being complete.

In this article we examine the logical ‘left brain’ thinking to testing a system. We dissected the act of validation as a problem solving approach consisting of these SEVEN activities:

Let’s examine the role of logical “left brained” thinking in system understanding (1&2), the act of validation (3&4) and interpretation of the act (5&6). So, how do we think logically? Let us look at this in three parts : the style of thinking we adopt, the methods we use and the approach we base it on. Well, we can go analyze the problem by breaking it down logically in a forward manner or set the goal and work backwards and in some cases approximate and continually refine.

“Forward” thinking style

The ‘forward’ thinking style is useful in breaking down the system logically to setting up a clear ‘what-to-test’. It is systematically decomposing the system into key business flows done by various personas, to arriving at business requirements that is really a collection of technical features of the system.

“Backward” thinking style

The ’backward’ thinking style is useful in setting up expectations, the criteria to be satisfied and also the goal in terms of potential issues to be uncovered.

Let us look at the criteria first. What do we do when we want to ascertain the purity of a material? First, we clarify what the expected purity is by identifying the properties that it should satisfy, then we check if the given material does indeed satisfy these properties. In the case of a software system the notion of properties is a quality model like the ISO 25010 that states the various ‘-ities’ that may have to be satisfied to meet the quality requirements.

So what is the goal of clean code? Well it is not to have any issues that affect the end user’s experience? Hypothesising potential issues that may be probable by deeper understanding of the intended behaviour, the environment and context, other systems it interacts with, the technology used and inputs it processes enable us to set a goal to start with and refine continually.

“Approximation” thinking style

When some things are not known and have to be discovered, approximation can be handy. This is especially useful in estimating in data volumes, transaction load etc. One of my favourite questions when I conduct workshops is “How many hairs do you have on your head?”. I’m always amazed at the answers that I get from the participants. Some say 10,000 while some enthusiastic participants say ONE million! I have to nudge them to try approximation using a simple scientific means like using area times hair-density and then refine.

Role of methods and approach

In all thinking styles be it forward, backward or approximate, methods and approach have a key role to play. The application of well formed techniques especially in test design (4) that are broadly categorised as black and white is well known. Principles based on testability to ensure clarity of spec in terms of criteria and key to problem solving.

Finally, the approach that is really a disciplined process of thinking, sometimes deeply ingrained that they become good habits are key to exploiting the logical left brain thinking. Systematic retrospectives to glean from experiences that can be applied to the current is the hallmark of mature thinking.

Summary

A logical ‘left brain’ thinking is essential to good testing. Testing is not just an act, but an intellectual examination of what may be incorrect and how to perturb them effectively and efficiently. This can be seen as a collection of thinking styles of forward, backward and approximate using methods that can be well formed techniques or high order principles that is based on an approach of disciplined process, good habits and learning from experiences.

--

--

T Ashok
High Performance QA

Software Test Professional. Endurance Cyclist.Ultra Runner. Wordsmith. “Do what you love, Love what you do”.