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

 



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 Anonymous Coward on Saturday October 11, 2008 @10:50AM (#25339257)

    Computer basics, ie how to use the web, and computer programming do not belong in the same course. People in the audience for either will not be happy with the other.

    • Re: (Score:2, Informative)

      by angahar ( 579961 )
      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.
      • Re: (Score:3, Insightful)

        by johannesg ( 664142 )

        At first I thought to ridicule your notion that rank beginners should be taught software engineering theory. Than I thought, "I won't bother. There is nothing I can do for him now, the Mods will get him."

        • by Alex Belits ( 437 ) * on Saturday October 11, 2008 @02:09PM (#25340671) Homepage

          At first I thought to ridicule your notion that rank beginners should be taught software engineering theory.

          BAD software engineering theory, to boot.

          Just imagine test-driven aerospace engineering. Test-driven civil engineering. Test-driven economics (okay, I take it back, that's Libertarian idea of letting everyone build "free market" by trial and error and not get wiped out or enslaved in the process). Test-driven medicine. All those area use massive amount of experiments, observation and verification, yet none would find it acceptable to abandon theory, rig up some testing contraption that may or may not be mis-designed and buggy by itself, then do job half-assedly and introduce random changes until tests pass. Or at least this is how "test-driven development" is usually implemented.

          I know one area where test-driven development worked extremey well -- biological evolution. Enjoy your ten million years long development cycles. And cancer. I mean, in products of such development.

    • by Anonymous Coward on Saturday October 11, 2008 @12:22PM (#25339929)

      What grade level is this on? If it's a semester long high school course, or middle school, you should get up with an experienced teacher. Even if you're teaching this at a junior/university college, you should find a licensed educator to talk to. Too often computer science teachers know a bit about programming and logic, but very little about teaching. I'ld recommend covering your major points, and focus on a very VERY simplistic program that handles a few basic aspects (Perhaps a simple calculator?) and progress through whatever technologies are necessary while stressing that programming languages are like human languages, except machine friendly. Some languages are more flowery (latin) some are more coarse (germanic) and some are very powerfully in their succinctness (some asiatics).. Finding a way to bring this out of nerd land helps normal kids not want to get you fired as badly.

      1) teach background
      2) teach theory
      3) relate theory to something understandable
      4) expound. Verify learning, and repeat. And repeat. and repeat. then move on seems to work. Half the kids are not paying attention at any given time in virtually any class.

    • by Deanalator ( 806515 ) <pierce403@gmail.com> on Saturday October 11, 2008 @05:44PM (#25341817) Homepage

      The scope is simple. Teach what they need to pass the AP computer science test.

      http://www.collegeboard.com/student/testing/ap/sub_compscia.html [collegeboard.com]

      1. show an example of a for loop
      2. explain what all the parts mean
      3. give the class some problems that can be solved with that knowledge

      Following those steps over and over again for more complex concepts until the class is comfortable with turning algorithms into code. This is what computer science is.

      Once people get the basics of algorithms, you can expand out into various practical applications. Classes on web design, network programming, operating systems, etc, but that fundamental base is critical.

      Until the process of iterative and recursive problem solving makes sense, all practical application will just be seen as magical gimmickry.

      • Re: (Score:3, Funny)

        There's some view that even that's too high a level, especially if this is a university comp sci class. I'd start with the statement "a computer is just a box of switches" then back it up with ones and zeros corresponding to switch states.

        Assign George Boole as outside reading.

        Give them a little bit of overview as to how the machine actually works, and maybe later down the track they'll think before they cascade ELSEIF's or load stack manipulation inside tight loops. Make them sensitive to the tools th

    • Re: (Score:3, Insightful)

      What are your audience?

      As the parent, said it should be clear who it is aimed at.

      If you've got a whole bunch of completely illiterate people who struggle to install a program, then programming will probably go way over their head.

      Likewise, if your audience is a bunch of people who have a firm grasp on the very basics, the right mindset and are eager to push it one level further, then the basics will bore them.

      ~Jarik

  • by nurb432 ( 527695 ) on Saturday October 11, 2008 @10:51AM (#25339261) Homepage Journal

    Don't teach things in 'the abstract'. Give them a task to accomplish that needs particular 'features'.

    Then the next 'task' adds more 'features', but doesn't drop the earlier ones learned.

    And don't make the tasks abstract either. "do a bubble sort" would qualify as too abstract. While "collect 5 client names from the user and sort them" wouldn't.

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

    • by Thiez ( 1281866 )

      5 client names can be sorted with bogosort, without seeing the source you'd never notice the crappy algorithm. How about a list of 5000 names from a file...

      Sorting is fun. Sorting huuuuuge lists as fast as possible is even more fun.

      • Re: (Score:3, Interesting)

        by andymadigan ( 792996 )
        Sometimes it's important to know the simple solution as well. Most (all?) of the algorithms that perform better than O(n^2) have a fairly high constant attached to them, which usually translates to more computing time and a difficult to implement algorithm. If you're really concerned about speed (you may have to sort 5 items from each of 500,000 lists) then you need to know how much data you're dealing with.

        However, that's all too complicated for a beginner's course. Teach them about stdin/stdout, teach the
    • by Vindication ( 1383017 ) on Saturday October 11, 2008 @11:28AM (#25339543)

      I'm a high school student who has previously taken AP-A Computer Science and is currently taking AB CS (this is the last year they're offering it, I believe), and I have never been more dissatisfied with any teacher that I have ever had.

      Programming is an outside interest for me; while we do Java in class, I experiment around with C, C++ and Python outside of school (and I am planning on trying to pick up PHP and Perl soon). I've found that many of my classmates, including friends who I know are quite competent with computers in general, are quite lost when trying to learn or apply many of the concepts we use in CS.This is understandable. However, my teacher has inexplicably continued to introduce many of these abstract concepts at the same time, without really explaining even the basic purpose and logic behind each one. As a result, I've seen many people new to CS but genuinely interested in it just give up, because it made little sense to them. Personally, I know someone who is quite talented with C, and it is thanks to his help that I can understand basic C concepts (memory management, etc.) and not be overwhelmed. This friend of mine, I believe, is quite a good teacher, and this is largely due to the fact that he a) does not assume that I know things incredibly well and b) utilizes the Socratic method to great effect.

      I agree with the parent's comment. Our current project in AB CS is to write a program that sorts an array using several different algorithms. It is supposed to help us understand Big O notation and the logic behind writing more efficient algorithms, but the teacher hasn't said a single word about Big O, instead opting to hand out papers (which my friends have told me they don't understand at all). The concept of Big O notation seems to be too abstract without practical examples.

      Encourage asking questions...you'd be surprised at how many people are afraid of asking questions because they feel they will sound stupid (at least in high school).

      Pseudocode is a necessity for some of the assignments we have, and yet many of my friends fail to see the point (they just see it as a waste of time). Make sure to emphasize its importance, because they will feel that they do not need it early on.

      Also, make sure to emphasize the importance of debugging your own code early and often. Since my "teacher" does not actually teach, I often end up having to help out my friends who are absolutely stuck, only to find that they had a small debugging issue that they could not find because the teacher never bothered explaining the necessity of debugging.

      I don't claim to be an expert in CS or teaching whatsoever, so take this response with a grain of salt. However, I do like to think that my experiences in these courses lend at least some credibility to my reply.

    • 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: (Score:3, Insightful)

        by anom ( 809433 )
        This is an extremely good way to teach. This method also makes it extremely easy to teach synchronization too (tell two kids to go modify the value pointed to by their label at the same time, and have that value on the chalkboard). You can give your students a better understanding of pointers, memory, and threading than most students have in a single class without showing them a line of code.
  • by jelizondo ( 183861 ) * <jerry.elizondo@gmai l . c om> 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.

    • Re: (Score:3, Interesting)

      by SteelFist ( 734281 )
      When I took an introductory programming course (high school), the teacher went into painful detail about the history of computers, binary code (with paper and pencil), and so on and so forth. Later in the course, he admitted that it was to weed out the kids who were taking it for a typing course and not the programming course it was. After making it through the weed-out portion of the class, I actually appreciated what the computer was doing more than if we had jumped right into the coding.
  • Most people who are taking a programming class already know how to use a computer. About the only way that you would ever teach basic computer skills in a programming class is if it was required to graduate. Also, what level is this? Is this high school? College? If it is college is it mostly people who are fresh out of high school or people looking to get a pay raise by getting a degree? All those things will change how you need to work it.
  • Teach them fun... (Score:5, Interesting)

    by SerpentMage ( 13390 ) on Saturday October 11, 2008 @10:56AM (#25339301)

    1) Teach them to understand that a computer does what a computer is told. So as a class building exercise get them to "program" a robot in pseudo code. You give them a fairly complex assignment that involves decisions. The test in this is that you the teacher are the robot. And the students who thought of this as a joke or simple assignment will quickly realize that garbage in garbage out means something.

    2) Do the assignment again, but this time add "testing" routines. Make them write little assignments, that are assembled into bigger tasks. Show how this could be a "test driven" environment. You teach the robot little things, and then those things are assembled into bigger things. This teaches them components, modules and test driven.

    3) Take all of that knowledge and apply it to a programming language. I personally would choose something along the lines of python and ruby. They have enough problems and they need a quick turn around.

    4) Teach them about OO by introducing them to a programming language like C# or Java.

    5) Finally teach them functional

    Though I would stress team exercises thus giving them the benefit of XP (Extreme Programming) type training.

    • Re: (Score:3, Informative)

      by SerpentMage ( 13390 )

      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" t

      • Re:Teach them fun... (Score:5, Interesting)

        by xenocide2 ( 231786 ) on Saturday October 11, 2008 @12:19PM (#25339913) Homepage

        Computer Science Unplugged [csunplugged.org] is a curriculum out there designed to teach students computing principles, and they recommend a game [csunplugged.org] like that. The game works like this: one person is playing the role of "programmer" and the rest of the class will try to follow their instructions. The goal is to duplicate a drawing that only the programmer can see.

        The first game(s) the rules are easy -- the "computer" can ask questions and the class can see what the machine is doing. Then you introduce restrictions. The computer player will be restricted from speaking, for example. At the end you have the programmer obscured from the class, only able to speak to their classmates to describe a picture. As programmers we rarely get the "full picture" so to speak, and have to give precise instructions that both we and the computer understand identically.

        The most important challenge to this as a teacher is selecting appropriate examples. They have a few, but I'd also add: a formula, with exponents, parenthesis, variables and subscripts. A pixel art smilely face ala CSS testing. A curve. A full binary tree with 4 levels. A small section of text, with bold, underline, paragraphs and bulletpoints. These are harder, but high school students can do it and it illustrates both rendering techniques and the need for language. For highschool students, I'd suggest spending a class on this, and then asking them to either write a paper (1 page tops) on the significance, or if the class is fast and small enough, hold a discussion.

  • by Anonymous Coward on Saturday October 11, 2008 @10:57AM (#25339307)

    ...my first class in programming: the teacher wrote "x=x+1" on the blackboard, and my reaction was "Huh? That is unsolvable!"

  • Blender! (Score:4, Interesting)

    by saterdaies ( 842986 ) on Saturday October 11, 2008 @10:58AM (#25339313)

    So, one of my friends in college did his senior research on alternative ways to teach introduction to programming and gave a very convincing argument for teaching it with Python and Blender (the 3D content creator). Blender allows you to use the Python programming language to set everything up and manipulate the objects so they learn programming, but it's a lot more satisfying. For example, what's more fun: reading input from stdin and saying if that integer is divisible by 3 using % or creating some 3D objects and moving them across the screen in a specified way?

    Maybe someone else has a better idea, but I thought I'd share

  • 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:Steve Drasner (Score:4, Insightful)

      by mattMad ( 1271832 ) on Saturday October 11, 2008 @11:31AM (#25339577)
      Focusing on pseudocode might be fine in college - but in HS it is very important to start with topics that are actually motivating the students. The danger is that you lose 80% of your students on the way if you do not give them "something to play with" every once in a while.
    • Is there a specific text that Drasner uses to teach like this? Or is his course mostly based on lecture? I'd be interested in taking a look at it.
  • 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).
  • Eduardoare (Score:2, Interesting)

    As a college student currently enrolled in an introductory java course, what I found particularly interesting was the initial teaching of really basic HTML and its tags to introduce the idea that programs need to follow a rigid syntax for them to function. Although I already had previous knowledge in Java and understood this, the rest of the class seemed to benefit from the way that the class was introduced. Regardless of the language, the professor can then go into basic programs for the target language (J
  • First, it is a good idea to try to do some sort of survey or something to judge their skills. However, that being said, you will almost certainly be dealing with a broad range of skills from some who may know more than you to someone who barely knows how to turn the computer on.

    The hardest thing is trying not to make the advanced students feel bored and the beginning students feel like you are talking down to them. That's when good teaching methods come into play. I would suggest asking the students to
  • 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.

  • As you are no doubt aware, "where is that myspace thing" and php/python/C/Pascal/Ada/C++/BASIC/LISP etc are not in the same ballpark. The scope of the class seems unclearly defined - an "Intro to computers" vs programming.

    Let's face it 99% of the people in the developed world (and higher in the rest of the world right now) will never need to program or want to program. They just want their computers to work and do what they want.

  • Traditionally, computing is taught "bottom up". Courses used to start with binary arithmetic and go on to NAND gates and flip-flops. Now, there's a trend towards "top down" instructions, where you start with something like using JavaScript to modify a web page, or PHP to create one.

    Most people don't need to go very far down. Down to the first level of code probably covers most programmers today. Some still need to understand C. Fewer need to understand assembler. Fewer still need to understand what

  • 1) Is it a "programming" course or a "computer science" course? There is a difference.

    If you are teaching them how to program, then you need to cover background things like "what is source code" and "how to compile a program and what that means" and "now that it is compiled what do I do". Then you need to introduce typical programming constructs - loops, conditional logic, representing math operations, etc.

    If you jump right into the web stuff it's almost completely missing all of the basic concepts.
  • by VikingBerserker ( 546589 ) on Saturday October 11, 2008 @11:12AM (#25339427)

    When I first learned to program, I remember the teacher asking us how we got to school that day, in as minute details as possible. Example: awaken, open eyes, elevate torso, rotate 90 degrees, bend legs until they reach the floor, stand, walk to bathroom, etc.

    From there, you can explain the concepts of procedures to compartmentalize the code. Brushing your teeth may take thousands of steps, yet cut down dramatically with looping, etc.

    While it starts out as a new way of looking at how computers process the steps in a more methodical sense than we do, it soon becomes a way to introduce functions, procedures, and other syntax in a practical sense.

    • by wfstanle ( 1188751 ) on Saturday October 11, 2008 @12:03PM (#25339807)

      I remember a story about a teacher that did something similar. He brought in the making for a peanut butter and jelly sandwich. He then asked the class for instructions on how to make it. It went as follows.

      1. "Put the peanut butter on the slice of bread."
            He held the jar over the slice of bread and started to shake the jar.

      2. ""No you take the knife and use it to spread the peanut jelly"
            He started to grab the knife by the blade end.

      3. "No grab the knife by the other end."
            This time he holds the knife correctly.

      4. "Spread the peanut butter on the slice of bread"
            He starts to put the peanut butter on the edges of the bread.

      This went on in minute detail until it dawned on the students that in everyday speech, we leave a lot out assuming that everyone knows what we are talking about. The students got an understanding of how we must communicate with computers. This in turn opened the discussion to other topics.

  • by gillbates ( 106458 ) on Saturday October 11, 2008 @11:18AM (#25339469) Homepage Journal

    The majority of people - even those with college degrees - have a difficult time with logic. Something as simple as an if-else construct can be very confusing to the average person at first.

    And there's another twist. About 40% of learners can understand and manipulate abstract concepts, and learn them without any practical experience whatsoever. The other 60% require experiential learning - they have to do before they understand. Fortunately, computers can very easily demonstrate concepts such as if-else...

    And how computers work is a mystery to most people. Before you start the course, you should come up with a simple mental model that you can use to explain how a computer works to someone with absolutely no understanding of electronics, logic, etc... For a basic programming course, you should first assess class understanding:

    1. Do they know how a computer works at a basic level - files, memory, cpu, etc?
    2. Do they know the difference between an application, and the files it creates ("I saved it in Word..." etc..)
    3. Do they understand how to solve a problem by breaking it down into its constituent steps? Believe me, there are people that really struggle with this, and expect the instructor just to teach them to solve a particular problem, rather than how to instruct a computer to solve problems. In fact, that might be a good introduction to programming, "Computer programming is the art of instructing computers to solve problems."

    For most programming courses, you should not even assume your students understand how to use the compiler. Furthermore, you should probably come up with a series of simple examples which demonstrate your point without any extraneous code. Because most people learn by doing, one of the first exercises should be to build a simple "hello world" type of application to familiarize themselves with the build tools.

    And have fun! Come up with interesting problems. Your students will most likely spend most of their corporate careers doing boring stuff, so they'll appreciate the chance to do fun things like games.

  • ...shrug...

    It'll get their interest, but then don't do it and you'll have taught them the most important lesson that can be taught in computer science.

    bait and switch.

  • I was not a comp sci major (a physics major), but I took comp sci classes, and am self-taught in compilers, language theory, and everything else I know about computers - including the hardware level, like the majority of people in the field. Looking back on the courses I did take, I feel that they left out a discussion of the flaws in the current paradigms. For example, the failure of the core von Neumann model of computing to address the problems of parallelism. The failure of procedural languages to enabl
  • by eddy ( 18759 ) on Saturday October 11, 2008 @11:20AM (#25339479) Homepage Journal

    As a starting point, I suggest this (draft) paper, because it's interesting, and short, flippant, and gets you thinking. The Camel has Two Humps [mdx.ac.uk]

    Learning to program is notoriously difficult. A substantial minority of students fails in every introductory programming course in every UK university. Despite heroic academic effort, the proportion has increased rather than decreased over the years. Despite a great deal of research into teaching methods and student responses, we have no idea of the cause.

    It has long been suspected that some people have a natural aptitude for programming, but until now there has been no psychological test which could detect it. Programming ability is not known to be correlated with age, with sex, or with educational attainment; nor has it been found to be correlated with any of the aptitudes measured in conventional intelligence or problem-solving-ability tests.

    We have found a test for programming aptitude, of which we give details. We can predict success or failure even before students have had any contact with any programming language with very high accuracy, and by testing with the same instrument after a few weeks of exposure, with extreme accuracy. We present experimental evidence to support our claim. We point out that programming teaching is useless for those who are bound to fail and pointless for those who are certain to succeed.

    • This is completely unlike any scientific paper I've ever read. It could be more rigorous in its methods, but I wish more papers adopted the same sort of tone. It would make them much more interesting to read.
  • to suggest not using "myspace", or anything on the Internet as the starting point, but instead use some computers that were *not* connected to the Internet at all, and teach actual programming, but others have suggested starting without computers entirely, and that makes sense too.

    To be perfectly honest, it wouldnt hurt to find a copy of DOS and GW-BASIC, and teach that. (Apple II's, using either Apple Basic, or Pascal would probably be harder to find)

    If you absolutely have to use something modern, I sugges

  • Step 1: Determine whether you're supposed to be teaching computer programming or computer literacy.

    If Computer Literacy, rename the course and structure it accordingly. End.

    Step 2: Where that myspace thing is on your computer monitor is computer literacy. Don't teach computer literacy.

    You don't start a calculus course with a review of the multiplication tables. Any students who don't already know how to use a word processor and navigate the web are not ready for a programming course and don't belong in one.

  • 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.
  • Take a look at Alice. [alice.org] There are even textbooks based on it.
  • Former teacher.. (Score:2, Informative)

    by Anonymous Coward

    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 ex

    • i'm not experienced or knowledgeable enough as a programmer to recommend a curriculum, but i have taken several programming classes in high school, college, and even some private tutoring sessions. and even though i love programming, and it's a hobby of mine, i really hated some of the classes i took, and they bored me to death.

      if you want to go over basics, teach the students basic computing theory like the parent post suggests. i found my intro programming class in college (Java) to be much more interesti

  • by MyDixieWrecked ( 548719 ) on Saturday October 11, 2008 @11:35AM (#25339599) Homepage Journal

    One of the issues I had when I was in school is that the computer classes were radically changed as I progressed through my grammar/middle/high school career.

    In 3rd and 4th grade, we learned LOGO on some old Atari computers and were basically taught about pixels and where home row was on the keyboard. It was all very simple to grasp and we did a lot of projects (drawing pictures in logo) that required us to use the keyboard a lot.

    In 6th grade, we had a BASIC class (not Qbasic, not visual basic... straight BASIC) on PCjr systems where we learned how to draw shapes to the screen and were taught the basic ideas behind computer resolution, very simple loops, how to print text to the screen, read input and use if/then. We also learned what input and output devices are and the names of the various computer parts (monitor, keyboard, printer, etc).

    I liked those classes and they went at a good pace which was great because I was the only kid who had a computer at the time (this is like 1991/1992) and everyone seemed to get what was going on and it was great. When I got to high school, there was a VisualBasic class which had a pre-requisite of Intro To Comptuers. I opted not to take that since not only did I have a computer for my whole life, but I also had the previous classes. When I talked to my guidance counselor, he said that the intro to computers class was just a typing class. The visual basic class was not a programming class... it was a class that teaches you the basics of computers (what a floppy is and how to print) and then ends with showing you visual basic.

    I opted not to take either class.

    My senior year of HS (98/99), they added a c++ class which I managed to sign up for by talking to the teacher and showing him that I already knew a little C++ and already knew computers better than most others (I would have had to take intro to comptuters and the VB class, otherwise), but that class wound up spending half the year teaching about how to use a web browser and what the difference between RAM and ROM is before we even got to 'cin' and 'cout', and that's all we ever did.

    So my advice is to spend very little time on the basics of computers in general and dive right in to projects that get them applying what they do know to do things that they want to do. Also, use a language that lets you dive right in. Java is a programmer's programming language. New programmers never understand it because it requires so much up-front knowledge to even understand what a simple hello-world app does. Especially if they are coming from visual basic or something similar.

    I think that C is the best beginners language out there. It's very simple. It's super straight-forward. There's a ton you can do with it right out of the box.

    PHP may be another good beginner's language, too, since the web is what most people use the most when they're on a computer and it would enable people to show off what they've done. It would also spark much more interest than C, especially since building a C app to work in windows isn't really a piece of cake... although programming in windows, in my experience, has been very difficult... there's a limited amount of free tools and it comes with virtually nothing built-in for that.

  • Buy a "programming for dummies" book and get the feeling of not knowing anything. I'll get ideas from it.

  • the basics (Score:4, Interesting)

    by fermion ( 181285 ) on Saturday October 11, 2008 @11:39AM (#25339639) Homepage Journal
    I was taught, and teach others, in the fundamentals. This means that I understand what is going on, and not just what to do to get a the proper response. So here are my thoughts.

    Start off without a computer. At the basis, computers are sequential, even if some other from is used in the programming. Students must be able to break processes down into steps. They will invariable create ambiguous steps or leave steps out. Act out the process to show the missing steps. Use humor show undesired outcomes. Kids tend not to fully comprehend cause and effect, sequential logic, and the like. They tend to want to told a process, then apply the process mindlessly. The creativity and flexibility at the basis of programming a computer must be taught. At this point language only limits the students options, so it is not necessary to worry about that yet.

    Second, the student must understand the limitation of a computer, and how they function. A sideline into binary math and boolean algebra is useful to teach these limitation, and get the student to think on this detail. If an AOI circuit simulator is available, this can be used to teach these limitations, as well as get the students used to using the computer in a product creation manner. This last bit is important, because many students have never used a computer to create anything significant, and don't really understand that this is what many professionals do. They know how to use proxies to bypass security, but not how to load an IDE to create a program. Many can't even comprehend it, and play with their proxies not understanding that there is something else they could be doing.

    This is a bit abstract, but computers do work in the abstract, which is why CS majors, and scientists, engineers, and math people tend to earn a premium. Such people can think in the abstract, and they can not only because of innate ability, but because they were taught to. Teachers that shy away from the abstract because the kids complain and it is easier not to are leaving out a part of the educational process. But use concrete examples to keep the abstract grounded in something the students can relate to.

    At this point, when everyone is familiar with the computer function, some time can be spent detail the general workings and components of the computer. I have seen children as young as 9 forced to memorize, rote, the names of each part of the computer, and match the name to the part. I have seen high school kids repair computers with a high level knowledge, not quite knowing how everything really fits together. I don't know what level of detail is necessary for computer programming. They should now what a computer is, but I would not formally assess or punish the lack of rote memorization.

    At this point, it depends on what is to be taught. Something like Alice can teach OO concepts in a very accessible and high level manner. Since most everything is moving towards using a high level API with short bits of glue code, this may not be such a bad choice.

    If actually programming is to be taught, I would not use an overly complex IDE or language. The basics need to be taught. for instance, to switch values i=j; j=i does not work. Variable scope is important. How one passes parameters is important. Global variable can be very bad. That sort of thing.

    At higher level, creating reliable contained data structures is always a fun topic. Write a web engine or a word processor is now a well known problem and can be handled in a year. If there is a science or math component, well formed solutions to such problems are also quite instructive.

    A key thing that is often missed in debugging. Give students time to debug their work. Don't cave to the crying. Let them help each other. Assessment is best done in their ability to fix a bug, rather than sketch out a section of code or a data structure.

    And of course project based and group learning is the soup du jour. As mentioned, it is possible to have the students write a si

    • by Anrego ( 830717 ) *

      I totally agree with you in theory.. but I think in reality this fall apart (unfortunately).

      Students will be anxious to actually make a program... and unlike yesteryear where programming tools were hard to come by... now days anyone with an internet connection can google "how to make really 1337 apps" and find a VB6 tutorial.

      While your teaching binary math and boolean algebra.. they are in the back hacking together a twisted VB6 version of hangman.. with lots of goto statements and copy+paste code from the

      • by Anrego ( 830717 ) *

        Addendum: I think the approach you described works beautifully however in environment where the students have a very serious interest in learning the right way to do things.. but we were talking about an intro course.

    • by Troy ( 3118 )

      To provide a counter-point, I've been teaching beginning programming to high school students for several years now. My classes are usually mixed between the kids who would get an A if I gave all of my lectures in pig-latin, the "normal" kids, and the kids whose greatest aim in life is to play the same stupid flash game every day. I'm also in a public school environment where I cannot assume that students are able to program at home. All of my labs consume several days of class time. This definitely slows me

  • by bennomatic ( 691188 ) on Saturday October 11, 2008 @11:42AM (#25339653) Homepage
    We need to change the stereotypes of future generations of programmers!
  • Start from assembler.
    Mwa ha ha ha ha!
    • by FlyByPC ( 841016 )
      Actually, some of your students will no doubt find assembly language to be a very refreshing change of pace from more modern, OO languages. (The Java course I took left a bad taste in my mouth; one too many "GridBagArray" manipulations, and not enough number-crunching. I enjoy programming, not Graphic Arts.

      I'm currently helping out with a course based around building a working Z80 computer. The programming is done in assembly and hand-assembled into machine code, to be programmed in Hex or Binary.

      It's k
  • Algorithmic approach (Score:3, Interesting)

    by Amigan ( 25469 ) on Saturday October 11, 2008 @11:54AM (#25339735) Homepage
    I agree with previous posters that have said act as a dumb robot and follow the classes instructions exactly .

    The simpilest example I can give you to use is the making of a peanut butter and jelly sandwhich. Bring loaf of bread, knife, jar of jelly, and a jar of peanut butter to class and ask the class for instructions on how to construct the sandwhich.

    statements like 'put the peanut butter on the bread' would result in taking the jar of peanut butter and placing it physically on top of the loaf of bread. Similarly, the statement 'add the jelly' would mean moving the jar of jelly onto the pile you've created. Until the students understand that each (and every) step must be stated, they won't correctly grasp the concept of what programs do.

    Jerry

    • Although mentioned several times, I actually don't like that approach. As a student, it seems inherently unfair. In any normal math/CS you need to (1) define available terms/operations (API), then (2) apply terms in proofs or algorithms.

      In this demonstration, the operations are not well-defined. Can I say "pick up knife"? Or do you need "place hand on knife"? Or do you need "curl fingers around knife, then press with thumb"? Personally I get enormously frustrated when someone does this in-minute-detail exer

  • Get into the mindset by explaining the ubergeek religion...
    Linux is godlike, Anything from Microsoft is the work of satan, and that Slashdot is their bible.

  • How Should I Teach a Basic Programming Course?

    Very simply.

  • So your students will be able to understand their supervisors and employers...
  • http://www.cs.mdx.ac.uk/research/PhDArea/saeed/paper1.pdf [mdx.ac.uk]

    so the answer is - it does not matter. Some of them will get it, most of them won't, makes no difference what you do.

  • They taught binary and hexidecimal conversions and binary logic right off the bat. They also covered bits, bytes and the ASCII tables. Once we knew a bit about how the computer represented its data they started talking about the syntax of the language we were using, basic I/O, branching and looping. After that they covered algorithms like sorting and general data structures like linked lists. Implementing a linked list in BASIC was a bit of an eye opener. I would contend that even though pretty much every l
  • I find lately the biggest hurdle in programming is getting your environment setup and being able to write and execute code. Many of the development environments are pretty tough when you just start out, but if you know enough to get testable code written it relieves a lot of stress. And not everyone wants to be a programmer, so don't expect total buy-in those that do will more than appreciate the leg-up to get started from their they can access the Internet's resources to develop further.

    For most people n

  • Computer literacy is distinct from networking which in turn is distinct from programming [as has been said]. Don't try to teach them all at the same time, and only teach two at the same time at the areas where the two overlap.

    The rest of my post is about teaching programming specifically, not the other two (although it may also be relevant to system administration).

    Teaching generative models is crucial. What does that mean? It means teaching the causal connections; for one, between what the code says and

  • .. like pascal!

    WAIT WAIT.. this isn't a troll!!

    I`m dead serious. Starting with a language like Java or C++ or *.NET or anything where the programmer can make something interesting means they will focus on the end product and not the code.

    Give them a language like pascal, and restrict them to cli apps.. and they won`t spend their time trying to make their app do something cool.. but instead focus on making the code look neat.

  • I can't really tell you how to teach this course, but I can suggest that you find some sort of underlying idea around which you will structure the course. For example: it sounds like you are trying to make a course that could just as well be called "Introduction to Computer Programming for the MySpace Generation." What does this mean? Well, according to my philosophy:

    With respect to students, it could mean that you are dealing with students with zero programming knowledge and zero programming interest.

  • I started by learning the PRINT, GOTO, LET, and FOR/NEXT commands, and learned to number lines by tens, so extra lines could be added later.

    Oh, wait. "Basic" programming, not "BASIC" programming. Got it.

    I would vote for (standard, nonproprietary) C or C++, since once you know that, it's a lot easier to figure out other modern languages (Java etc).

    I would put off introducing pointers until they have a very good grasp of using standard variables and variable arrays, though. Then you might explain what a
  • The only language you can teach to someone who doesn't know how to browse the web is LOGO, and even then... it's a stretch

    It teaches people you can program, it does not teach them how to do so. No best practices, no structured/object oriented/functional programming...

    On the other hand even if you teach a programming course, pick a language. Just because you know more than one way to do something doesn't mean showing them alternate paths is a good way to get your feet wet. Picking the best language for a

  • If you think you're going to work all that into an introductory programming course, you're nuts. First teach them to use a programmable calculator. Then introduce them to the (Ugh!) BASIC computer language. That's probably about all the time you'll have, but if at all possible try to teach them the C language. That should serve as a good foundation to branch off into the other areas you mentioned for the more advanced courses.

    If on the other hand, your job is to teach them to use computers instead of pro
  • Remember that? A language for teaching programming with easy to see results (a turtle which moved).

  • Like others have mentioned, without knowing the age range and dictated goal, it's tough to give really great advice, so I'll tell you about two of the mini-classes I've given.

    The first was a weekend "computer camp" for a small group of kids aged ten to sixteen. In a few days, we covered:

    • Computer hardware: recognizing the components and parts, how to replace components and set up the computer, etc. We ended with destroying an old, dead computer in part to see how what was inside components like the hard dri
  • 1st class have them write instructions on how to make a peanut butter and jelly sandwich.

    Then follow the instructions. None of them will get it entirely correct. Ie. Put knife in jar, but not open jar first.

  • Teaching youngsters is a lot easier if they can see good results within one or two days. Any tiny program that they could write and actually see function within two or three class days might get them hooked on learning more.
              Also kids like to compete. It raises interest in those that are reachable. Having a bit of a contest as to which kids program runs best may help inspire them.

  • use the robot making PB&J sandwiches.

    Have the students team up and write an algorithm for a robot to make PB&J sandwiches.

    next class, one of the students in the class act out the instruction with the bread, plastic knife or spoon, peanut butter, and jelly.

    Obviously, don't let students who are allergic to peanuts do this!!!!!!!!

    The exercise gives students an understanding of how algorithms are formed and the importance of each step.

    Your response when they skip a step is, "HOW?"

    My c++ instructor in co

  • Demonstrating interface is tricky especially as the particulars change. Maybe as the students think about how to stop a bicycle and a car?

    As to algorithm and execution, get a cook book page and show how a recipe relates to a program. How the instructions declare the variables and provide the algorithm. (How the recipe consists of steps in an interpreted language in that when it says "caramelize the onions" the experienced chef knows what to physically do.) How the kitchen is the computer; the chef is the I/

  • by Lennie ( 16154 ) on Saturday October 11, 2008 @02:13PM (#25340703)

    Maybe now that you are in teaching, maybe you should have a look how others do it, here is an example:

    http://groups.csail.mit.edu/mac/classes/6.001/abelson-sussman-lectures/ [mit.edu]

    I've been watching these for a while now, I liked them (although to much beginner for me, it's a nice way to get to know a 'new' language).

  • by anorlunda ( 311253 ) on Saturday October 11, 2008 @03:57PM (#25341295) Homepage

    I've taught introductory programming several times. I never thought that my goal was to teach a skill, or an abstract concept, or logical thinking. My goal was to convince the students that programming is fun and easier than they thought. If I succeeded, my students would run out of the class saying I CAN DO IT!

    To capture their imaginations, I used Visual Basic. I taught them how to draw a ball on the screen, how to make it move, how to bounce it off the wall, and finally how to turn it in to a kind of Pong game. I can take a group of random people off the street, and teach them to make their own Pong in about 3 hours.

    Graphics and motion are much more emotionally appealing than any kind of abstract logic. It also presents them with the opportunity to analyze symptoms to debug their own programs. They are better able to grasp the relationship between incorrect behavior and incorrect programming when the subject is graphics and motion.

    Something fun like Pong, also teaches the students that programming is a means to an end, not the end itself. The interesting part is clearly what happens with the ball, not what the source code looks like. Later in more advanced courses, a subset of the students might become entranced with programming as an intellectual end, and go on to become software professionals. Good for them.

    For those who never do become professionals, they at least grasp that,given a lot of work and common sense, one can create source code that shapes and steers behaviors in the run time. Never again will they think of software as some kind of incomprehensible black magic.

  • Logo (Score:3, Interesting)

    by david.given ( 6740 ) <dg@cowlark.com> on Saturday October 11, 2008 @04:15PM (#25341381) Homepage Journal

    Let's face it, most programming languages suck from the point of view of teaching. Python's pretty cool, but the syntax has lots of special cases and many, many weird (but useful) language features, all of which are confusing. Ruby ditto. Java is useful but unspeakably complex. C++ is even more useful and even more unspeakable. C requires you to be anally retentive. Basic is a crime. etc, etc. If you pick any of these, you end up having to teach the language, rather than teaching the abstract concepts that underly the language.

    My university got round this by designing their own custom language, S-Algol, and all the algorithms courses were done in it. Of course, it didn't help that it was a weird, half-implemented language (a garbage collected language with no actual garbage collector!) with lousy error detection (anyone who knows it will remember, and shudder at, the phrase 'void and void are not compatible in this context') and a half-assed IDE (the only editor I've ever seen where you had to move the cursor with the mouse. Yes, the arrow keys didn't work).

    If you want an existing language that's powerful enough to teach proper algorithms and yet simple enough for novices, you could do a lot worse than Logo. Yes, yes, stop laughing. But underneath the cute turtle interface it's surprisingly powerful and rather deep: it's best described as a stealth Lisp.

    Logo's biggest problem is that when it was introduced and heralded as the best thing since sliced strings, most affordable computers weren't powerful enough to actually run it; I remember Acornsoft Logo on the BBC Micro, running a Prolog-alike rules database, where a simple query took several minutes. Since the only thing that would reasonably run on a Logo on one of these machines were toys, Logo itself became known as a toy.

    But if you have another look at it today, you might be impressed. Okay, the syntax is a bit weird in places --- particularly when it comes to local variables --- and there's no object oriented system (although it's pretty much trivial to write one), but it's pretty much ideal for teaching basic concepts such as conditionals, iteration, abstraction, data structures, etc. And that bloody turtle gives instant gratification, making simple programs considerably more interesting than they would be in, say, Python.

    These days, you still won't find a better introduction to the utter basics of what computer programming's all about than the hoary old Logo tutorial. You know: "Let's move the turtle around! Let's draw a square! Let's make a procedure that draws a square! Let's draw several squares! Let's change the procedure to draw different sized squares!" That one.

The Tao is like a glob pattern: used but never used up. It is like the extern void: filled with infinite possibilities.

Working...