‘프로그래밍 원칙 7가지’ 프로그래밍 이론을 공부하며 자주 마주치는 원칙들이 있다. 좋은 엔지니어로 성장하기 위해서 꼭 챙겨야 하는 원칙들이다. 단순해서 외우기는 쉽지만, 실제 작업에 적용하기는 쉽지 않다. 그렇기에 중간중간 상기하고 제대로 적용하고 있는지 점검하는 시간을 가질 필요가 있다고 생각한다. 마침 중요한 7가지 원칙을 잘 요약해주는 글을 발견해서 공유한다. 각 원칙과 핵심 1~2 줄을 여기에 정리해 보았다. YAGNI (You Aren’t Ganna Need It) When adding code, make sure it’s needed right away. Don’t leave code hanging because you think it might be useful later on. DRY (Don’t Repeat Yourself) Most of the time, code duplication comes from a lack of knowledge of the system. Reusing code is always a smart choice. KISS (Keep It Simple, Stupid) This principle states that simpler systems will work best and more reliably. Big Desing Up Front Before jumping into the implementation part, make sure it’s all well thought out. SOLID Single Responsibility Principle Open Closed Principle Liskov substitution Principle Interface Segregation Principle Dependency Inversion Principle Avoid Premature Optimization I think if you apply KISS and YAGNI you shouldn’t fall for this. You are not going to buy 40 servers because you think your new app is going to be viral. Occam’s Razor The simplest explanation is usually the right one. Don’t create unnecessary entities without them being needed. 여담 엔지니어들은 축약어 만드는 것을 좋아하는 것 같다. 지금까지 만난 것 중 가장 좋아하는 것은 YAGNI 고 가장 황당했던 것은 k8s 다. YAGNI 는 많은 원칙을 함축적으로 포함하고 있다고 느껴져서 좋다. (또 한 내가 가장 지키기 어려워하는 원칙이다) k8s 는 처음에 기발하다는 생각이 잠깐 들다가도 k로 시작해서 s로 끝나는 8 + 2글자가 단어가 KuberneteS 밖에 없는 것도 아닌데 먼저 선점하는 사람이 임지 인 건가 싶어 조금 당황스러웠다.

7 Software Development Principles That Should Be Embraced Daily

Medium

7 Software Development Principles That Should Be Embraced Daily

다음 내용이 궁금하다면?

또는

이미 회원이신가요?

2021년 3월 21일 오후 5:05

댓글 0