We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil.

我们应忽略掉无关紧要的效率提升,在 97% 的情况下:过早优化是万恶之源。

Walking on water and developing software from a specification are easy if both are frozen.


Hofstadter’s Law: It always takes longer than you expect, even when you take into account Hofstadter’s Law.


Some people, when confronted with a problem, think “I know, I’ll use regular expressions.” Now they have two problems.

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.


Measuring programming progress by lines of code is like measuring aircraft building progress by weight.


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.

PHP是无能的业余爱好者创造出来的低级恶魔,而 Perl 是技艺娴熟的专家精心炮制的,潜伏着的超级恶魔。

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.”


Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.


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.


I don’t care if it works on your machine! We are not shipping your machine!


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.


A computer lets you make more mistakes faster than any other invention in human history, with the possible exceptions of handguns and tequila.


If debugging is the process of removing software bugs, then programming must be the process of putting them in.

如果把调试定义为铲除软件 BUG 的过程,那么编程就可以被定义为引入 BUG 的过程。

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.

有过 BASIC 开发经验的学生几乎不可能学会好的编程风格。作为潜在的程序员,他们大脑所受的伤害完全超出了重建的可能性。

Perl – The only language that looks the same before and after RSA encryption.

Perl – 仅有的一种用 RSA 加密前和加密后看起来差不多的编程语言。

I love deadlines. I like the whooshing sound they make as they fly by.


Saying that Java is good because it works on all platforms is like saying anal sex is good because it works on all genders

说 Java 好只因为它能适应所有平台,就好比说肛交好只因为它能适应所有性别。

XML is like violence – if it doesn’t solve your problems, you are not using enough of it.

XML 就像暴力 — 如果它解决不了你的问题,就是因为你使用得不够。

Einstein argued that there must be simplified explanations of nature, because God is not capricious or arbitrary. No such faith comforts the software engineer.


And then it occurred to me that a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are, in short, a perfect match.


Version 1 of any software is full of bugs. Version 2 fixes all the bugs and is great. Version 3 adds all the things users ask for, but hides all the great stuff in Version 2.

所有软件的第 1 个版本都满是 bug;第 2 个版本修复了所有的 bug,很好很强大;第 3 个版本加入了用户要求的所有特性,却不见第 2 个版本的所有优点。

If Java had true garbage collection, most programs would delete themselves upon execution.

如果 Java 有真正的垃圾清理,大多数的程序在运行的时候都会把自己清理掉。

You should name a variable using the same care with which you name a first-born child.


Optimism is an occupational hazard of programming: feedback is the treatment.


comments powered by Disqus

全面使用 UTF-8


GNU make 自动依赖生成

翻译 教程