好技術|好文章|好福利
String result; ...... return result.toString();這種算嗎?你們盡情吐槽吧
Cyandev 的分 享
if (m_doc->isModified() == true) { for (int i = 0; i < 100; i++) { save(); //Save the document for 100 times to ensure it has been saved successfully. } }
不知誰寫的,總之我都看哭了。
php
侯傑 的分享
enum FiveLine { Gold, Wood, Water, Fire, Earth, };看枚舉名字不知道五行(hang)是什麼鬼,看了枚舉內容恍然大悟,原來是五行(xing)……
李旭東 的吐槽程序員
<div class="div1"> <div class="div2"> <div class="div3"> </div> <div class="div4"></div> </div> </div>
……… <div class="div27"> <div class="div28"> </div> </div> ………… <div class="div396"> <div class="div397"></div> </div> ………… <div class="giveMeAFuckingClassName"> </div>
白砂糖 的分享
// 如下全部left表明右 // 如下全部right表明左
Kun Andy 的分享正則表達式
public enum ColorType { Green, // 綠色 Hong, // 紅色 } //...... this.curColortype= ColorType.Hong; ......
毫無違和感!英語和漢語的激烈碰撞,一時愣是沒讀懂代碼,「Hong」爲什麼物,你看註釋才恍然大悟!犀利
ide
多是綠的拼音(lv) 有點像等級,因此爲了防止歧義,用了Green!贊一個!函數
程序員很可愛,我愛程序猿你們庭!性能
這些蘊含智慧的代碼是禮物也是驚喜!ui
能夠幫你拉這麼多zan!感謝!this
真愛身邊的程序員!spa
愛他們線程
孫傳武 的分享
有次看一項目源碼,註釋裏有個warning。
// warning: Do not make any changes here. // I got confused why it can run successfully. // PLEASE Do not make any changes before you figure it out.
紳士提督不笑船 的分享
變量名
class UplaodDuiLie // 上傳隊列 // Uplaod 非手誤,徹底原文。 // 爲何大家只吐槽 typo 而不吐槽中英文混合呢。。
myd7349 的分享
從長度上來講,完爆樓上各位的。感覺下:
if(m_Str2.Find("'")>=0) { AfxMessageBox("您輸入的包含非法字符"); m_Str2=""; UpdateData(FALSE); return; } if(m_Str2.Find(':')>=0) { AfxMessageBox("您輸入的包含非法字符"); m_Str2=""; UpdateData(FALSE); return; } if(m_Str2.Find('/')>=0) { AfxMessageBox("您輸入的包含非法字符"); m_Str2=""; UpdateData(FALSE); return; } if(m_Str2.Find('!')>=0) { AfxMessageBox("您輸入的包含非法字符"); m_Str2=""; UpdateData(FALSE); return; } if(m_Str2.Find('@')>=0) { AfxMessageBox("您輸入的包含非法字符"); m_Str2=""; UpdateData(FALSE); return; } if(m_Str2.Find('#')>=0) { AfxMessageBox("您輸入的包含非法字符"); m_Str2=""; UpdateData(FALSE); return; } if(m_Str2.Find('$')>=0) { AfxMessageBox("您輸入的包含非法字符"); m_Str2=""; UpdateData(FALSE); return; } if(m_Str2.Find('%')>=0) { AfxMessageBox("您輸入的包含非法字符"); m_Str2=""; UpdateData(FALSE); return; } if(m_Str2.Find('&')>=0) { AfxMessageBox("您輸入的包含非法字符"); m_Str2=""; UpdateData(FALSE); return; } if(m_Str2.Find('^')>=0) { AfxMessageBox("您輸入的包含非法字符"); m_Str2=""; UpdateData(FALSE); return; } if(m_Str2.Find('*')>=0) { AfxMessageBox("您輸入的包含非法字符"); m_Str2=""; UpdateData(FALSE); return; } if(m_Str2.Find('(')>=0) { AfxMessageBox("您輸入的包含非法字符"); m_Str2=""; UpdateData(FALSE); return; } if(m_Str2.Find(')')>=0) { AfxMessageBox("您輸入的包含非法字符"); m_Str2=""; UpdateData(FALSE); return; } if(m_Str2.Find('/')>=0) { AfxMessageBox("您輸入的包含非法字符"); m_Str2=""; UpdateData(FALSE); return; } if(m_Str2.Find('|')>=0) { AfxMessageBox("您輸入的包含非法字符"); m_Str2=""; UpdateData(FALSE); return; } if(m_Str2.Find(':')>=0) { AfxMessageBox("您輸入的包含非法字符"); m_Str2=""; UpdateData(FALSE); return; } if(m_Str2.Find('[')>=0) { AfxMessageBox("您輸入的包含非法字符"); m_Str2=""; UpdateData(FALSE); return; } if(m_Str2.Find(']')>=0) { AfxMessageBox("您輸入的包含非法字符"); m_Str2=""; UpdateData(FALSE); return; } if(m_Str2.Find('{')>=0) { AfxMessageBox("您輸入的包含非法字符"); m_Str2=""; UpdateData(FALSE); return; } if(m_Str2.Find('}')>=0) { AfxMessageBox("您輸入的包含非法字符"); m_Str2=""; UpdateData(FALSE); return; }
哪怕不知道正則表達式,也該知道 FindOneOf 啊?!就是再不濟,也寫個循環吧。謹遵 DRY 原則的程序員看到這段代碼受到了 1024 Kg 的傷害。
固然,還有什麼:一個線程回調函數函數寫了 700 多行的事情咱就不說了。
一個小小的項目專門定義了名叫 Global.h/cpp 的文件來放置全局變量咱也不說了。一個小小的項目中一二百個全局變量咱也不說了,這些全局變量中大部分仍是指針變量咱也甭說了!!!
我去哭一會去。
青苔 的分享
看見這段代碼的時候,我拍了好久的掌……
虎耳 的吐槽
曾經在一個家公司,有一次有人發現對每一個請求,有個地方都會空等了一秒。
後來問老大,他說若是客戶有新要求,隨時能夠把性能提升一倍以上。
【END】