当前位置:网站首页>六石编程学:关于代码,有六个得意
六石编程学:关于代码,有六个得意
2022-07-04 18:37:00 【柳鲲鹏】
吾常常为自己的代码而得意。为什么得意?当然是自己都觉得好。自己觉得好,其实也是对比出来的。于是仔细思考了一下,总结了六个得意:
- 清理了无用代码
这些代码(含注释)放着也没有人用,留着完全是浪费精力。
有人问,哪一天需要参考怎么办?现在有版本管理,检出即可。
- 规范命名
通过命名,准确清楚的表达出含义,其实并不容易。得益于本人的语言用词专长,在这一点上吾是远超他人。
- 对齐
对齐代码,是六石编程学的独特主张。通过对齐,代码变得整齐漂亮,赏心悦目。
- 去掉了怪异代码
什么叫怪异代码?就是没有任何根据、来源,没有道理,可能是解决某个问题的代码。比如:莫名其妙的加上了一个值(如0.25),或者乘上了一个系数,或者一段代码专门应付某种情况。
- 合并代码
吾常常通过加参数,把类似代码进行合并。这样代码量能减少一些,感觉很多,实际上比预计的要少。关键是能避免怪异错误,一处修改全部正确。
- 运用技巧
为了解决问题,运用了别人几乎想不到(指或者参与相关工作的人)的技巧。当然是非常得意的。
边栏推荐
- 92. (cesium chapter) cesium building layering
- HMM hidden Markov model and code implementation
- 2022 Health Exhibition, Beijing Health Expo, China Health Exhibition, great health exhibition November 13
- kotlin 继承
- TCP waves twice, have you seen it? What about four handshakes?
- Kotlin inheritance
- 【毕业季】绿蚁新醅酒,红泥小火炉。晚来天欲雪,能饮一杯无?
- 上线首月,这家露营地游客好评率高达99.9%!他是怎么做到的?
- Lenovo explains in detail the green smart city digital twin platform for the first time to solve the difficulties of urban dual carbon upgrading
- 实战模拟│JWT 登录认证
猜你喜欢

C语言-入门-基础-语法-流程控制(七)

How is the entered query SQL statement executed?

Wireshark network packet capture

西门子HMI下载时提示缺少面板映像解决方案

线上数据库迁移的几种方法

Neural network IOT platform construction (IOT platform construction practical tutorial)

Small hair cat Internet of things platform construction and application model

Dark horse programmer - software testing - stage 08 2-linux and database-23-30-process port related, modify file permissions, obtain port number information, program and process related operations, Li
Some thoughts on whether the judgment point is located in the contour

多表操作-内连接查询
随机推荐
@transactional滥用导致数据源连接池耗尽问题
Educational Codeforces Round 22 E. Army Creation
Prometheus installation
BCG 使用之CBCGPProgressDlgCtrl进度条使用
HDU 6440 2018中国大学生程序设计网络选拔赛
BCG 使用之CBCGPProgressDlg进度条使用
Multi table operation inner join query
实战模拟│JWT 登录认证
92.(cesium篇)cesium楼栋分层
Add namespace declaration
What is the application technology of neural network and Internet of things
Introduction to ACM combination counting
明明的随机数
Dark horse programmer - software testing - stage 07 2-linux and database -09-24-linux command learning steps, wildcards, absolute paths, relative paths, common commands for files and directories, file
Kotlin inheritance
【毕业季】绿蚁新醅酒,红泥小火炉。晚来天欲雪,能饮一杯无?
[graduation season] green ant new fermented grains wine, red mud small stove. If it snows late, can you drink a cup?
BCG 使用之新建向导效果
Template_ Large integer subtraction_ Regardless of size
Niuke Xiaobai monthly race 7 I new Microsoft Office Word document