Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
Education Programming

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?"
This discussion has been archived. No new comments can be posted.

Resources for Teaching C to High School Students?

Comments Filter:
  • by simm1701 ( 835424 ) on Friday December 15, 2006 @06:47AM (#17252642)
    Don't try to teach the language, any more than you teach someone how to use a pen when writing.

    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.
  • by Channard ( 693317 ) on Friday December 15, 2006 @06:48AM (#17252644) Journal
    ... plagiarism is bound to be a possibility, especially with access to the internet. I know what when I was doing my C course years back at school, a lot of students ended up borrowing chunks of code from each other. And, in a few cases, taking one listing and just modifying it for their own purposes. And since they moved the code around a bit no-one really got busted. That was before we even had access to the internet, either!
  • Re:Memory (Score:3, Insightful)

    by Timesprout ( 579035 ) on Friday December 15, 2006 @07:34AM (#17252894)
    Actually your points are all good reasons why C should not be the language taught. These are high school kids who are going to stay back after to school to persue an interest. Getting them bogged down in the nuts and bolts of pointers and memory mangement will probably only serve to confuse then bore then alienate them.

    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.
  • by iamdrscience ( 541136 ) on Friday December 15, 2006 @07:35AM (#17252906) Homepage
    I disagree, I think Python is a spectacular first language. When you're teaching kids to program it helps to keep them away from the nitty gritty at first to keep their interest. Having to learn a lot of foreign concepts before being able to program something fun is what turns a lot of people off to programming, python gives the instant gratification but is also powerful and flexible enough to teach the concepts of programming. Once a student is in the programming mindset you can move them on to more complex/powerful languages like C/C++ and Java.
  • by iamdrscience ( 541136 ) on Friday December 15, 2006 @07:39AM (#17252934) Homepage
    I'm surprised it's as high as .01%, I've never been able to read any Perl I've written.
  • by LSU_ADT_Geek ( 580524 ) on Friday December 15, 2006 @10:01AM (#17254178)
    I did my undergraduate at LSU in Computer Science, where they start off everyone in C. I have enjoyed the language as I have been able to transition to newer, high-level languages easily. Whether this is because of C or the mindset you need to have with C, I think teaching them C is a good way to start. As for materials on learning and working with C, I recommend the following books / websites: 1. C: How To Program by Deitel & Deitel (ISBN: 0-13-226119-7) (http://isbndb.com/d/book/c_a09.html) This is the first book I learned on. The 2nd edition does a real thorough presentation of material with lots of code and visual examples of good techniques. Also, the 2nd edition did a really good job of incorporating library headers and function prototypes, which are harder to find in a book. 2. The C Programming Language by Kernighan & Ritchie (ISBN: 0-13-110362-8) (http://isbndb.com/d/book/the_c_programming_langua ge_a05.html) This is the holy grail of C books since it was written by the original creators of the language. Despite its slim size, both Kernighan & Ritchie do a really good job with making it concise and relevant. I can guaranty that every C developer has this book on their shelf. It also has some information about interfacing with Unix/Linux OS. 3. Data structures and algorithms book in C I am sorry, I really meant to give you the actual book title I used but it is on my shelf at home. You want to find some type of data structures and algorithm book to enforce good design techniques. The biggest problem I have seen when people learn how to program is the fact they learn how to solve a problem only with the tools of the language. This makes them reluctant to move to other languages that don't provide solutions in the same mechanism. By having your students work in a lower-level language like C, they learn how to build the data structures taken care for you in other languages (stacks, queues, trees, graphs, etc) so they develop the mindset rather than a functional dependency. Hope this helps and keep up the good fight!
  • by Peter La Casse ( 3992 ) on Friday December 15, 2006 @11:45AM (#17255930)
    Both perl and python allow bad coding practices far too easily, whereas you can write very good code in them, but its better to learn the discipline first.

    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.

  • by kpharmer ( 452893 ) on Friday December 15, 2006 @12:00PM (#17256228)
    > its better to learn the discipline first

    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.

Software production is assumed to be a line function, but it is run like a staff function. -- Paul Licker

Working...