Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

desirability of OO _teaching_ language for CS1?

5 views
Skip to first unread message

Gary Capell

unread,
Feb 23, 1995, 7:56:02 PM2/23/95
to

What do folks think about the advantages and disadvantages
of teaching CS1 with a language designed explicitly for that
purpose, and then _later_ teaching languages students will use
more in the real word?

As I see it, the advantages may include: faster learning, better
understanding of some theory, and learning to program _into_ a
language rather than _in_ it. Disadvantages may include: the
effort of learning a language which may never be used again,
the confusion of adapting to the second language.

Would the advantages or disadvantages be more weighty?

What led me to think of this was the paper
ftp://ftp.cs.su.oz.au/pub/tr/TR94_488.ps.Z
"Requirements for a First Year Object-Oriented Teaching Language"
Michael Koelling, Bett Koch and John Rosenberg
ISBN: 0 86758 935 3

which looks at what such a language should and shouldn't do.
--
<A HREF="http://www.cs.su.oz.au/~gary/">Gary Capell (ga...@cs.su.oz.au)</A>
"I went to the woods because I wanted to live deliberately."--Thoreau

Brian Harvey

unread,
Feb 24, 1995, 11:54:02 AM2/24/95
to
ga...@cs.su.oz.au (Gary Capell) writes:
>What do folks think about the advantages and disadvantages
>of teaching CS1 with a language designed explicitly for that
>purpose, and then _later_ teaching languages students will use
>more in the real word?
>
>As I see it, the advantages may include: faster learning, better
>understanding of some theory, and learning to program _into_ a
>language rather than _in_ it. Disadvantages may include: the
>effort of learning a language which may never be used again,
>the confusion of adapting to the second language.

We teach using Scheme, a language that was designed, not specifically
for CS1, but indeed specifically for teaching. But the question needs
closer examination, because "designed for teaching" may mean different
things to different people. Pascal, for example, was "designed for
teaching" in the sense that it deliberately withholds important
capabilites from the user lest they be confusing -- dumbed down, in
other words. Scheme was "designed for teaching" in the sense that it
tries to make the innards of the language as visible as possible, so
that there are no mysterious features.

There is also an implicit assumption in the question that the "real world"
languages of four years from now (or more, if the students go on to
graduate school) will be the same as they are now. Because if not, then
the students are going to have to deal with learning another language, and
we might as well teach them not to be afraid of that. I wouldn't hire as
a programmer anyone who couldn't pick up a new language in a day or so.

And surely that implicit assumption is less true right now than ever. Surely
it's not going to take another four years for people to get sick of C++,
don't you think? Such a baroque language!

So, to take the specific case of OOP: Scheme is *not* officially an OOP
languge, but it takes about 200 lines of code to implement an OOP system
in Scheme, and those 200 lines are available as an object of study, so
our CS 1 students can see how OOP really works. And the same with the
other programming paradigms we study!

Bottom line: I think the alleged disadvantage of having to learn another
language is really an advantage in disguise. Yes, some students have
trouble with it, but the ones who are going to end up competent programmers
enjoy the contrast.

Brian Harvey

unread,
Feb 27, 1995, 7:56:17 PM2/27/95
to
tech...@vysor.synapse.net writes:
>b...@anarres.CS.Berkeley.EDU (Brian Harvey) writes:
>>... I wouldn't hire as a programmer anyone who couldn't pick up a new
>>language in a day or so.
>
>Would he or she have to be able to walk on water as well ? And if the new
>language could be picked up in a day or so, how complex and capable would
>such a language be ?

