Git Product home page Git Product logo

savor-22b's People

Contributors

atralupus avatar kth1888 avatar upa-r-upa avatar

Watchers

 avatar  avatar

savor-22b's Issues

CsvParser Class 처리

public class Ingredient
{
    public int ID { get; set; }
    public string Name { get; set; }
    // TODO should be Grade enum
    public string MinGrade { get; set; }
    // TODO should be Grade enum
    public string MaxGrade { get; set; }
    public int SeedId { get; set; }
}

이런걸

public class Ingredient
{
    public int ID { get; set; }
    public string Name { get; set; }
    public Grade MinGrade { get; set; }
    public Grade MaxGrade { get; set; }
    public int SeedId { get; set; }
}

enum이나 nested class 처리할 수 있도록 고도화 하면 편합니다

RefrigeratorState 이름 바꾸기

RefrigeratorStateList라는 필드가 InventoryState안에 있는데 식재료와 음식을 둘 다 포함할 수 있는 값이라 냉장고라고 지었던건데... 어쩌다보니 음식 하나당 냉장고 하나에 넣는 엄청난 사치를 부리게 되었습니다.
좋은 이름으로 수정해주세요

InventoryState 리팩토링

여러 리스트들이 class 안에 있는데

    public InventoryState RemoveSeed(Guid seedStateID)

    public InventoryState AddSeed(SeedState seedState)

    public InventoryState AddRefrigeratorItem(RefrigeratorState item)

    public InventoryState RemoveRefrigeratorItem(Guid stateID)

    public RefrigeratorState GetRefrigeratorItem(Guid stateID)

이런 add, remove 등 메소드들이 계속 생겨나고 있습니다. 좋은 파훼법을 찾아봅시다
비슷하게 CsvDataHelper도 같은 방식인데 같이 고민해볼 수 있을 것 같습니다

TryGet 방식으로 바꿀 수 있는것들 바꿔두기

    public KitchenEquipmentState? GetKitchenEquipmentState(Guid stateID)
    {
        return KitchenEquipmentStateList.Find(k => k.StateID == stateID);
    }

이런 코드들은

    public bool TryGetKitchenEquipmentState(Guid stateID, out KitchenEquipmentState state)
    {
        ~~~
    }

이런식으로 변경이 가능합니다.

변수명 규칙 통일

~ID -> ~Id, ~CSV -> ~Csv
Id같은 값들은 첫 문자만 대문자로 합니다.

~List -> ~s, ~es
변수 명이나 특정 이름이 자료구조 형태가 포함되는게 좋은 건 아닌 것 같습니다. 예를 들어 List가 dictionary로 변할 때 변수 명도 수정되어야 하는 그런 상황이 있을 수 있으니..

NotFoundTableDateException null handling 중복 줄이기

    private Recipe FindRecipeInCsv(int recipeID)
    {
        var recipe = CsvDataHelper.GetRecipeById(recipeID);

        if (recipe is null)
        {
            throw new NotFoundTableDataException(
                $"Invalid {nameof(recipeID)}: {recipeID}");
        }

        return recipe;
    }

이런 코드로 체크하는데 어떻게 잘 중복을 제거해봅시다...

이사 기능 Action 분리

          이거 큰 분기로 if를 타는거라면 action 분리하는게 좋아보이긴 합니다.
  • initializeHouseAction
  • RelocationHouseAction
    보다보니까 User 빠져도 될 것 같아서 이렇게 두개로...

Originally posted by @Atralupus in #60 (comment)

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.