Eric Sosman said:
pemo said:
What would expect to be covered?
Say you'd already attended a course, that had covered stuff like structs,
pointers, bitwise and logical operators, multi-demensional arrays [and
the like], *but* hadn't covered other stuff like recursion, unions,
bit-fields [and the like].
What topics would /should be covered on a course that takes students
further?
(Does a multi-demensional array suffer from both
schizophrenia and Alzheimer's?)
Must invest in spelling checker!
There's a qualitative difference among the examples
you mention: unions and bit-fields are C language constructs,
while recursion is a general programming technique. Decide
what you're looking for: a course in advanced C, or a course
in programming topics some of which are expressed in C. Are
you trying to learn the tool or its application?
It's not so much as what I'm looking for, as I have to put this course
together.
Of course, I realise that recursion is a general programming technique
(having used Haskell for many years, I find looping any other way a bit
weird), and I included it here purely as it's something that *some* people
have a great deal of trouble getting to grips with - as some do unions and
things like bit-fields.
It's hard for me to imagine a responsibly-taught course
that omitted unions and bit-fields. Even a very short course
of half a dozen lectures should at least mention them, even
if it didn't spend time on them. But the follow-on course
to "Baby Steps in C" wouldn't be characterized as "advanced,"
would it?
That's interesting, as I've just taught two C courses (for a total of seven
weeks (7 * 3 hour sessions)) [4 weeks on an intro, 3 on a 'further' course],
and I haven't introduced unions or bit-fields yet. However, I'm now
putting together two three hour sessions on some more topics - and thus the
question as to what to include on this.
Off the top of my head, here are some other things that are on my general
candidate list [knowing the audience (mostly Oxford grad students)] - some
to do with general programming things, others to do more with C ...
function pointers and signal() etc.
defensive programming techniques.
mixing in assembler with C.
writing modular code, using your own header files effectively.
data-structures - like linked-lists, trees and graphs.
keywords like _Bool, restrict, register, ...
more on manipulating strings (strtok(), etc).
interacting with the operating system.
debugging using gdb etc.
source control.
lint.
using thrid party libraries [for stats].
btw, I'd be happy to provide *some* folks with a pdf of the courses I've
already put-together/taught - in return for their opinion on their
quality/correctness. If you're interested, please email me - peet[padding]m
at cslab.com. But, you have to be kind!