Well, when I was a kid in high school, after struggling mightily to learn
Fortran and IBM 7094 assembler, I then started picking up whatever other
languages I came across (Snobol and Cobol online, Algol in the CACM, APL
through Iverson's book) in not much more than a day each.

These days, there is a wider range of languages. However, our freshmen
come out of our first-semster course having worked with functional
programming, object-oriented programming, and logic programming styles.
Given that they understand the big ideas, I still think it shouldn't
take more than a day to learn the notation of any particular functional,
OOP, or declarative language.

Certainly, when someone invents a brand new programming paradigm, *that*
will take more than a day to learn. But, c'mon, we're not talking about
"complex and capable" languages here; out in the real world they're
using C++.

James McKim

unread,
Mar 2, 1995, 9:40:05 AM3/2/95
to
In article <3ijar2$h...@staff.cs.su.oz.au> ga...@cs.su.oz.au (Gary Capell) writes:
>
>What do folks think about the advantages and disadvantages
>of teaching CS1 with a language designed explicitly for that
>purpose, and then _later_ teaching languages students will use
>more in the real word?

Well, this has essentially been tried a couple of times hasn't it?
First with Basic and then with Pascal. Actually, both were pretty
successful in their time.

>
>As I see it, the advantages may include: faster learning, better
>understanding of some theory, and learning to program _into_ a
>language rather than _in_ it. Disadvantages may include: the
>effort of learning a language which may never be used again,
>the confusion of adapting to the second language.
>
>Would the advantages or disadvantages be more weighty?

Right now there seems to be _very_ strong feeling that even the
CS1 language must not only be a commercial one, but an extremely popular
commercial one. This "requirement" has even affected the folks in charge of
developing AP (advanced placement) exams in the States to the point
that C++ may be required in some _high school_ courses.

IMHO this is a mistake. If the beginning language _must_ be a commercial
language then let it at least be a language whose designer had learnability
and readability in mind. Among the OO languages, Eiffel comes to mind.



>
>What led me to think of this was the paper
>ftp://ftp.cs.su.oz.au/pub/tr/TR94_488.ps.Z
>"Requirements for a First Year Object-Oriented Teaching Language"
>Michael Koelling, Bett Koch and John Rosenberg
>ISBN: 0 86758 935 3
>
>which looks at what such a language should and shouldn't do.
>--
><A HREF="http://www.cs.su.oz.au/~gary/">Gary Capell (ga...@cs.su.oz.au)</A>
>"I went to the woods because I wanted to live deliberately."--Thoreau

Hope this helps,
-- Jim

--

*------------------------------------------------------------------------------*
Jim McKim (203)-548-2458 Co-editor of Eiffel Outlook
Internet: j...@hgc.edu Subscribe early and often!

tech...@vysor.synapse.net

unread,
Feb 26, 1995, 5:57:52 PM2/26/95
to
In article <3il2va$c...@agate.berkeley.edu> b...@anarres.CS.Berkeley.EDU (Brian Harvey) writes:
>... I wouldn't hire as a programmer anyone who couldn't pick up a new
language in a day or so.

Would he or she have to be able to walk on water as well ? And if the new

language could be picked up in a day or so, how complex and capable would such
a language be ?

Sounds to like a particularly arrogant point of view to me.
SJD

---------------------------------------------------
VYSOR Integration Inc, a member of the Geomatics
Industry Association of Canada.
91 rue Bocage, Suite B, Gatineau, Quebec,
CANADA J8T 5W5.
ph (819) 246-7792 fx (819) 568-6859
Main Products: "V-image Remote Sensing Software
for Windows", "Concept!Toolkit", "PiXCL for Windows"
email tech...@vysor.synapse.net
WWW http://www.synapse.net/vysor/Welcome.html
----------------------------------------------------

tech...@vysor.synapse.net

unread,
Feb 27, 1995, 2:47:57 PM2/27/95
to
In article <3itsbh$4...@agate.berkeley.edu> b...@anarres.CS.Berkeley.EDU (Brian Harvey) writes:

>Certainly, when someone invents a brand new programming paradigm, *that*
>will take more than a day to learn. But, c'mon, we're not talking about
>"complex and capable" languages here; out in the real world they're
>using C++.

Well, perhaps I've been out in the real world writing C/C++ for too long. The
real issue is that while a well trained programmer probably *can* pick up a
new language notation in a couple of days, becoming proficient and productive
in the new language, (and by extension, its development environment tools and
the real-world API) will take a lot longer. An example: throwing a programmer
who knows C only at Visual C++ and telling him to start writing fast
effective C++ for Windows 95 in a week. It won't happen. He/she would be able
to learn the details, which I why I would hire such a person. :-)

Stewart DIBBS

Darrah Chavey

