not-blond-beard / savor-22b Goto Github PK
View Code? Open in Web Editor NEWLicense: GNU Affero General Public License v3.0
License: GNU Affero General Public License v3.0
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 처리할 수 있도록 고도화 하면 편합니다
RefrigeratorStateList라는 필드가 InventoryState안에 있는데 식재료와 음식을 둘 다 포함할 수 있는 값이라 냉장고라고 지었던건데... 어쩌다보니 음식 하나당 냉장고 하나에 넣는 엄청난 사치를 부리게 되었습니다.
좋은 이름으로 수정해주세요
docker hub에 올려줍시다...
여러 리스트들이 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도 같은 방식인데 같이 고민해볼 수 있을 것 같습니다
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로 변할 때 변수 명도 수정되어야 하는 그런 상황이 있을 수 있으니..
나중에 디버깅하기가 어려울 것 같아서 null인 상태로 초기화해두고 쓰는게 좋을 것 같습니다
Originally posted by @Atralupus in #43 (comment)
private Recipe FindRecipeInCsv(int recipeID)
{
var recipe = CsvDataHelper.GetRecipeById(recipeID);
if (recipe is null)
{
throw new NotFoundTableDataException(
$"Invalid {nameof(recipeID)}: {recipeID}");
}
return recipe;
}
이런 코드로 체크하는데 어떻게 잘 중복을 제거해봅시다...
https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-a-merge-queue
좋은거 생겼습니다. 브랜치 룰은 걸어놨으니 트리거 이걸로 변경해주세요
이거 큰 분기로 if를 타는거라면 action 분리하는게 좋아보이긴 합니다.
Originally posted by @Atralupus in #60 (comment)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.