ewhk9887/korean_code_reviews_from_github huggingface dataset:
@@ -0,0 +1,100 @@
+@import '../../../styles/variable.scss';
+
+p {
+  font-family: 'Roboto';
+  letter-spacing: 0.2px;
+}
+
+.Main {
+  background-color: $backGroundColor;
+
+  .main {
+    display: flex;
+    justify-content: center;
+    padding-bottom: 100px;
+
+    .main-right {
+      width: 250px;
+      height: 500px;
+
+      .id-info-box {
+        display: flex;
+        justify-content: left;
+        align-items: center;
+        padding-left: 5px;
+        margin-bottom: 15px;
+
+        .my-image {
+          width: 45px;
+          height: 45px;
+          border-radius: 50%;
+          background-color: black;
+          margin-right: 10px;
+        }
+
+        .my-info {
+          p {
+            font-size: 14px;
+          }
+
+          #my-id {
+            font-weight: 500;
+            margin-bottom: 3px;
+          }
+
+          #my-id-text {
+            color: #adafb1;
+          }
+        }
+      }
+
+      .site-info {
+        width: 220px;
+        display: flex;
+        flex-wrap: wrap;
+
+        .site-info-list {
+          color: #c3c5c7;
+          font-size: 12px;
+          margin-bottom: 5px;
+
+          a {
+            color: #c3c5c7;
+          }
+
+          &:not(:last-child)::after {
+            content: '\00B7';
+            color: lightgray;
+            margin: 0 3px;
+          }
+        }
+
+        p {
+          color: #c3c5c7;
+          font-size: 12px;
+          margin-top: 15px;
+          line-height: 15px;
+        }
+      }
+    }
+  }
+}
+
+/* media query */
+@media screen and (max-width: 750px) {
+  .header-wrap {
+    max-width: 750px;
+  }
+
+  .main {
+    display: block;
+
+    .feeds {
+      margin: 0 auto;
+    }
+  }
+
+  .main-right {
+    display: none;
+  }
+}

리뷰: - 컴포넌트를 분리하셨다면 해당 css도 분리하셔서 진행하시는 게 가독성에도 좋겠네요.
@@ -0,0 +1,82 @@
+import React, { useState } from 'react';
+import CommentList from './CommentList';
+
+const Feeds = ({ feedData }) => {
+  const [input, setInput] = useState('');
+  const [inputList, setInputList] = useState([]);
+
+  const post = event => {
+    event.preventDefault();
+    setInputList(inputList.concat(input));
+    setInput('');
+  };
+
+  const handleInput = event => {
+    setInput(event.target.value);
+  };
+
+  return (
+    <div className="feeds" key={feedData.userId}>
+      <div className="user-bar">
+        <div className="user">
+          <div className="user-image" />
+          <em className="user-id">{feedData.userId}</em>
+        </div>
+        <button id="feed-dot">
+          <i className="fa-solid fa-ellipsis" />
+        </button>
+      </div>
+
+      <img className="article-img" src={feedData.url} alt="피드이미지" />
+
+      <div className="article-icons">
+        <div className="article-three-icons">
+          <button>
+            <i className="fa-regular fa-heart" />
+          </button>
+          <button>
+            <i className="fa-regular fa-comment" />
+          </button>
+          <button>
+            <i className="fa-solid fa-arrow-up-from-bracket" />
+          </button>
+        </div>
+
+        <button className="bookmark">
+          <i className="fa-regular fa-bookmark" />
+        </button>
+      </div>
+
+      <div className="like-user">
+        <div className="like-user-img" />
+        <p>
+          <b>{feedData.likeUser}</b>님 외 <b>{feedData.like}명</b>이 좋아합니다
+        </p>
+      </div>
+
+      <ul className="comments-ul">
+        {inputList.map((input, idx) => {
+          return <CommentList key={idx} item={input} />;
+        })}
+      </ul>
+
+      <form className="lets-comment" onSubmit={post}>
+        <input
+          className="comment-input"
+          type="text"
+          placeholder="댓글 달기..."
+          onChange={handleInput}
+          value={input}
+        />
+        <button
+          className={input ? 'submitCommentActive' : 'submitCommentInactive'}
+          disabled={!input}
+        >
+          게시
+        </button>
+      </form>
+    </div>
+  );
+};
+
+export default Feeds;

리뷰: - className은 컴포넌트명과 같게 해주세요.
@@ -0,0 +1,82 @@
+import React, { useState } from 'react';
+import CommentList from './CommentList';
+
+const Feeds = ({ feedData }) => {
+  const [input, setInput] = useState('');
+  const [inputList, setInputList] = useState([]);
+
+  const post = event => {
+    event.preventDefault();
+    setInputList(inputList.concat(input));
+    setInput('');
+  };
+
+  const handleInput = event => {
+    setInput(event.target.value);
+  };
+
+  return (
+    <div className="feeds" key={feedData.userId}>
+      <div className="user-bar">
+        <div className="user">
+          <div className="user-image" />
+          <em className="user-id">{feedData.userId}</em>
+        </div>
+        <button id="feed-dot">
+          <i className="fa-solid fa-ellipsis" />
+        </button>
+      </div>
+
+      <img className="article-img" src={feedData.url} alt="피드이미지" />
+
+      <div className="article-icons">
+        <div className="article-three-icons">
+          <button>
+            <i className="fa-regular fa-heart" />
+          </button>
+          <button>
+            <i className="fa-regular fa-comment" />
+          </button>
+          <button>
+            <i className="fa-solid fa-arrow-up-from-bracket" />
+          </button>
+        </div>
+
+        <button className="bookmark">
+          <i className="fa-regular fa-bookmark" />
+        </button>
+      </div>
+
+      <div className="like-user">
+        <div className="like-user-img" />
+        <p>
+          <b>{feedData.likeUser}</b>님 외 <b>{feedData.like}명</b>이 좋아합니다
+        </p>
+      </div>
+
+      <ul className="comments-ul">
+        {inputList.map((input, idx) => {
+          return <CommentList key={idx} item={input} />;
+        })}
+      </ul>
+
+      <form className="lets-comment" onSubmit={post}>
+        <input
+          className="comment-input"
+          type="text"
+          placeholder="댓글 달기..."
+          onChange={handleInput}
+          value={input}
+        />
+        <button
+          className={input ? 'submitCommentActive' : 'submitCommentInactive'}
+          disabled={!input}
+        >
+          게시
+        </button>
+      </form>
+    </div>
+  );
+};
+
+export default Feeds;

리뷰: - alt는 유저가 보는 텍스트 입니다.
- 유저 입장에서 작성해 주세요.
@@ -0,0 +1,82 @@
+import React, { useState } from 'react';
+import CommentList from './CommentList';
+
+const Feeds = ({ feedData }) => {
+  const [input, setInput] = useState('');
+  const [inputList, setInputList] = useState([]);
+
+  const post = event => {
+    event.preventDefault();
+    setInputList(inputList.concat(input));
+    setInput('');
+  };
+
+  const handleInput = event => {
+    setInput(event.target.value);
+  };
+
+  return (
+    <div className="feeds" key={feedData.userId}>
+      <div className="user-bar">
+        <div className="user">
+          <div className="user-image" />
+          <em className="user-id">{feedData.userId}</em>
+        </div>
+        <button id="feed-dot">
+          <i className="fa-solid fa-ellipsis" />
+        </button>
+      </div>
+
+      <img className="article-img" src={feedData.url} alt="피드이미지" />
+
+      <div className="article-icons">
+        <div className="article-three-icons">
+          <button>
+            <i className="fa-regular fa-heart" />
+          </button>
+          <button>
+            <i className="fa-regular fa-comment" />
+          </button>
+          <button>
+            <i className="fa-solid fa-arrow-up-from-bracket" />
+          </button>
+        </div>
+
+        <button className="bookmark">
+          <i className="fa-regular fa-bookmark" />
+        </button>
+      </div>
+
+      <div className="like-user">
+        <div className="like-user-img" />
+        <p>
+          <b>{feedData.likeUser}</b>님 외 <b>{feedData.like}명</b>이 좋아합니다
+        </p>
+      </div>
+
+      <ul className="comments-ul">
+        {inputList.map((input, idx) => {
+          return <CommentList key={idx} item={input} />;
+        })}
+      </ul>
+
+      <form className="lets-comment" onSubmit={post}>
+        <input
+          className="comment-input"
+          type="text"
+          placeholder="댓글 달기..."
+          onChange={handleInput}
+          value={input}
+        />
+        <button
+          className={input ? 'submitCommentActive' : 'submitCommentInactive'}
+          disabled={!input}
+        >
+          게시
+        </button>
+      </form>
+    </div>
+  );
+};
+
+export default Feeds;

