Sunday, January 17, 2021

Just Funnin’ – the infamous “Cowboys” section of the Lucid book

[This is the infamous section of the book Lucid the Dataflow Programming Language where I make fun of everyone working on imperative languages. It was very popular but many people hated it even though no individual is named. In a companion post I cite it as an example of a Career Limiting Move. It didn’t quite kill my career though it didn’t help. I’m sure there were a number of meetings I wasn’t invited to and program committees I was left out of because of it. Hmmm … was that really a bad thing?]

[Btw the late Ed Ashcroft was a co-author of the book but had no part in writing this section. Wise man.]

1.5 Some Suggested Solutions

Even the most enthusiastic supporter of imperative languages will admit that something is very wrong. There are, however, a number of different attitudes regarding the “software crisis” and the “parallelism problem”. Here are some of the more common points of view (slightly parodied). [slightly!]

First there is what we might call the Clint Eastwood outlook.

[This holds up well – though it was written more than 30 years ago!]

According to this “rugged Western” point of view, programming is a demanding and difficult activity, and always will be, but still “a programmer’s gotta do what a programmer’s gotta do”. According to the ‘Cowboys’ the actual problem is a shortage of real programmers who are clever enough and tough enough to get the job done. The Cowboys learned programming the hard way, through long hours ‘in the saddle’ (i.e., at the terminal) and expect everyone else to do the same. If you make mistakes, it is ‘yer own darned fault’. Cowboys generally distrust ‘book larnin’ (theory) and ‘new-fangled’ languages. They sneer at ‘greenhorns’ who complain that PL/I

[PL/I? A big complex language devised by IBM and long since dead. More complicated than C++ and clumsy like ADA. ADA? … don’t ask.]

is too big or that C is too low level.

[Yes, C, the same C that is still popular today. Basically unchanged, like Clint himself]

To them, PL/I does not have enough features and C is not dirty enough. What they want is even more powerful tools which allow them to get even closer to the computer and make it ‘dance’.

The Cowboys certainly deserve our admiration. The best of them (the real Straight Shooters) can produce impressive software that ordinary programmers are too ‘chicken’ even to try. Nevertheless, we have to ask ourselves whether or not there are enough really tough Wranglers to go around. There almost certainly are not, and we have to resign ourselves to the fact that most software will be written by ordinary, humble Trail Hands

[I just described typical software engineers as “trail hands”. I’m sure that went down well.]

—not by the Wyatt Earps of the terminal.

Next we have what we call the “Mr. Wizard” school of thought.

[Mr Wizard was a well known TV science popularizer a few decades ago. He was the Bill Nye of his day.]

The Wizards are in many ways the opposite of the Cowboys, but they agree on one thing: programming and programming languages are inherently very complex. The problem, as the Wizards see it, is that we lack a good theoretical/mathematical understanding of these languages. The Wizards have searched through many a dusty tome of ancient lore. They have learned the Arts Magical, the Logyck Symbolyck and the Calculus of Lambda. They have conjured up the mighty names of Tarski, Church and Curry.

[Famous logicians. I actually met the first two as a grad student at Berkeley. In fact I took a seminar from Tarski.]

The ultimate dream of the Wizards is a system for formal program verification. This would allow programmers (assisted by Wizards) to produce airtight proofs that given programs are correct—no matter how appallingly bad the language or program might be. Program verification is therefore a kind of philosopher’s stone which will turn base programs into gold. As John McCarthy [inventor of LISP] (1965, p. 219) said,

The prize to be won if we can develop a reasonable mathematical theory of computation is the elimination of debugging. Instead, a programmer will present a computer-checked proof that the program has the desired properties.

The problem, of course, is that no amount of Wizards’ wand waving changes the basic nature of the von Neumann [imperative] languages. The Wizards did succeed in producing formal specifications—but these specifications also took on telephone-book proportions, full of incomprehensible lambda- calculus expressions.

[This was semantics of programming languages, a big deal in its day. As dead now as PL/I]

Similarly, proving the correctness of ‘real’ programs has also turned out to be impractical. [still is, with specialized exceptions.] The Wizards ran into trouble with the ‘dirty’ features (side effects, goto statements, aliasing) mentioned. Of course, these are exactly the features the Cowboys love the most.

[Well, the goto has almost completely disappeared.]

There is a third group, however, which views the antics of the Cowboys and Wizards with self-righteous disdain. The members of this group are wild-eyed fanatics, the Preachers of the gospel of structured programming.

The Preachers subscribe to a computer science version of the doctrine of Original Sin. They believe that human beings are born with an inherent tendency to be careless and make mistakes (the sin of Sloth), and to undertake tasks that are beyond the meagre powers of their mortal minds (the sin of Pride). The wages of sin are, of course, bugs. If bugs (and software problems in general) are to be avoided, programmers must abandon their evil ways and adopt the way of the righteous. Programmers are exhorted to adopt some rigorous discipline (methodology) of programming whose rituals will prevent the software from being possessed by evil spirits.

[Nobody talks about “structured programming” any more because everybody practices it. But other cults have arisen.]



from Hacker News https://ift.tt/3ipomRM

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.