• Advertisement
Sign in to follow this  

Best Method of Teaching Programming?

This topic is 3876 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

What, in your opinion, is the best method of teaching programming to people new to and somewhat-immersed in the concept? I'm meaning to ask students and teachers this question, for I want the best advice on this. [Story behind all this] I'm currently a student in high school, and I've taught myself the basics of programming beginning somewhere around 5th and 7th (HTML, RM2K, Game Maker, VB in that time). When I got to high school and took a computer class, I was unfortunately expecting some sort of a challenge, but there was none. Part of it was due to the fact that I had already learned a majority of the class materials, but the other part, I believe, was due to my teacher. She's a nice lady and all, but her teaching methods just don't seem to be up to par. When I was in the class, I knew for fact that none of the other students really learned anything in her class, unless they went off on their own - which didn't really happen. On that note, I know that it requires some sort of a willingness to be taught, and I know some of the kids there simply didn't give a damn about programming, and just wanted to take it for their technology credit. However, there were others that occasionally made an earnest effort, and they had difficult even starting a program since they hadn't learned crap - even if they were paying attention. When they asked my teacher for help, she generally didn't know what she was doing, since she mostly just had us do programs out of the book (occasionally just copying verbatim) and later she compared the output. To make another concession, I'm not saying it's my teacher's fault that they hadn't learned much. I'm not saying that I'm great at teaching either - in fact, I kinda suck at it, 'cause I'll have the meaning in my head, but I won't be able to form the words. And I know that any teacher you're bound to have, he/she's most likely not going to be an absolute proffessional, because if they were, they'd be at a higher-paying job. She recognized that I knew a bit of programming already, and could learn faster than the rest, so to that, I'm thankful. However, there would be times in which she would essentially waste time with petty powerpoint presentations about random tidbits of programming or the programming language (random when the student doesn't even know the basics of programming), and force us to sit there, while she read the slide word-for-word. These little sessions somewhat pissed me off, for she locked everyone's computer in the class, despite their level, and had us stare at the screen. Let me reiterate: waste of time. This was a problem for me, because I would use the free time in class (usually most of it after I finished the assignments) to work on my own projects. With all this taken into consideration, I think that she could do a better job of teaching, if not by actually learning something about programming other than trivia about "What's new in Java?", then just by teaching method. I've read other posts, where they generally mirror the same story: they haven't learned crap. What could the teacher do better, that's possible for them, that could make learning more effective? (I'd say fun, but that sounds too dang cheesy) What was the best method of teaching for you? Do you think that the teacher could make a significant in programming, or is really just a topic in which self-learning is the only effective approach? Note - Java is the main language - set by College Board for the AP. We begin Computer Science Pre-AP on VB, and in second semester go on to Java. In Computer Science I, we just start the year off in Java. Occasionally, we would get 'use your own langauge' assignments, but these are rare in occurance. [Sorry for the broken flow of the story. You can see why I had trouble formulating explanations]

Share this post


Link to post
Share on other sites
Advertisement
unfortunately, alot of highschool and even alot of college teachers teaching programming or CS for that matter, have no clue how to make a your basic Hellow World Console App. They're pretty much teaching them selves as they go along. It's kinda hard to blame them though, as they can't really learn the stuff they should teach unless they themselves program, otherwise your just going by what a book tells you is write without knowing what it does.

I too went through your same situation a few years back, I had 5 years exp, in programming (3 basic, 2 C++), so I pretty much never listened too anything going on in the class, and found creative way to load SDL onto the server so I could mess around with something more than the console.

seriously in my oppinion if you dont learn anything from the class what's the point of offering the class.

Share this post


Link to post
Share on other sites
Yeah. The only problem with her teaching it to herself: she's been teaching Computer Science (along with BCIS and a few other computer classes) since the late '80s / early '90's - I'm not entirely sure. She's ~40 years old, so senility isn't really an excuse.

I'm not trying to harp on here or anything. No one's a saint in this situation, not me, not the teacher, and not the other students.

Share this post


Link to post
Share on other sites
Heh, your situation sounds like mine when I was in highschool. I took the AP Computer course. The teacher also didn't really know too much, so me and another kid did our own thing the whole year (made java applet games). The best way to get people to learning programming is for them to program. And the best way for them to program is to give them fun or interesting programming projects. Coming up with fun projects for new programmers is the hard part though because their inexperience limits what they can write.