리뷰: - onKeyup 보다는 변수로 동적 관리를 하면 좋을 것 같습니다.
- 변수를 만들어 동적으로 관리한다면 state가 없어도 되겠네요.
@@ -0,0 +1,82 @@
+import React, { useState } from 'react';
+import CommentList from './CommentList';
+
+const Feeds = ({ feedData }) => {
+  const [input, setInput] = useState('');
+  const [inputList, setInputList] = useState([]);
+
+  const post = event => {
+    event.preventDefault();
+    setInputList(inputList.concat(input));
+    setInput('');
+  };
+
+  const handleInput = event => {
+    setInput(event.target.value);
+  };
+
+  return (
+    <div className="feeds" key={feedData.userId}>
+      <div className="user-bar">
+        <div className="user">
+          <div className="user-image" />
+          <em className="user-id">{feedData.userId}</em>
+        </div>
+        <button id="feed-dot">
+          <i className="fa-solid fa-ellipsis" />
+        </button>
+      </div>
+
+      <img className="article-img" src={feedData.url} alt="피드이미지" />
+
+      <div className="article-icons">
+        <div className="article-three-icons">
+          <button>
+            <i className="fa-regular fa-heart" />
+          </button>
+          <button>
+            <i className="fa-regular fa-comment" />
+          </button>
+          <button>
+            <i className="fa-solid fa-arrow-up-from-bracket" />
+          </button>
+        </div>
+
+        <button className="bookmark">
+          <i className="fa-regular fa-bookmark" />
+        </button>
+      </div>
+
+      <div className="like-user">
+        <div className="like-user-img" />
+        <p>
+          <b>{feedData.likeUser}</b>님 외 <b>{feedData.like}명</b>이 좋아합니다
+        </p>
+      </div>
+
+      <ul className="comments-ul">
+        {inputList.map((input, idx) => {
+          return <CommentList key={idx} item={input} />;
+        })}
+      </ul>
+
+      <form className="lets-comment" onSubmit={post}>
+        <input
+          className="comment-input"
+          type="text"
+          placeholder="댓글 달기..."
+          onChange={handleInput}
+          value={input}
+        />
+        <button
+          className={input ? 'submitCommentActive' : 'submitCommentInactive'}
+          disabled={!input}
+        >
+          게시
+        </button>
+      </form>
+    </div>
+  );
+};
+
+export default Feeds;

리뷰: - form 태그 안에 있다면 버튼에는 따로 onClick을 부여하지 않으셔도 됩니다.
@@ -0,0 +1,36 @@
+package rentcar.domain;
+
+public class Avante extends Car {
+
+    private static final String NAME = "Avante";
+    private static final double DISTANCE_PER_LITER = 15;
+    private static final String VALIDATE_TRIP_DISTANCE_MESSAGE = "[ERROR] 여행거리는 0 이상입니다.";
+
+    private double tripDistance;
+
+    public Avante(double tripDistance) {
+        validateTripDistance(tripDistance);
+        this.tripDistance = tripDistance;
+    }
+
+    private void validateTripDistance(double tripDistance) {
+        if (tripDistance < 0) {
+            throw new IllegalArgumentException(VALIDATE_TRIP_DISTANCE_MESSAGE);
+        }
+    }
+
+    @Override
+    double getDistancePerLiter() {
+        return DISTANCE_PER_LITER;
+    }
+
+    @Override
+    double getTripDistance() {
+        return tripDistance;
+    }
+
+    @Override
+    String getName() {
+        return NAME;
+    }
+}

