Best Method of Teaching Programming?

Started by
13 comments, last by deadimp 16 years, 10 months ago
Think about it though, if a teacher really knew what they were doing, if they had studied some sort of programming language through college and was well versed in computer sciences, would they really be a teacher. I mean I live in the Eastern Panhandle of WV and most of the good teachers drive across the borders to Maryland where they make tons more money. I actually haven't had any CS courses yet (the 9th grade is stuck in a separate building) but their is a good chance they will suck cause all the teachers that could teach it are across the river.
Advertisement
Thanks for all your comments.

The general consesus is, high school Computer Science classes aren't exactly going to help you do squat. I was kinda figuring that this was where it was going to end up.
The problems, then, seem to lie in the fact that a) the teacher's usually ignorant on the matter, b) some of the students are 'plagiaristic', and don't bother to figure it out, and rely on their classmates to pass the class for both of them.

So from all that, it seems like self-teaching is the best method. How, then, would a teacher spur his/her students to take on this task? [Yeah, I know, another general, broad question]

And has anyone had a teacher that used a method like yadango's, or one that Zahlman described?

Quote:What is programming?
- Is it pure math, computability theorems and the like?
- Is it discrete math, sets and algebra?
- Hard-core programming, assembly, hardware tweaks, IO?
- "Soft-core" programming, code generation, frameworks, toolkits?
- VB6/HTML programming?
- Writing in word?

I would assume, for teaching beginners, the programming would pertain to the bare basics of "soft-core" programmming. VB might be good to start off in, but that could probably fall in the "soft-core" category... somewhat.

EDIT: Has anyone seen any evidence of CollegeBoard considering a different language? Or are schools essentially stuck with Java for the AP?
Projects:> Thacmus - CMS (PHP 5, MySQL)Paused:> dgi> MegaMan X Crossfire
My take on things:

The problem with the grand majority of programming classes is that they make the fatal mistake of getting stuck on the technology. Specific languages, specific tools.. all of them are useless when students aren't learning the right way to think about it.

Programming is the practice of expressing complex behaviours to a simple executor. It doesn't require a computer. (It could, ironically, be considered quite similar to teaching).

The key concept is that of abstraction - that a program is, in general terms, a collection of rules that say things like "To calculate the square of a float, multiply it by itself" and "To sort a list of numbers, split it into two lists, recursively sort each one, and then merge the two together again." The exact details of how you express those behaviours to the machine depends on the tools and languages you're using, so they're not that important.

So, I'd probably start off with some recipe exercises - get the students to act like compilers (which is what a programmer does - compiling human-understandable concepts down into the language they are programming in) by giving them some recipies and getting them to express them in terms of "pick up," "put down," "mix," "bake," etcetera. Throughout this, make clear this concept of breaking a complex task down into simpler ones over multiple iterations. Also illustrate how this "cook-machine-code" can be grouped together into tasks that are themselves grouped together into tasks, etc.. until you reach the top of the hierarchy, which is "bake a cake" or something similar.

Then they'd likely be ready for some assembly. Take a RISC instruction set system (or simulator) like MIPS and write some simple routines. Concepts from the previous exercises map directly to concepts in this one - basic instructions, limited "hands" (registers), etc. Build an understanding of what, ultimately, is at the bottom of the stack. Also cover the notion of macros - one instruction that represents a sequence of other ones.

After that, move to a higher-level language. Ideally something like Haskell, though probably Java. Illustrate how instructions have now become keywords and library functions. Introduce objects. And so on.

Richard "Superpig" Fine - saving pigs from untimely fates - Microsoft DirectX MVP 2006/2007/2008/2009
"Shaders are not meant to do everything. Of course you can try to use it for everything, but it's like playing football using cabbage." - MickeyMouse

superpig, while I agree with your assessment that programming is more a way of thinking and less a specific language, I see two major issues with the method of teaching you propose.

First and foremost, I think students would get very frustrated very quickly with being unable to produce tangible and meaningful output for a long time after starting the class. While they might be able to consume what they "cooked" in the first class, they still wouldn't connect that with programming, no matter how much you explained it. Then with assembly, they'd be extremely limited in what their program could do since it'd take far longer than one class to teach enough assembly to do much more than add some integers together.

Second, it might be a little TOO in-depth for a class to teach beginning programmers. One might argue the "ideal" computer language would involve total abstraction of those underlying concepts you suggest focusing on and yet the proper power and optimizations to result in code as compact and fast as a language where you really get your hands dirty. Since no language is ideal, of course knowledge of those nitty gritty details IS necessary as more complexity is needed in the programs, but it seems to me that introducing those concepts would make more sense to do as the issues crop up in the actual programming being discussed. Cross the bridges as you come to them. i.e. No need to discuss memory management and addressing until you're teaching pointers/references. If you're teaching students how an array is stored in machine code before they even know WHY they need to know that, they'll remember it just long enough to pass the test and then forget about it. If they truly grok the fact they're going to USE that knowledge repeatedly while programming, they'll take that extra step and remember it forever (assuming they have a true interest in programming beyond earning their tech credit; there's not much a teacher can do about the students that are only there because they have to be).
So order is an important issue in teaching programming (and just about everything else).
I agree with most everything you said, superpig, but I also agree with Xentropy that beginners should have somewhat of an application for something before they use it. This can't always be the case, especially when learning the bare basics of math and english, since the kindergarteners couldn't really care how many apples they have in a basket as long as they have enough. But with programming, I don't feel you're able to load beginning students with knowledge, and expect them to begin to apply it. They have to learn the applications before or at least alongside the lesson.

About the whole cooking thing. It's an interesting concept, and I like that you actually gave the parameters for that.
Going to another story about my my teacher, one of the first days in CS class, she had us do a similar task - without food, though. She told us to give instructions in order to sharpen pencils. The thing that still angers me today about that exercise (yeah, I don't forget minor things all too easily) is she never gave us what functionality we had available. The exercise was extremely open-ended, too open-ended for beginning the class. She didn't give us the depth that we had in control, whether we controlled nerve implulses, muscles, appendages as wholes, or just generic actions. I hope that since then she's realized why that exercise sucked so much. Of course, I haven't talked to her about it, because it took me a little while to really analyze why that exercise wasn't effective.
As for using this exercise (when formatted appropriately) to begin the class, I'm not so certain on. There are obvious benefits, especially that you begin to teach how steps should be laid out, and that you should consider your working environment. However, as Xentropy said, the connection might not be there, even if you just state it.

Thanks for the effort you all are putting into this. It's having me step back and consider a few things I haven't before.

Quote:Think about it though, if a teacher really knew what they were doing, if they had studied some sort of programming language through college and was well versed in computer sciences, would they really be a teacher. I mean I live in the Eastern Panhandle of WV and most of the good teachers drive across the borders to Maryland where they make tons more money. I actually haven't had any CS courses yet (the 9th grade is stuck in a separate building) but their is a good chance they will suck cause all the teachers that could teach it are across the river.

I know what you mean. I had complained to my mom about the teacher some, that she wasn't effective because she didn't program for a job or a hobby, and when my mother told me the whole job / wage perspective, I couldn't really think of what else to say. This isn't the whole case in this discussion though. It's combining effective teaching habits with the teacher's knowledge of the subject, not just the teacher's skills in the area.
[... Yeah, they all blend together, but you get my point]
Projects:> Thacmus - CMS (PHP 5, MySQL)Paused:> dgi> MegaMan X Crossfire

This topic is closed to new replies.

Advertisement