写好代码的10个秘密[转]
写好代码的10个秘密
1、百家之长归我所有(Follow Basic Coding Style)
其实写代码的方式有很多,每个人都有自己的风格,但是众多的风格中总有一些共性的、基本的写代码的风格,如为程序写注释、代码对齐,等等。是不是编程规范?对就是编程规范。
2、取个好名字(Use Naming Conventions)
取个好的函数名、变量名,最好按照一定的规则起名。还是编程规范。
热门日志
分类
- Django(4)
- ssdb(1)
- Mac(7)
- C(1)
- memcache(1)
- Python(32)
- Vim(8)
- sed(2)
- ansible(3)
- awk(4)
- shell(3)
- about(1)
- git(9)
- bat(4)
- svn(0)
- docker(1)
- Tornado(1)
- go(2)
- 架构(19)
- Vue(1)
- game(2)
- Html(6)
- Java(8)
- Mysql(38)
- Ajax(2)
- Jsp(1)
- Struts(8)
- Linux(73)
- JavaScript(39)
- Staruml(0)
- Mouth(1)
- Php(102)
- Windows(8)
- Message(48)
- Lua(10)
- Compute(1)
- Redis(7)
- Nginx(12)
- Jquery(1)
- Apache(1)
- cocos2d-x(8)