unread,
Mar 6, 1995, 12:06:45 PM3/6/95
to
In article <3ijar2$h...@staff.cs.su.oz.au>, ga...@cs.su.oz.au (Gary Capell) wrote:
> What do folks think about the advantages and disadvantages
> of teaching CS1 with a language designed explicitly for that
> purpose, and then _later_ teaching languages students will use
> more in the real word?
> ...

> What led me to think of this was the paper
> ftp://ftp.cs.su.oz.au/pub/tr/TR94_488.ps.Z
> "Requirements for a First Year Object-Oriented Teaching Language"
> Michael Koelling, Bett Koch and John Rosenberg
> ISBN: 0 86758 935 3
>
> which looks at what such a language should and shouldn't do.

I was at the talk they gave on this paper Friday, and they did a fairly
good job of convincing me (at least) that this is the right approach.
I agree completely with Brian Harvey's reply:

> Bottom line: I think the alleged disadvantage of having to learn another
> language is really an advantage in disguise. Yes, some students have
> trouble with it, but the ones who are going to end up competent programmers
> enjoy the contrast.

I think it's best to start with one language that concentrates on simple
programming concepts, without the clutter that confuses novices, and then
later move to a more powerful language. Students _must_ be exposed to multiple
languages.
Having just gone to 6 talks at SIGCSE that all said "You know, we've started
teaching C++ in CS1 (or CS2), and it's really not as bad as you might think",
I've come away more convinced than ever that we should _not_ teach C++ at
this level. (The paper you mentioned, plus 2 others and the
Birds-of-a-Feather
session helped convinced me of this.) And I agree with Brian that there is
certainly no disadvantage, and probably an advantage, in teaching with one
language and then switching to C++ later. However, I'm not quite as
convinced that the "other" OO languages around are not viable as a teaching
language. There are still some good arguments to be made for Object Pascal,
Object Turing, Eiffel, or Oberon. (I don't think Smalltalk is a good option
as a first teaching language.) Thus I'm not sure that _I_ would be willing to
go to the work that the author's intend to in building a new object oriented
language solely for teaching. However, if they are successful in their goals,
I am certainly planning on seriously considering their "Blue" as a language
to use in our CS 1.

Darrah Chavey Those who do not understand Unix are
Math/CS Dept. condemned to reinvent it, poorly.
Beloit College -- Henry Spencer, Univ. Toronto Unix hack
700 College St. Beloit, WI 53511

Michael Feldman

unread,
Mar 10, 1995, 6:43:29 PM3/10/95
to
In article <chavey-0603...@144.89.40.33>,
Darrah Chavey <cha...@beloit.edu> wrote:

> Having just gone to 6 talks at SIGCSE that all said "You know, we've started
>teaching C++ in CS1 (or CS2), and it's really not as bad as you might think",
>I've come away more convinced than ever that we should _not_ teach C++ at
>this level. (The paper you mentioned, plus 2 others and the
>Birds-of-a-Feather session helped convinced me of this.)

Considering the supposed popularity of C++ in the world, I am quite
astounded at the lack of enthusiasm of all these teachers who are trying
to do C++ in CS1 and CS2. Most of the ones I've met are just as equivocal
as the ones you encountered at SIGCSE.

For an interesting comparison, consider the almost uniformly positive
statements made by those introducing Ada in CS1 or CS2. I was a speaker
on that panel at SIGCSE 94, and if you read the panel abstracts from
those two, you'll see what I mean.

I certainly have no problem with the idea of choosing an intro language
based on its pedagogical merit; indeed, that is exactly why we Ada fans
have chosen it. I have no particular problem with Scheme as an intro
language either, on any of the others, as long as they are chosen on
the merits and not on the basis of a supposed popularity contest.

I am quite amazed at the - overall - thin intellectual arguments made
in favor of C++ in intro courses; the most common reasons given are

- the kids will need it for jobs in industry

(true, at least these days, but what's that got to do with _freshman_
courses?);

- the kids will need it in upper-division courses

(also true, at least these days, but why force the first-year courses
to bear this burden? Why not introduce it, as we do at GW, in the
later courses where it belongs?)

We've had threads on this group before on the merits of Ada, so I don't
want to start another one. We can continue this by e-mail. Meanwhile,
you can peruse this list of colleges and universities who are using Ada
with success in CS1 and CS2. The length of this list has grown steadily,
about 25-50% per year. A few schools have dropped off, but in the cases
I am aware of, the upper-division faculty voted to force the change on
the CS1/CS2 experts, for the "reasons" given above.

