본문 바로가기
Java 이야기

Java 코드 컨벤션 / 코드를 작성하는 규칙

by 자유코딩 2017. 9. 21.

프로그래밍을 하다보면 다른 개발자들과 함께 코드를 작성하게 됩니다.

 

다른 개발자들과 코드를 함께 작성 할 때 서로 코드를 작성하는 방식이 다르면 코드의 가독성이 떨어지게 됩니다.

 

가독성이 떨어지는 코드는 생산성을 높이는데 방해가 됩니다.

 

Sun에서 제시한 Coding Convention의 필요성

 

Code Convention for the java Programmer

 

This Code Convention for the Java Programming Language document contains the standard conventions that we at Sun follow and recomment that others follow. it covers filenames , file organization, comments , declaration , statements , white space , naming conventions, programming practice and include a code example

 

1. 80% of the lifetime cost of a piece of software goes to maintenance.

2. Hardly any software is maintained for its whole life by the original author.

3. Code Conventions improve the readability of the software. allowing engineers to understand new code more quickly and thoroughly

 

The code conventions for the java programming language document was revised and updated on April 20, 1999

 

1. 소프트웨어를 개발하는 일련의 모든 과정에 들어가는 비용 중 80%가 유지보수에 쓰인다. 

2. 소프트웨어의 유지보수를 그 소프트웨어를 직접 개발한 개발자가 담당하는 경우는 거의 보기 드물다.

3. 코드 규칙을 지키면 다른 개발자가 그 소스코드를 처음 보았을 때, 더 빠른 시간안에 이해 할 수 있도록 도와주기 때문에 코드의 가독성이 높아진다.

 

코드를 작성하는 규칙인 Coding Convention 의 Pdf파일을 첨부하여 올립니다.

 

프로그래밍에 많은 도움이 되시길 바랍니다.

 

Java Code Conventions(한글).pdf

 

댓글