QA – what is the work of a Quality Assurance Engineer? And how to become one?
- June 25
- 4 min
Quality is a very wide concept, understood by everyone in a bit different way. It can be taken care of on different business levels. It means something different for testers, product owners, and even for clients. As developers, this term will be mostly associated with producing high code quality.
In theory code quality is one of the most important aspects while developing software. Unfortunately, mostly due to workload and deadlines, this essential measure is ignored many times. Of course, such code can still behave in the way it is supposed to, but with time it will result in technical debt, bugs, security vulnerabilities, and many other issues.
In the last years, there was much buzz about “Clean” Code, Horrible Performance by Casey Muratori. In this video, the author states that using clean code rules may cause more harm than good mostly to performance. He makes some good points as indeed performance and efficiency are important, even crucial for gaming software. But following just this approach will not be beneficial when we are dealing with huge programs that are not only required to be fast but above all to be bug-free and reliable.
As developers, we rarely have the opportunity to create new code from scratch. Most of the time we work with code that was there for months or years. In the book “Working Effectively With Legacy Code” by Michael Feathers, the author points out four main reasons why we want to change already existing code: adding a feature, fixing bug, improving the design, and optimization. There is no doubt that code ages in time. That is why when we as developers are creating or changing something, we should pay special attention to quality.
By code quality term, the first thing we should have in mind is readability. If the code is written in such a way that every other developer or even someone non-technical can understand what a given function is doing, it is much more maintainable. We can achieve that by simply using naming conventions. Sticking to one convention in the whole project is improving readability, consistency, and maintainability. Easy-to-read code is even more important than the concept of reusability. It saves developers time and as a result clients’ money – if understanding code takes hours it is a huge waste.
To improve the readability of code we need to ensure that the names given to code elements such as variables, functions, and methods, clearly reflect their purpose or functionality. The method that obtains something should have a ‘get’ prefix for example. If it is challenging to name a method or function, it might be the indicator that the function is too complex and needs to be refactored into a few smaller ones to provide clarity. As the well-known KISS rule, which means Keep it Simple Stupid, says – we need to focus on simplicity and self-describing naming since it will as a result save our time and the time of other coworkers.
Sometimes we can think that what we created is easy to understand and without any flaws. Let’s be realists: we are not really objective when it comes to our code. This is where code review enters. Nowadays, many businesses use code review tools which is very helpful, but when developers know that code will be checked and commented on by peers, it puts a bit more pressure on them. They will try harder to deliver well-designed and tested code that others can understand. Apart from the code quality increase, thanks to code review, this process allows us to get others’ perspectives and maybe learn something in the process. Sharing knowledge and being open to other peoples’ remarks makes us better programmers and it reflects in the quality of your work.
A crucial part of code review is checking documentation. Even if we have beautiful legacy code, if we cannot run the application or don’t know how to use functionality, how can we fix the bugs or add new features? Clear and comprehensive documentation is a guide for us, and helps us to understand the codebase, its functionality, and its intended use. It also makes onboarding for new team members much smoother and it is really helpful when troubleshooting, debugging, and modifying. It provides information about why was that specific design, algorithm, and approach chosen. By keeping effective documentation, we ensure the preservation of knowledge and save the time we would otherwise use to transfer it. Also, well-documented code will be beneficial in understanding software evolution over time.
While “Clean Code” principles advocate for readability and maintainability and are mostly concerned with the development process, it’s essential to recognize that performance considerations are also valid, especially for large-scale programs. We must balance these aspects to ensure bug-free and reliable software and concentrate on the fact that we are not writing code for ourselves. By documenting, code reviewing, and using naming conventions we enhance readability and maintainability and our code will not be much slower.