Mike Feldman

--- cut here ---

Ada as a Foundation Programming Language

Michael B. Feldman
Chair, ACM-SIGAda Education Working Group
Department of Electrical Engineering and Computer Science
The George Washington University
Washington, DC 20052
(202) 994-5919 (voice) - (202) 994-0227 (fax)
mfel...@seas.gwu.edu

February 1995

This report lists the colleges and universities known -- or at least credibly
believed -- to have adopted Ada as a "foundation language," at CS1, CS2,
or CS7 level in their computer science (or similar) curricula. I choose
to keep track of precisely these courses because they are taken by
students in either first or second year, and thus early enough to serve
as a foundation upon which to build a large portion of the undergraduate
software curriculum.

This data is, for the most part, verifiable, based on first-hand reports
from the teachers of those courses. In a few cases, publishers' textbook
adoption data was used. I would like to keep this list as complete and up to
date as possible, so please let me know of any additions or corrections.

Group 1: Colleges and Universities Introducing Ada as the First Language
Taught in an Undergraduate Computing Curriculum.

Allan Hancock College, California
Armstrong State College, Georgia
Auburn University
Australian Defence Force Academy, Canberra
Basque University, San Sebastian, Spain
Birmingham Southern College, Alabama
California State University, Long Beach
California Polytechnic State University, Pomona
California Polytechnic State University, San Luis Obispo
Chalmers University of Technology, Sweden
Clemson University, South Carolina
Conservatoire National des Arts et Metiers, Paris, France
Cranfield Institute of Technology, United Kingdom
Cypress College, California
Daniel Webster College, New Hampshire
Ecole Nationale Superieure des Telecommunications de Bretagne, France
Ecole Superieure en Sciences Informatiques, Nice, France
Edith Cowan University, Perth, Australia
Embry-Riddle Aeronautical University, Arizona and Florida campuses
Florida Institute of Technology
Fayetteville State University, North Carolina
Flinders University, Australia
Friedrich Schiller University, Jena, Germany
The George Washington University, Washington, DC
Indiana-Purdue University, Ft. Wayne
Institut National des Sciences Appliquees, Toulouse, France
Jerusalem College of Technology, Israel
LeMoyne College, New York
Lenoir-Rhyne College, North Carolina
Loyola Marymount University, California
Marion County Technical Center, West Virginia
Marshall University, West Virginia
Montana State University
Murray State University, Kentucky
Muskingum College, Ohio
National Defense Management College at Taiwan, Republic of China
Northeast Missouri State University
Northern Arizona University
Norwich University, Vermont
Otterbein College, Ohio
Portsmouth Polytechnic, United Kingdom
Royal Melbourne Institute of Technology, Australia
Royal Military Academy, Belgium
Sacred Heart College (Connecticut)
Saint Mary College, Kansas
Sam Houston State University, Texas
San Diego Mesa College, California
Santa Clara University
Seattle University
South Bank University, United Kingdom
Southampton Institute of Higher Education, United Kingdom
Southern Arkansas University
St. Cloud State Univ., Minnesota
State University of New York at Plattsburgh
Stockton College of New Jersey
Swinburne University of Technology, Australia
Technical College of Berlin, Germany
United States Air Force Academy
Universite de Quebec a Montreal, Canada
University of Adelaide, Australia
University of Aston, United Kingdom
University of Bradford, United Kingdom
University of Brighton, United Kingdom
University of Canberra, Australia
University of Cantabria, Spain
University of Dayton, Ohio
University of Glamorgan, Wales, United Kingdom
University of Hertfordshire, Hatfield, United Kingdom
University of Lancaster, United Kingdom
University of Liverpool, United Kingdom
University of Maryland (University College)
University of Montana - Missoula
University of Muenster, Germany
University of New Orleans
University of North Dakota
University of Paisley, United Kingdom
University of Rome at Tor Vergata, Italy
University of Salzburg, Austria
University of Sofia, Bulgaria
University of South Dakota
University of South Florida
University of Stafford, United Kingdom
University of Wales, Aberystwyth, United Kingdom
University of York, United Kingdom
Valparaiso University, Indiana
West Virginia University

Group 2: Colleges and Universities Not Introducing Ada as the First Language
but Rather in a CS2 or Data Structures Course (or equivalent)

Briar Cliff College, Iowa
California State University, Fullerton
College of West Virginia, Beckley
Covenant College, Georgia
Davis and Elkins College, West Virginia
Ecole d'Ingenieurs de l'Etat de Vaud, Switzerland
Ecole Nationale de l'Aviation Civile, Toulouse, France
Florida International University
Gallaudet University, Washington, DC
Georgia State University
Indiana University, New Albany
Mesa State College, Colorado
Monterey Peninsula College, California
Mount Mercy College, Iowa
National University, California
Nicholls State University, Louisiana
Norfolk State University, Virginia
Northern Arizona University
Northern Kentucky University
Oglethorpe University, Georgia
Ohio University, Athens
Pennsylvania State University, Harrisburg
Rose Hulman Institute of Technology, Indiana
Southwest Baptist College, Missouri
Shippensburg University, Pennsylvania
State University of New York at Fredonia
Swiss Federal Institute of Technology, Lausanne
Technical University of Madrid, School of Telecommunication Engineering
University of Alaska, Fairbanks
University of Geneva, Switzerland
University of Missouri, Columbia
University of Otago, Dunedin, New Zealand
University of Richmond, Virginia
University of Scranton, Pennsylvania
University of Seville, Spain
University of Texas, Austin
University of Texas, Permian Basin
University of Zaragoza, Spain
Weber State University, Utah
Western New England College, Massachusetts

Lou Steinberg

unread,
Mar 13, 1995, 1:24:14 AM3/13/95
to
In article <3jqo71$a...@felix.seas.gwu.edu> mfel...@seas.gwu.edu (Michael Feldman) writes:

I am quite amazed at the - overall - thin intellectual arguments made
in favor of C++ in intro courses; the most common reasons given are

[...]

- the kids will need it in upper-division courses

(also true, at least these days, but why force the first-year courses
to bear this burden? Why not introduce it, as we do at GW, in the
later courses where it belongs?)

There are two reasons:

a) At least at Rutgers, there is no single course that all majors
take after CS2. Rather, the next course they take may be any of
several. We were trying to teach C in _each_ of these courses, and
that did not work, so we moved C into CS2, and, sadly, probably will
now move it into CS1.

b) Most CS professors feel that teaching a language, per se, is
questionable as content for a University-level CS course. Community
colleges and trade schools teach courses in "C" or "Fortran". We
are Computer Scientists and we teach principles, not languages. We
are willing to make concessions in CS1, since we are teaching
principles of programming and not just, e.g., Pascal, but after that
we expect students to be able to learn a procedural language more or
less on their own.

However, learning C is _hard_, at least for students who have only
seen one language (e.g., Pascal) and only had CS1 and 2. Many of them
cannot learn it without substantial instruction. Since the only course
where we are willing to give substantial instruction in a language is
CS1, that is where we must teach C.

I agree that in general we should teach principles, not languages.
How ever, if complete adherence to this principle drives us to teach C
in CS1, then I think bending the principle to teach C in a later course
is the lesser of evils. (Maybe we can say we are teaching the principles
of how to learn a new language :)

Brian Harvey

unread,
Mar 13, 1995, 2:46:23 AM3/13/95
to
l...@cs.rutgers.edu (Lou Steinberg) writes:
> a) At least at Rutgers, there is no single course that all majors
> take after CS2. Rather, the next course they take may be any of
> several. We were trying to teach C in _each_ of these courses, and
> that did not work, so we moved C into CS2, and, sadly, probably will
> now move it into CS1.
(etc.)

Okay, here's a radical suggestion: Let's not teach C/C++ at all in the
computer science sequence. Let's teach all our computer science classes
in a language we don't hate -- take your pick, mine is Scheme -- and then
offer a one-unit course just on C for those students who absolutely feel
they need it for the real world.

When I'm teaching data structures, in fact, I go ahead and lecture in
Scheme no matter what language the students are using. There is something
really appealing about filling four chalkboards with

