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?"
Don't teach the language (Score:5, Insightful)
Teach the mentality, the methodology of problem solving.
Teach basic algorithms, data structures and coding theory - give them an understanding of where the libraries they are suing will come from.
More importantly for modern world working teach colaberation, give them a real group project to do, each of them writing different interfaces or different parts of an interface for a whole program (something like a simple game such as tron is ideal for this)
By doing all of this the language becomes almost incidental - which is really what you want, who knows what the demand for C, C++, javam C# will be in a few years time, but learning the right methodology and colaberative practices will stand them in good stead for years to come.
Watch out, though... (Score:3, Insightful)
Re:Memory (Score:3, Insightful)
Personally I would favour Java as a teaching language because its basic syntax and structure is similar to most modern languages, its OO, easily debugged, requires exception handling, a JDK and an editor are all thats required and there are a plethora of libraries and frameworks available for more complex coding. Perhaps most importantly though they will be able to achieve results quite quickly rather than watch dangling pointers and memory leaks crash their code. When they have the basics of Java and they are still interested then you can show them some of whats happening under the hood.
Re:I know I'll get modded down for this: (Score:4, Insightful)
Re:I share your sentiment (Score:3, Insightful)
From a college grad who spent 4 years doing C ... (Score:2, Insightful)
Re:I know I'll get modded down for this: (Score:3, Insightful)
This is a key point, I think. Python doesn't force you to do the things that good programmers do anyway. Then again, C, Java etc. let you get away with all sorts of bad programming practices too.
I think it is easier to explain the concept of "type" with a language that forces you to declare your variables and their types before using them. But, that's a pretty minor advantage, and I think it's outweighed by the many practical advantages of Python.
Re:I know I'll get modded down for this: (Score:2, Insightful)
Sure, if these kids are going to become professional programmers. But if this class is intended to just give them a taste of programming or some simple skills - they discipline isn't the most important thing to learn.
Actually accomplishing something is important. And doing it with a minimum of distraction and fuss is also probably important. And if this is the case, then python is probably a nearly perfect first language. And since python tends to push you towards a right way of doing things, you will tend to pick up some valuable discplines there anyway.
I suppose you could also argue that VB might also apply since it's all about just getting things done, but it's so ugly that I think it'll tend to wreck the students for any other languages later on.