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.
[1단계 - 사다리 생성] 에버(손채영) 미션 제출합니다. #316
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
[1단계 - 사다리 생성] 에버(손채영) 미션 제출합니다. #316
Changes from 52 commits
88b71e0
63efb03
d6d3437
b9ae327
50bb66e
dba6496
2460723
df6505e
dbb5bf6
d862bce
960163e
7f82f81
afd6d85
6f309ff
b902809
63aff0e
6ed33af
7a2b7f4
b9fc1f8
8fd9449
e8d008c
416a256
1215174
e198c19
bd00b5d
4cd2c8c
fec15a1
2917f27
8bd7344
a8b502e
fbe8f4e
2a3966e
e5de9eb
7b92aa4
8546fb2
b61e163
39397ee
fc00918
829f6be
90f7b30
8052c65
0c478c6
9dd66ca
7c79b51
bb9e0cc
f22fe8a
057fd7a
44fa207
1a91b97
d4efe94
c4e12b4
24a26bd
011baed
84619c4
cb3e036
fdff455
5183c25
74b7287
25dbd20
7abb36c
a076bae
c4ae098
332b757
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
꼭 필요한 메소드 분리일까요?
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.
이전에 주셨던 코멘트가
메서드 분리를 의도하신 것이라고 판단하였습니다.
다른 방법을 고민해보겠습니다!
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.
알렉스가 주신 코멘트 두가지를 정리하면 아래와 같습니다!
제가 역할을 분리하기 위해 선택했던 방법이 메서드 분리였습니다.
메서드를 분리하지 않고 역할을 분리하는 방법은 찾지 못하였습니다..
메서드 분리가 아닌 방법으로 어떻게 역할을 분리할 수 있는지 궁금합니다! 🥹
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.
이전 메소드는 입력 + Members생성까지 같이 한다고 생각해서 많은 역할을 가진다고 생각했던 것 같아요!
이번 케이스에선
new Members()
라는 코드 한줄을 호출하는데 굳이 makeMembers라는 함수가 필요할까란 생각이 드네요!생성자 자체로도 이미 Members를 생성하는 로직인게 잘 드러나는 것 같아서요! 메소드로 래핑하지 않고 그냥 바로 생성자를 호출하지 않은 이유는 무엇인가요?
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.
사실 이유가 없었습니다..
메서드의 역할이 많다는 알렉스의 코멘트를 제 나름대로 반영하려고 하다보니
오히려 더 좋지 않은 구조의 코드가 된 것 같아요 ㅠㅠ
다른 방법을 더 고민해보겠습니다! 🥲
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.
테스트에서만 사용하는 클래스가 되었네요! 이제 안쓰는 클래스일까요?
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.
리팩토링하는 과정에서 Height 클래스 내의 로직들을 외부로 넘기다보니 무의미한 클래스가 되어버렸네요...
해당 클래스는 삭제했습니다!
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.
변수 이름도 변경되어야하지 않을까요?
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.
PointStrategy와 RandomPointStrategy 클래스가 존재하여
변수명은 points로 유지하자는 생각으로 변경하지 않았습니다.
하지만 지금 다시 생각해보니 두 단어를 혼용하는 것은 혼돈만 줄 것 같네요..
관련 클래스 및 변수명 모두 Connection 단어를 사용하도록 수정하겠습니다!
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.
이 객체의 역할이 맞을까요? input이
,
으로 split할 수 있는 형태로 들어온다는건 어떤 객체의 책임이 적절할까요?현재는 만약 UI가 console 이 아니라 Web이고 각 이름을 개행으로 구분해서 입력한다면 이 도메인까지 수정되어야 할 것 같은데, view와 비즈니스 로직이 분리되었다고 볼 수 있을까요?
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.
헉 그러네요. 구분자가 변경될 경우 Members 클래스가 수정되어야하는 상황이 발생하네요.
그렇다면 도메인보다는 컨트롤러의 책임이라고 생각됩니다.
생각 반영하여 코드 수정하겠습니다!