How Should I Teach a Basic Programming Course? 452
riverman writes "I have been 'provisioned' at the school where I work to teach a new Computer Science/Programming course. I'm supposed to be teaching everything from the very-very basics (i.e. where that myspace thing is in your computer monitor, and how it knows who your friends are) to the easy-advanced (i.e. PHP classes and Python/Google App Engine). I'm an experienced programmer, but I'm not sure where to start — I could easily assume that my students know something basic they don't. Are there any resources on the internet that could help me find a solid curriculum? What are your suggestions?"
I'm sure many of us have gone through intro-level programming courses of some sort; what are some things your teacher or professor did that worked well, and what didn't work at all?
re Thou shall not bore the young (Score:3, Informative)
You have to taylor the content to the audience.
Not knowing what age range is your audience makes it difficult to give you concrete
advise.
Avoid the history of computers, most young people (i.e. everyone under 40!) finds
it boring and in reality it is useless.
You can use Scratch [mit.edu] as a great tool to introduce
programming concepts without the boring theory.
In general, do not bore your audience, that's the secret.
It must be going around. (Score:4, Informative)
This was a recent topic [stackoverflow.com] on stackoverflow. There are some really good suggestions there.
Steve Drasner (Score:5, Informative)
His intro to programming class starts at the bottom, teaching only pseudocode without the use of computers whatsoever. After giving the students a good grasp of concepts of structured programming, he uses it to segue into the concepts of object oriented programming.
I took Java prior to Drasner's class and, while I understood most of what I learned, I never quite understood the purpose of OOP/D until I took Drasner's course. Everything snapped into place.
http://www.nvcc.edu/home/sdrasner/ [nvcc.edu]
Re:Teach them fun... (Score:3, Informative)
I have been thinking more. Here is a robot exercise.
"We have a class room here. The task is to get that robot over there to pick up the apple and bring it back."
The challenge in this exercise is that while you think it is easy to navigate a room, telling a robot is not. It will involve the students having to understand the concept of "x steps and then turn". AND it will involve the students on having to come up with a language.
After all how does a robot know that steps means to step. A step is a "keyword" that implies a set of actions.
In the second step of the testing, etc routines the objective would be to define what a step is. After all x steps depends on the step size.
So after this the students will understand the following:
1) Language is garbage in garbage out
2) Keywords imply some action and those actions need to be repeatable.
3) Consistency and testing are the names of the game.
SEE Program Resources (Score:5, Informative)
I Haven't, But Know Someone Who Has (Score:4, Informative)
Different types of students (Score:4, Informative)
The ones with an active interest will just need a little bit of "fuel" and point them in a direction and let them go. For these students you can show them a quick demo, tell them where to find more information, give them a project, and all you need to do is be available for questions. Too much guidance or restriction will either bore them or make them frustrated.
The other kind, lets say they have a passive interest, might be curious but maybe they don't have the same motivation as the others, so they will like to see many demonstrations, and have hands-on exercises where you guide them through something. I don't know if the active and passive interest students could be taught effectively in the same class.
Multiple languages (Score:3, Informative)
If you are covering more than one language in a "basic programming course" then you are already off mark. Now if your goal is to do more like a survey of programming languages, or an introduction to programming languages, then it is appropriate to explain why there are different languages, the types of languages, why languages are used in specific roles, etc.
If you are truly teaching programming, as in at the end of the course the students will be creating programs that do things, then you need to stick with one single language and development environment. Otherwise, every time the students begin to grasp the language and how it is invoked you are switching to something entirely different.
Re:Task based learning (Score:4, Informative)
I totally agree. Start small and increase incrementally. Each iteration should include elements of the previous iteration so that they are continually practicing what they've learned before.
For example:
task 1: print "hello world"
task 2: print "what is your name?", get name, print name
task 3: print "give me a number to square:", get number, square it, print result
Re:Task based learning (Score:5, Informative)
These examples don't cover everything, but what you do should work for you, your students, and the concept that needs to be transferred to the students.
HTML & Notepad++ (Score:3, Informative)
You can also make it more complex by adding CSS or Javascript which resemble real programming.
Former teacher.. (Score:2, Informative)
Former teacher here. I was in a similar situation. Here are some pointers:
* Go low level. Dedicate a lecture early on to bits and bytes and how binary logic becomes maths. The students don't need to know how to build a processor, but you need to dispel any notions of magic from the bottom up. Without some understanding on this level, computers will forever seem slightly magical. (Keywords: Relay, light-switch, bit, byte, register, instruction, Assembly, bus, ram, hard drive.)
* Build upon the previous and explain digital audio and more importantly, graphics, as examples of how the numbers become sounds and pictures. (Bitmaps, graphics memory, sample rates, bit depth.)
* Operating systems. Students should know which ones are out there how they differ and what they have in common. (Driver layer, process, program, gui)
The more you put into these steps right away, the easier it will be to teach programming. Also, it tends to equalize the student pool. I put it into two two-hour lectures, but you may want to be even more through.
Proceeding from there depends a lot on what the goal is, but for programming, I found that interwoven lectures and exercises with support time (teacher/TA in the computer room) usually works the best.
Here's an example (Score:1, Informative)
http://www.bembry.org/technology/python/index.php [bembry.org]
IIRC, the site's creator is Bryce Embry. His python stuff was, again iirc, created for high school students. I found it extremely helpful when I was learning python.
You can give students too much information and they just get lost and confused. bembry gives just enough to get the students going. I send him a big KISS (keep it simple stupid) award.
Re:You need to narrow the scope (Score:2, Informative)
Re:Task based learning (Score:5, Informative)
It looks like an equality statement that couldn't possibly be correct. Just telling them it's "an assignment statement" doesn't seem to penetrate. I have found a mailbox analogy to work about 95% of the time.
It goes like this: You are at the post office in front of a wall of mailboxes. The mailboxes have numbers on them (you could go into memory addressing if it was appropriate, but it's probably best to leave that out unless someone asks for a little more detail). One of the boxes has a label on it: 'x'. The statement "x = x + 1" means "take the current contents of the box labeled 'x', add '1' to it, then put the result back in the box labeled 'x'"
Often, about 60% of the students immediately go, "Oh. That's pretty straightforward." For the remainder, you could have 4 or 5 cardboard boxes. Write 'x' on a sticky note and put it on a box. Write '1' on a piece of paper ... You get the idea. Seeing this very concrete representation of memory, and that the names are 'labels' on that memory, means that this thing they have been hearing about for years, 'memory', is now nothing but a bunch of boxes you can store stuff in. Simple.
You can elaborate on this by putting multiple labels on the same box, or putting special pieces of paper in some boxes that say 'don't use me, go get/set the value of some other box', thereby demonstrating pointers. You can also demonstrate type mismatches by putting a picture in a box and then ask a student what it means to 'add 1 to a picture'. Etc, etc.
This may sound like baby steps, but in 1/2 hour or less and you have given your students a real, usable model of one of the most fundamental concepts there is.
Re:Blender! (Score:5, Informative)
If you're going to go this route, Alice [alice.org] is probably a better choice, since it was basically designed as a tool to teach programming with 3D graphics.
As opposed to Blender, which well, wasn't actually designed at all. :-P
(kidding -- Blender is great, but as a way to teach programming... the phrase "now you've got TWO problems" comes to mind.)
Re:Task based learning (Score:5, Informative)
This isn't just for programming. Using pertinent tasks to teach any subject is the best way to get the knowledge to stick.
Re:Blender! (Score:2, Informative)
Re:Task based learning (Score:4, Informative)
I'm 40, I program computers for a living and have never used calculus for it. I have never done any web development.
I'm thinking you perhaps work in some other area of applications than I do, but don't know the difference between a problem domain and programming per se.
Re:Task based learning (Score:2, Informative)
Actually, I am "some kind" of web developer. It's something like 70% Javascript, 20% SQL and 5% ActionScript, 5% xhtml/css/etc, if you must know.
Of course, I'm sure you meant that as an insult, something like, "oh a web developer! They're so stupid! No wonder they don't know math! Ha ha ha!!!" To which I reply: screw you.
(That all said, the data visualization people where I work might use it all the time, I don't know. But I'm making a good living with computers and I don't know jack about calculus.)