Skip to content

banksalad/styleguide

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

styleguide

뱅크샐러드 엔지니어링 팀이 지향하는 코드의 형태를 함께 논의하고 이를 문서로 정리해둔 스타일 가이드 코드 저장소입니다.

정적인 문서 파일이 아닌 코드 저장소 형태로 스타일 가이드를 운영하는 것은 이를 논의의 공간으로 삼고자 하는데 가장 큰 뜻이 있습니다. 누구든 제안(issue 혹은 pull request)할 수 있으며 이에 대한 의견을 공유할 수 있도록 하기 위함입니다.

다음은 저희 뱅크샐러드 엔지니어링 팀에서 작성한 언어별 스타일 가이드 목록입니다. 늘 저희 팀 최신의 생각을 반영하기 위해 노력 중이며, 작성된 스타일 가이드는 언제든 더 나은 형태로 변경될 수 있습니다.

철학

저희 뱅크샐러드는 작성에 편리한 코드보다는 읽기에 더 쉬운 코드를 더 가치 있게 생각하며 이를 스타일 가이드에 충분히 반영하고자 합니다. 물론 저희 팀은 코드 작성의 편리함 또한 중요한 가치라 여기며 이를 위한 노력 역시 해나가고 있습니다.

다음의 내용은 저희 팀이 스타일 가이드에 대한 철학을 정립하며 도움을 받았던 스타일 가이드이며 일부를 발췌하여 공유합니다.

Use common sense and BE CONSISTENT.

If you are editing code, take a few minutes to look at the code around you and determine its style. If they use spaces around their if clauses, you should, too. If their comments have little boxes of stars around them, make your comments have little boxes of stars around them too.

The point of having style guidelines is to have a common vocabulary of coding so people can concentrate on what you are saying, rather than on how you are saying it. We present global style rules here so people know the vocabulary. But local style is also important. If code you add to a file looks drastically different from the existing code around it, the discontinuity throws readers out of their rhythm when they go to read it. Try to avoid this.

OK, enough writing about writing code; the code itself is much more interesting. Have fun!

Google C++ Style Guide

참고 자료