[comp.edu] teaching 1st year undergrads

jbd@duke.cs.duke.edu (Joanne Bechta Dugan) (07/13/87)

I recently requested advice and commentc concerning teaching an intorductory
computer science course to first-year students who were serious majors.
Below is a compendium of responses, edited a bit to keep it short.

BTW - I found a very nice book that I will use: Condensed Pascal (with
more Math and Science by Doug Cooper) that I will use this fall.  It is 
basically a condensed version of Oh!Pascal (for which I received several 
recommendations) but with examples and exercises drawn from math and science.

Anyway, here are the comments and suggestions I received:
---------------------------------------------------------------------------
The hardest part is molding the minds to THINK like computer scientists. The
syntax and the like are easy. Two books that come to mind are by Nell Dale from
Texas and Bill Bulgren from Kansas (at home so i don't have titles) You need to
decide (fairly early) if your goal is for people to pass a watered down course
or to teach a rigorous course that students come out of with some talents. The
former gets good evaluations while the latter gives internal warm fuzzies.

I like to concentrate on the concepts of counting, repetition, controling
repetition, decisions, when arrays are needed and the like before going into
procedures and functions. I try to make procedures and functions as similar as
they really are. Recursion and pointer variables are appropriate for rigorous
courses but not for mickey mouse courses.
-------------------------------------------------------------------------------
You ought to look at Doug Cooper and Mike Clancy's "Oh! Pascal!"
second edition, (W.W.Norton and Company, Inc.), 1985.  Some folks
may have had reservations about the first edition but the second
is great.  Make sure you take a look at Cooper's excellent
instructor's manual.  There you'll find essentially a handbook
for teaching novices as it has been done at Berkeley for some time.
--------------------------------------------------------------------------------
Hi, I would recommend "Oh! Pascal" for intro to Pascal.  That is what I
first leanred with, then I taught the class later out of a newer edition.
It is organized in such a way as to provide nice little examples of
everything, including how to juggle linked lists in a straight forward
manner.  Plus it is a book that one can "read", not just "reference", 
making for easier absorption of Pascal.

I have had several other Pascal books, no others are memorable.
---------------------------------------------------------------------------------
I can suggest an excellent textbook that would ideal for first-year CS
students.  The book's title is "Oh! Pascal!" by Cooper and Clancy.  This
book is perhaps the most readable text I have ever seen.  It contains a
myriad of subjects, not limited to the study of introductory computer
programming.  

I have just been through what you will shortly be going through.  That is,
I just finished teaching CS I.  The only pieces of advice that I can offer
are pace yourself, avoid introducing more than one new topic per class
meeting, and hand out tons of examples.  Try to avoid simply writing the
examples on the [black|green|white]board; it is better for the students
to have something that they can take home with them to study without the
bother of taking notes.  This certainly makes your job more difficult, but
the overall effect is outstanding.
----------------------------------------------------------------------------------
        I don't like the book we use: Introduction to PASCAL and Structured
Design, by Neil Dale and David Orshalick, D.C. Heath and Company, 1983.  
First, it covers standard Pascal and not Turbo, but that may not be a problem
for you.  However, I found that the presentation was on a far too simplistic
level for my tastes.  I felt that CS majors should be presented the material
on a programming language in a more academic fashion. 

        If you will be using Turbo Pascal, there is a book I have found that
I have been recommending to my department that I like:  Problem Solving Using
Turbo Pascal, by Jacqueline A. Jones and Keith Horrow, Prentice-Hall, 1986.

        If you are not using Turbo Pascal, I still feel that the best book I
have seen on Pascal is the one that I used when I learned the language:
Programming in Pascal, by Peter Grogono, Addison Wesley.  The first edition
appeared in 1978.  I have the second edition at home, but I am not sure what
the most recent version is.

        The other book that I use in my class is: Computer Science: An
Overview, by J. Glenn Brookshear, Benjamine/Cummings Publishing Co., 1985.
I feel that this is an excellent text on some of the important sub-fields
within Computer Science and that it matches quite well with those topics
that I wish to discuss.  There are chapters on Operating Systems, Programming
Languages, Databases, AI, Algorithms, and more.......
----------------------------------------------------------------------------------
My favorite text books for Pascal are:

Wirth, Introduction to Systematic Programming
Wirth, Data + Algorithms = Programs

    Both books are somewhat "formal" in their presentation.  As an under-
    grad in the early 60's, I learned programming by reading articles in
    the Communications of the ACM.  I thought that Algol was a purely formal
    language, and quickly developed my own "metalanguage" for programming.

Cooper, Oh! Pascal

    This book follows Berkeley's "Problem Solving Approach".  Solve 
    lots of problems.  

Zwass, Introduction to Computer Science

    This is a Barnes and Noble (?) outline series.  The nice thing is
    that it talks about operating systems, etc., as well as programming
    languages.  And it contains samples of different languages, helping
    to avoid bigotry.  It is nice and cheap and can thusly be assigned
    as a second text.
----------------------------------------------------------------------------------
Almost all of the students in our computer science department are
now taught with the Turing programming language.  It has all the
features  (and more) of Pascal but is actually simpler than Basic.
This makes it really easy to use, learn and teach.  (The first time
we used it in a first year course it cut the lecture time required
from 26 to 22 hour.)

Turing also comes with an excellent textbook called "Introduction
to Computer Science Using the Turing Programming Language" by Holt
and Hume.  Its a really good book for an intro course because it
takes rights from the most elementary info and yet extends far enough
to cover students of any ability.

Secondly, I would recommend that you look at introducing your students
to some basic application programs (word processor, database and spreadsheet)
as these are the most likely programs they will encounter in the business
world.
----------------------------------------------------------------------------------
	I will be teaching the course this fall and can make
several comments.  First, it will be a Pascal based course (as
it has the past several years) using Borland's Turbo Pascal on
IBM PC's.  We are very close to switching to Modula 2 but want
to wait until the PCollier system is improved a bit.

	Secondly, we have found what is truely an excellent text.
It is titled "Building Pascal Programs" by Stuart Reges from
Stanfor University and published by Little, Brown and Company.
Reges has been teaching the intro course at Stanford for
several years and is heavily involved in AP computer science
for high school students.

	Finally, we will be moving away from the traditional set
of three or four programming projects in the fall semester
which start out easy and end up difficult.  I should mention
that all our courses are four credits.  We meet three times a
week in lecture and once a week for an hour in lab to discuss
the projects.

	It appears that the students need to be spoon fed, or at
least brought along more carefully.  We plan to change the lab
sessions from one hour to three hours long and give them a
series of "experiments" they can complete during the lab
period.  In a word, they are not capable of doing independent
work at this level.  By the time the first semester is over,
we hope their programming skills will be honed to the point
they can handle projects on their own in the second semester
(CS II) Data Structures course.
--------------------------------------------------------------------------------
Although I have never taken (or taught!) an intro CS course before, I
have alwasy felt strongly about teaching computer science or
programming rather than teaching a programming language. Obviously one
must teach a language if any programming is to be done, but to spend
an entire semester just to teach a programming language seems silly,
especially for people who intend to go on in CS and thus should be
fairly good. Surely you will be teaching some of the most basic data
structure and algorithms, if you get into recursion and pointers. For
example, arrays, linked lists, even trees are quite reasonable, and
algorithms like sorting, binary search, Hanoi, etc etc.

I think that the fundamental things that you want to get across to
undergraduate majors are:
1) The nature of sequential computation
2) The limitations imposed by the finiteness of the machine
3) The decomposition of problems into subproblems.

