"In theory, theory and practice are the same. In practice, they’re not."
December 16, 2010 2:09 PM   Subscribe

“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, from the Top 50 Programming Quotes of All Time.
posted by Slap*Happy (39 comments total) 36 users marked this as a favorite
 
All the C haters out there can go deference a null pointer.
posted by GuyZero at 2:16 PM on December 16, 2010 [7 favorites]


No spoiler alert? I was happy racing to the bottom of that page until I got to the bottom of that page.

Still, a good list. Thanks SH.
posted by Chichibio at 2:16 PM on December 16, 2010


That's one of my favorite quotes. FYI.
posted by DU at 2:18 PM on December 16, 2010


According to a commenter, the Bill Clinton quote is fake, which is good, because I couldn't really imagine any context in which he might have had occasion or knowledge to make such a claim.
posted by invitapriore at 2:19 PM on December 16, 2010 [3 favorites]


Some great classics there.
posted by Artw at 2:19 PM on December 16, 2010


Oh and the Babbage one is useful in so many contexts. "I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question." Yes.
posted by DU at 2:22 PM on December 16, 2010 [4 favorites]


My favorite, so true it hurts:
13. "Sometimes it pays to stay in bed on Monday, rather than spending the rest of the week debugging Monday's code."
- Christopher Thompson

posted by vorfeed at 2:23 PM on December 16, 2010 [3 favorites]


Yogi Berra, who is a professional baseball player and probably never wrote a piece of code in his life, has one of the great ones.
posted by meowzilla at 2:26 PM on December 16, 2010


I use the Berra quote on a regular basis at work, and I'm going to start using the one in the FPP as well.
posted by sauril at 2:46 PM on December 16, 2010


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

I maintain code that has come close at times to turning me into a violent psychopath.
posted by octothorpe at 3:09 PM on December 16, 2010 [6 favorites]


Most of these are in our Bugzilla quips list. Most of them have also been verified by sad experience.
posted by blue_beetle at 3:12 PM on December 16, 2010


Egads, Martin does know where I live. Fortunately, I never code anything.
posted by cairnish at 3:20 PM on December 16, 2010


I still say you don't know programming pain until you've integrated something with SAP.
posted by Artw at 3:21 PM on December 16, 2010 [3 favorites]


The best quotes in that list are not marginally better than merely good ones. They are an order-of-magnitude better, measured by whatever standard.
posted by euphorb at 3:26 PM on December 16, 2010 [2 favorites]


"Some people, when confronted with a problem, think "I know, I'll use regular expressions." Now they have two problems." -jwz
posted by flaterik at 3:29 PM on December 16, 2010 [6 favorites]


I quite like the one about lasagna code being the object orientated version of spaghetti code...
posted by Artw at 3:30 PM on December 16, 2010 [1 favorite]


The Douglas Adams quote is pretty insightful. It also applies to anything complex, or to bureaucracy.
The major difference between a thing that might go wrong and a thing that cannot possibly go wrong is that when a thing that cannot possibly go wrong goes wrong it usually turns out to be impossible to get at or repair.

— Hitchhiker's Guide to the Galaxy by Douglas Adams (via comments)
posted by Tobu at 3:46 PM on December 16, 2010 [2 favorites]


"My programming language is solder"

- many people including me
posted by sidereal at 3:46 PM on December 16, 2010


"A good programmer looks both ways before crossing a one-way street."

From the comments. That is all of it in a nutshell.

Another one:

"Linux is only free if your time is worthless"
posted by gjc at 4:14 PM on December 16, 2010 [6 favorites]


Oh, man, I've been trying to remember that Bill Bryson quote forever, except I couldn't remember how it went exactly or who said it. It's such a perfect quote: "For a long time it puzzled me how something so expensive, so leading edge, could be so useless. 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."
posted by Kattullus at 4:29 PM on December 16, 2010


From the comments: XML is like violence - if it doesn’t solve your problems, you are not using enough of it.

