DAY 3
๐ย ์ค๋ ์ฝ์ ๋ฒ์ : cp2 A Pragmatic Approach ~ Design
<aside>
๐ ์ฑ
์์ ๊ธฐ์ตํ๊ณ ์ถ์ ๋ด์ฉ์ ์จ๋ณด์ธ์.
</aside>
- Our understanding changes day by day. New requirements arrive as weโre designing or coding. Perhaps the environment changes. Whatever the reason, maintenance is not a discrete activity, but a routine part of the entire development process.
- DRY - Donโt Repeat Yourself
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
- bad code requires lots of comments. The comments will inevitably become out of date, and untrustworthy comments are worse than no comments at all.
- Orthogonality:
In computing, the term has come to signify a kind of independence or decoupling. Two or more things are orthogonal if changes in one do not affect any of the others. In a well-designed system, the database code will be orthogonal to the user interface: you can change the interface without affecting the database, and swap databases without changing the interface.
- Eliminate effects between unrelated things.
We want to design components that are self-contained: independent, and with a single, well-defined purpose.
<aside>
๐ค ์ค๋ ์ฝ์ ์๊ฐ์? ๋ ์ค๋ฅด๋ ์๊ฐ์ ๊ฐ๋ณ๊ฒ ์ ์ด๋ณด์ธ์
</aside>
<aside>
๐ ๊ถ๊ธํ ๋ด์ฉ์ด ์๊ฑฐ๋, ์ ์ดํด๋์ง ์๋ ๋ด์ฉ์ด ์๋ค๋ฉด ์ ์ด๋ณด์ธ์.
</aside>
- โNormalize it according to the underlying business model...Whatever the eventual solution, avoid this kind of unnormalized dataโ โก๏ธย what does โto normalize dataโ mean?
<aside>
๐ก ์๊ฐ 3์ค ์์ฝ
</aside>
- I got a habit of focusing on writing code that donโt need comments after reading Clean Code. Glad to see the same advice in this book.
- Orthogonality part was interesting. Even if I create functional components, they are often not completely independent in React world. Props might change, state might not be available anymore, etc. However this is what weโre trying to achieve in the pattern library weโre building at the moment.
- You gain productivity, reduce risks, if you have orthogonality in your project.