Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: c,c++5,c#.

Author: Omid David Tabibi

Date: 11:13:46 08/11/04

Go up one level in this thread


On August 11, 2004 at 12:47:43, Anthony Cozzie wrote:

>>"It is practically impossible to teach good programming to students that have
>>had a prior exposure to BASIC: as potential programmers they are mentally
>>mutilated beyond hope of regeneration."
>>
>>and
>>
>>"Teaching BASIC should be a criminal offense."
>>
>
>The teaching of introductory computer science has always been of interest to me.
> Right now, most people are taught Java first and C second (=an intermediate
>language), if at all.  At CMU, I learned C (before I went there), then C++, then
>ML, then assembly, and I never really used Java at all, although now the
>introductory course is in Java.

In many universities C/C++ is replaced with Java as the first language, but I
think this is a big mistake. When someone learns Java, it would be very hard for
him to grasp the idea of pointers and other complicated issues in C/C++. It is
said that issues like pointers are confusing and so Java is better. Well, I
taught my 13 years old sister to program in C for about one year, and now she
has no problems dealing with many complicated issues with pointers (actually I
found teaching recursions to her harder than pointers).

So I believe starting with C followed by C++ is the best choice (fortunately, in
most Israeli universities C/C++ are still taught before Java). But Assembly as a
first choice would be too complicated and confusing, and should be taught only
after the students have some experience with C and issues like pointers.

In the upcoming semester I will teach a course on Assembly. It is a 2nd year
course, and so all the students will be familiar with C and C++.


>
>What I have always been curious about is how the conventional curriculum would
>fare against a bottom-up approach: Learn assembly first, then C, then C++/Java,
>and finally a functional language like Haskell or ML.  I think that there is a
>lot of handwaving that goes on with programming languages that wouldn't be
>necessary if students were taught assembly first (why you can pass an array as a
>pointer, why scanf needs an & before int arguments but not strings, why printf
>takes variable arguments but no other functions, function pointers, etc).
>
>I would budget the class something like:
>
>6 weeks x86 assembly
>  1 week  basic instructions (mov, add, etc), nasm
>  2 weeks memory operands AKA pointers & pointer arithmetic
>  1 week  branches
>  1 week  calling conventions
>  1 week  practice
>5 weeks C
>  1 week syntax, types, & printf/scanf
>  1 week loops and conditionals
>  1 week arrays & pointers
>  1 week strings & string libraries
>  1 week structures
>3 weeks C++
>  1 week classes
>  1 week inheritance
>  1 week polymorphism
>
>which I believe would fit a 1 semester class, if I did my math right.  Assembly
>is so simple that it practically teaches itself, C is incredibly simple when you
>know assembly, and C++ is C with a few decorations. This might be a little
>aggressive, but I think it's doable.
>
>Combining it into a larger curriculum would give
>
>Semester 1: basic programming (see above)
>Semester 2: algorithms and datastructures (basic sorting, trees, hashes, etc)
>Semester 3: functional programming (haskell or ML)
>Semester 3: low level programming (virtual memory, threads, fork(), etc)
>Semester 4: advanced algorithms (runtime analysis)
>Semester 4: parallel programming + basic computer architecture (pipelines,
>caches, remote memory)
>
>After which the student would be prepared for most upper level computer science
>classes.
>
>anthony



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.