리뷰: Car (추상) 클래스의 하위 구현체들은 모두 이 로직이 반복되고 있어요. 👀  
반복되는 코드를 Car 클래스에 구현하면 반복되는 코드를 줄일 수 있을 것 같아요. 🤗
@@ -0,0 +1,36 @@
+package rentcar.domain;
+
+public class Avante extends Car {
+
+    private static final String NAME = "Avante";
+    private static final double DISTANCE_PER_LITER = 15;
+    private static final String VALIDATE_TRIP_DISTANCE_MESSAGE = "[ERROR] 여행거리는 0 이상입니다.";
+
+    private double tripDistance;
+
+    public Avante(double tripDistance) {
+        validateTripDistance(tripDistance);
+        this.tripDistance = tripDistance;
+    }
+
+    private void validateTripDistance(double tripDistance) {
+        if (tripDistance < 0) {
+            throw new IllegalArgumentException(VALIDATE_TRIP_DISTANCE_MESSAGE);
+        }
+    }
+
+    @Override
+    double getDistancePerLiter() {
+        return DISTANCE_PER_LITER;
+    }
+
+    @Override
+    double getTripDistance() {
+        return tripDistance;
+    }
+
+    @Override
+    String getName() {
+        return NAME;
+    }
+}

리뷰: `0`이 어떤 숫자인지 상수로 추출하여 의미를 명확하게 해주면 좋을 것 같아요. 🤗
@@ -0,0 +1,92 @@
+package blackjack.controller;
+
+import blackjack.domain.card.CardFactory;
+import blackjack.domain.card.Deck;
+import blackjack.domain.report.GameReports;
+import blackjack.domain.request.DrawRequest;
+import blackjack.domain.request.UserNamesRequest;
+import blackjack.domain.user.Dealer;
+import blackjack.domain.user.Player;
+import blackjack.domain.user.Players;
+import blackjack.view.InputView;
+import blackjack.view.OutputView;
+import java.util.List;
+import java.util.stream.Collectors;
+
+public class BlackJack {
+
+    private final Players players;
+    private final Deck deck;
+
+    private BlackJack(Players players, Deck deck) {
+        this.players = players;
+        this.deck = deck;
+    }
+
+    public static BlackJack init(UserNamesRequest playerNames) {
+        Dealer dealer = new Dealer();
+        Players candidates = playerNames.userNames()
+            .stream()
+            .map(Player::new)
+            .collect(Collectors.collectingAndThen(Collectors.toList(),
+                players -> new Players(dealer, players)));
+        CardFactory cardFactory = CardFactory.getInstance();
+        Deck deck = new Deck(cardFactory.createCards());
+        return new BlackJack(candidates, deck);
+    }
+
+    public void runGame() {
+        spreadStartCards();
+        if (!players.hasBlackJack()) {
+            drawPlayers();
+            drawDealer();
+        }
+        GameReports reports = getResult();
+        showResult(reports);
+    }
+
+    private void spreadStartCards() {
+        players.drawStartCards(deck);
+        OutputView.printAllPlayersCard(players);
+    }
+
+    private void drawPlayers() {
+        for (Player player : players.findOnlyPlayers()) {
+            drawEachPlayer(player);
+        }
+    }
+
+    private void drawEachPlayer(Player player) {
+        while (player.isDrawable() && getPlayerRequest(player)) {
+            player.drawCard(deck.spreadCard());
+            OutputView.printEachCardInfo(player);
+        }
+    }
+
+    private boolean getPlayerRequest(Player player) {
+        String drawRequest = InputView.getDrawRequest(player);
+        return DrawRequest.valueOf(drawRequest)
+            .isDrawable();
+    }
+
+    private void drawDealer() {
+        Dealer dealer = players.findDealer();
+        while (dealer.isDrawable()) {
+            dealer.drawCard(deck.spreadCard());
+            OutputView.printDealerGetCard();
+        }
+    }
+
+    private GameReports getResult() {
+        Dealer dealer = players.findDealer();
+        List<Player> candidates = players.findOnlyPlayers();
+        return candidates.stream()
+            .map(dealer::createReport)
+            .collect(Collectors.collectingAndThen(Collectors.toList(), GameReports::new));
+    }
+
+    private void showResult(GameReports reports) {
+        OutputView.printResultStatus(players.all());
+        OutputView.printReports(reports);
+    }
+}

