Computer Languages: A Tricky Balancing Act

No computer language is perfect, but some seem more prone to verbal abuse than others.

People often say they'd like programming languages to be "more like human language." Usually, they are complaining that computer languages involve far too much syntax -- too many strict rules, that is, that dictate exactly how different "words," or symbols, can or cannot be strung together.

Rigid syntax is a necessity, of course, because it helps to eliminate ambiguity in programs and make sure that lists of precise instructions get interpreted exactly as programmers intend them to be. Syntax is the price programmers pay, one way or another, for maintaining their sanity.

Indeed, we often forget how forgiving the human mind is when it comes to understanding language. As linguist Noam Chomsky has pointed out, even children whose parents speak a particular language imperfectly, perhaps because they are newly-arrived immigrants, grow up to be good speakers themselves. Computers have no such abilities.

But strict rules of syntax also make programming languages more difficult for humans to learn and master. This issue has been discussed widely across the software blogosphere lately, triggered by a surprising discovery made at Southern Illinois University.

Researchers there made up a programming language that used random syntax, with no rhyme or reason to its rules. Then, they watched as novices tried to learn this language, called Randomo. Meanwhile, they also let novices try their hand at learning a well-established language called Perl.

And guess what: The two languages proved equally difficult to learn. As a piece over at Fast Company.com puts it, to a newcomer "a string of characters bashed out by a monkey at a keyboard would literally make an equal amount of sense" as one written in Perl. (Another language, Quorum, proved much easier to learn, evidently because it has been designed well to begin with, based on user testing and surveys.)

Perl, programmer friends of mine attest, truly is difficult to read. They joke about it as a "write only" language, not one that you can pass to a friend for easy reading. Another snide observation has it that any sequence of random characters is probably a valid Perl program.

One major problem, I'm told, is Perl's excessive use of abbreviations. Seemingly every character on the keyword has a meaning: The string $@ might mean one thing and $$@ something else -- or worse, something very similar to that first string, laying the grounds for dangerous confusion. Here, for example, is what is said to be a working Perl program, composed precisely to show off the kind of inhuman notation for which the language is notorious:

So twisted and opaque can Perl programs be written that for several years, programmers held an Obfuscated Perl Contest -- modeled, it should be noted, on a similar one that focuses on the language C.

In fact, pretty much every computer language has its pros and its cons, its advocates and its detractors. But some, including Perl, seem to have attracted particularly harsh commentary. One popular item found on various Websites that collect quotable programming quips: "PHP is a minor evil perpetrated and created by incompetent amateurs, whereas Perl is a great and insidious evil perpetrated by skilled but perverted professionals."

Try to make programming languages too easy for humans to read, of course, and you get COBOL, a language that most practitioners today view as a verbose and inefficient monstrosity. Fact is, COBOL was this industry's workhorse in the 1970s, the language with which all sorts of towering mainframe programs got written, often by people with no background in computer science. To this day, many of those systems are grinding away in the bowels of datacenters everywhere.

But the pros don't like to think about this language. "The use of COBOL cripples the mind," wrote the late programming theorist E.W. Dijkstra, known for thinking about programming strictly as an exercise in mathematics. "Its teaching should therefore be regarded as a criminal offense."

I remember those typing drills. Oddly enough, I could type without looking at the keyboard for a while when I was around that age. Then I regressed back to slower typing (even with programming in college). Now, I'm back to the speed typing. Weird cycle right?

Typing drills are really important! I downloaded Scratch several years ago. The interface back then was similar to Google App Inventor for Android (arriving much later). I haven't seen Small Talk yet. My kids aren't interested in programming...

John, Thank you very much for this link, I really like the message of Program or be Programmed. I think this type of realistic view of the future, allows people like myself to see the "intrinsic value" of learning a new language.

When I was going through school, had this message been conveyed, I know I would have looked at the whole issue differently.

But you know what they say, "It is never too late." And as I step into the "deep end" again, I will remember Mr.Rushkoffs' message, matter of fact I am going to replay again right now !