Jon Stewart on 15 Sep 2003 16:16:42 -0000


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [ALACPP] Advice for a teacher, please


> We are about to enter discussions for curriculum changes, and my gut 
> feeling is that the C class should go, with a little bit of C being 
> incorporated into one of the other courses.  It's 45 minutes a day, five 
> days a week, for a full 10 months. My opinion is that this is entirely 
> too much C for a curriculum in which the students are destined to move 
> away from it. One thing on my side is that most of the students who took 
> the C course last year (before I started working there) did not sign up 
> for the more advanced course, but I would like more.
> 
> I personally learned C++ from the get-go about 8 years ago when I began 
> to study object-oriented programming, picking up some C along the way 
> over the years, and I feel fine about it.
> 
> However, I think I probably have the least industry experience of anyone 
> on this list, so I'd like your expert input:
> 
> How much C do you really need to get the most out of C++?


A moderate amount -- a very common usage of C++, and kind of what the 
language is best used for, is to write a library in C++ and then create a 
C wrapper API for it. You need to know some C to create that wrapper.

To respond to the more expansive topic, I think the most important 
fundamentals of CS/Programming are perhaps given the least amount of 
attention:

 * Programming is fun.

 * Programs should be elegant, simple, natural, neither clever nor 
brute-force stupid. A well-written program reflects a well-organized 
solution to a problem; "programming is understanding."

 * Self-reliance, fearlessness, and determination are virtues.


While learning how a program stack works and how memory is arranged are 
useful, they shouldn't be the focus of an elementary class -- they're 
details when compared to the large problem of expressing a program 
precisely and accurately in a formal language. So, I wouldn't teach an 
intro class in C. I think I'd teach an intro class in Java, mostly. First, 
because Java provides a pretty standardized environment (fewer accidental 
details to worry about), second, the libraries let you build "real" 
programs that can serve as motivation for students, third, Java's name 
recognition and perceived utility also provides motivation, finally, while 
it may lack some more advanced techniques for code re-use and flexibility, 
Java does allow for elegant programs (as long as you avoid "web-apps" that 
involve writing formatted i/o all over the place...). 

I'd think the thing to do right off the bat is to take a simple Java 
application, with windows and menus and the mouse, etc., and have them 
modify it, just a tiny bit. From there, you can start to drill down and 
present new material in a comfortable environment. From the beginning, 
they get to see that they can produce a "real" program (which I for too 
long considered a daunting task when I was learning CS). In addition, I 
think it's useful to have a few assignments later on where the problem is 
perhaps best solved by judicious use of the class libraries. Give them 
some pointers to the class lib docs, show a few usages, and turn them 
loose. I don't think you'll get full utilization of the library as the 
result, but it'll encourage them to learn how to read documentation and 
think for themselves ("how can I apply these tools to lessen my effort?").

Perhaps finally, I'd take some time out from Java every once in a while to
work in a different language. Perhaps use a functional language when
exploring recursion. A tangent in first order logic can be explored simply 
in Prolog. String manipulation calls for regular expressions, and Perl, or 
maybe Python, can help you out there. The goal isn't to teach them 
proficiency in these languages, not at all, and I'd given them example 
programs as a starting point and only discuss those language features 
which they'd need. The goal is teaching them self-reliance and 
fearlessness; "yes, this is different, but you can do it."

The second and third years could remain largely unchanged, C++, with an 
emphasis on OO and various techniques. It would also be useful, I'd think, 
to have them wrap their C++ with C and/or Python APIs. Having them use a 
database in a program would also be a useful skill. And, of course, C++ 
can really excel at the traditional data structures topics, which are 
often the focus of a second or third programming course.

My $.02.



Jon
-- 
Jon Stewart                                 Advanced Los Angeles C++
stew1@xxxxxxxxxxx                           http://www.alacpp.org
_______________________________________________
alacpp mailing list
alacpp@xxxxxxxxxxx
http://lists.ellipsis.cx/mailman/listinfo/alacpp