当前位置:网站首页>[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

边栏推荐
- 6年测试经验,教大家测试~如何把控项目
- Talk about 11 tips for interface performance optimization
- Time pit in MySQL driver
- Quanzhi t3/a40i industrial core board, 4-core [email protected] The localization rate reaches 100%
- Data query of MySQL (multi table query)
- 进程间通信---对管道的详细讲解(图文案例讲解)
- Three methods of STM32 delay function
- Installation guide for proftpd Secure FTP server with TLS encryption enabled
- Website Collection
- The financing demand of 129 million yuan was released, and the roadshow of the Dake city project continued to irrigate the "good seedlings" of scientific innovation
猜你喜欢

“12306”的架构到底有多牛逼?

Explain asynchronous tasks in detail: task status and lifecycle management

Interprocess communication - detailed explanation of the pipeline (explanation of graphic cases)

STM32 DMA receives serial port data

Never pass a request to an asynchronous thread. There is a hole
![[cloud native and 5g] micro services support 5g core network](/img/c9/4ccacd1e70285c2ceb50c324e5018c.png)
[cloud native and 5g] micro services support 5g core network

代码实现 —— 多项式的最大公因式(线性代数)

自定义mvc原理和框架实现

矿山开采虚拟现实vr安全培训提升员工警惕性和防护意识

一文理解分布式开发中的服务治理
随机推荐
Vector similarity evaluation method
How to use RPA to achieve automatic customer acquisition?
如何在多御安全浏览器中自定义新标签页?
一文理解分布式开发中的服务治理
Installation guide for proftpd Secure FTP server with TLS encryption enabled
代码实现 —— 多项式的最大公因式(线性代数)
手把手教你安装VSCode(附带图解步骤)
How to customize a new tab in Duoyu security browser?
Jmeter之BeanShell生成MD5加密数据写入数据库
Awvs cannot start problem
C language improvement (I)
MySQL基本操作和基于MySQL基本操作的综合实例项目
7/28 Gauss elimination to solve linear equations + Gauss elimination to solve XOR linear equations + find the combination number II
How much is the report development cost in the application system?
Responsive dream weaving template home decoration building materials website
ResNet50+k折交叉验证+数据增强+画图(准确率、召回率、F值)
Esbuild Bundler HMR
I was stunned by this question that I browsed 746000 times
发布融资需求1.29亿元,大科城项目路演持续浇灌科创“好苗子”
What happens if you have to use ArrayList in multithreading?