Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

What's your favourite quote about programming?

One quote per answer, and please check for duplicates before posting!

share
comments disabled on deleted / locked posts

locked by Yannis Rizos Sep 14 '12 at 17:07

This question exists because it has historical significance, but it is not considered a good, on-topic question for this site, so please do not use it as evidence that you can ask similar questions here. This question and its answers are frozen and cannot be changed. More info: help center.

closed as not constructive by Walter, ChrisF Feb 7 '11 at 13:10

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

166 Answers

up vote 232 down vote
+100

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 W. Kernighan

share
6  
A corolloary of an otherwise true maxim: Don't forget that a diagram can increase your brain power. You can swap out "remember structure of big thing" to nonvolatile paper. –  Tim Williscroft Oct 25 '10 at 0:49
1  
I love the quote but the implication is that we should at most put 50% of our effort into coding in the first place. –  Jon Hopkins Nov 12 '10 at 9:55
4  
I think the implication is that you should avoid that programmer's urge to use the 'clever' way to do something when the slightly longer, more obvious way of doing something works just fine. –  Fishtoaster Nov 12 '10 at 17:48
2  
But what if it's "perfect" code? There's no way to "debug" that. –  muntoo Dec 12 '10 at 4:34
show 1 more comment

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

— Edward V Berard

share
4  
+1. Printed that one out for the office notice board –  billy.bob Oct 8 '10 at 11:38
1  
+1 This one is now our departmental motto. –  Reallyethical Oct 24 '10 at 13:44
show 2 more comments

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

share
72  
Brain stack overflow. –  Nathan Taylor Sep 2 '10 at 1:45
3  
@Joe D: I'm curious how you'd rewrite a recursive English sentence into a single non-recursive sentence. –  Jon Purdy Sep 22 '10 at 4:08
4  
It may converge for sufficient small values of "longer" –  mouviciel Sep 22 '10 at 18:02
3  
+1 - I'm proud to count myself among the top billion programmers along with Douglas Hofstadter. –  Peter Turner Oct 11 '10 at 16:09
show 3 more comments

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

— Rick Osborne

share
12  
it seems I keep ending up maintaining code that I wish I knew where the creator lived, but its probably a good thing I don't. –  WalterJ89 Sep 10 '10 at 7:00
8  
@webbiedave You work on ReiserFS? :) –  Neil Aitken Nov 1 '10 at 15:08
show 3 more comments

You can have the project:

  • Done On Time
  • Done On Budget
  • Done Properly

Pick two.

— Unknown

share
22  
5  
Reminds me of a similar triangle, but with women. "You can have a girlfriend that: Is smart, is attractive, has a good personality." –  Maxpm Dec 16 '10 at 4:59
5  
@Maxpm: The version I heard was "The 4 S's: Smart, Sexy, Sane, Single. Pick 3." –  Mason Wheeler Jan 20 '11 at 18:27
1  
So, when there are no constraints on time and budget you cannot do it properly. Good to know. –  Antsan Jan 20 '11 at 20:22
show 4 more comments

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

— Jamie Zawinski

share
5  
A timeless classic –  Factor Mystic Sep 8 '10 at 23:52
5  
Some people, when confronted with a problem, think "I know, I'll use <some problem solving implementation>." Now they have two problems. –  Callum Rogers Sep 22 '10 at 18:58
40  
Some people when confronted with a problem don't think, they just post on StackOverflow –  Matt Ellen Oct 11 '10 at 8:16
5  
Some people don't understand regular expressions, and hate them because others do. –  Orbling Dec 16 '10 at 17:14
3  
@Yar - I've never found the syntax obtuse personally, and the density is a good thing. Why express something like a pattern match in a more verbose format? Where clarity is required for something complicated, the extended mode can be used with comments. –  Orbling Dec 26 '10 at 3:59
show 3 more comments

In theory, there is no difference between theory and practice. But, in practice, there is.

— Jan L. A. van de Snepscheut

share
27  
I've also heard "The difference between theory and practice is smaller in theory than in practice." –  Roger Pate Sep 10 '10 at 17:02
1  
Roger Pate's formulation is the one I heard, written by Olin Shivers in "History of T". Paul Graham talks about it here: paulgraham.com/thist.html –  khedron Oct 11 '10 at 18:45
2  
I'd say if a theory doesn't translate to practice, then the theory is simply incomplete. –  Rei Miyasaka Dec 28 '10 at 1:35
show 1 more comment

You can use an eraser on the drafting table or a sledgehammer on the construction site - Frank Lloyd Wright

Not exactly a programming quote but it most certainly applies.

share
14  
Highly applicable IMO –  John MacIntyre Sep 9 '10 at 1:06
3  
Luckily for us when most software goes wrong it doesn't collapse and kill people. –  Neil Aitken Sep 29 '10 at 10:58
8  
Except when it blows up an Ariane 5 (Flight 501), or doses people with lethally high levels of radiation... –  Frank Shearar Oct 2 '10 at 19:58
2  
Ironically, I believe many of Frank Lloyd Wright's more convoluted buildings have fallen into disrepair. –  Maxpm Dec 16 '10 at 5:03
1  
@TomWij, @Walter, @Roger: Please refrain from dirtying this site with your metatalk. If I wanted to hear bickering, I would visit meta.stackoverflow.com. This is where you should be having this fascinating and timeless conversation. –  Yar Dec 26 '10 at 0:49
show 17 more comments

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.

— Rick Cook

share
add comment

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

share
2  
-- Bill Gates (softwarequotes.com/printableshowquotes.aspx?id=579) –  Bill Karwin Sep 9 '10 at 18:04
3  
This is true on multiple levels. A gem. –  user1249 Oct 10 '10 at 19:21
3  
The key difference being, of course, that the aircraft's final weight is known while the software's final LOC count is unknown. –  mmyers Oct 28 '10 at 15:40
5  
So why do most Microsoft products give me this feeling that I'm chained by my foot to an airplane that is struggling to get off the runway? –  Sharpie Jan 9 '11 at 0:10
add comment

There are 2 hard problems in computer science: cache invalidation, naming things, and off-by-1 errors.

    — Leon Bambrick (@secretGeek)

(Actually, everything from http://q4td.blogspot.com/search/label/programming seeing as I curate the list.)

share
show 4 more comments

Nine people can't make a baby in a month.
  — Fred Brooks, The Mythical Man-Month

share
14  
technically: 18 people can't make a baby in a month –  Here Be Wolves Sep 27 '10 at 19:45
13  
@HereBeWolves or 10 –  WalterJ89 Oct 7 '10 at 16:39
14  
What's wrong with 1 guy and 8 ladies? Sounds just about right to me. –  Roger Pate Oct 10 '10 at 3:40
4  
If we go for twins or triplets we need fewer ladies. –  user1249 Oct 21 '10 at 6:37
12  
While the first baby will suffer 9 months latency, proper pipelining will continue to deliver 1 per month... –  Brian Knoblauch Jan 19 '11 at 15:42
show 3 more comments

We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil. Yet we should not pass up our opportunities in that critical 3%.
  — Donald Knuth, Structured Programming with go to Statements, JACM Computing Surveys, Vol 6, No. 4, Dec. 1974, p.268

This is extracted from the below two paragraphs, which not only say why he comes to the above conclusion, but gives information on how to avoid this mistake:

There is no doubt that the grail of efficiency leads to abuse. Programmers waste enormous amounts of time thinking about, or worrying about, the speed of noncritical parts of their programs, and these attempts at efficiency actually have a strong negative impact when debugging and maintenance are considered. We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil.

Yet we should not pass up our opportunities in that critical 3%. A good programmer will not be lulled into complacency by such reasoning, he will be wise to look carefully at the critical code; but only after that code has been identified. It is often a mistake to make a priori judgments about what parts of a program are really critical, since the universal experience of programmers who have been using measurement tools has been that their intuitive guesses fail. (…)

share
2  
@Roger Pate: I suspect you're right, most people don't realize there is more to the quote. –  Scott Dorman Sep 9 '10 at 14:01
27  
+1 for posting the whole thing. –  Mason Wheeler Sep 9 '10 at 23:41
5  
Hope you don't mind that I included a bit more. I think it's really important and maybe this will encourage more to read the full paper. :) –  Roger Pate Sep 10 '10 at 17:36
5  
+1 Thanks for the full quote. I never know there was more to it. –  Evan Plaice Sep 11 '10 at 9:10
2  
It's great that you posted the entire quote. A lot of people just know the sort version and have no idea what Knuth actually meant by that. –  DasIch Dec 26 '10 at 1:15
show 2 more comments

Debuggers don't remove bugs. They only show them in slow motion.

— Unknown

share
35  
Or in many cases, make them stop appearing entirely. –  Graeme Perrow Sep 27 '10 at 14:44
12  
@Graeme those cases are called Heisenbugs :) –  Here Be Wolves Sep 27 '10 at 19:40
add comment

The first 90% of the code accounts for the first 90% of the development time. The remaining 10% of the code accounts for the other 90% of the development time.

Tom Cargill

share
10  
I think you'll find that 90% of the code takes 90% of the time, and the last 10% of the code takes the other 90% of the time. –  FacticiusVir Sep 9 '10 at 1:14
2  
Tom Cargill of Bell Labs: en.wikipedia.org/wiki/Ninety-ninety_rule –  Bill Karwin Sep 9 '10 at 2:46
1  
I know this: 20% mates drink 80% beer. –  Zzz Oct 1 '10 at 21:41
1  
Personally, I'd say that the first 90% of the code accounts for the first 90% of the development time. Then, the remaining 90% of the code accounts for the other 90% of the development time. –  Kaz Dragon Oct 21 '10 at 8:58
show 4 more comments

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

share
22  
funny, just made me think of php. –  WalterJ89 Oct 7 '10 at 16:40
2  
@WalterJ89: Worry not! Up until PHP 5.3, PHP is refcounted. –  zneak Oct 10 '10 at 23:17
show 2 more comments

Computer Science is no more about computers than astronomy is about telescopes

— Edsger Dijkstra

share
4  
Yes, but this is supposed to be about programming, not computer science. [sly grin] –  Mark C Oct 11 '10 at 17:21
show 2 more comments

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

share
24  
That's why I like to refer to my job as enbugging. –  deceze Sep 13 '10 at 2:02
9  
And maintenance as rebugging? –  Joe D Oct 8 '10 at 22:41
1  
@JoeD No, "bugwatching". –  Mark C Oct 11 '10 at 17:22
add comment

There are only two kinds of languages: the ones people complain about and the ones nobody uses

— Bjarne Stroustrup

share
15  
bad excuse for C++ suckage –  hasenj Nov 12 '10 at 10:17
3  
C# is an obvious counter-example. –  Timwi Dec 26 '10 at 12:46
7  
And VB falls into both categories. –  Quick Joe Smith Jan 20 '11 at 12:09
add comment

The best thing about a boolean is even if you are wrong, you are only off by a bit. - (Anonymous)

share
show 1 more comment

On two occasions I have been asked, "Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?" In one case a member of the Upper, and in the other a member of the Lower House put this question. I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question.
  — Charles Babbage

Arguably the first documented case of a programmer encountering stupid user questions.

share
5  
Sounds like a T-Shirt idea! "User Error: Fouling things up since 1832". (Date?) –  Mark C Sep 28 '10 at 12:48
add comment

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

share
add comment

It's all talk until the code runs.
  — Ward Cunningham

share
add comment

Unicode support is not a “feature”. It is expected behaviour.

Granted, it is very specific, but it is my favourite because obsolete character sets are just too widely used still...

share
3  
Now you just have to argue about which unicode –  Martin Beckett Dec 26 '10 at 2:18
show 2 more comments

Commenting your code is like cleaning your bathroom - you never want to do it, but it really does create a more pleasant experience for you and your guests.

— Ryan Campbell

share
1  
Meh...Most comments I've encountered in my life are written under the assumption that comments can make up for poorly written code.. –  Stargazer712 Oct 14 '10 at 20:53
2  
I enjoy writing comments too, but you wouldn’t want to see my bathroom. –  Timwi Dec 26 '10 at 12:48
show 3 more comments

The fool wonders, the wise man asks.
  — Benjamin Disraeli

share
show 2 more comments

Programming is like sex: one mistake and you have to support it for the rest of your life.
  — Michael Sinz

share
add comment

Il semble que la perfection soit atteinte non quand il n'y a plus rien à ajouter, mais quand il n'y a plus rien à retrancher.
  — Antoine de Saint-Exupéry, French writer (1900-1944), Terre des Hommes (1939)

(It would seem that perfection is attained not when there is nothing left to add, but when there is nothing left to take away.)

share
2  
Perfection Is –  David Kendal Jan 19 '11 at 1:43
2  
@David Kendal: Nice! Similarly, Henry David Thoreau said, "Simplify, Simplify." Which always makes me think, "Simplify." –  Bill Karwin Jan 27 '11 at 21:37
show 1 more comment

Java is to JavaScript as car is to carpet.
  — Chris Heilmann

share
1  
@Keyo: Yeah, I thought of that take on it. I still think the quote is really clever. –  Bill Karwin Dec 10 '10 at 4:00
show 1 more comment

As formulated by Eric S. Raymond:

Linus's Law

Given a large enough beta-tester and co-developer base, almost every problem will be characterized quickly and the fix obvious to someone.

Or, less formally,

Given enough eyeballs, all bugs are shallow.

share
show 3 more comments

Not the answer you're looking for? Browse other questions tagged or ask your own question.