Skip to content

[6기] 3주차 Wordle 과제 제출 - 초이#43

Open
cwangg897 wants to merge 19 commits into
woowahan-pjs:mainfrom
cwangg897:main
Open

[6기] 3주차 Wordle 과제 제출 - 초이#43
cwangg897 wants to merge 19 commits into
woowahan-pjs:mainfrom
cwangg897:main

Conversation

@cwangg897

@cwangg897 cwangg897 commented Jan 13, 2026

Copy link
Copy Markdown

페어 : 우연
방식 : 작업 명세서 기반 커밋 단위로 교체, 50분마다 10분 휴식
진행 : 총 10시간 진행

  • 1/5(월) 21:00 ~ 23:00 (2시간) - 온라인
  • 1/7(수) 21:00 ~ 24:00 (3시간) - 온라인
  • 1/11(일) 20:00 ~ 23:00 (3시간) - 온라인
  • 1/12(월) 21:00 ~ 23:00 (2시간) - 온라인

배운 점과 잘한 점

개발을 시작하기 전에 초기 객체 모델링을 먼저 고민하는 방식을 배울 수 있었던 점이 가장 인상 깊었습니다.

또한 검증 로직을 작성하는 과정에서, 우연님께서 상황에 따른 예시를 차분하게 만들어 가는 모습이 인상적이었고, 이러한 접근 방식은 알고리즘 문제를 풀 때도 충분히 활용할 수 있겠다고 느꼈습니다.

마지막으로 패키지를 정리하면서 어니언 아키텍처를 간접적으로나마 경험해볼 수 있었던 점도 의미 있는 경험이었습니다.

잘했다고 생각하는 점은, 누군가에게 코드를 보여주며 함께 코딩해 본 것이 처음이었는데, 초반에는 심리적으로 긴장하고 잘하고 싶다는 마음 때문에 실수가 잦았습니다.

하지만 시간이 지나면서 그런 부담이 줄어들었고, 잘하는 모습을 보여주는 것보다 내 생각이 상대에게 잘 전달되는지가 더 중요하다는 방향으로 코딩할 수 있었던 점은 스스로 긍정적으로 평가하고 있습니다.

아쉬운 점

페어 프로그래밍을 하면서 서로의 지식 수준과 배경이 먼저 싱크되어야 한다는 말이 떠올랐습니다.

그래서 제가 DDD나 헥사고날 아키텍처에 대한 이해가 더 있었다면, 전체적인 진행이 조금 더 수월하고 빠르지 않았을까 하는 아쉬움이 남았습니다.

또한 머릿속에 있는 코드 진행 방향을 말로 풀어 설명하는 부분이 많이 미숙해서, 우연님께서 이해하는 데 어려움이 있었을 것 같고, 이 부분은 반드시 보완해야겠다고 느꼈습니다.

많은 시간을 투자한 부분

가장 많은 시간을 썼던 부분은 생각을 맞추는 과정이었습니다.

수요일에 페어 프로그래밍을 본격적으로 시작했는데, 생각을 싱크하는 데 시간이 많이 소요되어 밤 12시가 넘어서까지 진행했습니다.

시간은 흐르는데 진도가 잘 나가지 않았고, 다음 날 출근을 고려해 아쉽게 마무리하게 되었는데,

그 이후에도 자기 전이나 출근해서 계속 왜 잘 안됐을까, 어떻게 하면 더 잘할 수 있을까를 고민하는 데 많은 시간을 투자했습니다.

그렇게 정리한 생각을 다음 날 우연님께 공유했고, 그 방향대로 진행하니 훨씬 수월하게 작업할 수 있어서 개인적으로 뿌듯함을 느꼈습니다.

페어에게 하고 싶은 말

우연님께 제 생각을 충분히 말로 전달하지 못했음에도 불구하고, 이해해 주시고 끝까지 경청해 주셔서 정말 감사드립니다.

특히 제가 손부터 나가려 할 때,

“키보드에서 손을 떼고 먼저 생각을 이야기해볼까요?”라고 침착하게 말씀해 주셔서, 덕분에 저도 마음을 가다듬을 수 있었습니다.

초기 프로젝트를 어떻게 접근하고 구조를 잡아가는지, 일을 어떤 기준으로 분할하는지, 그리고 코딩 스타일 전반에 걸쳐 많은 것을 배울 수 있었습니다.

함께해서 즐거웠고, 고생 많으셨습니다 🙂

dev-wooyeon and others added 18 commits January 7, 2026 22:05
Signed-off-by: cwangg897 <dhkdrb897@gmail.com>
Signed-off-by: dev-wooyeon <une@kakao.com>
Signed-off-by: cwangg897 <dhkdrb897@gmail.com>
Signed-off-by: dev-wooyeon <une@kakao.com>
Signed-off-by: cwangg897 <dhkdrb897@gmail.com>
Signed-off-by: dev-wooyeon <une@kakao.com>
Signed-off-by: cwangg897 <dhkdrb897@gmail.com>
Signed-off-by: dev-wooyeon <une@kakao.com>
Signed-off-by: cwangg897 <dhkdrb897@gmail.com>
Signed-off-by: dev-wooyeon <une@kakao.com>
Signed-off-by: cwangg897 <dhkdrb897@gmail.com>
Signed-off-by: dev-wooyeon <une@kakao.com>
Signed-off-by: cwangg897 <dhkdrb897@gmail.com>
Signed-off-by: dev-wooyeon <une@kakao.com>
Signed-off-by: dev-wooyeon <une@kakao.com>
Signed-off-by: dev-wooyeon <une@kakao.com>
import domain.service.AnswerSelector;
import domain.service.Game;
import infrastructure.adapter.in.ConsoleOutputAdapter;
import infrastructure.adapter.out.FileWordRepository;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