Share this post


Link to post
Share on other sites
for teaching programming:
chalkboard/whiteboard = the SUCKAGE
PPT lecturing = the more SUCKAGE (so i feel for you on this one... it gets worse in college he he he).

my ideal method... well if my department decides to let me teach some of the lower division programming classes (which they do for some masters students like myself), i would teach in weird style, not like the other professors i have had. i would not do the whiteboard/chalkboard/PPT thing at all. i would just sit there at the computer and program, and expect the other students to program with me. i would have mandatory attendence, an easy midterm, a harder final he he he, and a small project due once a week and maybe one large project due at the end of the quarter.

but that's college. HS well... what can you do? the real fun programming stuff starts after you learn data structures and algorithms and advanced math so you can start having some fun! in HS what can you do? oooo program Pythagorean solver? he he he maybe quadratic equations and stuff? not fun! so i think HS (C++/Java) programming is always going to suck unless it's an AP class or something filled with eepsters he he he.

Share this post


Link to post
Share on other sites
Quote:
And the best way for them to program is to give them fun or interesting programming projects. Coming up with fun projects for new programmers is the hard part though because their inexperience limits what they can write.

I agree. What would the projects be, that inexperienced programmers could do, other than the usual "input number, output number again" assignments? I don't think I ever had a fun assignment in her class. Especially not when she assigned us to do the Marine Biology Simulator - boring, and the coding style... I just didn't like it.

Quote:
my ideal method... well if my department decides to let me teach some of the lower division programming classes (which they do for some masters students like myself), i would teach in weird style, not like the other professors i have had. i would not do the whiteboard/chalkboard/PPT thing at all. i would just sit there at the computer and program, and expect the other students to program with me. i would have mandatory attendence, an easy midterm, a harder final he he he, and a small project due once a week and maybe one large project due at the end of the quarter.

With this method, would you maintain the class whilst you program (tell slackers to do something), and have your screen up on the projector, or have it as a free-for-all, one of those "if you don't do it, I say nothing and you fail" situations?

Quote:
PPT lecturing = the more SUCKAGE (so i feel for you on this one... it gets worse in college he he he).

Aw, crap.
Do teachers/professors actually find this effective? Or is it that they don't want to put any more effort into it than needed?

Quote:
so i think HS (C++/Java) programming is always going to suck unless it's an AP class or something filled with eepsters he he he.

The AP classes weren't any better... I think so far that one kid that didn't really program before learned some C# and used XNA to make a couple of 2D shooters. After three years in her class (He was in my classes the first two years, and this year I didn't even put CS on my schedule).

Share this post


Link to post
Share on other sites
Welcome to modern education. It's not really as though any of your other classes are any better as seen by someone who has studied a little on the side. Some of it is the general deterioration (and increasing disrespect) of teaching as a profession. Some of it is the general increase in bureaucracy and 'striving for universal mediocrity'. A good deal of it is students who by and large see little benefit in being intelligent and cultured; 'tis not a requirement for rising out of the lower classes anymore.


As for my opinion, the answer varies greatly on the student. Different people learn very differently.

Share this post


Link to post
Share on other sites
Best method of teaching cardio-vascular surgery?

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?

(This is not intended as strict separation of complexity or grading of complexity)

What do you teach "everyone"?

Programming is usually useful when solving boring tasks. How much knowledge do you need to do that?

I don't have an answer of best method, but I do know that Computer Science and Software Engineering are extremly complex, demanding and extensive topics in many ways likened to medicine (some theoretical foundation, but coupled with a lot of specific domain knowledge which needs to be learned). Consider all the language intricacies and platform quirks - same as in medicine where knowing the ammounts of drugs and their components is vital.

Compared to "pure" science such as physics or mathematics, software engineering is still part art that relies heavily on experience and in-depth knowledge.

I'd say that for general purpose (X)HTML or Flash would be somewhat suitable today. They allow production of fairly decent projects, but without the hassles of platforms and languages (ironically, all the browser compatibility issues are almost a non-issue in such contexts, but C++ quirks will kill someone's will to live).

Those that are interested will, sooner or later, need to master the theory behind it (math, data structures and algorithms, design techniques and paradigms, different language semantics, OS, IO, ...................... more dots ..........)

Share this post


