[comp.lang.c] Teaching C as first programming language

djp@central.cis.upenn.edu (David Phillips) (06/13/91)

Our department has decided to switch from Pascal to C as the intro
programming language.  If anyone has taught this before and has any
advice or warnings (other than not to try), please send them on.

Thanks.
djp
************************************************************************
David Phillips    University of Pennsylvania   djp@central.cis.upenn.edu

darwinl@alliance.uucp (Darwin Ling) (06/15/91)

As a student before, one thing I hate the most when I first learn C is
that the weak type checking "feature" it has. It is especially bad as
my first labguage is Pascal. So, if possible , get the ANSI C instead
of the other one (like the one available on BSD Unix 4.2{3}, or
whatever..}


I.E. get one with a stronger type checking feature. It would ease the
efforts a lot in leanring a new programming language like C. One
thing, you may be aware of it already, is that , C is not intended for
any educational purposes like Pascal's. So, it got a lot of stuff
there which is to allow programmer to get around things .

------------------------------------------------------------------
				Darwin Ling                       

				Alliance Technologies , Inc
				Advanced Development group
				uunet :     uunet!alliance!darwinl
------------------------------------------------------------------

ditolla@itnsg1.cineca.it (Francesco Di Tolla) (06/20/91)

It's good!
If the first language you learn is hard, then you 'll learn other
languages in a short time;
if you learn C or Pascal, you'll be able to read programs written
in Fortran or Basic.
C is a bit harder then Pascal..., so the student also in other 
laguages 'll program better then if hi started with the other.
Force them to write subroutines also for tasks for which they
already exists (ex. strcpy.....).
As reference manual the K.R. is good but slow, it explains
must important features only after a long introduction, so
the student 'll have problems in understanding things like
'visibility' and 'lifetime' of variables, or the utility of
pointers..., very good from this point of view are the original
manuals of Microsoft C (I learned much more on them, in the version
4.0).
In a first course I won't talk about object oriented programming.
Don't make applications to graphics, they are not standard 
F.

chapmans@motcid.UUCP (Simon ( Grouchy Babes ) Chapman) (06/20/91)

In article <1991Jun19.172436.14898@itnsg1.cineca.it> ditolla@itnsg1.cineca.it (Francesco Di Tolla) writes:
>It's good!
>If the first language you learn is hard, then you 'll learn other
>languages in a short time;
>if you learn C or Pascal, you'll be able to read programs written
>in Fortran or Basic.
>C is a bit harder then Pascal..., so the student also in other 
>laguages 'll program better then if hi started with the other.

I can't believe that I just read this. Not a sign of `IMHO'
anywhere. If you make students learn a language that you _know_
is `hard', are you sure you haven't put them off learning
another language forever ?

I'm not overly sold on the idea of giving anyone K & R as a
learning exercise either. I regularly recommend Stephen Kochan's
C books as good beginning C books.

IMHO. ;-) Flame off. Where's the vodka.

 +----------------------------------------------------------------------------+
 | Simon Chapman    Motorola CID. UK.                 "Go UCD Aggies !!"      |
 | UUCP     : ...uunet!motcid!pyramid!chapmans                                |
 | Internet : motcid!pyramid!chapmans@uunet.uu.net                            |
 | Phone    : +44 793 545425 (international)    (0793) 545425 (domestic)      |
 +----------------------------------------------------------------------------+

ron@eatdust (Ron Schweikert) (06/21/91)

In article <7363@maize.UUCP> chapmans@motcid.UUCP (Simon ( Grouchy Babes ) Chapman) writes:
>In article <1991Jun19.172436.14898@itnsg1.cineca.it> ditolla@itnsg1.cineca.it (Francesco Di Tolla) writes:
>>It's good!
>>If the first language you learn is hard, then you 'll learn other
>>languages in a short time;

stuff deleted..

>I can't believe that I just read this. Not a sign of `IMHO'
>anywhere. If you make students learn a language that you _know_
>is `hard', are you sure you haven't put them off learning
>another language forever ?

Well, IMHO :-), C is okay as a starter (and obviously for advanced work!)

The key is to use it's structured
character and good support of top-down program design (IMHO).  You don't get 
into ptrs to matrices of arrays of ptrs (:-) right off the bat anyway!  Don't 
use the "hard" parts of the language.  No flames please, I know that you can
write really "bad" C, but just because a language has power and flexibility
doesn't mean you have to use it or teach it (IMHO).  I think C is 'hard '
because people haven't learned the basics (IMHO). (ok, no more kidding with 
IMHO).

I took one Pascal class, never did anything outside of the class (Adult
Continuing Education, so it wasn't really "in-depth") and then took C.  We
did a lot of the "simple" stuff and learned good programming style, *then*
worked into the more challenging stuff.  The key is the teacher and the
curriculum, not the language (IMHO) :-)

cosper@seq.uncwil.edu (Kit Cosper) (06/21/91)

chapmans@motcid.UUCP (Simon ( Grouchy Babes ) Chapman) writes:

			[deleted stuff]

>I'm not overly sold on the idea of giving anyone K & R as a
>learning exercise either. I regularly recommend Stephen Kochan's
>C books as good beginning C books.

	I just go through the first semester of C and had a blast.
	We used Kochan's _Programming in C_, which I found to be 
	a most friendly text for the neophyte programmer.  I also
	purchased K&R as a reference ( it's also used in the second 
	semester to follow up after Kochan ) and, aside from some
	lib functions at the end of the semester I didn't get much
	mileage this go 'round.  Not that it isn't a good book, IMHO
	it's excellent, just a little advanced for the beginner.

	At this university C is now "the" intro language.  I had BASIC
	years ago (~10) and had no problems with taking C and FORTRAN
	concurrently.  Actually, I found C easier than FORTRAN.


>IMHO. ;-) Flame off. Where's the vodka.

	Not here! I'm whiskey man

> +----------------------------------------------------------------------------+
> | Simon Chapman    Motorola CID. UK.                 "Go UCD Aggies !!"      |
> | UUCP     : ...uunet!motcid!pyramid!chapmans                                |
> | Internet : motcid!pyramid!chapmans@uunet.uu.net                            |
> | Phone    : +44 793 545425 (international)    (0793) 545425 (domestic)      |
> +----------------------------------------------------------------------------+

Kit

-- 

Kit Cosper
cosper@seq.uncwil.edu
Donations  of witty or thoughtful comments appreciated

s64421@zeus.usq.EDU.AU (house ron) (06/24/91)

cosper@seq.uncwil.edu (Kit Cosper) writes:

>	I just go through the first semester of C and had a blast.
>	We used Kochan's _Programming in C_, which I found to be 
>	a most friendly text for the neophyte programmer.  I also
>....
>	At this university C is now "the" intro language.  I had BASIC
>	years ago (~10) and had no problems with taking C and FORTRAN
>	concurrently.  Actually, I found C easier than FORTRAN.

Then you're not a neophyte programmer, are you?  When you learn you
very first language, you master all sorts of _concepts_ which you never
need learn again.

--
Regards,

Ron House.   (s64421@zeus.usq.edu.au)
(By post: Info Tech, U.C.S.Q. Toowoomba. Australia. 4350)