当前位置:网站首页>六石编程学:关于代码,有六个得意
六石编程学:关于代码,有六个得意
2022-07-04 18:37:00 【柳鲲鹏】
吾常常为自己的代码而得意。为什么得意?当然是自己都觉得好。自己觉得好,其实也是对比出来的。于是仔细思考了一下,总结了六个得意:
- 清理了无用代码
这些代码(含注释)放着也没有人用,留着完全是浪费精力。
有人问,哪一天需要参考怎么办?现在有版本管理,检出即可。
- 规范命名
通过命名,准确清楚的表达出含义,其实并不容易。得益于本人的语言用词专长,在这一点上吾是远超他人。
- 对齐
对齐代码,是六石编程学的独特主张。通过对齐,代码变得整齐漂亮,赏心悦目。
- 去掉了怪异代码
什么叫怪异代码?就是没有任何根据、来源,没有道理,可能是解决某个问题的代码。比如:莫名其妙的加上了一个值(如0.25),或者乘上了一个系数,或者一段代码专门应付某种情况。
- 合并代码
吾常常通过加参数,把类似代码进行合并。这样代码量能减少一些,感觉很多,实际上比预计的要少。关键是能避免怪异错误,一处修改全部正确。
- 运用技巧
为了解决问题,运用了别人几乎想不到(指或者参与相关工作的人)的技巧。当然是非常得意的。
边栏推荐
- What should we pay attention to when doing social media marketing? Here is the success secret of shopline sellers!
- 实战模拟│JWT 登录认证
- What are the consequences of closing the read / write channel?
- What does the neural network Internet of things mean? Popular explanation
- [problem] Druid reports exception SQL injection violation, part always true condition not allow solution
- Neural network IOT platform construction (IOT platform construction practical tutorial)
- Actual combat simulation │ JWT login authentication
- Wireshark network packet capture
- On communication bus arbitration mechanism and network flow control from the perspective of real-time application
- Educational Codeforces Round 22 E. Army Creation
猜你喜欢
Crystal optoelectronics: ar-hud products of Chang'an dark blue sl03 are supplied by the company
Development and construction of DFI ecological NFT mobile mining system
多表操作-外连接查询
The company needs to be monitored. How do ZABBIX and Prometheus choose? That's the right choice!
CANN算子:利用迭代器高效实现Tensor数据切割分块处理
ACM组合计数入门
Swagger突然发癫
English grammar_ Noun - use
How is the entered query SQL statement executed?
Swagger suddenly went crazy
随机推荐
双冒号作用运算符以及命名空间详解
@Data source connection pool exhaustion caused by transactional abuse
CANN算子:利用迭代器高效实现Tensor数据切割分块处理
Cbcgptabwnd control used by BCG (equivalent to MFC TabControl)
Pytoch learning (4)
kotlin 类和对象
2022 Health Exhibition, health exhibition, Beijing Great Health Exhibition and health industry exhibition were held in November
The company needs to be monitored. How do ZABBIX and Prometheus choose? That's the right choice!
1007 maximum subsequence sum (25 points) (PAT class a)
Functional interface
1002. A+b for Polynomials (25) (PAT class a)
Reflection (I)
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
输入的查询SQL语句,是如何执行的?
2022 Health Exhibition, Beijing Health Expo, China Health Exhibition, great health exhibition November 13
Free soldier
Online data migration scheme encountered in the project 1 - general idea sorting and technical sorting
In the first month of its launch, the tourist praise rate of this campsite was as high as 99.9%! How did he do it?
HDU 6440 2018中国大学生程序设计网络选拔赛
Niuke Xiaobai month race 7 F question