DAY 10
๐ย ์ค๋ ์ฝ์ ๋ฒ์ : 5์ฅ ~ Conceptual Affinity
<aside>
๐ ์ฑ
์์ ๊ธฐ์ตํ๊ณ ์ถ์ ๋ด์ฉ์ ์จ๋ณด์ธ์.
</aside>
- Code formatting is about communication, and communication is the professional developerโs first order of business.
- Nearly all code is read left to right and top to bottom. Each line represents an expression or a clause, and each group of lines represents a complete thought. Those thoughts should be separated from each other with blank lines.
- If one function calls another, they should be vertically close, and the caller should be above the callee, if at all possible. This gives the program a natural flow.
<aside>
๐ค ์ค๋ ์ฝ์ ์๊ฐ์? ๋ ์ค๋ฅด๋ ์๊ฐ์ ๊ฐ๋ณ๊ฒ ์ ์ด๋ณด์ธ์
</aside>
If itโs easy for me to read, itโs probably easy for others too. Donโt make readers to hop around between files to find where the function is.
<aside>
๐ ๊ถ๊ธํ ๋ด์ฉ์ด ์๊ฑฐ๋, ์ ์ดํด๋์ง ์๋ ๋ด์ฉ์ด ์๋ค๋ฉด ์ ์ด๋ณด์ธ์.
</aside>
<aside>
๐ก ์๊ฐ 3์ค ์์ฝ
</aside>
- Formatting is even more important than the functionality that might change in the next release. Formatting continues to affect maintainability and extensibility long after the original code has been changed beyond recognition.
- Formatting is a rule you set and follow in the team. โCommunication is the professional developerโs first order of businessโ
- Keep the related variables, functions close to each other while giving some room(new line) to breathe between different group of thoughts(code block).