O’REILLY Learning「Good Code, Bad Code」5 Make code readable
https://learning.oreilly.com/library/view/good-code-bad/9781617298936/
日本語翻訳版は秀和システムから発売
5 Make code readable
This chapter covers
・Techniques for making code self-explanatory
・Ensuring that details within the code are clear to others
・Using language features for the right reasons
可読性の本質は、あるコードが何を行っているかをエンジニアが迅速かつ正確に理解できるようにすること。
項のタイトルで十分理解出来てしまう
5.1 Use descriptive names
5.2 Use comments appropriately
5.3 Don’t fixate on number of lines of code
5.4 Stick to a consistent coding style
5.5 Avoid deeply nesting code
5.6 Make function calls readable
5.7 Avoid using unexplained values
5.8 Use anonymous functions appropriately
5.9 Use shiny, new language features appropriately
9箇条的な。