Given that I'm currently working on an application with its config defined by a hand-coded 18,000 line XML file (and counting), I found this particularly entertaining.
posted by ZsigE at 4:42 PM on December 16, 2010 [1 favorite]


They're missing one of my faves: "Programming is like sex; make one mistake and you end up supporting for the next 18 years."
posted by CheeseDigestsAll at 4:45 PM on December 16, 2010 [1 favorite]


No, these days Linux works just fine for mundane shit like web browsing and word processing, without the need to compile anything.
posted by LogicalDash at 4:55 PM on December 16, 2010


It's almost shocking how little fiddling I've done with my install of Ubuntu. Though I;m sure if you want to mess about with a command line doing stuff there's plenty of oportunity there too.
posted by Artw at 4:57 PM on December 16, 2010


I've always been partial to this (filthy) one, also via jwz: "Whenever a programmer thinks, 'Hey, skins, what a cool idea', their computer's speakers should create some sort of cock-shaped soundwave and plunge it repeatedly through their skulls."
posted by bbuda at 5:06 PM on December 16, 2010 [2 favorites]


I'm only a bureaucrat, but I've seen this one in action and know it to be true:

"A large number of installed systems work by fiat. That is, they work by being declared to work." -- Anatol Holt
posted by sneebler at 5:19 PM on December 16, 2010 [3 favorites]


..the Bill Clinton quote is fake, which is good, because I couldn't really imagine any context in which he might have had occasion or knowledge to make such a claim.

It seems like a black art when you have major projects fail with no one knowing its terrifyingly bad state until its too late. Like, a 100 million dollars bad.
posted by uni verse at 5:45 PM on December 16, 2010


Ever have stuff you haven't thought about in years hit twice in the same hour?

I get the ACM journal, and was reading A Conversation with Ed Catmull when I find this
(Catmull:)
Think of a line: with a difference equation, four adds gets you the next point in a cubic curve; every four adds gets you a new point. I came up with a method such that every four adds got you the point in the middle of the curve. It turns out that for doing subdivision surfaces, it's really fast.
In fairness, 'I came up with a method' does not absolutely mean 'I invented' a method', though it does imply it.

Why cavil? I was sitting right behind Ed in this 1974 lecture by George Chaikin
that described the quadratic version of the spline subdivision algorithm. I showed that the subdivision was in fact a quadratic spline while sitting in that lecture, and showed the result to Ed immediately after the lecture. The extension to cubic splines was pretty obvious.

And here I read:
"Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live."
Later, at Applicon, a CAD-CAM company in near Boston where both Ed and I worked, I implemented spline curves and spline surfaces in their computer-aided-design (CAD) product, which ran on a PDP-11(no url).

Memory was tight and computer speed was slow, so of course I used the subdivision scheme described above. I computed splines and spline surfaces in 4K bytes of code memory. The code was kind of tight and tricky. It used no (SLOWWWW) multiplication or division, and almost all the arithmetic was in a routine that computed X0 - 2X1 + X2.

I left Applicon, and revisited it a few years later. I was introduced to 'the guy who is maintaining your spline code.'
I put out my hand to shake his.

He wrapped is hands around my neck.
posted by hexatron at 5:55 PM on December 16, 2010 [18 favorites]


AskMeFi: I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question.
posted by baf at 6:26 PM on December 16, 2010 [9 favorites]


If you look at that whole quote, though, it's a lot more interesting:

"On two occasions I have been asked [by members of Parliament]: '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


Here we are, all these years later, and computers do this all the time. Error detection and correction are used constantly; they're an important cornerstone of modern computing. Even a cheap, mass-produced desktop computer can very often be given the wrong figures, and yet produce the right answers. A concrete example is a damaged RAR set with accompanying PAR files... by running a sophisticated algorithm on the whole data set, the computer is able to fix the damage and reconstruct the originals. In hardware, ECC memory can correct single-bit errors, and can detect dual-bit errors. In wireless, sophisticated multipath error detection can detect and correct damaged transmissions.

Even when reconstruction can't happen, as in TCP/IP checksumming, most modern data transfer and many storage schemes can at least detect that an error has occurred.

