Programming Languages Are Not Our Friends – 3

Ambiguity of Languages

When developing programming languages based on human language, one aspect that isn’t discussed much is that human language is expressive but imprecise and ambiguous. Human language is fairly good at expressing the emotion or mood of a situation but it has trouble clearly and precisely describing actions.

For example, I think we’ve all had this conversation in a car. The passenger says, “Turn right at the next street.” And the driver says, “You mean this one? Or that one?” “The next one, not this one.”

We don’t notice it as much when we are talking to one another because we can reinforce our meaning with voice inflection, facial expressions and gestures and asking for clarifications. Unfortunately, we can’t do that with written statements.

How many on-line flame wars got started because an innocent thought was expressed in written language in a way that was misinterpreted by a reader of the statement? Many times after the flame war has died down, we realize that the combatants were both on the same side and agreed on everything but disagreed about the way it was said.

Developers are sometimes heard to remark that the first thing they do when they start on a project is to throw away the written specs because they’re worthless or too general. It is hoped that they’re joking, but there is a grain of truth in it. Most developers view their written specs with contempt or interpret them loosely because most of the written specs aren’t very good (imprecise, ambiguous or even just plain wrong). And yet every project of any significance or being developed for a customer has a written spec.

And the irony is that developers don’t view their own written documents (programs) with as much contempt. The simple act of successfully compiling their programs seems to wipe away all doubts that what they created could be obscuring just as many problems as the written spec that they tossed away. That their carefully crafted program could be just as inaccurate as the materials passed out at the project kickoff meeting.

What’s the old joke, It must be right – it compiled without errors.

Leave a Reply

Your email address will not be published. Required fields are marked *