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?
You need to narrow the scope (Score:5, Insightful)
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)
Re: (Score:3, Insightful)
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."
Re:You need to narrow the scope (Score:5, Interesting)
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.
Re:You need to narrow the scope (Score:5, Insightful)
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.
Re:You need to narrow the scope (Score:4, Insightful)
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)
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
Re:You need to narrow the scope (Score:5, Funny)
Re: (Score:2)
119 load "gramrchk.bas"
Task based learning (Score:5, Insightful)
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.
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:4, Interesting)
100 REM TASK 1
110 LPRINT CHR$(33); "hello world"; CHR$(33); CHR$(13); CHR$(12);
200 REM TASK 2
210 LPRINT CHR$(33); "what is your name?"; CHR$(33); CHR$(13); CHR$(10);
220 INPUT N$
230 LPRINT N$; CHR$(13); CHR$(12);
300 REM TASK 3
310 LPRINT CHR$(33); "give me a number to square:"; CHR$(33); CHR$(13); CHR$(10);
320 INPUT I
330 S = I * I
340 LPRINT S; CHR$(13); CHR$(12);
You said you wanted it printed, right?
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.
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:Task based learning (Score:5, Funny)
(Considering I'm almost 30, I program computers for a good living, and I've never used it, I'm thinking: it ain't.)
Considering I'm almost 40, I program computers for a living and have to use it all the time, I am thinking you are a some kind of web developer.
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:4, Interesting)
I think calculus is, among branches of mathematics, one of the less useful for computer programming. Computers are discrete systems, and either need to use approximations for using calculus or need to use something else. Graph theory, field theory, algebra of all sorts, and (obviously) computation theory are all more applicable to general computer programming problems. Calculus and computer programming mainly only go together when you're trying to make a computer solve problems that can be best modeled with calculus; and it's always the case that it's helpful to have domain knowledge when implementing something.
Of course, calculus is very useful for a lot of other fields, including ones as related as electrical engineering. (Unless, of course, you include as "calculus" things that are unrelated to calculus except in name and the Latin root; the lambda calculus is good to understand if you're a programmer, so that you can precisely communicate programming language behavior, but that's only related to calculus in that it's a set of symbols and manipulation rules which models an abstract mathematical concept.)
Re:Task based learning (Score:4, Interesting)
If you do any game engine physics then you are going to be doing a large amount of calculus. Other branches of programming are less likely.
I always believed that people who say: "I don't see how this relates to me", usually have a singular lack of imagination. That is why curiosity is a survival trait, it forces us to learn things that may be useful later on. There are some things I am terrible at, but that doesn't stop me knowing something of them because I am just curious.
Calculus, is a less likely contender for the curiosity list but it was curiosity about it (and matrix algebra) that got me interested in mathematics, leading to a degree in it. OTOH, programming languages I find I am curious about but unless I will be using it I know there is no point learning them in detail. Ruby I've read some stuff on, learnt the syntax, but haven't bothered learning it properly because if I am not using it I will just forget it all. Whereas, Java, Python, C/C++, awk etc are different ... I use those often.
Re:Task based learning (Score:5, Interesting)
I'm not ignorance of basic math, I'm ignorance of calculus. And I'm not proud (or ashamed, really) of it at all.
Look, here's the reason I posted that: I was part of a CS program at a university that required calculus. I failed calculus more than once (go ahead, make fun of me), and as a result I ended up dropping out of the program and feeling terrible for years. I'd go as far as saying it wasted years of my life working a dead-end support job.
Imagine how I felt after learning that, hey, calculus is actually mostly useless for the vast majority of software development jobs. Universities are losing students by making pointless requirements that have nothing to do with the field the students are studying, and I think that should stop. That's all.
Re: (Score:3, Interesting)
What's the point?
There are mathematicians who don't need Calculus in their jobs, either. They could be very successful without ever using Calculus, except for the fact that a math degree requires taking some Calculus classes.
There are also programmers who can earn good money without knowing C, C++, or Java.
There is some training that is so basic, that all CS people should have it, even if some people do rarely use it. Basic differential calculus is one of those.
Everyone needs knowledge of basic m
Re: (Score:2)
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)
However, that's all too complicated for a beginner's course. Teach them about stdin/stdout, teach the
Re:Task based learning (Score:5, Interesting)
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.
Re: (Score:2)
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: (Score:3, Insightful)
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.
Re: (Score:3, Interesting)
Re:re Thou shall not bore the young (Score:4, Insightful)
Kids taking an introductory computer course generally are not reading slashdot...
That is why we are nerds, we like stuff that bores other people to tears...
Once you are old enough to realize this, you will function better in the world at large.
Problems... (Score:2)
Teach them fun... (Score:5, Interesting)
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)
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)
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.
I remember... (Score:4, Funny)
...my first class in programming: the teacher wrote "x=x+1" on the blackboard, and my reaction was "Huh? That is unsolvable!"
Re: (Score:3, Funny)
Blender! (Score:4, Interesting)
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
Whatever you do (Score:4, Interesting)
Scariest title ever.
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: (Score:2, Informative)
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:Steve Drasner (Score:4, Insightful)
Re: (Score:2)
SEE Program Resources (Score:5, Informative)
I Haven't, But Know Someone Who Has (Score:4, Informative)
Eduardoare (Score:2, Interesting)
Start at the beginning (Score:2)
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
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.
Mys (Score:2)
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.
Top down vs. bottom up (Score:2)
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
Make a few decisions first (Score:2)
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.
How about a non-programming example? (Score:5, Interesting)
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.
Re:How about a non-programming example? (Score:5, Insightful)
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.
Computer science is hard for most people. (Score:5, Insightful)
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:
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.
Teach how to make millions from spamming (Score:2)
...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.
What my education left out (Score:2, Interesting)
The Camel has Two Humps (Score:5, Interesting)
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]
Re: (Score:2)
I was going (Score:2)
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
Suggestions (Score:2)
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)
You can also make it more complex by adding CSS or Javascript which resemble real programming.
Programming Teaching Tool (Score:2)
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 ex
Re: (Score:2)
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
my experiences with computer science education (Score:4, Interesting)
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.
Don't assume any knowledge. (Score:2)
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)
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
Re: (Score:2)
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
Re: (Score:2)
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.
Re: (Score:2)
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
Teach them basic hygene. (Score:4, Funny)
If you going to start from the very-very basic (Score:2)
Mwa ha ha ha ha!
Re: (Score:2)
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)
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
Re: (Score:2)
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
No problem (Score:2)
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? (Score:2)
How Should I Teach a Basic Programming Course?
Very simply.
Teach it in Chinese (Score:2)
this was a real eyeopener for me on this subject (Score:2)
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.
Back in the Day (Score:2)
Introductory Programming (Score:2)
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
On the importance of Generative Models (Score:2)
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
Use a useless language (Score:2)
.. 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.
Re: (Score:2)
Mr. Pattis, you went back to Pascal from Modula-2? So sad...
Develop a philosophy, not a course ... (Score:2)
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.
Well... (Score:2)
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 doe (Score:2)
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
Slow Down! (Score:2)
If on the other hand, your job is to teach them to use computers instead of pro
LOGO (Score:2)
Remember that? A language for teaching programming with easy to see results (a turtle which moved).
Computer/Internet Overview for Jr. High and H.S? (Score:2)
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:
1st class have them write instructions on how to (Score:2)
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.
Kids and the Right Now (Score:2)
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 old robot (Score:2)
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
Regarding Interface, Algorithm, and Computation (Score:2)
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/
watch how others do it ? (Score:5, Interesting)
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).
Teach Them: I CAN DO IT! (Score:4, Interesting)
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)
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.
Re: (Score:2)
Depends... computer basics in a programming course could be how a computer works, not how to work it. Understanding what a computer is doing in terms understanding the concepts of memory being allocated, how persistence is taking place, networking, etc. is very important for a programmer to know. The programmers who don't understand memor