下面的這些經典的引言來自英文,也許有些我翻譯的是不很好,所以,我提供了中英對照,如果有問題,請大家指正。
過早的優化是萬惡之源。Premature optimization is the root of all evil!
- Donald Knuth
在水里行走和以一個需求規格進行軟件開發,有一點是相同的,那就是如果水或需求都被凍住不
了,那么行走和軟件開發都會變得容易。Walking on water and developing software from a
specification are easy if both are frozen
- Edward V Berard
Hofstadter 定理:“一件事情總是會花費比你預期更多的時間,就算是你已經考慮過本條Hofstadter 定理”。It always takes longer than you expect, even when you take into account Hofstadter’s Law.
- Hofstadter’s Law
有些遇到問題的人總是會說“我知道,我會使用正則表達式”,那么,你現在有兩個問題了。(意思是:你本想用正則表達式來解決你已有問題,但實際上你
又引入了“正則表達式”的一個新問題)Some people, when confronted with a problem, think “I
know, I’ll use regular expressions.” Now they have two problems
- Jamie Zawinski
調試程序的難度是寫代碼的兩倍。因此,只要你的代碼寫的盡可能的清楚,那么你在調試代碼時就不需要那么地有技巧。Debugging is
twice as hard as writing the code in the first place. Therefore, if you
write the code as cleverly as possible, you are, by definition, not
smart enough to debug it.
- Brian Kernighan
用代碼行來衡量開發進度,無異于用重量來衡量制造飛機的進度。Measuring programming progress by lines
of code is like measuring aircraft building progress by weight.
- Bill Gates
PHP被一些不合格的業余人員造就成了一個小惡魔;而Perl則是被一些熟練的但不正當的專業人員造就成了一個超級大惡魔。PHP is a
minor evil perpetrated and created by incompetent amateurs, whereas Perl
is a great and insidious evil, perpetrated by skilled but perverted
professionals.
- Jon Ribbens
在兩個場合我被問到:“請你告訴我,如果你給機器輸入了錯誤的數字,那么,是否還能得到正確的答案?”我并不能正確領會這類想法。(注意,本引言的
作者姓Babbage,這個名字和神父同名,意思是,作者在反問提問的人,你是問我還是向神父祈禱?)On two occasions I have
been asked, ‘Pray, Mr. Babbage, if you put into the machine wrong
figures, will the right answers come out?’ I am not able rightly to
apprehend the kind of confusion of ideas that could provoke such a
question.”
- Charles Babbage
在編程的時候,我們一定要想像一下,以后維護我們自己的代碼的那個人會成為一個有暴力傾向的瘋子,并且,他還知道我們住在哪里?Always
code as if the guy who ends up maintaining your code will be a violent
psychopath who knows where you live.
- Rick Osborne
現代的編程是“程序員努力建一個更大更傻的程序”和“世界正在嘗試創造更多更傻的人”之間的一種競賽,目前為止,后者是贏家。
Programming today is a race between software engineers striving to build
bigger and better idiot-proof programs, and the Universe trying to
produce bigger and better idiots. So far, the Universe is winning.
- Rich Cook
我才不關于我的代碼是否能在你的機器上工作!我們不會給你提供機器。I don’t care if it works on your machine! We are not shipping your machine!
- Ovidiu Platon
我總是希望我的電腦能夠像電話一樣容易使用;我的這個希望正在變成現實,因為我現在已經不知道怎么去使用我的電話了。I have always
wished for my computer to be as easy to use as my telephone; my wish has
come true because I can no longer figure out how to use my telephone.
- Bjarne Stroustrup
計算機是一種在人類歷史上所有發明中,可以讓你比以前更快地犯更多的錯誤的發明,同樣,其也包括了“手槍”和“龍舌蘭酒”這兩種發明的缺陷。A
computer lets you make more mistakes faster than any other invention in
human history, with the possible exceptions of handguns and tequila.
- Mitch Ratcliffe
如果調試程序是一種標準的可以鏟除BUG的流程,那么,編程就是把他們放進來的流程。If debugging is the process
of removing software bugs, then programming must be the process of
putting them in.
- E. W. Dijkstra
教一群被BASIC先入為主的學生,什么是好的編程風格簡直是一件不可能的事。對于一些有潛力的程序員,他們所受到的智力上的傷害遠遠超過了重建他
們的信心。It is practically impossible to teach good programming style to
students that have had prior exposure to BASIC. As potential
programmers, they are mentally mutilated beyond hope of regeneration.
- E. W. Dijkstra
理論上來說,理論和實際是一樣的。但實際上來說,他們則不是。In theory, theory and practice are the same. In practice, they’re not.
- Unknown
只有兩個事情是無窮盡的:宇宙和人類的愚蠢。當然,我現在還不能確定宇宙是無窮盡的。Two things are infinite: the
universe and human stupidity; and I’m not sure about the universe.
- Albert Einstein
Perl這種語言就好像是被RSA加密算法加密過的一樣。Perl – The only language that looks the same before and after RSA encryption.
- Keith Bostic
我愛“最終期限”,我喜歡“嗖嗖嗖”的聲音就像他們在飛一樣。I love deadlines. I like the whooshing sound they make as they fly by.
- Douglas Adams
說Java好的是因為它跨平臺就像好像說肛交好是因為其可以適用于一切性別。Saying that Java is good because
it works on all platforms is like saying anal sex is good because it
works on all genders
- Unknown
XML就像是一種強暴——如果它不能解決你的問題,那只能說明你沒有用好它。XML is like violence – if it doesn’t solve your problems, you are not using enough of it.
- Unknown
愛因期坦說,自然界中的一切一定會有一個簡單的解釋,因為上帝并不是反復無常和獨裁的。當然,不會有什么信仰能程序員像愛因期坦那樣感到舒服。
Einstein argued that there must be simplified explanations of nature,
because God is not capricious or arbitrary. No such faith comforts the
software engineer.
- Fred Brooks