adapter.out.FileWordRepository 클래스가 없어 컴파일 에러가 발생합니다!

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

확인했습니다. 마지막 풀을 못받은거 같아요

Comment thread src/main/java/domain/service/Game.java Outdated

public void updateFinished() {
if (ResultValues.correct().equals(result.getBoard())) {
this.isFinished = Boolean.TRUE;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

isFinished 필드가 boolean 타입인데 wrapper class인 Boolean.TRUE로 하신 이유가 궁금합니다!
가독성을 위해서 Boolean.TRUE이 좋을 수도 있지만 Boolean -> boolean 타입으로 오토 언박싱이 일어날 것 같은데 불필요한 오토 언박싱을 제거하려면 this.isFinished = true와 같이 해도 괜찮을 것 같습니다!

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

좋은 지적입니다. 애초에 primitive 타입이라서 Boolean을 사용할 필요가 없네요.
맞습니다. 아마 저는 소나린트에서 지원해주는 내용으로 수정하다 보니 이렇게 된 것 같습니다


public static String correct() {
return String.valueOf(ResultValues.그린.getValue())
.repeat(Math.max(0, WordCondition.입력_제한_길이.getValue()));

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

String.repeat(n)이 n < 0 → IllegalArgumentException을 발생시킨다고 알고 있습니다!

그런데 WordCondition.입력_제한_길이가 -5 같은 음수값으로 잘못 지정될 경우에도 예외를 발생시키지 않고 게임이 정상 동작하게 되면 오류를 찾기 더 어려워지지 않을까 생각합니다.

.repeat(Math.max(0, WordCondition.입력_제한_길이.getValue())); -> .repeat(WordCondition.입력_제한_길이.getValue());

이렇게 하고 WordCondition.입력_제한_길이가 음수가 될 수 없게 다른 곳에 검증하는게 어떨지 생각합니다!

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

찾아보니 의도와다르게 제가 작성한거같네요 좋은 리뷰감사합니다 수정하겠습니다

}

public static String inCorrect() {
return String.valueOf(ResultValues.그레이.getValue())

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

ResultValues.그레이.getValue()가 이미 String이라 String.valueOf()는 필요 없을 것 같습니다!

Comment thread src/main/java/domain/model/Answer.java Outdated

public class Answer {

private String value;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

정답 단어는 생성자에서 한번 초기화 한 뒤 변경이 불가능하도록 final로 선언하면 어떨까 합니다!

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

맞습니다. 놓치고있었네요

// TODO. 정책 논의 필요 (횟수 차감 여부) -> 차감 해버리기
if (!validWord(input.getValue())) return false;

if (!validNull(input.getValue())) return false;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

input이 null이면 input.getValue()에서 이미 NullPointerException이 발생해 validNull()로 null 체크하는게 의미가 없어지는 것 같습니다!

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

맞습니다~ 반영할게요

Comment thread src/main/java/domain/model/Result.java Outdated
public class Result {

private StringBuilder board;
private StringBuilder[] boards = new StringBuilder[WordCondition.입력_제한_횟수.getValue()];

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

boards가 배열로 선언되어서 입력 제한 횟수만큼 board를 관리한다는 것은 명확하게 보이는 것 같습니다!

다만, 처음 선언 시 boards 배열 값이 null로 초기화되어 있어서 boards[i].toString()와 같이 사용할 경우 NullPointerException 위험이 있다고 생각합니다.

List<StringBuilder> boards 와 같이 List를 사용할 경우 null을 신경 쓸 필요가 없고 크기 제한도 없어서 유연하게 대응하기에 더 좋을 수 있다고 생각합니다!

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

좋습니다 수정했습니다. 날카로웠어요

public String getWelcomeMessage() {
int inputMaxCount = WordCondition.입력_제한_횟수.getValue();
return String.format("WORDLE을 %d 번 만에 맞춰 보세요.\n"
+ "시도의 결과는 타일의 색 변화로 나타납니다. "

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

"시도의 결과는 타일의 색 변화로 나타납니다. "

문자열 마지막에 있는 공백은 제거해도 될 것 같습니다!

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

동의합니다

this.outputPort = outputPort;
}

public void updateFinished() {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

updateFinished()에서 정답을 맞추거나, 시도 횟수와 입력 제한 횟수가 같으면 isFinished = true로 업데이트 하고 있는데
두 조건문이 isFinished = true로 변경하는 동일한 작업을 하기 때문에 조건 중 하나를 만족하면 return 하도록 해서 연산을 조금이라도 줄여보면 어떨까 합니다!

public void updateFinished() {
        if (ResultValues.correct().equals(result.getBoard())) {
            this.isFinished = Boolean.TRUE;
            return;
        }
        if (WordCondition.입력_제한_횟수.getValue() == result.getCurrentTryCount()) {
            this.isFinished = Boolean.TRUE;
        }
    }

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

좋은 생각입니다

}
}

private static void checkedGreen(int length, String input, String answer, ResultValues[] results,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

checkedGreen(), checkedNotGreen() 메서드가 Word 클래스 안에서만 쓰인다면 static은 제거해도 괜찮을 것 같습니다!

Signed-off-by: cwangg897 <dhkdrb897@gmail.com>
@hyojin23

hyojin23 commented Feb 4, 2026

Copy link
Copy Markdown

안녕하세요 초이님! 3차 과제 리뷰어 도니입니다.
리뷰했던 부분 반영된 것 확인했습니다. 과제 하느라 정말 고생 많으셨습니다!!
😄👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants