프로그램개발을 할 때 종종 사용 되는 3가지 원칙 DRY, KISS, YAGNI 소개해봅니다.
1. DRY(Don't Repeat Yourself)
- 같은 일을 두번하지 않는 다는 의미로 기능이 중복되는 것들은 하나의 함수나 컴포넌트화 해서 사용해야 한다는 의미입니다.
- 이런 일은 자기 혼자 하는 프로젝트에서도 발생 할 수는 있지만(하면 안되!!) 주로 팀내 다른 개발자와도 발생 할 수 있는 일입니다.
- 그렇기 때문에 팀 단위로 개발을 진행하려면 공용 함수로 여러 곳에 사용 할 수 있을 것 같은 기능은 별도의 프로젝트로 관리해야합니다.
2. KISS(Keep it simple, stupid)
- 단순하게 하라는 의미로 하나의 함수나 컴포넌트에 여러가지 기능을 넣지 않고, 하나의 함수는 하나의 기능만을 하도록 작성해야 합니다.
- 간단히 말해서 알기 쉽게 만드는 편이 좋다는 원리를 말합니다.
3. YAGNI(You ain't Gonna Need It)
- 현재 필요하지 않는 기능에 대해서 미리 만들지 말라라는 의미입니다.
- 저는 개인적으로 실제로 프로젝트를 하면서도 많이 겪게 되기도 하는데요, 미리 너무 멀리까지 설계를 해서 처음부터 진을 빼는 경우가 종종 있습니다.
- 요즘 개발 트렌드는 그렇게 하는 방법 보다는 MVP(Minimum Viable Product) 방식으로 일단 작동하는 프로그램을 먼저 만들어 내는 것이 대세입니다.(그래야 덜 지치고 해나가는 맛이 있거든요!!)
매번 위의 원칙을 최대한 지키려고 노력을 하는데, 가끔 현실과 타협하는 경우도 생기기는 합니다.
최대한 원칙을 지킬 수 있도록... 노력!!!! 해봅니다.
[광고] STEEM 개발자 커뮤니티에 참여 하시면, 다양한 혜택을 받을 수 있습니다.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
[by @happyberrysboy] [Clean Code] DRY KISS YAGNI
https://www.steemit.com/@kr-dev.cu0/happyberrysboy-posting-2022-06-14-22-58
@kr-dev.cu0님이 당신을 멘션하였습니다.
멘션을 받고 싶거나 받지 않으시려면 댓글을 남겨주세요. 빠른 시일내에 반영하도록 하겠습니다.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
This post has been upvoted by @italygame witness curation trail
If you like our work and want to support us, please consider to approve our witness
Come and visit Italy Community
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Upvoted! Thank you for supporting witness @jswit.

Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Hi @happyberrysboy,
my name is @ilnegro and I voted your post using steem-fanbase.com.
Come and visit Italy Community
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit