亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

你在源代碼中遇到的最好的評論是什么?

你在源代碼中遇到的最好的評論是什么?

你在源代碼中遇到的最好的評論是什么?你在源代碼中遇到的最好的評論是什么?
查看完整描述

3 回答

?
慕無忌1623718

TA貢獻1744條經驗 獲得超4個贊

我對此感到特別內疚,在我的大多數項目中嵌入了非建設性的評論、代碼詩和一些小笑話(盡管我通常有足夠的理智在發布代碼之前刪除任何直接冒犯的內容)。這里有一個我特別喜歡的,放在一個設計很差的“上帝物體”下面。

/**
* 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.
*/

對不起!我只是忍不住…!

另一種,我承認我并沒有真正放生到野外,盡管我是非常我很想在我的一個不那么直觀的類中這樣做:

// 
// Dear maintainer:
// 
// Once you are done trying to 'optimize' this routine,
// and have realized what a terrible mistake that was,
// please increment the following counter as a warning
// to the next guy:
// 
// total_hours_wasted_here = 42
//


查看完整回答
反對 回復 2019-07-02
?
Smart貓小萌

TA貢獻1911條經驗 獲得超7個贊

Exception up = new Exception("Something is really wrong.");
throw up;  //ha ha


查看完整回答
反對 回復 2019-07-02
?
慕哥6287543

TA貢獻1831條經驗 獲得超10個贊

//When I wrote this, only God and I understood what I was doing
//Now, God only knows


查看完整回答
反對 回復 2019-07-02
  • 3 回答
  • 0 關注
  • 563 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號