[10] 좋은 코드란? : 가독성이 좋은 코드
1. 코멘트 잘 활용하기 : 다른 개발자들과의 소통을 위함
2. 이름 잘 짓기 : 충분히 구체적이면서 간결한 이름
3. Style Guide (=convention =코드 작성 규칙)을 지키기 : 프로그래밍 언어마다 공유된 규칙이 있는데, 이를 지켜야 가독성이 좋고 소통이 편하다.
스타일 가이드의 예) 구글에서 검색하면 언어마다 다 나옴~
---> 여기에서 Camel 표기법이란 띄어쓰기 규칙임
▶Python Style Guide (공식)
www.python.org/dev/peps/pep-0008/
PEP 8 -- Style Guide for Python Code
The official home of the Python Programming Language
www.python.org
▶Python Style Guide (구글에서 사용)
https://github.com/google/styleguide/blob/gh-pages/pyguide.md
google/styleguide
Style guides for Google-originated open-source projects - google/styleguide
github.com
▶JavaScript Style Guide (표준)
JavaScript Standard Style
JavaScript Standard Style Sponsored by English • Español (Latinoamérica) • Français • Bahasa Indonesia • Italiano (Italian) • 日本語 (Japanese) • 한국어 (Korean) • Português (Brasil) • 简体中文 (Simplified Chinese) •
standardjs.com
▶JavaScript Style Guide (구글에서 사용)
https://google.github.io/styleguide/jsguide.html
Google JavaScript Style Guide
Google JavaScript Style Guide 1 Introduction This document serves as the complete definition of Google’s coding standards for source code in the JavaScript programming language. A JavaScript source file is described as being in Google Style if and only i
google.github.io
▶Java Style Guide (오라클에서 사용)
https://www.oracle.com/technetwork/java/codeconvtoc-136057.html
불러오는 중입니다...
▶Java Style Guide (구글에서 사용)
https://google.github.io/styleguide/javaguide.html
Google Java Style Guide
1 Introduction This document serves as the complete definition of Google's coding standards for source code in the Java™ Programming Language. A Java source file is described as being in Google Style if and only if it adheres to the rules herein. Like ot
google.github.io
▶C Style Guide
Style Guide for C
There ’ s no one, right way to stylize code. But there are definitely a lot of wrong (or, at least, bad ways). Even so, CS50 does ask that you adhere to the conventions below so that we can reliabl...
cs50.readthedocs.io
4. 구조화 잘 하기: 객체지향 프로그래밍을 통해 '파일 분리'(관련된 코드를 필요한 만큼 한 곳에 모아두는 것)를 잘해야 함.
5. Design Pattern을 활용하여 문제 해결 하기: 프로그래밍에서 고질적으로 발생하는 문제들을 해결하기 위한 테크닉을 정리해둔 것을 디자인 패턴이라고 함. 책이 있음 -->