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

๐ 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 #08
- ๐ Chapter 6. Objects and Data Structures
- โ๏ธ TIL
- Top quotes from the book
- Remaining questions
๐ Top quotes from the book
- Law of Demeter (๋๋ฏธํฐ ๋ฒ์น) : ๋ฌ๋์ ์์ ์ด ์กฐ์ํ๋ ๊ฐ์ฒด์ ์์ฌ์ ์ ๋ชฐ๋ผ์ผ ํ๋ค๋ ๋ฒ์น
- ๋ด๋ถ ๊ตฌ์กฐ๋ฅผ ์จ๊ธฐ์ง ์๊ณ ๋ ธ์ถํ๋ ์ ์ด ๋๊ธฐ ๋๋ฌธ์, ๊ฐ์ฒด๋ ์กฐํ ํจ์๋ก ๋ด๋ถ ๊ตฌ์กฐ๋ฅผ ๊ณต๊ฐํ๋ฉด ์ ๋๋ค๋ ์๋ฏธ๋ค.
- train wreck
- This code violates the Law of Demeter by chaining multiple method calls.
// BAD โ // Found in Apache code final String outputDir = ctxt.getOptions().getScratchDir().getAbsolutePath(); // GOOD ๐ Options opts = ctxt.getOptions(); File scratchDir = opts.getScratchDir(); final String outputDir = scratchDir.getAbsolutePath();
- This code violates the Law of Demeter by chaining multiple method calls.
- ์๋ฃ ์ ๋ฌ ๊ฐ์ฒด
- ์๋ฃ๊ตฌ์กฐ์ฒด์ ์ ํ์ ์ธ ํํ๋ ๊ณต๊ฐ ๋ณ์๋ง ์๊ณ ํจ์๊ฐ ์๋ ํด๋์ค - ์๋ฃ ์ ๋ฌ ๊ฐ์ฒด(Data Transfer Object, DTO). ๋ฐ์ดํฐ๋ฒ ์ด์ค์ ํต์ ํ๊ฑฐ๋ ์์ผ์์ ๋ฐ์ ๋ฉ์ธ์ง์ ๊ตฌ๋ฌธ์ ๋ถ์ํ ๋ ์ ์ฉํ๋ค. ํํ DTO๋ ๋ฐ์ดํฐ๋ฒ ์ด์ค์ ์ ์ฅ๋ ๊ฐ๊ณต๋์ง ์์ ์ ๋ณด๋ฅผ ์ ํ๋ฆฌ์ผ์ด์ ์ฝ๋์์ ์ฌ์ฉํ ๊ฐ์ฒด๋ก ๋ณํํ๋ ์ผ๋ จ์ ๋จ๊ณ์์ ๊ฐ์ฅ ์ฒ์์ผ๋ก ์ฌ์ฉํ๋ ๊ตฌ์กฐ์ฒด๋ค.



๐ Remaining questions
- Law of Demeter
- DTO(Data Transfer Object)
- Object Oriented Programming(๊ฐ์ฒด์งํฅ ํ๋ก๊ทธ๋๋ฐ)
- Procedural Programming(์ ์ฐจ์งํฅ ํ๋ก๊ทธ๋๋ฐ)
๐ Additional Resources
'Nomad Coders' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[Nomad Coders Challenge] Clean Code - Assignment #11 (0) | 2024.12.15 |
---|---|
[Nomad Coders Challenge] Clean Code - Assignment #10 (3) | 2024.12.10 |
[Nomad Coders Challenge] Clean Code - Assignment #07 (0) | 2024.12.07 |
[Nomad Coders Challenge] Clean Code - Assignment #06 (0) | 2024.12.06 |
[Nomad Coders Challenge] Clean Code - Assignment #05 (0) | 2024.12.05 |
Comments