How to talk to a computer


The first lesson you must learn in programming is that computer languages are not at all like the normal languages that people use. In fact, “language” is probably a bad word to use in programming. A computer “language” is more like a “set of commands” for making the computer do things. To learn programming, you must learn all the commands in the programming language. Each command has a very precise meaning and must be typed according to some very precise rules. One tiny mistake will certainly ruin the command.

This trips up all beginning programmers. Normal language forgives many errors. You can walk into a McDonald’s and say to the server something like this:

“Uh, I’ll have a Big… a Big… yeah, a Big Mac. No, make that a Quarter Pounder. With fries. Yeah, large. And a vanilla milkshake. No, chocolate. Medium. No, large. Oh, and make the fries medium size.” 

The server will have no problem getting the message: you want a Quarter Pounder with a medium sized serving of fries and a large chocolate milkshake. But a computer could never figure it out. 

Let’s imagine a fantasy in which the human server at McDonald’s is replaced with a robot. To place the same order by typing it into a console, you’d have to type something like this:

Order: 1 Quarter Pounder and 1 medium fries and 1 large chocolate milkshake

Suppose that you made a tiny goof and misspelled one of the words like this:

Order: 1 Quarter Pounder and 1 medium fries and 1 large choclate milkshake

The computer would go “BZZZZTT!” and say “SYNTAX ERROR!” and you’ve have to try again. Why? Because you misspelled “chocolate”, silly! It doesn’t know what “choclate” means. It won’t use a spell checker because programming languages absolutely, positively MUST get everything perfect. 

It’s true that some of the better text editors can anticipate what words belong where and will auto-fill the correct words for you as you’re typing. I’m sure that auto-correction is already in use in the best text editors. But the general rule that you MUST type in everything perfectly remains important. 

But computers aren’t the only ones to exhibit extreme sensitivity to syntax errors. In the right circumstances, people can be just as block-headed. How many times have you heard this line:

“We’re sorry, sir, but we cannot honor your request. You have not properly filled out form RC/22b, Authorization for Transmittal of Individual Confidential Information. Please review this form and fill it out completely and resubmit your application.”

If you think about it, this is really the same response as the computer’s syntax error. Both the computer and the bureaucrat respond to a communication that does not fit their required format with the same unyielding obtuseness.

Just to be fair, let me throw in another example:

“If the moment of inertia tensor is not diagonal, unstable perturbations will develop.”

Does this sentence make any sense to you? You have no context with which to understand it. How else could you respond to it other than to throw up your hands and say "Syntax error!”?

Communication Responsibility
Whose fault is it when communications fail? Who has the responsibility for insuring that the communication gets through clearly: the speaker or the audience? We Americans, steeped in egalitarianism and a spirit of cooperation, tend to answer that both sides share responsibility for clear communications. I disagree, and I think that your experiences with computers will lend weight to my position. I think that the responsibility for clear communications falls squarely on the shoulders of the speaker.

In theory, the audience of a communication is supposed to give feedback to the speaker on how clearly the message is getting through. Thus, if you and I are conversing, and something I say doesn’t make sense to you, you are supposed to say, “Run that by me one more time, please.” This habit insures that our conversation will move smoothly and efficiently.

In the real world, however, this seldom happens. Sometimes the audience doesn’t want to appear stupid by asking a dumb question. Sometimes the listener believes that his confusion is temporary and will quickly abate. Sometimes the listener is so completely lost that he doesn’t even know where to begin. Whatever the cause, he just nods his head knowingly and mutters, “OK”.

How then can we communicate well if our audience can’t be trusted to speak up when it is confused? There is only one sure-fire solution, and that is to assume very little of the audience. You must be pessimistic, assuming that everything you say is lost on the audience. You must drive home every single point with ruthless drive and determination. You must be a defensive driver, imagining what is going on in the mind of the audience, trying to guess where they might be tripped up next. This is the only way to communicate with confidence.

Sad to say, few people are aware of how confusing their expressions can be, even when writing. Just cruise any discussion board on any topic, and you’ll find dozens of examples of slovenly phrasing. The rule that so many people fail to grasp is that you must ask yourself how the audience will interpret what you just said or wrote. Put yourself in their shoes!

It is a hard lesson to learn, but the computer provides an excellent training ground. It assumes nothing, knows nothing. It has no context with which it can second-guess what you really meant to say. It can respond to your commands only in their absolute, literal sense. It will indeed drive you crazy. But it will also discipline you to think hard about exactly what you say. It is a sobering experience to have so many of your commands rejected as syntax errors — you never knew you were so sloppy a communicator. But once you learn to express yourself clearly and carefully, you will find that the number of syntax errors you generate will fall.

The lesson you learn in the process will benefit you in many areas other than computers. Precise communications are important in almost everything we do. How many arguments have you endured that were started by a misunderstanding? How many foul-ups have you gotten into because somebody didn’t express themselves exactly? I well remember the time my father drove 30 miles to pick me up “at the Doggie Diner on Main Street”. Neither of us knew that there were two Doggie Diners on Main Street. He went to one, I went to the other. If I had been more specific, the screwup would never have developed.