Do you and your team see Programming and Software Testing as two separate disciplines? You believe that programming and testing are as different as oil and water? If so, this blog post will converse with you to realign your thoughts.
When I started to draw the correlation between Software Testing and Programming,
- That is when I realized Programming is beyond writing the code.
- Testing is an integral part of programming.
- Writing code is one part of programming.
- Likewise, testing the written code and the associated system, is part of programming.
- I see, the idea of TDD is an example to it.
- Testing is not the other side of a coin.
- Programming and Testing are on the same side of a coin! Testing helped me to learn this.
Then, what is on the other side of the coin?
- It is we on the other side of the coin,
- Who are seeing and advocating testing and programming are the two different disciplines.
Had I understood this early in my career, it would have made a significant difference.
For the last 10 years, I have been assisting myself and mentees to experience this perspective of programming and testing.
The sad part is, the colleges and universities do not tell this to their students. Instead, we are said the programming and testing are two different stuffs in software system and engineering. Thereby, treating the one is superior to other. Eventually, we in the industry continue to share the same thought and dialogues in all spaces. Thereby, creating the gap in skills and thoughts of both programmer and tester.
Programming
What is Programming?
A program is planned and an ordered event of actions with a purpose. When it is ordered in a specific way, it involves logical decision of a programmer to design and implement a program in a intended way.
In Computer Science, I accomplish this with the help of programming languages and commands which an operating system leverages and executes.
Programming is a thought process and thinking activity which evolves over the time with discipline and consistent practice.
- It involves thinking, understanding, questioning, and analyzing the intent of learning and solving a problem in hand.
- It demands questioning and learning the context.
- It involves studying of -- systems, people, environment, communication, programming languages, design, modeling, simulation, engineering, technologies, anthropology, geography, economy, business, politics, laws, regulations, computer software, software tech stacks, hardware, domains, different professions, jobs, emotions, crime, psychology, science, arts, and you can add more to this list as you unlearn and learn.
- It demands analytical thinking, critical thinking, and ability to develop clarity for making decisions to design the implementation and code.
Programming is like a manifest file in Android app, where it manifests and expects how and what the app should be like. The app code implements the manifestation.
Coding
Visualizing and writing the programming instructions from the manifestation thought of programming is coding. The programming instructions [logical] are written using programming languages. I understand it, this way.
To code, one uses programming languages. Further one has to understand the Data Structures and Computer Hardware and associated software to code efficiently and effectively. This is where I understood the need and value of the Data Structures. This forms the basic and fundamental necessity for one who wants to build and test the software system.
Each programming language has its own,
- Syntax
- Rules
- Limitations
- Way of execution
- Space
- Time
- Storing and retrieval of data
The below said will be well evaluated for the context,
- Which programming language to code? Why?
- What Data Structures to use for processing the data?
That said, the idea of debugging remains relatable and same in most cases irrespective of the programming language.
That is, the debugging is at meta layer of programming. Based on the context, how the debugging is done, can change with the programming language. But, the idea of debugging remains the same.
Programmers learn and practices different programming languages.
Programmers solve the problem using programming language. To solve, programmers start visualizing with programming, and then code.
I see, the programmer learn -- Is the actual problem being solved? So that the time and efforts are well spent.
To stop here, there is,
- Clean Code, and not Clean Programming
- Code Smell, and not Programming Smell
- Code Refactoring, and not Program Refactoring
Programming and Coding are two different skills and it runs in parallel helping each other.
It is like, the programming is a blue print, and, coding is the construction work. Both are needed!
Testing
Having one's own definition as a practitioner is good. But, then I see, my definition also aligns with that of Dr. Cem Kaner, James Bach and Ashok Thiruvengadam. So, I quote their thoughts here.
Testing is,
- Questioning a product to evaluate it.
- Probing the system to learn and evaluate it.
- Empirical technical Investigation
- To learn quality related information of a software system
- So that the stakeholders can make informed decision
I see, testing is an another stand to the programming. It is not different.
Programming and Testing are analyzing and thinking skills for first. The thinking applied and implemented and evaluated is coding skill.
What all needed for better programming, all those are needed for value adding testing. Refer to the above section on Programming.
Further, testing uses coding to execute the intent of a test to some extent. And, this is a need. Being skilled in programming and coding gives a different perspective and strength to the testing. The value out of this will be distinct and prominent in most context.
If one can test, one can program too.
Now, do you see that the programming and testing are not the two disciplines? They are one! They are on the same side of the coin. On the other side of a coin, it is we who are not willing to see this and advocating these two are different.
I learn, a skilled tester can add keep adding ways to sample, interpret and test when she or he can use the coding skills.
To summarize,
- Programming and Testing are the same discipline.
- Seeing it as two different discipline is counterproductive!
- This counterproductive can be seen in the software industry, today.
- It is useful thought process, mindset and attitude to see both programming and testing as a overlapping areas and one discipline.
- Both are on the same side of the coin in Computer Science, Software & Engineering
- Coding skill does not mean one has programming skill.
- Coding skill does not mean one has testing skill.
- Programming skill shows the testing skill and vice versa.
- Programming is a way of testing.
- Programming is a way of debugging.
- Testing is a way of debugging and refactoring the programming.
- Programmer develops the tests and code.
- If you can program, you can test. If you can test, you can program. If you can program, you can code.
- But, coding skill alone is not enough to program and test.
- These all are three distinct skills, where programming and testing overlaps very much on each other.