Link to post
Share on other sites
yeah, i would use the projector and just code the whole time. put comments and stuff. then post everything on the web. if people don't show up, i won't hesitate to dock points, and i'll tell them so (you'd be surprised... threats like this work he he he).

at my school i get the PPT lectures quite often (at least one per quarter, sometimes even two). in these classes people oftentimes don't even bother showing up. during finals i see faces i've never seen before.

the best programmers i know... are self taught. they like programming and say after an intro class or something, branch out and blossom on their own. the people that don't like programming... well let's just say at my school, which uses Java, there are people who graduate who have no idea how to even create a file in Java.

so if you suffered in HS going through programming courses, don't fret. when you go to college the professors in general know what they're doing. however, i had one professor in a C class tell his students to use static_cast to cast, and that the only difference between a struct and a class in C++ is that a struct can't have methods (which is bull ha ha ha). but meh, the prof was a Java guy so i forgive him.

Share this post


Link to post
Share on other sites
Quote:
Original post by deadimp
I agree. What would the projects be, that inexperienced programmers could do, other than the usual "input number, output number again" assignments? I don't think I ever had a fun assignment in her class. Especially not when she assigned us to do the Marine Biology Simulator - boring, and the coding style... I just didn't like it.


Oh, the MBS. I've heard about that one. What a horrible mess. From what I've seen, the requirements really are awful, and the design is (a) handed down to you and (b) just plain wrong.

Anyway, when I was making plans to write my own intro-to-C++ book, I intended to have the final project be something along the lines of jwalsh's Project 2. I really do think that games catch new programmers' interest, even if they don't see themselves going into gamedev. Have you ever heard of someone whose first idea for a big project was to make a spreadsheet app? :)

But I did have a few other projects in mind to guide the student towards that final goal. One of them, to master the fundamentals of (a) file I/O and (b) string manipulation, is "mad libs". You know, like the party game. You provide a text file, with the 'blanks' indicated by text in braces (indicating the "kind of thing" to fill in) or something. The student writes a program that reads through the file, finds those text items, prompts the user for values (using the text between the braces) and substitutes in the user's supplied text.

That's the basic model. From there, you can for example add a requirement for 'escaping' syntax (so that the prompt text can include braces); that can become more complex than you might think. For full marks, require a proof that all strings can be represented in the syntax :) Or, add markup for "default values", or to "tie" two fields together (e.g. {3: proper noun} {3} prompts for a proper noun just once, and fills it in both places), or... you are limited only by your imagination :)

Quote:
Original post by yadango
my ideal method... well if my department decides to let me teach some of the lower division programming classes (which they do for some masters students like myself), i would teach in weird style, not like the other professors i have had. i would not do the whiteboard/chalkboard/PPT thing at all. i would just sit there at the computer and program, and expect the other students to program with me. i would have mandatory attendence, an easy midterm, a harder final he he he, and a small project due once a week and maybe one large project due at the end of the quarter.


I really think you're on to something here. Personally I don't think I'd even mark the small projects - simply because plagiarism runs rampant on these things no matter what you do (trust me on this one - at the U of T, you are constantly being told scare stories about MOSS and the university's code of conduct WRT plagiarism, but it still doesn't prevent, in some cases, half the class from getting >100% on the first two assignments yet failing the midterm).

I'm also a big believer in the Socratic method. Have a project in mind, but constantly ask the students whether things make sense. I'm honestly stunned at the frequency with which beginning programmer write bizarrely convoluted things when the "obvious" answer is correct - and more stunned at the way that "tutorials" and self-styled OO "gurus" etc. teach in ways that *actively fight against* perfectly reasonable intuition. Get the basics down right away; don't let e.g. a bad variable name slip through - encourage the students to pounce on that and analyse what the name should actually be. But keep it moving, too - discuss the "philosophy" briefly where needed, and remind students of the need for pragmatism.

Quote:
Original post by deadimpWith this method, would you maintain the class whilst you program (tell slackers to do something), and have your screen up on the projector, or have it as a free-for-all, one of those "if you don't do it, I say nothing and you fail" situations?


I would say that it should be a free-for-all, except that no one student (or small group of students) should be allowed to dominate the discussion. Remember that just because a student isn't contributing comments doesn't mean s/he's not learning from the surrounding Q&A. S/he might simply be shy.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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).

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement