Recent Posts
Recent Comments
Tags
- ๊ตฌ๊ธ์ ๋๋ฆฌํฑ์ค
- github clone
- github
- react scripts
- law of ux
- ๊ฐ๋ฐ์๋ถํด๋ฝ
- devbookclub
- react ga4
- ๊นํ ํด๋ก ์๋ฌ
- ๋ ธ๋ง๋์ฝ๋
- Day js
- cleancode
- Data Driven UX
- react ga
- FOUR GRIT
- ์กด ์ผ๋ธ๋ก ์คํค
- data management
- ๊ตฌ๊ธ ์ ๋๋ฆฌํฑ์ค
- Google Analytics
- React
- nomad coders
- ๋ ธ๊ฐ๋ถ
- Jon Yablonski
- NomadCoders
- UX
- Clean Code
- uxui
- ํฌ๊ทธ๋ฆฌํธ
- ํด๋ฆฐ์ฝ๋
- Day.js
Link
TURI BLOG
[Nomad Coders Challenge] Clean Code - Assignment #03 ๋ณธ๋ฌธ

๐ 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.
๐ป I plan to read Clean Code in JavaScript and Python, referring to the GitHub repositories shared by Nomad Coders with the challengers.
Assignment #03
- ๐ Chapter 2. Meaningful Names - Variables
- โ๏ธ TIL
- Top quotes from the book
- My review
- Remaining questions
๐ Top quotes from the book
- ์๋๋ฅผ ๋ถ๋ช
ํ ๋ฐํ๋ผ
- ๋ณ์๋ ํจ์ ๊ทธ๋ฆฌ๊ณ ํด๋์ค ์ด๋ฆ์ ๋ค์๊ณผ ๊ฐ์ ๊ตต์งํ ์ง๋ฌธ์ ๋ชจ๋ ๋ตํด์ผ ํ๋ค. ๋ณ์(ํน์ ํจ์๋ ํด๋์ค)์ ์กด์ฌ ์ด์ ๋? ์ํ ๊ธฐ๋ฅ์? ์ฌ์ฉ ๋ฐฉ๋ฒ์? ๋ฐ๋ก ์ฃผ์์ด ํ์ํ๋ค๋ฉด ์๋๋ฅผ ๋ถ๋ช ํ ๋๋ฌ๋ด์ง ๋ชปํ๋ค๋ ๋ง์ด๋ค.
- ์ฝ๋ ๋งฅ๋ฝ์ด ์ฝ๋ ์์ฒด์ ๋ช ์์ ์ผ๋ก ๋๋ฌ๋์ง ์๋ ๊ฒ์ด ๋ฌธ์ ๋ค.
- ๊ทธ๋ฆ๋ ์ ๋ณด๋ฅผ ํผํ๋ผ
-
acountList (x) -> accountGroup, bunchOfAccount, Accounts (o)
- ์๋ก ํก์ฌํ ์ด๋ฆ์ ์ฌ์ฉํ์ง ์๋๋ก ์ฃผ์ํ๋ค.
- ์ผ๊ด์ฑ ์ ์ง : ์ ์ฌํ ๊ฐ๋ ์ ์ ์ฌํ ํ๊ธฐ๋ฒ์ ์ฌ์ฉํ๋ค.
-
- ์๋ฏธ์๊ฒ ๊ตฌ๋ถํ๋ผ
class Product -> class ProductInfo, class ProductData (x) class Customer, class CutomerObject (x)
- ๋ฐ์ํ๊ธฐ ์ฌ์ด ์ด๋ฆ์ ์ฌ์ฉํ๋ผ
- ํ๋ก๊ทธ๋จ์ ์ฌํ ํ๋์ด๊ธฐ ๋๋ฌธ์ด๋ค.
- ๊ฒ์ํ๊ธฐ ์ฌ์ด ์ด๋ฆ์ ์ฌ์ฉํ๋ผ - ๋ฌธ์ ํ๋๋ฅผ ์ฌ์ฉํ๋ ์ด๋ฆ๊ณผ ์์
- ์์ ์ ๊ธฐ์ต๋ ฅ์ ์๋ํ์ง ๋ง๋ผ
- ์ ๋ฌธ๊ฐ ํ๋ก๊ทธ๋๋จธ๋ ๋ช ๋ฃํจ์ด ์ต๊ณ ๋ผ๋ ์ฌ์ค์ ์ดํดํ๋ค. ์ ๋ฌธ๊ฐ ํ๋ก๊ทธ๋๋จธ๋ ์์ ์ ๋ฅ๋ ฅ์ ์ข์ ๋ฐฉํฅ์ผ๋ก ์ฌ์ฉํด ๋จ๋ค์ด ์ดํดํ๋ ์ฝ๋๋ฅผ ๋ด๋๋๋ค.
- Class Name - Noun, Noun Phrase
e.g) Customer, WikiPage, Account, AddressParser (o) Manager, PRocessor, Data, Info (x)
- Method Name - Verb, Verb Phrase
e.g) postPayment, deletePage, save (o)
- ํ ๊ฐ๋
์ ํ ๋จ์ด๋ฅผ ์ฌ์ฉํ๋ผ
- ์ถ์์ ์ธ ๊ฐ๋ ํ๋์ ๋จ์ด ํ๋๋ฅผ ์ ํํด ์ด๋ฅผ ๊ณ ์ํ๋ค.
- ํ ๋จ์ด๋ฅผ ๋ ๊ฐ์ง ๋ชฉ์ ์ผ๋ก ์ฌ์ฉํ์ง ๋ง๋ผ. ๋ค๋ฅธ ๊ฐ๋
์ -> ๊ฐ์ ๋จ์ด (x)
- ํ๋ก๊ทธ๋๋จธ๋ ์ฝ๋๋ฅผ ์ต๋ํ ์ดํดํ๊ธฐ ์ฝ๊ฒ ์ง์ผ ํ๋ค. ์ง์ค์ ์ธ ํ๊ตฌ๊ฐ ํ์ํ ์ฝ๋๊ฐ ์๋๋ผ ๋์ถฉ ํ์ด๋ด๋ ์ดํดํ ์ฝ๋ ์์ฑ์ด ๋ชฉํ๋ค. ์๋ฏธ๋ฅผ ํด๋ ํ ์ฑ ์์ด ์๋ ๋ ์์๊ฒ ์๋ ๋ ผ๋ฌธ ๋ชจ๋ธ์ด ์๋๋ผ ์๋๋ฅผ ๋ฐํ ์ฑ ์์ด ์ ์์๊ฒ ์๋ ์ก์ง ๋ชจ๋ธ์ด ๋ฐ๋์งํ๋ค.
- Name Based on Domain (x) -> Use computer science (CS) terms, algorithm names, pattern names, or mathematical terms.
- ์ฌ๋ ์ฝ๋ ๊ฐ์ ๋ ธ๋ ฅ๊ณผ ๋ง์ฐฌ๊ฐ์ง๋ก ์ด๋ฆ ์ญ์ ๋๋ฆ๋๋ก ๋ฐ๊ฟจ๋ค๊ฐ ๋๊ตฐ๊ฐ๋ ์ง์ฑ ํ ์ง๋ ๋ชจ๋ฅธ๋ค. ๊ทธ๋ ๋ค๊ณ ์ฝ๋๋ฅผ ๊ฐ์ ํ๋ ค๋ ๋ ธ๋ ฅ์ ์ค๋จํด์๋ ์ ๋๋ค.
- ์ด ์ฅ์์ ์๊ฐํ ๊ท์น ๋ช๊ฐ๋ฅผ ์ ์ฉํด ์ฝ๋ ๊ฐ๋ ์ฑ์ด ๋์์ง๋์ง ์ดํด๋ณด๋ผ.
๐๏ธ My review
- From the example below, I better understood the importance of using searchable and meaningful variable names, something I hadnโt paid much attention to in the past. I used to think naming variables with overly long names was unnecessary, but now I understand why even a single variable should be thoughtfully named.

๐ Remaining questions
- polymorphic method(๋คํ ๋ฉ์๋)
- noise word(๋ถ์ฉ์ด)
๐ Additional Resources
๐ Reference
'Nomad Coders' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[Nomad Coders Challenge] Clean Code - Assignment #06 (0) | 2024.12.06 |
---|---|
[Nomad Coders Challenge] Clean Code - Assignment #05 (0) | 2024.12.05 |
[Nomad Coders Challenge] Clean Code - Assignment #04 (1) | 2024.12.02 |
[Nomad Coders Challenge] Clean Code - Assignment #02 (4) | 2024.11.30 |
[Nomad Coders Challenge] Clean Code - Assignment #01 (1) | 2024.11.29 |
Comments