10 Tips For Clean Code

作者: 光剑书架上的书 | 来源:发表于2019-05-16 01:33 被阅读24次

1: You're responsible for code quality.

2: Use meaningful names.

3: Write code that expresses intent.

4: Code should speak for itself. Less comments = less maintenance.

5: Leave the code better than you found it.

6: Single-responsibility code. i.e function does 1 thing well. Less arguments = better function.classes: most methods use most of the class' properties.

7: Tests (TDD).

8: Work on big picture skeleton, then fill in the details later . (interface first, implementation later).

9: Independent components that can be used in different places.

10: Master your craft.


5.Leave your code better than you found it.

6.Single-responsibility code.


Kotlin 开发者社区

国内第一Kotlin 开发者社区公众号,主要分享、交流 Kotlin 编程语言、Spring Boot、Android、React.js/Node.js、函数式编程、编程思想等相关主题。
Kotlin 开发者社区 QRCode.jpg

相关文章

网友评论

    本文标题:10 Tips For Clean Code

    本文链接:https://www.haomeiwen.com/subject/vzwvaqtx.html