J
John Coleman
Greetings,
I teach math and computer science (though mostly math) at a small liberal arts college. Because of our smallness we don't have a huge course offering.To compensate, we have a grab-bag "special topics course" where we cover different topics each semester based on student's and/or professor's interests.
Next fall I will be running a special topics course with the title "Modern C Programming". The motivation for the course is that currently our CS students are exposed to C++, Java and a smattering of other languages (e.g. Lisp in an elective AI course) but no C per se. While in principle they learn some C naturally in the course of learning C++ they really don't learn all that much about things like pointers, malloc, and the safe handling of C-style strings and they definitely don't learn anything about C99. The proposed class is intended to give a serious introduction to C to students who have a working knowledge of either C++ or Java. This will allow me to blow through the basic syntax of expressions, loops, etc. in a couple of weeks and to spend the bulk of the semester on aspects of C which are different from Java and even C++.
My question is - what would a good text be? My first tentative choice was King's "C programming: a modern approach", but I have also been looking at Kochan's book "Programming in C". More recently I have been toying with the idea of using K&R. On the one hand that seems on the face of it like a poorchoice for a course called *Modern* C programming. On the other hand - it *is* a classic and seems to hit the right level of difficulty (a course forstudents who already know at least one programming language). My main question is - does the merits of K&R outweigh the disadvantages of the lack of coverage of C99? I could of course supplement K&R by e.g. O'Reilly's "C Pocket Reference" which covers the C99 material. Where I'm at right now is that my heart says to go with K&R but my head says go with King (or Kochan). The bookstore wants a decision on my part sooner rather than later.
Also - I am open to ideas about projects for the students to work on. One idea that I had was to concentrate on the Mandelbrot Set. Towards the beginning of the semester they could have a program which just prints to the command line e.g. with '*' for points in the set. Later on they could write it to a portable bit map text file. Even later they could write it to a .bmp file in which they have to get the header and the byte-alignment correct. Finally, I could have them rewrite it in C99 with e.g. the complex-number type and variable-length arrays so they don't have to hard-wire in the size of the bitmap. This topic of course reflects my interest as a mathematician.I have less ideas when it comes to straight computer-science applications (although Jacob Navia's idea about a hex-dump utility for pedagogical purposes caught my eye).
Thanks in advance for any suggestions
-John Coleman
I teach math and computer science (though mostly math) at a small liberal arts college. Because of our smallness we don't have a huge course offering.To compensate, we have a grab-bag "special topics course" where we cover different topics each semester based on student's and/or professor's interests.
Next fall I will be running a special topics course with the title "Modern C Programming". The motivation for the course is that currently our CS students are exposed to C++, Java and a smattering of other languages (e.g. Lisp in an elective AI course) but no C per se. While in principle they learn some C naturally in the course of learning C++ they really don't learn all that much about things like pointers, malloc, and the safe handling of C-style strings and they definitely don't learn anything about C99. The proposed class is intended to give a serious introduction to C to students who have a working knowledge of either C++ or Java. This will allow me to blow through the basic syntax of expressions, loops, etc. in a couple of weeks and to spend the bulk of the semester on aspects of C which are different from Java and even C++.
My question is - what would a good text be? My first tentative choice was King's "C programming: a modern approach", but I have also been looking at Kochan's book "Programming in C". More recently I have been toying with the idea of using K&R. On the one hand that seems on the face of it like a poorchoice for a course called *Modern* C programming. On the other hand - it *is* a classic and seems to hit the right level of difficulty (a course forstudents who already know at least one programming language). My main question is - does the merits of K&R outweigh the disadvantages of the lack of coverage of C99? I could of course supplement K&R by e.g. O'Reilly's "C Pocket Reference" which covers the C99 material. Where I'm at right now is that my heart says to go with K&R but my head says go with King (or Kochan). The bookstore wants a decision on my part sooner rather than later.
Also - I am open to ideas about projects for the students to work on. One idea that I had was to concentrate on the Mandelbrot Set. Towards the beginning of the semester they could have a program which just prints to the command line e.g. with '*' for points in the set. Later on they could write it to a portable bit map text file. Even later they could write it to a .bmp file in which they have to get the header and the byte-alignment correct. Finally, I could have them rewrite it in C99 with e.g. the complex-number type and variable-length arrays so they don't have to hard-wire in the size of the bitmap. This topic of course reflects my interest as a mathematician.I have less ideas when it comes to straight computer-science applications (although Jacob Navia's idea about a hex-dump utility for pedagogical purposes caught my eye).
Thanks in advance for any suggestions
-John Coleman