본문 바로가기
회고록

👩🏼‍💻TIL : 13. CODE Review

by NOHCODING 2022. 10. 20.
반응형

00. What Is Code Review?

  - One stage in a software development workflow

  - Gets feedback from your collegues on your code to submit

 

01. TDD(Test-Driven Development)란?

 - 우리가 구현해야할 요구사항과 구현체를 분리하자  

 - 테스트가 주도하는 개발 

 - RED. 항상 실패하는 테스트를 먼저 작성

 - Green. 테스트가 통과하는 프로덕션 코드를 작성

 - Refactor. 테스트가 통과하면 프로덕션 코드를 리팩토링

 

02.  Why 12 Code Review Necessary?

 - 나의 CL을 이해하기 쉽게 만든다.

 - 나의 동료가 나의 코드를 이해할 수 있다. 

 - 숙련된 개발자로부터 코딩 스타일과 팁을 배울 수 있다.

 - 나의 동료가 공통된 코딩 스타일을 공유할 수 있다.

 - 결함을 줄일 수 있다. 

 - 나의 코드에 일관적인 코딩 스타일을 유지할 수 있다.

 

 

03.  Code Review Course

 - Code review

 - Code review workflow with Git

 - Code reivew etiquette

 - Code style guidelines

 - Testing

 - Code reivew case studies

 - Code refactoring

 - Secure coding

 - Clean code

 

 

04. Google C Style Guide 

https://google.github.io/styleguide/cppguide.html

 

 

05. General Naming Rule

 -  Name should be descripive.

 - Avoid abbreviation

 - Give as descriptive a name as possible

 - 함수는 한놈만 패자.(문제가 있을 때 이해하기 어렵고, 잘게 쪼개서 한 기능만 할 수 있는 함수를 사용)

int price_count_reader;			//No abbreviation
int num_errors;				//num is a widespread convention
int num_dns_connections;		//Most people know what "DNS" stands for
int lstm_size;				//"LMTM" is a common machine learning abbreviation

 

 

06. Testing

 - Testing Rocks! Debug Sucks!

 - 디버깅은 보통 문제를 찾는데 엄청 시간이 걸림 

 - 테스팅은 새로 작성한 코드에서도 결함을 검출 할 수 있음

 - Unit Testing

 - Integration Testing

 - Regression Testing 

 - End - to - End Testing

 

 

07. Code Refactoring

 - Refactoring은 SW의 동작을 바꾸지 않으면서도 내부 구조를 개선하는 것

 - 코드의 구조를 잘 정해진 규정되로 수정하는 기술

 - SW를 더 이해하기 쉽게 만들고 수정하는 비용을 줄임

반응형

댓글