当前位置:网站首页>[quality] code quality evaluation standard
[quality] code quality evaluation standard
2022-07-29 02:28:00 【Code Xiaoyi】
Today, let's think about how to evaluate code quality ?
Seven standards recognized and recognized by the industry :
Maintainability (maintainability)、 Readability (readability)、 Extensibility (extensibility)、 flexibility (flexibility)、 Conciseness (simplicity)、 Reusability (reusability)、 ...Testability (testability).
One 、 Maintainability
Not because of new features feature or bugfix introduce bug, It can efficiently complete the development of new functions and bugfix, The code is easy to maintain , Low maintenance costs and risks
Two 、 Readability
Code doesn't just need to follow the syntax rules of the programming language , You also need to follow the team's coding conventions , Students in the team need to be able to easily understand each other's code , For example, whether it meets the coding specification 、 Is the name meaningful 、 Is the note exhaustive 、 Is the function the right length 、 Whether the module division is clear 、 Whether it meets the requirements of high cohesion and low coupling, etc , Generally, teams need to rely on coding specifications to constrain , Pass code review To detect readability , Readable code , be responsible for review My classmates read the code faster , There's no doubt to go straight to the code problem , conversely , Code questions are too many to understand ,review The effect is greatly reduced , therefore , Code readability can greatly enhance code review effect , Reduce risk .
3、 ... and 、 Extensibility
Modify the inner closure , Opening up and expansion , Need to meet “ High cohesion and low coupling ” Code design principles , The extension of new functions will not destroy the modification of internal code and introduce unnecessary risks , But through extended design , Ensure that the new function code is relatively independent , Does not affect the original code logic ; Try not to modify the original code , And realize new functions .
Four 、 Reusability
Reusability refers to the degree of code reusability , Whether the new function development can reuse the original code , This requires that code module design should not be mixed with business logic , Reduce code writing and changes , Yield twice the result with half the effort .
5、 ... and 、 flexibility
seeing the name of a thing one thinks of its function , Is to write a very clever code , To meet the scalability , And meet the reusability , Affect existing code as little as possible , Write the least code , You can realize the expansion of new functions , Maintaining the status quo , Call it magic .
6、 ... and 、 Conciseness
There is one that states the design principles :KISS(“Keep It Simple,Stupid”) Keep your code simple , This requires a deep knowledge of code algorithm , Master moves , A deadly move , There is no false move . however , Conciseness may run counter to readability , Keep it simple , There is a need to ensure code readability , Need balance , It's not easy , Think deeply and act simply , Thick and thin hair .
7、 ... and 、 ...Testability
Code testability can reflect the level of code quality from the side , It is convenient to write unit test cases , The function development code is not changed completely , Instead, the risk of modification will converge within the controllable range .
So how to measure code quality ? Welcome to discuss .
Finally, thank everyone who reads my article carefully , The following online link is also a very comprehensive one that I spent a few days sorting out , I hope it can also help you in need !

These materials , For those who want to change careers 【 software test 】 For our friends, it should be the most comprehensive and complete war preparation warehouse , This warehouse also accompanied me through the most difficult journey , I hope it can help you ! Everything should be done as soon as possible , Especially in the technology industry , We must improve our technical skills . I hope that's helpful ……
If you don't want to grow up alone , Unable to find the information of the system , The problem is not helped , If you insist on giving up after a few days , You can click the small card below to join our group , We can discuss and exchange , There will be various software testing materials and technical exchanges .
Typing is not easy , If this article is helpful to you , Click a like, collect a hide and pay attention , Give the author an encouragement . It's also convenient for you to find it quickly next time .
Self study recommendation B Stop video :
Zero basis transition software testing : Self taught software testing , Got the byte test post offer, Is the B The best video station !
Advanced automation testing : Huawei has landed , Salary increase 20K,2022 Most suitable for self-study python Automated test tutorial , Spend it yourself 16800 Bought , Free sharing

边栏推荐
- Virsh console connection failure
- Responsive dream weaving template home decoration building materials website
- [cloud native and 5g] micro services support 5g core network
- 聊聊 Feign 的实现原理
- fopen、_ Wfopen reads Unicode encoded files
- Meeting notice of meeting OA
- 响应式织梦模板家装装饰类网站
- 如何把thinkphp5的项目迁移到阿里云函数计算来应对流量洪峰?
- FPGA刷题——存储器(RAM和FIFO的Verilog实现)
- 线上3d数字展厅制作方案及优点
猜你喜欢
随机推荐
聊聊 Feign 的实现原理
响应式织梦模板户外露营类网站
[mqtt from introduction to improvement series | 09] Wireshark packet capturing and analyzing mqtt messages
After 4 years of testing experience, I finally entered Alibaba. Two months later, I chose to resign naked
如果非要在多线程中使用 ArrayList 会发生什么?
当我看源码的时候,我在想什么?
Data query of MySQL (multi table query)
C语言提高篇(一)
“12306”的架构到底有多牛逼?
Excel uses countif statistics
我被这个浏览了 746000 次的问题惊住了
[golang learning notes 2.2] map, structure and interface
What should I do if excel opens a CSV file containing Chinese characters and there is garbled code?
Keil5 open the engineering prompt not found device solution
virsh console连接失败问题
基于对象的实时空间音频渲染丨Dev for Dev 专栏
ResNet50+k折交叉验证+数据增强+画图(准确率、召回率、F值)
详解JS的四种异步解决方案:回调函数、Promise、Generator、async/await
Experiment 2: Arduino's tricolor lamp experiment
Derivation of Euler angle differential equation









