neubauer@bsu-cs.UUCP (08/23/87)
In article <290@rruxa.UUCP>, gwl@rruxa.UUCP (George W. Leach) writes: > In article <1010@argus.UUCP>, ken@argus.UUCP writes: > > from the beginning to be a readable language, unlike C and Lisp. > > I wasn't aware that it was the language that dictated readability. > Silly me. I guess it is beyond the control of the programmer to ensure > readability, no matter which language the program is implemented in. A programmer who is concerned with readability can write readably no matter what language is being used. On the other hand, a programmer who is not concerned with readability can (and is likely to) produce utterly incomprehensible garbage. However, that is not the point in question here, we are talking about STUDENT programmers in their first CS course. These are people who usually have never thought about _reading_ programs. The typical view among CS1 student programmers (at least around here, but I would be surprised if we were unique) seems to be "if it runs, it's done." Documentation, intrinsic or add-on, comes as an afterthought, if at all. These are people who need every possible encouragement to write programs that can be read. A "good" language can make it EASIER to write readably, and so helps make it (a little) less difficult to get students to do so. Sure, it is still possible for students to give all their variables names like X, Y and Z or Tom, Dick and Harry. It is also possible to write Pascal in all caps and in a format that is as devoid of structural information as the (typical) FORTRAN or BASIC format (and I'll bet that I'm not the only one who has seen it done). However, some languages have devices that can easily be used to improve their readability. Some, like free format or the ability to use mixed case, are typograpical (and I had better not let myself get started on why typography is not "mere"). Others, like longer identifiers, are aids to memory. Still others facilitate abstraction of concepts from the problem, helping the student to see the forest despite the trees. Astute readers will have noticed that none of the features that I have mentioned here as promoting readability have any bearing on eliminating either C or LISP from consideration as a first language. Both of these languages do have most of the features that tend to promote readability. The perceived readability problems with C and Lisp have little to do with the expressive powers of those languages, but much more to do with the "literary traditions" of the communities that have done most of the programming in them. (I could flame on this topic forever, so I had better not start.) Actually, the reason that *I* would tend to favor Pascal over either C or LISP as a first language (in spite of its screwy use of semicolons) has more to do with its size (not too large) and its reasonably good type checking. I am not impressed by the counterargument that Pascal is not what they will be using "in the real world". After all, a first language is exactly that -- a first language. CS majors are going to have to learn more anyway, and while there are some conceptual leaps in going to a purely declarative or functional language, they should have little trouble with any languages that are as similar to Pascal as C or COBOL. (So there! I can count on getting flames for that! :-) -- Paul Neubauer UUCP: {ihnp4,seismo}!{iuvax,pur-ee}!bsu-cs!neubauer
dhesi@bsu-cs.UUCP (08/23/87)
In article <1039@bsu-cs.UUCP> neubauer@bsu-cs.UUCP (Paul Neubauer) writes
an article favoring Pascal over C for first-year students.
This may be more of an aside than an argument.
C versus Pascal is an incomplete dichotomy.
The argument ought really to be C+lint versus Pascal.
Now everybody, start over.
--
Rahul Dhesi UUCP: {ihnp4,seismo}!{iuvax,pur-ee}!bsu-cs!dhesi
gwl@rruxa.UUCP (George W. Leach) (08/24/87)
In article <1039@bsu-cs.UUCP>, neubauer@bsu-cs.UUCP (Paul Neubauer) writes: > > However, that is not the point in question here, we are talking about > STUDENT programmers in their first CS course. These are people who usually > have never thought about _reading_ programs. The typical view among CS1 > student programmers (at least around here, but I would be surprised if we > were unique) seems to be "if it runs, it's done." Documentation, intrinsic > or add-on, comes as an afterthought, if at all. These are people who need > every possible encouragement to write programs that can be read. > I agree 101%!!! If left to their own devices these people will never think about anything but getting the program to produce the desired effect, A GOOD GRADE! If a reasonable portion of that grade will be decided by such qualities as readability, then they will do a better job on that part. What I typically do is to allow the first program to be graded without taking off any points for such things as non mnuemonic naming, lack of adequate indentation, etc.... I will then get up on my soap box after handing back the first assignment. I try to show people concrete examples from the assignments of good and bad practices. I then will progressively start taking more and more credit off for such infractions as the semester marches on. If I notice that someone is continuing to exhibit the same bad habits over and over again despite the lost credit, I either (a) think this person is a masochist and is beyond help or (b) have a talk with this person and point them to the path of correct programming behavior. > -- > Paul Neubauer UUCP: {ihnp4,seismo}!{iuvax,pur-ee}!bsu-cs!neubauer George W. Leach Bell Communications Research New Jersey Institute of Technology 444 Hoes Lane 4A-1129 Computer & Information Sciences Dept. Piscataway, New Jersey 08854 Newark, New Jersey 07102 (201) 699-8639 UUCP: ..!bellcore!indra!reggie ARPA: reggie%njit-eies.MAILNET@MIT-MULTICS.ARPA From there to here, from here to there, funny things are everywhere Dr. Seuss "One fish two fish red fish blue fish"