Resources for Teaching C to High School Students? 166
mctk asks: "I'm a high school teacher who, disappointed with the lack of computer science in school, has promised to teach a few motivated students programming after school. As an enthusiastic novice with three semesters of C under my belt and a few side projects worth of experience, I feel competent yet ignorant. I would really appreciate suggestions for resources on C that are written to be accessible to high school students and contain lots of ideas for activities. Perhaps you've had success with a series of books that spans beginner to advanced? Do you have any activities you would recommend? How would you map a student's first year of coding? I welcome any and all suggestions. While we're on the subject, is there a brace style that is most standard in the industry?"
I know I'll get modded down for this: (Score:5, Interesting)
There's a reason there are so few resources on teaching C to high school students; it wasn't meant to be taught to high school students.
in high school... (Score:4, Interesting)
In high school, I took an AP Computer Science class that taught C++. If I understood then what I understand now, learning C++ would have been a whole lot easier. My teacher focused too much on the language instead of concepts.
After several failed attempts at trying to learn how to program, I finally understood basic concepts such as variables, integers, arrays, etc. I then took a more basic computer science class, "Algorithm Design/Problem Solving," that used the book Programming Logic and Design [amazon.com]. This book does not use or concentrate on any specific programming language. All our assignments were done in pseudo-code and we had to show the logic of what we wanted accomplished. I have to admit it was a lot easier trying to convey the logic without having to worry about the syntax.
It's been a couple semesters since I've taken that class, without any programming in between, and now I've picked up The C Programming Language [amazon.com]. I am currently half way through the book and ,I must say, I finally understand and appreciate the concepts being taught. I wouldn't quite recommend this book to the pure beginner, because it assumes knowledge about basic concepts such as variables, compiling, etc. The book, at a little less than 300 pages, is written and presented much better than the 1000+ page programming books I've run across.
If I were back in high school, I would love to have these concepts introduced at a gradual progression. Basic programming concepts -> Logic & Design w/ pseudo-code -> the actual language of choice using an easy to learn (30 minute intro) compiler. Of course, hindsight is 20/20 and I'm not too sure if I would have paid as much attention to the first two concepts. Since you are teaching in a high school, I take it you have 2 semesters to teach the class. Perhaps dedicate the first half of the first semester with logic. You can have them play different logic games and tie that in with the lessons.
Creating a good foundation makes learning and teaching a whole lot easier.
C IS a learning tool (Score:2, Interesting)
One of the coolest things we did was to write an asm method, write a C program that uses it, compile them with -O0 and debugging info, and then link them together manually, load them in a debugger and see what exactly happens. Not something you should do in your everyday life, but a fantastic experience.
However, I agree that it's not a language to teach day-to-day programming with, or to start learning to program. There are a lot of better languages for that.
Re:Don't teach the language (Score:3, Interesting)
Anyway, my advice is to delay introducing pointers as long as possible.