Giter Site home page Giter Site logo

codesquad-cocoa-java's Introduction

Hi there 👋

codesquad-cocoa-java's People

Contributors

ehdrhelr avatar

Watchers

 avatar

Forkers

bockya

codesquad-cocoa-java's Issues

2주차 미션 리뷰 드립니다~

안녕하세요 Shion, 소니입니다.
2주차 미션에 대해 간단한 리뷰 남기니 참고해주세요~

  1. 여러개의 클래스를 하나의 파일에 작성하지 말고, 파일로 분리해서 import하는 방식으로 사용해보세요
  2. userListMap은 static으로 선언하는게 맞을까요? static 으로 선언했을 때 어떤 문제가 있을까요?
  3. 현재 하나의 클래스 안에 모든 로직이 다 들어있네요. 이런 경우 클래스 크기가 너무 커져서 코드를 이해하기 어렵고, 하나의 클래스에서 너무 많은 역할을 갖고 있어 객체지향원칙에 어긋납니다.(ex. 단일책임원칙). 역할별로 클래스를 분리해보시면 좋겠어요!
  4. 메서드명은 해당 역할을 이해하기 쉽게 잘 작성해주셨네요. 👍👍
  5. 아래와 같은 코드는 한 줄로 표현할 수 있답니다 😄
public boolean isUser(String userName) {
        if (userListMap.containsKey(userName)) {
            return true;
        }
        return false;
    }
public boolean isUser(String userName) {
        return userListMap.containsKey(userName);
    }
  1. 메서드가 너무 길면 하나의 메서드에서 너무 많은 일을 하고 있는건 아닌지 의심해봐야 합니다. 역할별로 메서드를 분리해보세요. 하나의 메서드는 하나의 역할만 하도록 구현하는게 좋습니다.
  2. 사용하지 않는 코드(주석 포함)는 삭제해주세요~ (설명을 위한 주석은 남겨도 좋습니다.)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.