Developers and Bugs — why are they happening again and again?
Entering the world of testers, one question started to formulate in my mind: “what is the reason that bugs happen?”.
And I am quite positive that you will, after reading this article, find the answers I provide useful for you as testers and QA engineers. Do consider them as tips you can easily implement too.
Also, I decided to share some insights into different ways of thinking (usually referred to as mindsets), why they are important for developers, and how they can be important to testers.
So let’s begin with our new journey, with bugs, developers, testers, and knowledge.
Humans and code writing
The below-stated reasons are so common that everyone in any business sector probably repeats them every day. In some jobs, this can be time-saving, helpful, and even inspiring, but for developers, it is a clear path for constant bugs in their code. And also, for testers, these seven reasons are prone to cause mistakes in the testing process and test case fallouts. But understanding them can help testers quickly find bugs and point developers to where the errors are in the code.
Copy-Paste
Rush
Improvisation
Multi-Tasking
Shallowness
Overconfidence
Negligence
New Selenium IDE supports cross browser testing and parallel tests for automation along with record and replay function. Here’s why you shouldn’t miss out on it.
The importance of writing cleaner code
Programming is 99% team work.
Today teams shift approaches in code writing and encourage team members to write cleaner code. The reason for that: if your code is cleaner then it’s easier to read. And it will be more understandable to other developers. And this is important for any programing language you use.
Also, software solutions are constantly updated, so when a new team member has to do updates, it will be a problem if the code is messy.
For testers, the reason is an obvious one. If they are dealing with clean code, it will be easy to spot a bug and write a bug report. Also, if a bug occurs, and you report it to the developing team, every team member will better understand the error if the code is written respecting the “rules” of writing cleaner code.
These are some points that will help in writing cleaner code:
When defining names for variables or functions, use descriptive names. Try creating syntax with variables that have understandable value for other developers. And not only in your team but for anybody who will review your code later.
Try to write functions that do only one thing. Yes, when you write your code and have the result in your head, you will write one function that does a lot of things. This complex function is clear to you, but it will be hard for somebody else to understand.
Try to take some time, and write a couple of short functions that will do one thing at a time and be easy to read and understand.
Another tip, instead of writing too many comments, write code with descriptive names. It can be harder, but be sure that it would be appreciated in the end.
When writing a comment, one needs to be understandable and have a clear message. Write your comment with information that will be useful. And this is not only that other developers will know what you did, but you will also need to go back to your code later. And after a couple of months or a year, you will have difficulty understanding what the code is doing if you don’t have a descriptive message.
The most important use of cleaner code is when you write one, testers will easily automate tests for it.
Binary search
Now, let’s see why binary search is easier with cleaner code.
Binary search is only successful and possible to use when you have a sorted list of items. In binary search in every step, data will be reduced to half. This reduces search time significantly, and required information or piece of information will be quickly delivered to the end user.
To have a clean code and to write one, you must have a well-organized structure. The organized structure is easier to read, and as we know, binary search is only successful on codes with clear structure.
This will also reduce the time for testing, and your software will be released without bugs. Your end user will also be satisfied.
Automated Functional Testing tests helps to ensure that your web app works as it was intented to. Learn more about functional tests, and how automating them can give you a faster release cycle!
Timeless Knowledge
Now, you probably wonder what does timeless knowledge have to do with bugs? I will try to explain it in short.
The world of programming and software solutions is a fast-changing game. More and more people are driven to start their careers in this field, and it is the reason for the fast evolution of coding languages and solutions.
So much research is happening in the field of programming and software solutions, that it’s practically impossible to keep up with all the new developments that are going on.
All the time some hot new thing is out in the market, and we are prone to follow it. People just don’t want to be left aside, they aim to be in the center of the action.
But, one thing tends to be ignored. And that is the advantage of having timeless knowledge.
Here’s a complete Manual testing tutorial covering all aspects of Manual testing, including strategies and best practices!
What is timeless knowledge and how to identify it:
It can be derived from physical or abstract truths, like graph theory, linear algebra, and most other branches of pure mathematics.
It can be time-stationary like storytelling, leadership, and learning how to learn. In the world of programming try to transfer this to things like operating systems, computer networks, and cryptography.
To maintain timeless knowledge learn about operating systems, and use knowledge about cryptography for a better understanding of codebases. Learning communication skills will help you to be a successful team leader, and to run successful testing cycles in the world of testing and QA.
For programming these points are timeless knowledge (you know them as the basics of programming languages):
Variable Declaration
Basic Syntax
Data Type and Structures
Flow Control Structures (Conditionals and loops)
Functional Programming
Object-Oriented Programming
Debugging
IDEs (integrated development environments) and Coding Environments
And now to wrap it up:
Why is this all important to testers?
All I mentioned in this article are the most important coding basics that testers need to know. And testers and QA need to understand this to be included in all phases of software development.
The starting point in understanding software programs, solutions, machine learning, and automation is to learn the algorithm, binary code, and how machine language is evolved into today’s “modern” languages. Not to mention you will easily understand cloud solutions and AI.
I want to say — to test, you must understand how the software solution you test is supposed to work, and then you will easily find errors and write an acceptable bug report. Timeless knowledge is the foundation for learning new things. Learn basics and you will easily switch between manual to automation testing, from tester to QA team leader.
Subscribe to my newsletter
Read articles from Lejla Hadzimahovic directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
Lejla Hadzimahovic
Lejla Hadzimahovic
If there is a Disneyland where books would ride their roller coaster, then it is definitely under Lejla's management. A person whose words will lead you to an imagined and justified goal and someone who will manage to make the economy interesting as well. Economist graduate, blogger, and programmer with many years of experience, and with over 117 published articles and a gallon of coffee drunk because of those.