Skip to main content

How to improve the software quality of C/C++ large-scale projects? Adopt these 15 ways .

How to improve the software quality of C/C++ large-scale projects?


The quality of software delivery has always been the core issue of our software development projects. How to ensure the quality of software projects, especially large and super large software projects, has always been an issue that many software companies have been paying attention to and researching whether at home or abroad.


 Usually we will control and evaluate software quality in six parameters: functionality, usability, efficiency, testability, maintainability, and portability.

1.Functionality, that is, whether the software meets the customer's business requirements;

2. Usability is a measure of how much effort users need to use the software. Simple and easy-to-operate software is very important for customers. Take WeChat, which has the largest number of users in China, do you think its design is always It is so simple and easy to use that after so many years of use, its complexity has not increased a lot. The simple product design and simplicity of the road to the simple and easy to use can often attract more users;

3. Reliability, that is, whether the software can always meet the availability in a stable state; reliability is the traditional definition and basic requirement of quality. Of course, there are different requirements for software in different application scenarios. For example, most client software is easy to use. In most cases, it can run and deal with problems normally, but for software in some industries, such as financial transactions Software, aerospace and medical software, if there is a problem, then the cost is huge.

4. Efficiency, that is, to measure how much physical resources the software needs to run normally; the actual execution of the program and the efficiency of event processing. Especially for some application scenarios with high real-time requirements, a difference of a few milliseconds may bring about completely different results. Such as Internet finance high-frequency trading software, strategic trading software and military software.

 

5. Testability, that is, effective testing of each functional module. Normally, our software will not become reliable just because it passes the test; when you can test, the software has established its inherent quality. Not all software can be effectively tested. In order for the software to be effectively tested, we must design with the goal of high quality in every link at the beginning of the project.

 

6. Maintainability, that is, to measure the feasibility of adjusting the completed software; good software must have systematic defect tracking and scalability to new customer needs. For many systems developed in C++, if the design of the system is not good, the maintenance cost and expansion cost of the system may be very high. Large-scale systems and maintainable designs are carefully designed and planned from every step of the project (requirements analysis, system architecture, detailed design, quality assurance, rigorous testing, etc.).

7. Portability, that is, to measure whether the software can be easily deployed to different operating environments; any good system should have portability to a new platform.

 

15 Ways to improve software quality:

 

1. Quality Assurance (QA) is generally an organization within a software company that is responsible for "ensure" that product quality has reached a certain standard. Establish the software testing process model, the testing done by QA is carried out at the end-user level. Regression testing at any level depends on the developers themselves.

 

2. Quality assurance. QA must become an inaccessible part of the development process. You can't just wait for the developer to throw a piece of software before starting the test. Developers are responsible for ensuring the quality of software products. QA wants to reflect this. Whether it is a customer, an architect, a developer, or a QA tester, they have the responsibility and obligation to participate in the whole process of ensuring the quality of the project. To ensure high-quality software products, system architects and software developers must be involved in the entire software development process Put quality first.

 

3. Establishing a PDCA cycle is not only a requirement for developers but also a requirement for QA testers. The PDCA cycle is also called the quality cycle, which is a general model in management. It is the first letter of the English words Plan, Do, Check and Adjust. The PDCA cycle is to perform software quality management in this order. 


4. Avoid repetitive code, refactor the repetitive code in the system, and reduce unnecessary interference.

5. Test the completed code in time and establish defect tracking.

6. Review the code regularly and do a good job of code review.

7. Standard code comments. The purpose of comments is to enable other developers to understand what this piece of code does? If your comments can do this, then OK, then your comments are basically perfect.

8. The code logic is clear, reduce unnecessary code, think more before writing each piece of code, suppose to propose several solutions, see which solution is more concise and easy to understand, use that solution, and strive to write self-explanatory Code.

9. Compare and analyze multiple algorithms that can achieve the same purpose, and find out more effective and efficient algorithms.

10. Good naming habits, the names of function variables, variables and methods should be clearly understood by words so that people can understand them at a glance.

11. Complicated classes, methods, and functions with too many parameters should be split into smaller units for implementation to ensure that each unit has a single responsibility.

12. Don't use pure numbers in the code, you can use macro definitions, and use macros for quantification.

13. Multi-level nested code, handle them separately, don't nest too deeply.

14. Local variables are guaranteed to have a single purpose.

15. Advocate the use of code generation tools, especially in large-scale system development, the benefits of using automated tools are obvious.

Comments

Popular posts from this blog

Defination of the essential properties of operating systems

Define the essential properties of the following types of operating sys-tems:  Batch  Interactive  Time sharing  Real time  Network  Parallel  Distributed  Clustered  Handheld ANSWERS: a. Batch processing:-   Jobs with similar needs are batched together and run through the computer as a group by an operator or automatic job sequencer. Performance is increased by attempting to keep CPU and I/O devices busy at all times through buffering, off-line operation, spooling, and multi-programming. Batch is good for executing large jobs that need little interaction; it can be submitted and picked up later. b. Interactive System:-   This system is composed of many short transactions where the results of the next transaction may be unpredictable. Response time needs to be short (seconds) since the user submits and waits for the result. c. Time sharing:-   This systems uses CPU scheduling and multipro-gramming to provide economical interactive use of a system. The CPU switches rapidl

What is a Fair lock in multithreading?

  Photo by  João Jesus  from  Pexels In Java, there is a class ReentrantLock that is used for implementing Fair lock. This class accepts optional parameter fairness.  When fairness is set to true, the RenentrantLock will give access to the longest waiting thread.  The most popular use of Fair lock is in avoiding thread starvation.  Since longest waiting threads are always given priority in case of contention, no thread can starve.  The downside of Fair lock is the low throughput of the program.  Since low priority or slow threads are getting locks multiple times, it leads to slower execution of a program. The only exception to a Fair lock is tryLock() method of ReentrantLock.  This method does not honor the value of the fairness parameter.

How do clustered systems differ from multiprocessor systems? What is required for two machines belonging to a cluster to cooperate to provide a highly available service?

 How do clustered systems differ from multiprocessor systems? What is required for two machines belonging to a cluster to cooperate to provide a highly available service? Answer: Clustered systems are typically constructed by combining multiple computers into a single system to perform a computational task distributed across the cluster. Multiprocessor systems on the other hand could be a single physical entity comprising of multiple CPUs. A clustered system is less tightly coupled than a multiprocessor system. Clustered systems communicate using messages, while processors in a multiprocessor system could communicate using shared memory. In order for two machines to provide a highly available service, the state on the two machines should be replicated and should be consistently updated. When one of the machines fails, the other could then take‐over the functionality of the failed machine. Some computer systems do not provide a privileged mode of operation in hardware. Is it possible t