인터넷에서 우연히 찾은 링크.
Why I Don't Read Code Comments By Dr. Heinz Kabutz, from DevX
중간 내용을 인용해 보면
My dislike of comments is based on the following reasoning:
* In most cases, comments are written by programmers who don't believe in them.
* Comments rarely reflect what is really happening in the code.
* Well-written code should not need comments. Of course, there are exceptions. For example, interfaces need very detailed comments to define the various conditions. If you have methods named f(), g(), and h(), you will need to document what the methods do. But why not call them something sensible in the first place?
* Instead of writing long pre- and post-conditions in the comments, why not write extensive unit tests?
나도 주석은 많을 수록 좋다라고 배워왔지만 주석도 절제의 미가 있어야 하는법. 코드 자체가 명확히 의미를 전달할 수 있어야 하고 특이사항에 대해서는 그것을 주석으로 설명하기 보다는 그런 것이 없도록 만들어야 될것이다.
Why I Don't Read Code Comments By Dr. Heinz Kabutz, from DevX
중간 내용을 인용해 보면
My dislike of comments is based on the following reasoning:
* In most cases, comments are written by programmers who don't believe in them.
* Comments rarely reflect what is really happening in the code.
* Well-written code should not need comments. Of course, there are exceptions. For example, interfaces need very detailed comments to define the various conditions. If you have methods named f(), g(), and h(), you will need to document what the methods do. But why not call them something sensible in the first place?
* Instead of writing long pre- and post-conditions in the comments, why not write extensive unit tests?
나도 주석은 많을 수록 좋다라고 배워왔지만 주석도 절제의 미가 있어야 하는법. 코드 자체가 명확히 의미를 전달할 수 있어야 하고 특이사항에 대해서는 그것을 주석으로 설명하기 보다는 그런 것이 없도록 만들어야 될것이다.
'개발&Development > 프로그래밍 일반' 카테고리의 다른 글
개발자의 과거, 현재, 미래 (0) | 2005.03.21 |
---|---|
UML 그리고 VS 2005 블라블라 (3) | 2005.03.16 |
Visual Studio Team System 구조도 (0) | 2005.03.16 |
[서평] Visual interface design : 비주얼 인터페이스 디자인 (0) | 2005.03.15 |
OOP! Oops (2) | 2005.02.22 |