On Jan 3, 2012, at 3:44 PM, Richard wrote:
For the record, no, I don't recommend C++ for
beginners, although some
do and many have done that as their first programming course. I would
probably start with Logo, then C#, then C++, then assembly.
At my university, we used to have CS 201 in C. CS 201 was intended to be the intro to CS
for students who already had *some* programming experience (C, Javascript, BASIC,
whatever), whereas 104 was intended to be the "remedial" course where folks with
zero experience would learn the basics.
Unfortunately, the advisors responsible for incoming student authorizations gave into the
impatient students and started letting just anyone take CS 201. By the time I was a TA
(13 years after the paradigm had been established), probably only about 20% of the class
had had any programming experience (and were quite bored) while we struggled to guide the
rest of them through first UNIX shells and then the code-compile-run-swear-repeat
sequence.
We switched to Python a few years ago, and the difference has been amazing. At least
compared to C, it just gets out of the way of learning the principles of programming
pretty well. I think what caused the most trouble was the bit about meaningful
indentation, which is something I've never really been a fan of; I like my braces (or
at least some form of explicit block boundary)! Of course, the students who never learned
to pay attention to their indentation level were generally the sort that wound up as IT or
English majors anyway. If nothing else, Python taught the students that neatness counts.
:-)
I, myself, learned BASIC first on my elementary school's Apple IIs. For a kid,
it's a pretty good language. I transitioned to C when I discovered that I
couldn't do much interesting with what BASICs were available to me, but I never
understood pointers until I learned assembly (it was a major epiphany, especially since I
learned on PowerPC, where pointer dereferencing was an entire different instruction, not
just a different addressing mode). Currently, our students learn C concurrently with
assembly further on in the program (it's a 300-level course), which I think is a great
idea. All of the web designers who just want to learn Java and get a job are already
shunted away on a different track at that point.
I shudder at the fact that many of our high schools use Java as an introductory language.
I really can't see the point of starting someone out saying, "Your program runs
from a special method in a special class (we'll teach you what both of those are
later) labelled 'public static void main()'. Just wave the chicken correctly, and
maybe if you stick with it long enough, you'll find out what that magic incantation
means."
- Dave