10 Tips For Clean Code

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.

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章