TURI BLOG

[Nomad Coders Challenge] Clean Code - Assignment #07 본문

Nomad Coders

[Nomad Coders Challenge] Clean Code - Assignment #07

TURI BLOG 2024. 12. 7. 14:58

 

 

📍 It is part of a book club challenge on a programming learning website called Nomad Coders. The challenge is to demonstrate what I have learned after reading Clean Code by Robert C. Martin.

 

📝 It will consist of the following sections over three weeks: the range of reading, the top quotes from the book, my review, and remaining questions. 

  🔗Challenge Schedule


💻 I plan to read Clean Code in JavaScript and Python, referring to the GitHub repositories shared by Nomad Coders with the challengers.

 

Assignment #07

  • 📚 Chapter 5. Formatting
  • ✔️ TIL 
    • Top quotes from the book
    • My review

 

📝 Top quotes from the book

  • 형식을 맞추는 목적
    • 코드의 형식은 의사통의 일환이고, 의사소통은 전문 개발자의 일차적인 의무다. 
    • 오늘 구현한 기능이 다음 버전에서 바뀔 확률은 아주 높다. 그런데 오늘 구현한 코드의 가독성은 앞으로 바뀔 코드의 품질에 지대한 영향을 미친다. 
  • 적절한 행 길이를 유지하라
    • 500줄을 넘지 않고 대부분 200줄 정도인 파일로도 커다란 시스템을 구축할 수 있다.
    • 신문기사처럼 작성하라 - 세세한 사실은 숨기고 첫 문단에 전체를 요약한다.
    • 개념은 빈 행으로 분리 - 줄바꿈: 개념 분리
    • 세로 밀집도 - 연관성 의미. 서로 밀접한 코드 행은 세로로 가까이.
    • 수직거리
      • 변수 - 변수는 사용하는 위치에 최대한 가까이 선언
      • 종속함수 - 한 함수가 다른 함수 호출시, 두 함수는 세로로 가까이. 호출하는 함수 > 호출되는 함수
      • 개념적 유사성 - 비슷한 동작 수행하는 함수일수록 가까이 배치
      • 호출하는 함수 > 호출되는 함수. 중요한 개념 > 세세한 사항 
    • 들여쓰기의 중요성
    • 팀 규칙이 우선 - 모든 팀원을 규칙을 따라야 한다. 그래야 소프트웨어가 일관적인 스타일을 보인다.

🖊️ My review

I didn’t understand why skipping lines or adding spaces unnecessarily in code was important before.
Now, I am understanding why we need them.
Reading this book taught me that working in a team with other engineers and writing code is not solely about me.
I am learning that I need always to consider the person who will read my code. Programming is about collaboration and teamwork.

 


🔗 Additional Resources

Comments