generated from muhandojeon/study-template
-
Notifications
You must be signed in to change notification settings - Fork 0
[전호영] 15장,16장,17장 : JUnit 들여다보기, SerialDate 리팩터링, 냄새와 휴리스틱 #37
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
Merged
The head ref may contain hidden characters: "15\uC7A5,16\uC7A5,17\uC7A5/\uC804\uD638\uC601"
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| # 느낀점 | ||
|
|
||
| 14장까지 나왔던 클린코드 규칙을 적용해 JUnit 소스코드를 분석했다. | ||
| - fPrefix 등 모호한 변수명을 prefixLength 로 수정 | ||
| - 큰 함수를 작은 함수로 분해 | ||
| - 조건문 | ||
| - 부정문을 긍정문으로 수정 (가독성 향상) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| # 느낀점 | ||
|
|
||
| 15장과 비슷하게, 리팩토링 | ||
|
|
||
| - 안쓰는 주석 정리 | ||
| - 상수 및 열거형 수정 | ||
| - 불필요하게 상속받은 클래스를 Enum으로 수정 | ||
| - 메서드명을 더 서술적이게 수정 | ||
| - SerialDate를 추상 클래스로 변경 | ||
| - 이름 역시 추상클래스에 맞도록 추상화(DayDate) | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| # 공감하는 안좋은 습관 | ||
|
|
||
| C2: 쓸모없는 주석 | ||
| - 코드와 같은 내용을 반복하는 주석 | ||
|
|
||
| C4: 성의없는 주석 | ||
| - 대충 작성한 불친절한 주석 | ||
| - 작성자만 이해할 수 있는 애매한 설명 | ||
|
|
||
| E1: 여러 단계를 거쳐야 하는 빌드 | ||
| - 소스코드 관리 시스템에서 간단한 명령 하나로 빌드가 안 되는 경우 | ||
|
|
||
| F1: 너무 많은 인수 | ||
| - 함수 인수는 적을수록 좋음 | ||
|
|
||
| F3: 플래그 인수 | ||
| - boolean 인수로 함수 동작을 제어하는 것 | ||
| - 함수가 한 가지 이상의 일을 한다는 증거 | ||
|
Comment on lines
+16
to
+18
Member
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. 이런 패턴은 처음 봤는데, 이렇게 쓰는 건 진짜 안 좋을 것 같기는 해요 |
||
|
|
||
| G2: 당연한 동작을 구현하지 않음 | ||
| - 함수명으로 예상되는 동작을 구현하지 않는 경우 | ||
|
|
||
| G5: 중복 | ||
| - 똑같은 코드가 여러 곳에 반복 | ||
|
|
||
| G11: 일관성 부족 | ||
| - 어떤 방식으로 뭔가를 구현했다면 유사한 기능도 같은 방식으로 구현해야 함 | ||
|
|
||
| G25: 매직 숫자를 상수로 교체하지 않음 | ||
| - 의미있는 숫자를 그대로 사용하는 경우 | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
요게 생각보다 차이가 많이 크더라구요