리뷰: `collectingAndThen` 함수는 저도 몰랐는데, 유용한 것 같아요! 🤭👍
@@ -0,0 +1,92 @@
+package blackjack.controller;
+
+import blackjack.domain.card.CardFactory;
+import blackjack.domain.card.Deck;
+import blackjack.domain.report.GameReports;
+import blackjack.domain.request.DrawRequest;
+import blackjack.domain.request.UserNamesRequest;
+import blackjack.domain.user.Dealer;
+import blackjack.domain.user.Player;
+import blackjack.domain.user.Players;
+import blackjack.view.InputView;
+import blackjack.view.OutputView;
+import java.util.List;
+import java.util.stream.Collectors;
+
+public class BlackJack {
+
+    private final Players players;
+    private final Deck deck;
+
+    private BlackJack(Players players, Deck deck) {
+        this.players = players;
+        this.deck = deck;
+    }
+
+    public static BlackJack init(UserNamesRequest playerNames) {
+        Dealer dealer = new Dealer();
+        Players candidates = playerNames.userNames()
+            .stream()
+            .map(Player::new)
+            .collect(Collectors.collectingAndThen(Collectors.toList(),
+                players -> new Players(dealer, players)));
+        CardFactory cardFactory = CardFactory.getInstance();
+        Deck deck = new Deck(cardFactory.createCards());
+        return new BlackJack(candidates, deck);
+    }
+
+    public void runGame() {
+        spreadStartCards();
+        if (!players.hasBlackJack()) {
+            drawPlayers();
+            drawDealer();
+        }
+        GameReports reports = getResult();
+        showResult(reports);
+    }
+
+    private void spreadStartCards() {
+        players.drawStartCards(deck);
+        OutputView.printAllPlayersCard(players);
+    }
+
+    private void drawPlayers() {
+        for (Player player : players.findOnlyPlayers()) {
+            drawEachPlayer(player);
+        }
+    }
+
+    private void drawEachPlayer(Player player) {
+        while (player.isDrawable() && getPlayerRequest(player)) {
+            player.drawCard(deck.spreadCard());
+            OutputView.printEachCardInfo(player);
+        }
+    }
+
+    private boolean getPlayerRequest(Player player) {
+        String drawRequest = InputView.getDrawRequest(player);
+        return DrawRequest.valueOf(drawRequest)
+            .isDrawable();
+    }
+
+    private void drawDealer() {
+        Dealer dealer = players.findDealer();
+        while (dealer.isDrawable()) {
+            dealer.drawCard(deck.spreadCard());
+            OutputView.printDealerGetCard();
+        }
+    }
+
+    private GameReports getResult() {
+        Dealer dealer = players.findDealer();
+        List<Player> candidates = players.findOnlyPlayers();
+        return candidates.stream()
+            .map(dealer::createReport)
+            .collect(Collectors.collectingAndThen(Collectors.toList(), GameReports::new));
+    }
+
+    private void showResult(GameReports reports) {
+        OutputView.printResultStatus(players.all());
+        OutputView.printReports(reports);
+    }
+}

리뷰: `BlackJack` 클래스는 Controller의 용도로 사용하려는 것 같으나 비즈니스 로직이 상당수 존재하는 것 같아요. 🤔
Controller는 상태 값을 가지지 않아야해요. 👀 
`BlackJackController` 클래스와 비즈니스 모델인 `BlackJack` 클래스로 분리해볼 수 있을 것 같아요. 🤗
@@ -0,0 +1,34 @@
+package blackjack.domain.card;
+
+public enum Number {
+
+    ACE(1, "A"),
+    TWO(2, "2"),
+    THREE(3, "3"),
+    FOUR(4, "4"),
+    FIVE(5, "5"),
+    SIX(6, "6"),
+    SEVEN(7, "7"),
+    EIGHT(8, "8"),
+    NINE(9, "9"),
+    TEN(10, "10"),
+    JACK(10, "J"),
+    QUEEN(10, "Q"),
+    KING(10, "K");
+
+    private final int score;
+    private final String message;
+
+    Number(int score, String message) {
+        this.score = score;
+        this.message = message;
+    }
+
+    public int score() {
+        return score;
+    }
+
+    public String message() {
+        return message;
+    }
+}

