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
Post a Comment