Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror
×
Programming IT Technology

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

How Should I Teach a Basic Programming Course?

Comments Filter:
  • by jelizondo ( 183861 ) * <<moc.liamg> <ta> <odnozile.yrrej>> on Saturday October 11, 2008 @10:54AM (#25339283)

    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.

  • by dummy_variable ( 35218 ) on Saturday October 11, 2008 @10:59AM (#25339319)

    This was a recent topic [stackoverflow.com] on stackoverflow. There are some really good suggestions there.

  • Steve Drasner (Score:5, Informative)

    by gcnaddict ( 841664 ) on Saturday October 11, 2008 @11:01AM (#25339331)
    Find Steve Drasner. He's a Computer Science professor at Northern Virginia Community College in Annandale.

    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)

    by SerpentMage ( 13390 ) on Saturday October 11, 2008 @11:01AM (#25339337)

    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.

  • by TarrVetus ( 597895 ) on Saturday October 11, 2008 @11:02AM (#25339341)
    You could check the Stanford Engineering Everywhere program's resources [stanford.edu]. They released some great beginner level programming courses [stanford.edu] under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported license [creativecommons.org]. Those could be adapted for teaching the subject to students, and the content used for instructional material.
  • by ricegf ( 1059658 ) on Saturday October 11, 2008 @11:02AM (#25339343) Journal
    I attended a fascinating talk by Mr. Vern Ceder [canterburyschool.org] at the past PyCon (Python Conference) on teaching programming to secondary students. You might review his papers from that and other conferences, and email him for advice (see linked page).
  • by mrroot ( 543673 ) on Saturday October 11, 2008 @11:04AM (#25339361)
    Thinking back (waaaay back) to my first programming class in HS, there are going to be two kinds of students, those who have an active interest and those who do not.

    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)

    by Dan East ( 318230 ) on Saturday October 11, 2008 @11:05AM (#25339363) Journal

    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.

  • by Anonymous Coward on Saturday October 11, 2008 @11:05AM (#25339365)

    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

  • by introspekt.i ( 1233118 ) on Saturday October 11, 2008 @11:05AM (#25339369)
    Second that motion. I teach labs for an introductory programming class myself. The best way to get concepts to stick with students is to present them as pertinent problems or tasks to the students. Some examples that work for me are making small games (card games, dice games, etc) and writing programs that perform some kind of pertinent calculation (like business calculations or health BMI, target heart rate) calculations. All of these can be encapsulated in the task of presenting the program to the user in a nice interface..be it command line, web, or desktop GUI.

    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)

    by Pakled ( 1145971 ) on Saturday October 11, 2008 @11:22AM (#25339489)
    HTML in a basic text editor is a great place to start. It teaches how to open and close tags and the importance of correct syntax.

    You can also make it more complex by adding CSS or Javascript which resemble real programming.
  • Former teacher.. (Score:2, Informative)

    by Anonymous Coward on Saturday October 11, 2008 @11:25AM (#25339525)

    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)

    by Anonymous Coward on Saturday October 11, 2008 @11:28AM (#25339545)

    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.

  • by angahar ( 579961 ) on Saturday October 11, 2008 @11:46AM (#25339671)
    Test Driven Development. After more than 30 years as a working software developer and computer programming instructor I wouldn't teach it any other way. An excellent book recently released that offers this approach is Agile Java by Jeff Langr.
  • by hedronist ( 233240 ) * on Saturday October 11, 2008 @11:48AM (#25339687)
    I agree, go concrete. It's easy to forget that almost everything about a computer is abstract to a rank beginner. One thing I have seen students get hung up on is:

    x = x + 1

    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)

    by baxissimo ( 135512 ) on Saturday October 11, 2008 @11:52AM (#25339719)

    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.)

  • by bishiraver ( 707931 ) on Saturday October 11, 2008 @12:03PM (#25339799) Homepage

    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)

    by Plaid Phantom ( 818438 ) on Saturday October 11, 2008 @12:14PM (#25339879) Homepage
    Agreed. I helped teach a one-week summer class for junior high kids using Alice, and I don't think there was a single one that didn't enjoy it. And it demonstrates Object Oriented programming well.
  • by Hognoxious ( 631665 ) on Saturday October 11, 2008 @02:45PM (#25340935) Homepage Journal

    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.

  • by Blakey Rat ( 99501 ) on Saturday October 11, 2008 @02:57PM (#25341001)

    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.)

Stellar rays prove fibbing never pays. Embezzlement is another matter.

Working...