리뷰: enum 클래스명이 `ACE, JACK, QUEEN, KING`을 포함하는 의미라고 볼 수 있을까요? 🤔
`Type` or `CardType`과 같은 네이밍은 어떨까요? 😃
@@ -0,0 +1,34 @@
+package blackjack.domain.card;
+
+public enum Number {
+
+    ACE(1, "A"),
+    TWO(2, "2"),
+    THREE(3, "3"),
+    FOUR(4, "4"),
+    FIVE(5, "5"),
+    SIX(6, "6"),
+    SEVEN(7, "7"),
+    EIGHT(8, "8"),
+    NINE(9, "9"),
+    TEN(10, "10"),
+    JACK(10, "J"),
+    QUEEN(10, "Q"),
+    KING(10, "K");
+
+    private final int score;
+    private final String message;
+
+    Number(int score, String message) {
+        this.score = score;
+        this.message = message;
+    }
+
+    public int score() {
+        return score;
+    }
+
+    public String message() {
+        return message;
+    }
+}

리뷰: 객체의 상태 값을 외부로 호출하는 메서드는 `getter` 메서드를 정의해주세요. 😃 
getter, setter와 같은 관습적인 메서드 생성이 낯설거나 어렵다면 `⌘ + N` 단축키를 통해서 이런 메서드들을 쉽게 생성할 수 있어요. 🤗
@@ -0,0 +1,35 @@
+package blackjack.domain.card;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+public class CardFactory {
+
+    public static CardFactory INSTANCE;
+
+    private CardFactory() {
+    }
+
+    public static CardFactory getInstance() {
+        if (INSTANCE == null) {
+            INSTANCE = new CardFactory();
+        }
+        return INSTANCE;
+    }
+
+    public List<Card> createCards() {
+        List<Card> cards = new ArrayList<>();
+        for (Suit suit : Suit.values()) {
+            createBySuit(cards, suit);
+        }
+        Collections.shuffle(cards);
+        return cards;
+    }
+
+    private void createBySuit(List<Card> cards, Suit suit) {
+        for (Number number : Number.values()) {
+            cards.add(new Card(suit, number));
+        }
+    }
+}

리뷰: Deck으로 쓰이는 카드들은 카드의 형태와 갯수들이 정해져있고  재사용할 확률이 높다고 생각해요. 😃 
미리 만들어뒀다가 필요한 시점에 재사용해보면 어떨까요? 🤗

[참고 자료](https://tecoble.techcourse.co.kr/post/2020-06-24-caching-instance/)
@@ -0,0 +1,22 @@
+package blackjack.domain.card;
+
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Queue;
+
+public class Deck {
+
+    private final Queue<Card> deck;
+
+    public Deck(List<Card> cards) {
+        this.deck = new LinkedList<>(cards);
+    }
+
+    public Card spreadCard() {
+        return deck.poll();
+    }
+
+    public int remainCardSize() {
+        return deck.size();
+    }
+}

리뷰: 저는 Stack이 조금 더 카드 게임에 어울린다고 생각하는데, Queue도 좋은 접근인 것 같아요. 🤗 

`spreadCard` 메서드에서는 deck이 비어있는 경우에 대한 예외 처리도 할 수 있을 것 같아요. 😃
@@ -0,0 +1,42 @@
+package blackjack.domain.card;
+
+import blackjack.domain.score.ScoreCalculator;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+public class CardBundle {
+
+    private static final int BLACK_JACK_SCORE = 21;
+
+    private final List<Card> cards;
+
+    private CardBundle() {
+        this.cards = new ArrayList<>();
+    }
+
+    public static CardBundle emptyBundle() {
+        return new CardBundle();
+    }
+
+    public void addCard(Card card) {
+        cards.add(card);
+    }
+
+    public int calculateScore() {
+        return ScoreCalculator.findByCards(cards)
+            .calculateScore(cards);
+    }
+
+    public List<Card> getCards() {
+        return Collections.unmodifiableList(cards);
+    }
+
+    public boolean isBurst() {
+        return calculateScore() > BLACK_JACK_SCORE;
+    }
+
+    public boolean isBlackJack() {
+        return calculateScore() == BLACK_JACK_SCORE;
+    }
+}

리뷰: CardBundle.`empty()` 로도 충분히 의미가 전달되는 것 같아요. 😃