Computer Chess Club Archives


Search

Terms

Messages

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

Author: Richard Pijl

Date: 16:30:50 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.

Before I started my study at the Delft University of Technology in 1985 I had
some exposure to Basic (on a COMX-35 and later on an Acorn Electron).
I learned decent programming at the university with Pascal. And I still cannot
find a better language to teach students the basics of programming, including
stuff like records, pointers etc. All basic algorithms and datastructures are
simple to implement in this language. The final tasks did include things like a
backtracking algorithm (with the use of pointers), programming a multiple queue
simulation experiment, implementation of a memory management algorithm, etc.
In the second half year, an assembly course was included. The final task of this
course was to implement a 10-instruction virtual machine in PDP-11 assembly
(feasible in just 3 pages of commented assembly). Ok, it is not the most modern
processor, but a very nice one that demonstrates the principles of assembly
programming.

IMHO only after passing the courses:
- How to program properly (in Pascal)
- How do computers work (in assembly)
a student is ready to learn (and appreciate) C.

Richard.

>
>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.