你遇到过的源代码中最好的注释是什么?


当前回答

伟大的一个泄露的Windows 2000源代码:

! !如果你把制表符换成空格,你会被杀死!!!!!!!* !!!!!!!!!!!!!!这样做会破坏构建 过程 !!!!!!!!!!!!!!!!* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

http://www.kuro5hin.org/story/2004/2/15/71552/7795

其他回答

  rescue
    # silently, we fail
    # many validations fade
    # like tear drops in rain
  end

这只是众多案例中的一个……

def format_ticket_content(text, recursive = true)
  if text.is_a?(TicketNote)
    note = text
    text = note.content
  else
    note = nil
  end

  ## Safety pig has arrived!
  text = h(text)
  ##                               _
  ##  _._ _..._ .-',     _.._(`))
  ## '-. `     '  /-._.-'    ',/
  ##    )         \            '.
  ##   / _    _    |             \
  ##  |  a    a    /              |
  ##  \   .-.                     ;  
  ##   '-('' ).-'       ,'       ;
  ##      '-;           |      .'
  ##         \           \    /
  ##         | 7  .__  _.-\   \
  ##         | |  |  ``/  /`  /
  ##        /,_|  |   /,_/   /
  ##           /,_/      '`-'
  ## 
/**
 * Not even your mum thinks you're special if you call this method
 */    
onlyYourMumThinksYoureSpecialIfYouCallThisMethod() {...}
// Replaces with spaces the braces in cases where braces in places cause stasis 
   $str = str_replace(array("\{","\}")," ",$str);
// (c) 2000 Applied Magic, Inc.
// Unauthorized use punishable by torture, mutilation, and vivisection.

啊,我一直很喜欢这个……