当前位置:网站首页>Embedded development: skills and tricks -- seven skills to improve the quality of embedded software code
Embedded development: skills and tricks -- seven skills to improve the quality of embedded software code
2022-07-04 22:19:00 【Guangdong embedded Education】
For developers , Nothing is worse than trying to maintain and update code of such poor quality . For many development teams , Software code quality is not required . To improve code quality , Here are a few tips that embedded developers can follow , And integrate it into your own process , This will help improve their code quality .
skill 1—— Follow coding standards
Developers interested in improving code quality should start by examining industry standards . Developers can use many industry standards to improve the way they write code , Include :
l MISRA-C
l Cert-C
l IEC 12207
l IEC 62304
These standards establish a framework for developing high-quality software . Anyone who wants to improve software quality should review what has been done , And start implementing industry recommendations .
skill 2—— Analyze and maintain software complexity
It has been proved many times , Minimizing software complexity also minimizes error rates . The more complex the software is , The greater the change , Not only will there be software bug, And the maintenance of the system will also increase bug. Developers should monitor their function complexity by using cyclomatic complexity .
skill 3—— Conduct regular code reviews
Code review has proved to be the most effective way to reduce software errors . Integrating peer reviews into the development cycle is crucial to ensure that software quality remains at a high level . In order to have an effective code review process , Embedded developers should follow several key factors :
Limit code reviews to 60 Within a
Don't comment more than 400 individual LOC
Schedule a code review at least once a week ( If you generate more than per week 400 individual LOC, More )
skill 4—— Requirements must be traceable
If a requirement cannot be tested and verified in some way , It's better to be automated , Then it is not a real demand . Even before the development starts , Requirements should be broken down into traceable test cases , These use cases can be used later to verify that all requirements have been met . Of course , Needs change , Will use different design methods , But there needs to be a way to track software features and functions , Trace back to the requirements that produced them , And prove that they work as expected .

skill 5—— Compile without errors and warnings
Many teams and developers who ignore compiler warnings , Sometimes there are only oneortwo warnings that developers need to dig deep , Or trivial , So they were ignored , Just hang there . If the compiler does not trust the code and gives a warning , Then developers should treat it as a compiler error and resolve the warning . Warnings are the way the compiler says it doesn't like something . honestly ,C Compilers like everything , So if it has problems with something , So as embedded developers, we should do the same . Code quality means no errors and warnings .
skill 6– Static analysis
Static code analyzer is one of the fastest ways to find potential problems in embedded software . Static code analyzer can find syntax problems 、 Potential glitches , And identify the non portable structure in the code , The static analyzer can even check whether the coding standard is followed , Integrating static analyzers into a continuous build process is a good way to improve code quality and minimize software errors .
skill 7—— All code must be thoroughly tested
Many small and medium-sized enterprises release products without completely testing the software . These companies tend to carry out high-level spot checks , To see if the system works as they expect , Then send them to the wild . When most readers learn that the products of these companies encounter problems in this field , May not be surprised . As an embedded developer , We can't think that our code is working properly just because we don't see the improper behavior of the system . Our code needs to be fully tested ! Comprehensive testing means :
l High level test cases have been verified
l Unit tests have been performed
l Integration tests have been performed
l Code coverage testing has been completed , To verify that each line of code is executed during the test
l System tracking analysis , To verify the time 、 Performance and system behavior are correct , It's not just right for users .
If a line of code is not executed during the test , There is no way to know whether this line of code contains errors that will occur when users use the system one day .
Conclusion
Improving code quality is not necessarily a major 、 Expensive tasks . These suggestions are easy to implement , It can even be completed in a few weeks or months . The end result will be higher quality software , Provide a better user experience , At the same time, reduce the cost of embedded development .
边栏推荐
- Telephone encryption, middle 4 is replaced by * * * *
- Kdd2022 | what features are effective for interaction?
- Nat. Commun.| Machine learning jointly optimizes the affinity and specificity of mutagenic therapeutic antibodies
- 网上开户哪家证券公司佣金最低,我要开户,网上开户安全吗
- 傳智教育|如何轉行互聯網高薪崗比特之一的軟件測試?(附軟件測試學習路線圖)
- 抖音实战~评论数量同步更新
- 服务线上治理
- 好用app推荐:扫描二维码、扫描条形码并查看历史
- 删库不必跑路!详解 MySQL 数据恢复
- TCP protocol three times handshake process
猜你喜欢

Bizchart+slider to realize grouping histogram

Huawei Nova 10 series released Huawei application market to build a solid application security firewall

Tiktok actual combat ~ the number of comments is updated synchronously

Use blocconsumer to build responsive components and monitor status at the same time

Éducation à la transmission du savoir | Comment passer à un test logiciel pour l'un des postes les mieux rémunérés sur Internet? (joindre la Feuille de route pour l'apprentissage des tests logiciels)

A large number of virtual anchors in station B were collectively forced to refund: revenue evaporated, but they still owe station B; Jobs was posthumously awarded the U.S. presidential medal of freedo

El tree combined with El table, tree adding and modifying operations

Xiangjiang Kunpeng joined the shengteng Wanli partnership program and continued to write a new chapter of cooperation with Huawei

凭借了这份 pdf,最终拿到了阿里,字节,百度等八家大厂 offer

嵌入式开发:技巧和窍门——提高嵌入式软件代码质量的7个技巧
随机推荐
UML图记忆技巧
Visual task scheduling & drag and drop | scalph data integration based on Apache seatunnel
【愚公系列】2022年7月 Go教学课程 003-IDE的安装和基本使用
关系型数据库
智洋创新与华为签署合作协议,共同推进昇腾AI产业持续发展
不同环境相同配置项的内容如何diff差异?
现在mysql cdc2.1版本在解析值为0000-00-00 00:00:00的datetime类
Interview question 01.08 Zero matrix
可视化任务编排&拖拉拽 | Scaleph 基于 Apache SeaTunnel的数据集成
Why should garment enterprises talk about informatization?
Use blocconsumer to build responsive components and monitor status at the same time
HDU - 1078 FatMouse and Cheese(记忆化搜索DP)
傳智教育|如何轉行互聯網高薪崗比特之一的軟件測試?(附軟件測試學習路線圖)
Bizchart+slider to realize grouping histogram
WebGIS框架---kalrry
Scala download and configuration
Force buckle 2_ 1480. Dynamic sum of one-dimensional array
HDU - 1078 fatmouse and cheese (memory search DP)
idea中pom.xml依赖无法导入
Which securities company has the lowest Commission for opening an account online? I want to open an account. Is it safe to open an account online