Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!aramis.rutgers.edu!athos.rutgers.edu!wittman From: wittman@athos.rutgers.edu (Barry) Newsgroups: comp.edu Subject: Re: SEEKING SUGGESTIONS FOR TEACHING A LANGUAGES COURSE Summary: Teaching programing - concepts are of primary importance Message-ID: Date: 16 Aug 90 15:06:10 GMT References: <90Aug8.173401edt.7886@neat.cs.toronto.edu> <6717.26c20a9a@vax1.tcd.ie> Organization: Rutgers Univ., New Brunswick, N.J. Lines: 67 I agree with Jipping on the importance of concepts. Someone who knows how to program can do so in any language of a similar class to the one s/he has practised while learning. If one is merely exposed to a variety of languages and asked to write practice programs, what will happen is that bad techniques will be practiced and therefore learned. It is much harder to "unlearn" than to learn. The main issue we are concerned with in our foundations course is to answer the question: how can I implement the solution to a problem without getting lost or confused? The answer is to use good programing practices from the very beginning. It may be helpful for a student to be shown, in the first lecture, a few samples of what a program looks like in the language that is going to be used for practice, just to make it look less unfamiliar, but from then on I think concepts are what count. We try to stress structured programing concepts, top down design, functional modularity, right down to abstract data types. We expose recursion and iteration as approaches to problem solving. We try to do these things from the very beginning. This means we have to deal with functions and procedures, and the concepts of parameters/arguments, definition/reference, and recursion very early. And then show them in practice, with classroom examples as well as homework assignments in which the concepts are exploited. Actually writing the code is a late step in the process - in fact the next-to-last step (debugging is last). We sometimes ask our students to write the headers of all subroutines and functions prior to actually implementing them, if the program is requires several. The headers are turned in first as a separate assignment. (If our classes were smaller we could give individual guidance based on misconceptions revealed at this stage). We happen to use Pascal because it is characteristic of a wide class of languages, supports most of the concepts we are interested in reasonably well, and is widely available. We use the plain vanilla stuff, nothing exotic. The reverse approach doesn't work: students who know "BASIC" are at a serious disadvantage in many ways. Example: I once taught a high-level introductory course aimed at Math PHDs who were practicing faculty in State institutions trying to cross over to CS. One student had been using BASIC for 25 years and was so hopelessly mired in its limitations that he was unable to write Pascal programs. He was probably the worst example of someone burned by learning a programing language rather than programing. (He tried to write every assignment in BASIC and then translate to Pascal.) It's very hard to do Tower of Hanoi or even tree traversals in a non-recursive language, compared to the ease of recursion. Our second semester deals with data structures - still using Pascal, largely trees (general, binary, search trees, balanced, B-trees) with some graphs (pointers and linked lists having been introduced in the first semester). We also deal some with complexity analysis which is introduced in the first semester for simple cases. I hope this attempt is of some use to you. Barry Wittman Instructor