프로그램 주석에 관련된 스택오버플로우 스레드
안녕하세요. Hackability 입니다.
점심 먹고 이리저리 둘러 보던 중 StackOverflow 에 재미난 글이 있어서 포스팅 남깁니다. 해당 포스팅 제목은 What is the best comment in source code you have ever encountered? 로써, 코딩 시 주석에 관한 스레드였는데요. 이 스레드에서 무시무시한 댓글들을 볼 수 있었습니다.
먼저 이 스레드에 불을 지른 댓글
/** * For the brave souls who get this far: You are the chosen ones, * the valiant knights of programming who toil away, without rest, * fixing our most awful code. To you, true saviors, kings of men, * I say this: never gonna give you up, never gonna let you down, * never gonna run around and desert you. Never gonna make you cry, * never gonna say goodbye. Never gonna tell a lie and hurt you. */
.... -_-;;; 뭐... 이정도면 양호한 편이네요. 좀 더 다른 댓글을 보면....
Exception up = new Exception("Something is really wrong."); throw up; //ha ha
.... 이건 실제로 블랙햇 2012 때, 마이크로소프트 보안팀에 있다가 일 그만두고 NDA 풀린 뒤, 발표했던 사람이 얘기 했던 것과 유사한데요. 그 발표자도 했던 말이 마이크로소프트 자체에서 제품 라이프 사이클이 굉장히 잘 구축되어 있어도 버그가 나타나는 이유가 소스 코드가 너무 방대 하고 소스 코드의 주석이 막 "Something wrong here" 이런식으로 되어 있었다고 하네요... -_-;;
다른 코멘트를 더 보면 ...
// Magic. Do not touch.
-_-;;
그리고 저에게 코딩 인생을 흔들어 놓았던 코멘트는 ...
#define TRUE FALSE //Happy debugging suckers
-_-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
실제로 저도 예전에 공동 작업하다가 저는 잘 되는데 딱 한 사람만 동작을 안해서 몇일을 삽질 한 끝에 그 사람이 공유 라이브러리의 상수를 수정한 것을 확인하고 밤잠을 설친적이 있었습니다..
이와 유사하게 ...
#define NULL (::rand() % 2)
ㅠㅠ 무슨 원한이 있길래 그러는거야 .... 말로 하자... 흑흑
/** * Always returns true. */ public boolean isAvailable() { return false;
}
-_-;;;;; "comments don't run !!!!"
#Christmas tree initializer toConnect = [] toRead = [ ] toWrite = [ ] primes = [ ] responses = {}
remaining = {}
## Safety pig has arrived! text = h(text) ## _ ## _._ _..._ .-', _.._(`)) ## '-. ` ' /-._.-' ',/ ## ) \ '. ## / _ _ | \ ## | a a / | ## \ .-. ; ## '-('' ).-' ,' ; ## '-; | .' ## \ \ / ## | 7 .__ _.-\ \ ## | | | ``/ /` / ## /,_| | /,_/ / ## /,_/ '`-'
매마른 감수성을 채워줄 그림도 그려주고 ...
컴퓨터 프로그래밍 주석은 아니지만 이 모든일의 원조격이 되는건 역시 삐에르 드 뻬르마 ㅡㅡ;
(...)
I have discovered a truly marvellous proof of this, which this margin is too narrow to contain.
더 많은 내용을 보고 싶으신 분들은 http://stackoverflow.com/questions/184618/what-is-the-best-comment-in-source-code-you-have-ever-encountered?page=2&tab=votes#tab-top 를 확인해보세요 :) ㅋㅋㅋ