当前位置:网站首页>六石编程学:关于代码,有六个得意
六石编程学:关于代码,有六个得意
2022-07-04 18:37:00 【柳鲲鹏】
吾常常为自己的代码而得意。为什么得意?当然是自己都觉得好。自己觉得好,其实也是对比出来的。于是仔细思考了一下,总结了六个得意:
- 清理了无用代码
这些代码(含注释)放着也没有人用,留着完全是浪费精力。
有人问,哪一天需要参考怎么办?现在有版本管理,检出即可。
- 规范命名
通过命名,准确清楚的表达出含义,其实并不容易。得益于本人的语言用词专长,在这一点上吾是远超他人。
- 对齐
对齐代码,是六石编程学的独特主张。通过对齐,代码变得整齐漂亮,赏心悦目。
- 去掉了怪异代码
什么叫怪异代码?就是没有任何根据、来源,没有道理,可能是解决某个问题的代码。比如:莫名其妙的加上了一个值(如0.25),或者乘上了一个系数,或者一段代码专门应付某种情况。
- 合并代码
吾常常通过加参数,把类似代码进行合并。这样代码量能减少一些,感觉很多,实际上比预计的要少。关键是能避免怪异错误,一处修改全部正确。
- 运用技巧
为了解决问题,运用了别人几乎想不到(指或者参与相关工作的人)的技巧。当然是非常得意的。
边栏推荐
- Pointnet / pointnet++ point cloud data set processing and training
- Jetpack compose tutorial
- Matrix flip (array simulation)
- 输入的查询SQL语句,是如何执行的?
- 双冒号作用运算符以及命名空间详解
- HDU 1372 & POJ 2243 Knight Moves(广度优先搜索)
- Free soldier
- 黑马程序员-软件测试--08阶段2-linux和数据库-23-30-进程端口相关,修改文件权限,端口号信息的获取,程序和进程相关操作,linux命令案例
- PHP pseudo original API docking method
- 西门子HMI下载时提示缺少面板映像解决方案
猜你喜欢

Euler function

The company needs to be monitored. How do ZABBIX and Prometheus choose? That's the right choice!

Dark horse programmer - software testing - 09 stage 2-linux and database -31-43 instructions issued by modifying the file permission letter, - find the link to modify the file, find the file command,

Siemens HMI download prompts lack of panel image solution

The explain statement in MySQL queries whether SQL is indexed, and several types in extra collate and summarize

Small hair cat Internet of things platform construction and application model

What should we pay attention to when doing social media marketing? Here is the success secret of shopline sellers!

欧拉函数

应用实践 | 蜀海供应链基于 Apache Doris 的数据中台建设

English语法_名词 - 使用
随机推荐
CANN算子:利用迭代器高效实现Tensor数据切割分块处理
Chrome development tool: what the hell is vmxxx file
多表操作-外连接查询
Online data migration scheme encountered in the project 1 - general idea sorting and technical sorting
做社交媒体营销应该注意些什么?Shopline卖家的成功秘笈在这里!
1008 elevator (20 points) (PAT class a)
TCP waves twice, have you seen it? What about four handshakes?
mysql中explain语句查询sql是否走索引,extra中的几种类型整理汇总
公司要上监控,Zabbix 和 Prometheus 怎么选?这么选准没错!
Online text line fixed length fill tool
Multi table operation inner join query
Jetpack compose tutorial
Educational Codeforces Round 22 E. Army Creation
Master the use of auto analyze in data warehouse
实战模拟│JWT 登录认证
黑马程序员-软件测试--07阶段2-linux和数据库-09-24-linux命令学习步骤,通配符,绝对路径,相对路径,文件和目录常用命令,文件内容相关操作,查看日志文件,ping命令使用,
Pointnet / pointnet++ point cloud data set processing and training
Cbcgptabwnd control used by BCG (equivalent to MFC TabControl)
Actual combat simulation │ JWT login authentication
西门子HMI下载时提示缺少面板映像解决方案