There are a number of recurring themes in the major which should be
brought out clearly to beginning majors:
There is the theme of recursion: This theme runs through trees,
lists, linear recurrences (used to analyze algorithms), string
processing (finite state machines), recursive routines, stacks,
binomial coefficients, mathematical induction and recursive
definitions, not to mention turing machines and a lot of
computability theory.
(Pointers, by the way, are just a way of implementing recursive
structures). Picking a theme like that can do a lot for students to
unify the many disparate ideas of computer science. 
Another good theme is finite state machines. They are fundamental to
many things (e.g. switch statements, string processing, circuit
design, computer arithmetic algorithms, computability theory,
compiler theory, all of computability theory, linear systems, markov
chains, coding/encryption, testing, etc, etc.

My suggestion would be to pick a theme and use it to introduce some
of the areas of study that they will run into later. You might
consider Arbib, et al (Springer Verlag) "A basis for theoretical
computer science" or, Knuth, volume 1 as an intro to the math and
data structures needed.

My major complaint about computer science programs is that they
never TEACH mathematical techniques, but they all expect their
students to somehow (magically) to have acquired them.
--------------------------------------------------------------------------------
	MIT uses the STRUCTURE AND INTERPRETATION OF COMPUTER
PROGRAMS by Abelson and Sussman for their introductory course.  
>From what I gather, a lot of other schools are beginning to 
follow their lead.  I have heard the book described as the most 
significant single book in computer science--the book to have 
if you are only going to have one book.  Personally, I consider 
that to be an understatement.  The text uses SCHEME as the language 
of instruction, a lexically scoped dialect of LISP.  I guess that
would be to reasonable a choice for Duke to consider.
I've never taught an intro course myself, but I have taught 2nd semester
students, both here and at Cornell.  My impression is that, even after one
semester's course in an elementary programming language, most students
are barely capable of composing a simple iterative algorithm, to do
anything posed as a "word problem".  (If you give them a detailed description,
in English or flowchartese of the ALGORITHM to use, most (not all) would be
capable of coding it into a familiar language.)  My impression is that it is most important to give these students exposure to some programming language,
emphasizing very basic, common language structures.  This should be reinforced
with problems whcih require the student to make choices among weveral
different methods.  Many examples of programs, and of algorithms being
developed while they watch, should also be used.  I'd be very doubtful that
either pointers, or their analoguous implementation using indexes stored
in another array could be covered.  Similarly, recursion may be over the heads
of most students at this level.  Bear in mind that "pointers" are best understood after the student knows what an "address" is -- and these students haven't
yet had a course in computer architecture.  Recursion MAY be understandable
to them, because they simply don't see that there are implementation problems
when a subroutine calls itself.  Quite possibly, you could get them to
design recursive programs, as an alternative to iterative ones -- I think
that MIT used pure LISP as the first-course programming language for years.
Mixing an iterative and recursive style of programming might be the hard
part -- I doubt that students at this level would have any hint as to why
(in terms of machine efficiency) one style might be preferqble to another
in some particular place.  

------------------------------------------------------------------------
(End of Comments)
------------------------------------------------------------------------
Joanne Bechta Dugan                  CSNET: jbd@duke
Computer Science Department          ARPA:  jbd@cs.duke.edu
Duke University                      UUCP:  {ihnp4|decvax|mcnc}!duke!jbd
Durham, NC 27706, USA                Phone: (919) 684-3048