🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.prolog
Article #2969

Re: PROLOG code formatting (random musings)

#2969
From: Richard A. O'Keefe
Date: Mon, 08 Feb 1988 02:31
48 lines
3136 bytes
In article <6890@agate.BERKELEY.EDU>,
lagache@violet.berkeley.edu (Edouard Lagache) writes:
>  Since I am
>           equipped with the barest of development tools, I enjoy
>           neither the benefits, nor suffer from the curses of a code
>           formatter/pretty printer.
"Curses"?  What can he be talking about?  *Having* a layout program
doesn't mean that you are forced to *use* it!  As for development
tools, all it takes is a C compiler...  (Or Prolog, for that matter.)

>  While there are a number of
>           conventions for proper PROLOG coding style, coding (in any
>           language) is a very individualistic thing, one of the few
>           places where a programmer can express the artistic aspects of
>           what is truly a craft, not a science.
> 
Amongst other things, a program is an act of communication.
**Coding** is no more the place for being individualistic than
is speech:  that is the Humpty-Dumpty school of programming!
A true artist will devote his creativity to devising worthwhile
things to say, not to individualistic babbling.  It's not the
*skilled* composers who long for something more individualistic
than the diatonic scale.  It's not the *skilled* poet who moans
about the rigidity of sonnet or haiku form.

I cannot stress this sufficiently:  the purpose of a program is to
COMMUNICATE.  We can *measure* how well people understand a program.
Suggested experiment:
	take a number of smallish Prolog programs (one or two pages)
	ensure that each of them contains one bug
	rewrite each of them in four or five different styles
	take several Prolog programmers with one year's experience each
	give each of the programmers one version of each program
	measure how long it takes each programmer to find the bugs
An experiment of this sort would be feasible, and I would be *very*
interested in assisting.  The possibility of making such a measurement
means that (relative to the population the programmers are drawn from)
the quality of a coding style is an objective matter.  If something
else turns out to be more effective than my current style, I mean to
adopt it.  I have already changed my Prolog style several times, in
the interests of intelligibility.  Looking back at some of my old code,
the layout which I liked is clearly and objectively inferior to my
present scheme.  In fact, all of the good ideas in my present scheme
came from other people!  (Thanks, Grant, Nevil, Lawrence, Leon.)

Has anyone out there conducted any psychology-of-programming experiments
with Prolog?  Could something be arranged as part of the next conference?
Technical Details
Message-ID: <630@cresswell.quintus.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!cmcl2!nrl-cmf!ames!sri-spam!sri-unix!quintus!ok
References: <6890@agate.BERKELEY.EDU>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!cmcl2!nrl-cmf!ames!sri-spam!sri-unix!quintus!ok
From: ok@quintus.UUCP (Richard A. O'Keefe)
Newsgroups: comp.lang.prolog
Subject: Re: PROLOG code formatting (random musings)
Message-ID: <630@cresswell.quintus.UUCP>
Date: 8 Feb 88 02:31:28 GMT
References: <6890@agate.BERKELEY.EDU>
Organization: Quintus Computer Systems, Mountain View, CA
Lines: 48
Keywords: Pretty Printers, Structured editors, coding style.
Summary: "artistic aspects"