(define (insertion-sort stuff)
(if (null? stuff)
'()
(insert (car stuff)
(insertion-sort (cdr stuff)))))

(define (selection-sort stuff)
(if (null? stuff)
'()
(cons (smallest stuff)
(selection-sort (remove (smallest stuff) stuff)))))

(define (mergesort stuff)
(if (< (length stuff) 2)
stuff
(merge (mergesort (one-half stuff))
(mergesort (other-half stuff)))))

(define (partition-sort stuff)
(if (< (length stuff) 2)
stuff
(let ((pivot (guess-median stuff)))
(append (partition-sort (filter (lambda (x) (< x pivot)) stuff))
(filter (lambda (x) (= x pivot)))
(partition-sort (filter (lambda (x) (> x pivot)) stuff))))))

Only imagine that the last two are in a column next to the first two.
Then I can say "the first column takes things one at a time, the second
column takes things half at a time. The first row divides arbitrarily
and does the sorting in the recombination; the second row sorts in the
division, then just recombines the results by concatenation."

You just can't do that sort of thing when your code is full of
declarations and syntactic noise!

Michael Feldman

unread,
Mar 13, 1995, 10:56:24 PM3/13/95
to
In article <LOU.95Ma...@athos.rutgers.edu>,
Lou Steinberg <l...@cs.rutgers.edu> wrote:

> a) At least at Rutgers, there is no single course that all majors
> take after CS2. Rather, the next course they take may be any of
> several. We were trying to teach C in _each_ of these courses, and
> that did not work, so we moved C into CS2, and, sadly, probably will
> now move it into CS1.

That's a variant of my reason (2): "the kids need it in the upper division".

[snip]

> However, learning C is _hard_, at least for students who have only
> seen one language (e.g., Pascal) and only had CS1 and 2. Many of them
> cannot learn it without substantial instruction. Since the only course
> where we are willing to give substantial instruction in a language is
> CS1, that is where we must teach C.

This is amazingly contradictory. I don't mean to flame _you_; I think
your colleagues' reasoning is contradictory. On the one hand, learning
C is _hard_, even after CS1/2. On the other, we should teach it in CS1.
Amazing.

>I agree that in general we should teach principles, not languages.
>How ever, if complete adherence to this principle drives us to teach C
>in CS1, then I think bending the principle to teach C in a later course
>is the lesser of evils. (Maybe we can say we are teaching the principles
>of how to learn a new language :)

I couldn't agree more. BTW - we are doing just that here at GW. We have
a 1-credit lab course, with the CS1/2 as prerequisites, in which _just_
C is taught. Maybe it's because we are a joint EECS department, but the
idea of a 1-credit lab is sort of "normal" for us - it is how we teach
the EE's to learn to use the lab instruments. In this sense, C really
is like a lab instrument. I am sympathetic to the "principles, not
languages" argument, but do not think it should be applied dogmatically.

We have gone back and forth about whether assembler should be a full
3-credit course. At the moment, we do Mac assembler in 3 credits, but
that could flip to a 1-credit lab as well.

(As it happens, our CS1 and CS2 courses are Ada, but the idea could work
as well with other CS1/2 languages.)

Mike Feldman

Lou Steinberg

unread,
Mar 14, 1995, 11:29:09 AM3/14/95
to lou
In article <3k3458$6...@felix.seas.gwu.edu> mfel...@seas.gwu.edu (Michael Feldman) writes:

Lou Steinberg <l...@cs.rutgers.edu> wrote:

> However, learning C is _hard_, at least for students who have only
> seen one language (e.g., Pascal) and only had CS1 and 2. Many of them
> cannot learn it without substantial instruction. Since the only course
> where we are willing to give substantial instruction in a language is
> CS1, that is where we must teach C.

This is amazingly contradictory. I don't mean to flame _you_; I think
your colleagues' reasoning is contradictory. On the one hand, learning
C is _hard_, even after CS1/2. On the other, we should teach it in CS1.
Amazing.

If my comment sounded like I was quoting colleagues, I should clarify:
this was my own analysis of the *mostly unstated* reasoning that led
us to our current position. I'm sure none of my colleagues would take
this position once it is put in this explicit form. In fact, my point
in making this analysis is to bring out the contradictions that I
think are implicitly behind our reasoning.

0 new messages