Xref: utzoo comp.edu:2384 comp.lang.misc:3201 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!wasatch!cs.utexas.edu!uunet!pdn!dinsdale!reggie From: reggie@dinsdale.nm.paradyne.com (George W. Leach) Newsgroups: comp.edu,comp.lang.misc Subject: Re: Which language to teach first? Message-ID: <6461@pdn.paradyne.com> Date: 2 Aug 89 10:24:03 GMT References: <8514@batcomputer.tn.cornell.edu> <13158@bloom-beacon.MIT.EDU> <6454@pdn.paradyne.com> Sender: news@pdn.paradyne.com Reply-To: reggie@dinsdale.paradyne.com (George W. Leach) Organization: AT&T Suncoast Division, Largo FL Lines: 54 In article mccalpin@masig3.ocean.fsu.edu (John D. McCalpin) writes: >In reggie@dinsdale.nm.paradyne.com (George W. Leach) writes: >> Many studies of programmer behavior have indicated that the >>novice programmer thinks in terms of a specific language syntax, while >>with experience comes more abstract thinking without worring about >>implementation language details. [...] >The trouble occurs when the poor students spend too many years with >abstraction and forget that the purpose of the exercise is to solve a >problem --- and that has to be done in a specific language with a >specific syntax. The expression of the solution to the problem must be expressed in a specific language for the purpose of implementing it on a machine. And, yes that is the ultimate goal. However, one does not use the implementation language during the steps prior to implementation, eg. requirments, specification, design, etc.... Unless one is just a hacker :-) The expression of the design of the solution need not be written down in that implementation language. >A sad example of this was the "GOTO" war last year (or maybe the year >before) in the Communications of the ACM. In a patronizing letter, an >eminent computer scientist (whose name will remain unmentioned) gave >the "correct" solution to a simple problem that had been batted back >and forth as an example of a construct that was made *easier* to read >with a GOTO statement. The problem was that the "solution" was not >written in an existing programming language, but in a very obscure >pseudo-code. Sometimes the use of pseudo-code is useful in order to express a solution in the form of a programming language, but without paying attention to all of the particular syntactic details of an implementation language. This allows one to concentrate on the solution method rather than the syntax in which that solution is expressed. For example, if one wishes to communicate the solution to a file merge problem, the interesting aspects of the solution revolved around the algorithm. We are not all that interested in how files are opened, read from, written to, checked for EOF, closed, etc...... We can express these concepts in some abstract notation and translate to the implementation language later. The attention will be focused in on the actual solution loop. The idea is that the solution that was provided may be transcribed into an appropriate implementation language. While I agree that once one reaches this point you might as well use the implementation language to write code, there is a use for pseudo-code. How often do you refer to books on algorithms? Would you prefer one that expresses the algorithms in what ever language happens to be in vogue today or one that expresses the algorithm in a generic manner that transcends language? George W. Leach AT&T Paradyne (uunet|att)!pdn!reggie Mail stop LG-133 Phone: 1-813-530-2376 P.O. Box 2826 FAX: 1-813-530-8224 Largo, FL USA 34649-2826