I find the tone of haughty superiority quite amusing. The members of Parliament that he was dismissing were asking questions that were actually far in advance of anything that Babbage could understand. He dismissed them as morons, when it was actually Babbage's own ignorance on display in his reply.

In Babbage's defense, that is a very hard problem, being asked a century or so too soon, but the 'inability to apprehend' was nonetheless his own failing, not Parliament's.
posted by Malor at 10:29 PM on December 16, 2010 [2 favorites]


Well, no, not really. What the MPs meant was "if I tell it to do the wrong thing, will it do what I meant?" We still do not have DWIM computers. The error corrections you describe can only ensure more robust transmission of data within a computer context, they cannot possibly correct incorrect human input except in the most trivial of cases.

Explaining modern error correction to Babbage would involve saying that sometimes when you input figures to the computer, it screws them up internally, but other internal parts notice and fix it.
posted by breath at 10:50 PM on December 16, 2010 [4 favorites]


It's not even that they fix the errors.... 'fix' is an inaccurate term for this.

Error correction works by having redundancy in the data and the means to detect errors. So that when they occur, they are noticed and replaced with correct data (reconstructed making use of the redundancy). For example, the encoding on a CD-R uses this.

In the simplest of cases it is just error detection - if an error is detected the data is discarded, and new data is requested.

In other cases data loss can be compensated for when it doesn't really matter... e.g. if you lose a frame or two of video during processing, it doesn't have a big impact on the end result. But the end result is still wrong.

Computers can only work with what they are given, so the quote from Babbage still holds today IMHO. If this were not true, we would be able to do NCIS-style number plate enhancements, no problem at all!
posted by joz at 11:34 PM on December 16, 2010


Claimed to be better.
posted by cthuljew at 2:15 AM on December 17, 2010 [1 favorite]


10. Get into a rut early: Do the same process the same way. Accumulate idioms. Standardize.

Oh cripes, YES! I constantly have people adding code to my codebase and then telling me "well, it seems to work" as though that's the only metric by which to measure code. Does it fit in? Can it be comprehended and maintained? If I change font sizes (or whatever other global "API" type thing) will this function Do The Right Thing?
posted by DU at 4:47 AM on December 17, 2010


39. Re graphics: A picture is worth 10K words - but only those to describe the picture. Hardly any sets of 10K words can be adequately described with pictures.

Yes, finally a succinct explanation of why the command line is more flexible than a GUI.
posted by DU at 4:50 AM on December 17, 2010


When I was switching careers to programming by teaching myself VB/HTML/SQL, I was getting a lot of advice and input from a friend who was a senior architect at a startup. This was back around 2001 or so. He was talking to me about his decision to have the teams use Java instead of C++ to write all the server code at his new company. I asked him why, since I thought Java might be slower, and the C++ guys I knew were always boasting about how Java guys were wimps because they didn't manage their own memory, etc.

He said "I've managed a lot of development teams and I've finally come to the conclusion that most C++ programmers aren't smart enough to write C++ code."
posted by freecellwizard at 8:38 AM on December 17, 2010


“I think Microsoft named .Net so it wouldn’t show up in a Unix directory listing.”

My fave.
posted by thsmchnekllsfascists at 9:12 AM on December 17, 2010


Hexatron, I may have used your code! In 1984 I was a summer intern at a printed circuit board fab that used an Applicon system. It ran on a PDP-11 running RSX-11, and fancy vector graphics terminals. Fun times! (And in '88 I was working on a graphical editor, and implemented the spline subdivision algorithm -- also with no multiplies.)
posted by phliar at 9:41 AM on December 17, 2010


Yogi Berra, who is a professional baseball player and probably never wrote a piece of code in his life, has one of the great ones.

Just FYI, meowzilla - Yogi Berra probably never said half of the quotes attributed to him, either. He even mentioned this repeatedly in interviews.
posted by IAmBroom at 12:24 AM on December 19, 2010


« Older "We are each other's best friend."   |   All these worlds are yours... Newer »


This thread has been archived and is closed to new comments