每个程序员都必须知道的5条编程原则[程序员编程培训]

kxyz 2021-11-26 阅读:9
每个程序员都必须知道的5条编程原则[程序员编程培训]
每个程序员都必须知道的5条编程原则[程序员编程培训]
每个程序员都必须知道的5条编程原则[程序员编程培训]
每个程序员都必须知道的5条编程原则[程序员编程培训]
每个程序员都必须知道的5条编程原则[程序员编程培训]
每个程序员都必须知道的5条编程原则[程序员编程培训]
Clever code is programming that is less about creating easily understandable code and more about showing everyone how smart you are. A typical example of clever code is packing an excessive amount ofprogram logicinto a single line of code.
聪明的代码是编程,而不是创建易于理解的代码,而更多的是向所有人展示您的聪明程度。 聪明代码的典型示例是将过多的程序逻辑打包 到一行代码中。
Minimal code was at one time heralded as a sign of good programming but over time, the industry has recognized that brief code is meaningless if it’s hard for someone else to follow the logic. Any line of code that would take another programmer dozens of minutes to understand should probably be done away with.
极少的代码曾一度被认为是良好编程的标志,但随着时间的流逝,业界已经认识到,如果其他人很难遵循逻辑,那么简短的代码就毫无意义。 可能需要其他程序员花费数十分钟才能理解的任何代码行,都应该删除。
Good programming is not only about building applications that meet the end user’s expectation but also creating code that is easy to understand. Following these programming principles will ensure you achieve both.
好的程序设计不仅与构建满足最终用户期望的应用程序有关,而且与创建易于理解的代码有关。 遵循这些编程原则将确保您同时实现两者。

请先 登录 再评论,若不是会员请先 注册