程序编码规范

谷歌编码规范

Google 编码规范在 GitHub 上的仓库地址:https://github.com/google/styleguide。
Every major open-source project has its own style guide: a set of conventions (sometimes arbitrary) about how to write code for that project. It is much easier to understand a large codebase when all the code in it is in a consistent style.
“Style” covers a lot of ground, from “use camelCase for variable names” to “never use global variables” to “never use exceptions.” This project (google/styleguide) links to the style guidelines we use for Google code. If you are modifying a project that originated at Google, you may be pointed to this page to see the style guides that apply to that project.
Google 开源项目风格指南——中文版,访问地址:https://zh-google-styleguide.readthedocs.io/en/latest/

阿里编码规范

2017年开春之际,“阿里巴巴Java开发手册”首次公开,即公开的是阿里官方Java代码规范标准。https://yq.aliyun.com/attachment/download/?id=1170
这套Java统一规范标准有助于提高行业编码规范化水平,帮助行业人员提高开发质量和效率、大大降低代码维护成本。
该手册以Java开发者为中心视角,划分为编程规约、异常日志规约、MYSQL规约、工程规约、安全规约五大块,再根据内容特征,细分成若干二级子目录。根据约束力强弱和故障敏感性,规约依次分为强制、推荐、参考三大类。此套规范不仅能让代码一目了然, 更有助于加强团队分工与合作、真正提升效率。
阿里开发编码规范手册(V1.5华山版),相比上一版本存在较多的变化。