Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions 15장/전호영.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# 느낀점

14장까지 나왔던 클린코드 규칙을 적용해 JUnit 소스코드를 분석했다.
- fPrefix 등 모호한 변수명을 prefixLength 로 수정
- 큰 함수를 작은 함수로 분해
- 조건문
- 부정문을 긍정문으로 수정 (가독성 향상)
Comment on lines +6 to +7
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

요게 생각보다 차이가 많이 크더라구요

11 changes: 11 additions & 0 deletions 16장/전호영.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# 느낀점

15장과 비슷하게, 리팩토링

- 안쓰는 주석 정리
- 상수 및 열거형 수정
- 불필요하게 상속받은 클래스를 Enum으로 수정
- 메서드명을 더 서술적이게 수정
- SerialDate를 추상 클래스로 변경
- 이름 역시 추상클래스에 맞도록 추상화(DayDate)

31 changes: 31 additions & 0 deletions 17장/전호영.md
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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이런 패턴은 처음 봤는데, 이렇게 쓰는 건 진짜 안 좋을 것 같기는 해요


G2: 당연한 동작을 구현하지 않음
- 함수명으로 예상되는 동작을 구현하지 않는 경우

G5: 중복
- 똑같은 코드가 여러 곳에 반복

G11: 일관성 부족
- 어떤 방식으로 뭔가를 구현했다면 유사한 기능도 같은 방식으로 구현해야 함

G25: 매직 숫자를 상수로 교체하지 않음
- 의미있는 숫자를 그대로 사용하는 경우