What's your favourite quote about programming?
One quote per answer, and please check for duplicates before posting!
What's your favourite quote about programming?
One quote per answer, and please check for duplicates before posting!
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
Walking on water and developing software from a specification are easy if both are frozen.
— Edward V Berard
It always takes longer than you expect, even when you take into account Hofstadter's Law.
— Hofstadter's Law
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.
— Rick Osborne
You can have the project:
- Done On Time
- Done On Budget
- Done Properly
Pick two.
— Unknown
Some people, when confronted with a problem, think "I know, I'll use regular expressions."
Now they have two problems.
— Jamie Zawinski
In theory, there is no difference between theory and practice. But, in practice, there is.
— Jan L. A. van de Snepscheut
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.
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
Measuring programming progress by lines of code is like measuring aircraft building progress by weight.
— Bill Gates
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.)
Nine people can't make a baby in a month.
— Fred Brooks, The Mythical Man-Month
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. (…)
Debuggers don't remove bugs. They only show them in slow motion.
— Unknown
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.
If Java had true garbage collection, most programs would delete themselves upon execution.
— Robert Sewell
Computer Science is no more about computers than astronomy is about telescopes
— Edsger Dijkstra
If debugging is the process of removing software bugs, then programming must be the process of putting them in.
— Edsger Dijkstra
There are only two kinds of languages: the ones people complain about and the ones nobody uses
— Bjarne Stroustrup
The best thing about a boolean is even if you are wrong, you are only off by a bit. - (Anonymous)
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.
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
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
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...
The fool wonders, the wise man asks.
— Benjamin Disraeli
Programming is like sex: one mistake and you have to support it for the rest of your life.
— Michael Sinz
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.)
Java is to JavaScript as car is to carpet.
— Chris Heilmann
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.
Should array indices start at 0 or 1? My compromise of 0.5 was rejected without, I thought, proper consideration.
— Stan Kelly-Bootle
There are 10 kinds of people in the world — those who understand binary and those who don't.
Being a good software engineer is 3% talent, 97% not being distracted by the internet.
— Unknown, appropriated
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.
— Bill Bryson
If you want to set off and go develop some grand new thing, you don't need millions of dollars of capitalization. You need enough pizza and Diet Coke to stick in your refrigerator, a cheap PC to work on and the dedication to go through with it.
— John Carmack
Testing can only prove the presence of bugs, not their absence.
— Edsger W. Dijkstra
What's the simplest thing that could possibly work?
— Ward Cunningham
All problems in computer science can be solved by another level of indirection... Except for the problem of too many layers of indirection.
— David Wheeler
I don't care if it works on your machine! We are not shipping your machine!
-- Vidiu Platon (whoever that is)
When all you have is a hammer, everything starts to look like a nail
There are two major products that come out of Berkeley: LSD and UNIX. We don't believe this to be a coincidence.
Jeremy S. Anderson
Good code is its own best documentation. As you're about to add a comment, ask yourself, 'How can I improve the code so that this comment isn't needed?' Improve the code and then document it to make it even clearer.
-Steve McConnell
There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies.
— C.A.R. Hoare
A computer lets you make more mistakes faster than any invention in human history—with the possible exceptions of handguns and tequila.
— Mitch Ratcliffe
A programmer is a device for turning caffeine into code.
(Not original to me, but associated with me through appearances on DotNetRocks etc. Lifted from a Usenet sig, I long ago forgot whose, which was no doubt inspired by Paul Erdos.)
A programmer started to cuss
Because getting to sleep was a fuss
As he lay there in bed
Looping 'round in his head
was:while(!asleep()) sheep++;
Not quite a quote as such, but I little limerick I've always liked.
Source piercings - bash.org/?845468
Beware of bugs in the above code; I have only proved it correct, not tried it.
— Donald Knuth
You wanted a banana but what you got was a gorilla holding the banana and the entire jungle.
— Joe Armstrong on object-oriented programming
Any fool can write code that a computer can understand. Good programmers write code that humans can understand.
Martin Fowler (in his book Refactoring)
Any sufficiently advanced technology is indistinguishable from magic.
-- Arthur C. Clarke
My old answer from SO:
If the code and the comments disagree, then both are probably wrong.
Another good website: "Quotes about Tech Writing"
On the seventh day, God said, "Ship it! We'll release patches later."
— Josh Flachsbart
"For a successful technology, reality must take precedence over public relations, for nature cannot be fooled."
-Richard Feynman (Rogers' Commission Report into the Challenger Crash, Appendix F - Personal Observations on Reliability of Shuttle)
More succinctly:
"You can't lie to the compiler."
-Andrew Stevenson
Software is like sex: it's better when it's free.
— Linus Torvalds
The real question is not whether machines think but whether men do.
— B. F. Skinner
Related more to AI than to simple programming, but I still like it.
The difficulty of a bug can be measured as the distance, in lines of code, from the cause of a bug to the visible symptom of a bug.
If you want me to give you a two-hour presentation, I am ready today. If you want only a five-minute speech, it will take me two weeks to prepare.
— Mark Twain
The shortest version:
If I had more time, I would have written a shorter letter.
— Marcus T. Cicero
The near-perfectionist's version:
You know that I write slowly. This is chiefly because I am never satisfied until I have said as much as possible in a few words, and writing briefly takes far more time than writing at length.
— Karl Friedrich Gauss
Several more discuss this concept from various angles.
Crockford is the sole user of the super-strict equality operator (====), which either returns true or kicks you in the balls.
Not really a programming quote, more of an IT one, but one that my A-Level IT teacher drummed into me aged 16:
Typing is no substitute for Thinking
A good algorithm is like a sharp knife - it does exactly what it is supposed to do with a minimum amount of applied effort. Using the wrong algorithm to solve a problem is trying to cut a steak with a screwdriver: you may eventually get a digestible result, but you will expend considerable more effort than necessary, and the result is unlikely to be aesthetically pleasing.
Open source is free only if your time costs nothing
Heard it from a guy I worked with. Don't know who came up with this.
A normal person believes a kilobyte is 1000 bytes, a coder believes a kilometer is 1024 meters.
-Unknown
It should be noted that no ethically-trained software engineer would ever consent to write a DestroyBaghdad procedure. Basic professional ethics would instead require him to write a DestroyCity procedure, to which Baghdad could be given as a parameter.
Nathaniel Borenstein
Computers are useless. They can only give you answers.
— Pablo Picasso
A few months writing code can save you a few hours in design.
Which is modified from:
A few months in the laboratory can save you a few hours in the library.
Be nice to nerds. Chances are you'll end up working for one. - Bill Gates
The problem with quick and dirty...is that dirty remains long after quick has been forgotten. - Steve C McConnell
My site SoftwareQuotes.com is full of quotations about programming and software development.
Why fix an old bug if you can write three new ones in the same time?
— David Kastrup
Real Programmers don't comment their code. If it was hard to write, it should be hard to understand.
— Tom Van Vleck
Anyone attempting to produce random numbers by purely arithmetic means is, of course, in a state of sin.
— John von Neumann
Those who try to build idiot-proof systems always underestimate the persistence and ingenuity of idiots.
— Anon
Quoting Kent Beck:
Make It Work
Make It Right
Make It Fast
One accurate measurement is worth more than a thousand expert opinions.
Admiral Grace Hopper
... one of the main causes of the fall of the Roman Empire was that, lacking zero, they had no way to indicate successful termination of their C programs.
-- Robert Firth
Every time I ask developers why their shiny new C# .NET version isn't nearly as fast and smooth as the old C/C++ version, I'm thinking of:
The most amazing achievement of the computer software industry is its continuing cancellation of the steady and staggering gains made by the computer hardware industry.
— Henry Petroski
But they just tell me to shut up while they plaster on yet another level of abstraction...
Programming is one of the most difficult branches of applied mathematics; the poorer mathematicians had better remain pure mathematicians
— Edsger W. Dijkstra
"The complexity you remove can never fail" -- Burt Rutan on the Ansari X Prize
I am one of those culprits who created the problem. I used to write those programs back in the '60s and '70s, and was so proud of the fact that I was able to squeeze a few elements of space by not having to put '19' before the year.
-- Alan Greenspan, former Federal Reserve chair
How do we convince people that in programming simplicity and clarity—in short: what mathematicians call "elegance"—are not a dispensable luxury, but a crucial matter that decides between success and failure?
A beautiful program is like a beautiful theorem: It does the job elegantly. It has a simple and perspicuous structure; people say, “Oh, yes. I see that’s the way to do it.”
-- Butler Lampson
Not really about programming, but...
You can't wait for inspiration. You have to go after it with a club.
— Jack London
It's not about programming per se, but by a famous programmer:
The best way to predict the future is to invent it.
— Alan Kay
Which is usually a good thing to remind myself to get moving and do things.
Kurzfristige Hacks tendieren dazu, langfristige Lösungen zu werden.
— Bodo Tasche
Translated: Current hacks tend to be long-term solutions.
Make everything as simple as possible, but not simpler.
-- Albert Einstein (for me, via Scott Myers). Emphasis added.
"It worked on MY computer!" -anon
"Programs must be written for people to read, and only incidentally for machines to execute." - Abelson and Sussman, from "The structure and interpretation of computer programs"
A language that doesn't have everything is actually easier to program in than some that do.
— Dennis M. Ritchie
The best code is no code at all
Programmers are optimists by nature, they also have a keen eye for the downside. A hyperactive imagination for disaster scenarios is a professional asset; they have to think through everything that can go wrong in order to practice their craft.
-- Scott Rosenberg
Plans are worthless, but planning is everything.
— Dwight D. Eisenhower
My favourites have already been posted, so here's something I thought of one day at work:
In Soviet Russia, exception throws YOU!!
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, "No Silver Bullet"
From my first programming class (FORTRAN IV):
What is a computer?
It it a box with a little man in it.
This man is blazing fast. He can do millions of instructions per second.
But he is myopic. He's so myopic that he can see only one instruction at a time.
He's also not very smart, he'll attempt to do exactly what you tell him to do.
This has become the base of my philosophy of programming and debugging.
“ Copy and paste is a design error. ” -- David Parnas
If you fail to plan, you plan to fail
-My c# Teacher (not sure where he heard it from!)
Well, not my favorite but...
If it is not broken, don't fix it
Knowledge is proud that it knows so much; wisdom is humble that it knows no more.
--William Cowper
I abhor a system designed for the "user," if that word is a coded pejorative meaning "stupid and unsophisticated."
Ken Thompson
Debugging is like farting — it's not so bad when it's your own code.
I don't understand why cheerleaders won't talk to me. Maybe I don't throw five touchdowns against Newport High, but let's see one of those football morons program in assembly language!
— Chris Lipe
It's OK to figure out murder mysteries, but you shouldn't need to figure out code. You should be able to read it.
-- Steve McConnell
It should be noted that no ethically-trained software engineer would ever consent to write a DestroyBaghdad procedure. Basic professional ethics would instead require him to write a DestroyCity procedure, to which Baghdad could be given as a parameter.
Nathaniel Borenstein
/* You are not expected to understand this. */
Comment in Sixth Edition Unix.
In Hebrew there's a saying (mostly by army conscripted programmers):
באג בדיזיין -> זין בדיבאג
Which is an anagram, and it roughly translates to
Bugs in the design -> you're f^#ked while debugging
Let me re-assert that the question of whether there are limitations in principle of what problems man can make machines solve for him as compared to his own ability to solve problems, really is a technical question in recursive function theory.
— John McCarthy
If it wasn't for the last minute, nothing would get done.
—Supposedly from "Murphy's Laws"; see here
Although I can do plenty of things without any pressure (like post answers here), I need a hint of fear to do what I'm supposed to be doing (like my homework).
In C++ it’s harder to shoot yourself in the foot, but when you do, you blow off your whole leg.
— Bjarne Stroustrup
Being able to get a machine to do what you want is the closest thing we've got in technology to adolescent wish-fulfillment.
— Guy Steele in Coders at Work
What you are asking me to do is like trying to put the toothpaste back in the tube. It doesn't work.
It would seem that perfection is attained not when no more can be added, but when no more can be removed.
Antoine de Saint-Exupery
Vision without action is a daydream. Action without vision is a nightmare.
proverb from japan
to understand recursion you must first understand recursion
A quote on recursion and programming in general I came up with today.
Only fools believe in foolproof systems.
Linux is only free if your time has no value.
Memory is like an orgasm. It's a lot better if you don't have to fake it.
— Seymour Cray on virtual memory
Education: that which reveals to the wise, and conceals from the stupid, the vast limits of their knowledge.
— Mark Twain
I'll call him Mel, because that was his name.
From The story of Mel
Don't write too much. Concentrate your sweat on one story, rather than dissipate it over a dozen.
Jack London
Somehow, I missed the (paraphrased, shorter) duplicate of this one:
Don't loaf and invite inspiration; light out after it with a club, and if you don't get it you will nonetheless get something that looks remarkably like it."
Part of one quote; I split them to narrow down the topic.
I had a teacher that would tell students who were getting ahead of themselves this:
You don't know what you don't know
I can't say for sure if it's his quote or something he picked up from somewhere else.
Just use string you G-- d---ed savages!
during debate about merits of char[]
vs string
By Mike Williams, one of the creators of Erlang:
The required techniques of effective reasoning are pretty formal, but as long as programming is done by people that don't master them, the software crisis will remain with us and will be considered an incurable disease. And you know what incurable diseases do: they invite the quacks and charlatans in, who in this case take the form of Software Engineering gurus.
-- Dijkstra
OOP to me means only messaging, local retention and protection and hiding of state-process, and extreme late-binding of all things. It can be done in Smalltalk and in LISP. There are possibly other systems in which this is possible, but I’m not aware of them.
-- Alan Kay
Only wimps use tape backup: real men just upload their important stuff on ftp, and let the rest of the world mirror it ;)
-- Linus Torvalds
You can't trust code that you did not totally create yourself. (Especially code from companies that employ people like me.)
— Ken Thompson, "Reflections on Trusting Trust"
double value; /* or your money back! */
short changed; /* so triple your money back! */
cons.c on perl source tree
I wish I could make Lust and Gluttony helpful but Sloth, Pride and Envy are certainly great for programmers." ~ Kenneth Clowes
There is no object-oriented problem that cannot be solved by adding a layer of indirection, except, of course, too many layers of indirection.
-- From "The Art of Unit Testing" Roy Osherove (attributed to an unnamed source)
If you can't measure it, you can't improve it.
Lord Kelvin
Simplicity is prerequisite for reliability.
-- Edsger W. Dijkstra
The best indication of software quality is consistent indentation
I read this when I was following up footnotes in SICP once but I've not been able to find it since, so a) I can't attribute it and b) I am writing from memory, and more than likely paraphrasing. I have, however, found it to be true.
I'm not sure if he's the originator of this quote, but I attended a session at a conference once where Alex Pukinskis said this and I love it!
Untested code has no business value - Alex Pukinskis
This isn't strictly a programming quote and I don't recall where I first heard it, but I've repeated it plenty of times on the job:
If you don't test it, it doesn't work.
Release early. Release often. -- Eric S. Raymond
As a general rule, the most successful man in life is the man who has the best information.
— Benjamin Disraeli
The whole history of this invention has been a struggle against time.
— Charles Babbage on the Analytical Engine, 1837
(Or, It Takes One to Know One)
I have often felt that programming is an art form,
whose real value can only be appreciated
by another versed in the same arcane art;
there are lovely gems and brilliant coups
hidden from human view and admiration, sometimes forever,
by the very nature of the process.
You can learn a lot about an individual
just by reading through his code, even in hexadecimal.
From The Story of Mel, a Real Programmer (free verse version)
I had no idea there was actually a short Wikipedia article with links to both prose and verse versions of the story, along with other information.
Entia non sunt multiplicanda praeter necessitatem
(Keep it simple, stupid)
Years ago I ran across a poster that had the Latin expression with the English translation under it.
Keep it Simple!
XML is like violence - if it doesn’t solve your problems, you are not using enough of it.
Programming is an art form that fights back
-- Unknown
Note: especially when you're oncall...
True story:
I was doing a project for school in c++ and needless to say there was some compiler wrestling. As I got more pissed of I started naming my test functions shit with fuck variants for variables. At some point to every-bodies amusement I yelled "Why isn't this fuck pointing to shit?!?!?"
Impossible is Nothing
Although belongs to Adidas, but fits Software development well.
Comments in code are like sex. When they are good -- it's very, very good. But when they are bad, they are better than nothing.
-- Anonymous