-
Notifications
You must be signed in to change notification settings - Fork 0
[최호] 14장: 점진적인 개선 #31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The head ref may contain hidden characters: "14\uC7A5/\uCD5C\uD638"
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| # Part 14: 점진적인 개선 | ||
|
|
||
|
|
||
| ## 내용 | ||
|
|
||
| 14-8 코드를 보면 코드가 엉망이라고 한다. | ||
| - 인스턴스 변수의 개수 | ||
| - TILT와 같은 이상한 문자열 | ||
| - HashSets, TreeSets, try-catch-catch 블록 등 | ||
|
|
||
| Boolean 인수만 지원하던 초기버전은 괜찮았는데 | ||
| 여러 타입의 인수들을 추가로 받으면서 코드가 복잡하고 지저분해졌다. 하나의 인수를 추가할 때마다 여러 곳의 코드를 수정해야 하는 등 확장성이 모자랐다. | ||
|
|
||
| TDD는 언제 어느 때라도 시스템이 돌아가야 한다는 원칙을 따른다. | ||
|
|
||
| 새로운 인수 유형을 추가할 때 코드가 중복되는 문제점을 해결하기 위해 ArgumentMarshaler라는 새로운 개념을 도입했다. | ||
|
|
||
| 에러 메시지 생성 책임을 ArgsException 클래스로 이전한다. | ||
|
|
||
| 코드가 더 나빠지기 전에 기능을 추가하는 것을 멈추고 리팩터링을 한다. | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 |
||
|
|
||
| ## 느낀 점 | ||
| - 사실 지금 프로젝트 리팩토링들을 멈추고 있는건 테스트 코드가 없어서 문제가 많이 일어나서가 아닐까..? | ||
| - 테스트 코드를 공부해봐야겠다. | ||
|
Comment on lines
+23
to
+24
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 저도 이번 장을 읽으며 테스트 코드를 하루빨리 공부하여 도입해 봐야겠다는 생각을 했습니다!! |
||
| - 여러 백엔드 중 nest를 공부하는 이유도 jest로 테스트를 하기 때문에 좀 더 도움이 되지 않을까라는 생각도 있다. | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nest 공부하는거 어떤지 궁금하네요 ㅎㅎㅎ 내일 알려주세요. |
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
저자가 약간 TDD 만능론자 같은 느낌이 들어요