Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

How Should I Teach a Basic Programming Course?

Soulskill posted about 6 years ago | from the week-one:-beards dept.

Programming 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?

Sorry! There are no comments related to the filter you selected.

You need to narrow the scope (5, Insightful)

Anonymous Coward | about 6 years ago | (#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:You need to narrow the scope (1)

mp3LM (785954) | about 6 years ago | (#25339395)

I agree completely. You either need to be really selective for the course or keep the course really basic.

Re:You need to narrow the scope (4, Funny)

theshowmecanuck (703852) | about 6 years ago | (#25339503)

110 Teach Basic 120 End

Re:You need to narrow the scope (1, Funny)

Anonymous Coward | about 6 years ago | (#25339513)

109 If you already know BASIC goto 120

Re:You need to narrow the scope (1)

tristian_was_here (865394) | about 6 years ago | (#25339593)

120 your telling a fib goto 500

Re:You need to narrow the scope (2, Informative)

angahar (579961) | about 6 years ago | (#25339671)

Test Driven Development. After more than 30 years as a working software developer and computer programming instructor I wouldn't teach it any other way. An excellent book recently released that offers this approach is Agile Java by Jeff Langr.

Task based learning (5, Insightful)

nurb432 (527695) | about 6 years ago | (#25339261)

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 (4, Informative)

Anonymous Coward | about 6 years ago | (#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

Re:Task based learning (5, Informative)

introspekt.i (1233118) | about 6 years ago | (#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 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.

Re:Task based learning (1)

Thiez (1281866) | about 6 years ago | (#25339371)

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:Task based learning (0)

Anonymous Coward | about 6 years ago | (#25339615)

teach them how stuff like making function calls, pointers, and recursion work too, and then after they finish their project in Python or Java or whatever you're teaching make them redo it in TI-Basic. you don't know programming until you implement mergesort and binary search trees in a language that doesn't have local variables or custom data structures. see who can do it the fastest and the smallest. its such a primitive language that you get all the joy of trying to implement the same things in assembly language without the horror of crashing all the time ;)

Re:Task based learning (1)

HNS-I (1119771) | about 6 years ago | (#25339437)

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

Excuse me but I believe people that are much more comfortable thinking in abstract terms are being neglected enough as it is.

No I think you would do much better explaining them about stable, unstable sorts. And in which conditions they should be used.

Also teach them about the different paradigmes: functional, procedural and object oriented.

Re:Task based learning (5, Interesting)

Vindication (1383017) | about 6 years ago | (#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'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:Task based learning (5, Informative)

hedronist (233240) | about 6 years ago | (#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 Thou shall not bore the young (3, Informative)

jelizondo (183861) | about 6 years ago | (#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

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 [] as a great tool to introduce
programming concepts without the boring theory.

In general, do not bore your audience, that's the secret.

Re:re Thou shall not bore the young (1, Insightful)

Anonymous Coward | about 6 years ago | (#25339385)

Actually, the history of computers was one of the most interesting features of the Intro to Programming class I took the better part of a decade ago.

My instructor had worked for DEC and IBM maintaining big iron in the 70's and 80's, and he had a lot of extremely interesting stories, and a good deal of personal insight into computing history.

Of course, on the other hand, I'm now a graduate student in history, so I may not be particularly representative. YMMV.

Re:re Thou shall not bore the young (4, Insightful)

jelizondo (183861) | about 6 years ago | (#25339565)

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

Darkness404 (1287218) | about 6 years ago | (#25339287)

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.

This sounds more like an introductory course (-1, Offtopic)

Anonymous Coward | about 6 years ago | (#25339297)

If you really need to teach 'programming' in this course, I'd recommend HTML.

Teach them fun... (5, Interesting)

SerpentMage (13390) | about 6 years ago | (#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:Teach them fun... (2, Informative)

SerpentMage (13390) | about 6 years ago | (#25339337)

I have been thinking more. Here is a robot exercise.

"We have a class room here. The task is to get that robot over there to pick up the apple and bring it back."

The challenge in this exercise is that while you think it is easy to navigate a room, telling a robot is not. It will involve the students having to understand the concept of "x steps and then turn". AND it will involve the students on having to come up with a language.

After all how does a robot know that steps means to step. A step is a "keyword" that implies a set of actions.

In the second step of the testing, etc routines the objective would be to define what a step is. After all x steps depends on the step size.

So after this the students will understand the following:

1) Language is garbage in garbage out
2) Keywords imply some action and those actions need to be repeatable.
3) Consistency and testing are the names of the game.

Re:Teach them fun... (0)

Anonymous Coward | about 6 years ago | (#25339621)

I don't know if it's still around but I learned basic programming in a C++ course that started with Karel++ It's a scaled down C++ style language that controls a little graphical robot that moves around a maze with a few actions: Move Foward, Turn Left, Pick Beeper, and place beeper. The beepers are just objects the robot can pickup and usualy means the end of the maze.

It starts with assignement such as walking up a stair case, moving a beeper, etc. Then by the end the more advanced students (like myself) can write a program that will allow the robot to navigate any maze.

Re:Teach them fun... (0)

Anonymous Coward | about 6 years ago | (#25339717)

Not sure why you would teach functions after objects? I would go the other way around. I never found object-model to be simple.. it is a concept to be learnt and it is not that easy. Math on the other hand is common-sense (i.e. after high school) and so functional programming technique would be the natural next step.

I remember... (4, Funny)

Anonymous Coward | about 6 years ago | (#25339307) first class in programming: the teacher wrote "x=x+1" on the blackboard, and my reaction was "Huh? That is unsolvable!"

Re:I remember... (1)

tg2k (895772) | about 6 years ago | (#25339611)


Fixed that for you.

Blender! (3, Interesting)

saterdaies (842986) | about 6 years ago | (#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

Whatever you do (3, Interesting)

ColdWetDog (752185) | about 6 years ago | (#25339367)

Don't teach BASIC.

Scariest title ever.

Re:Whatever you do (1, Insightful)

Anonymous Coward | about 6 years ago | (#25339657)

Basic will harm their minds less than C. I say teach them python.

Re:Whatever you do (-1, Troll)

Anonymous Coward | about 6 years ago | (#25339663)

I stfu with fad words like Python already. Python will be dead in five years, just like Forth or Ada. C has been strong and here from the 60's.

Re:Whatever you do (1)

fxkr (1343139) | about 6 years ago | (#25339673)

Don't teach BASIC.

Agreed. But don't teach them C either, because that would be the other extreme.

I recommend Python [] as an easy-to-learn yet extremely useful general-purpose (this sorts out PHP) language.

Re:Blender! (4, Informative)

baxissimo (135512) | about 6 years ago | (#25339719)

If you're going to go this route, Alice [] 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.)

It must be going around. (4, Informative)

dummy_variable (35218) | about 6 years ago | (#25339319)

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

Steve Drasner (4, Informative)

gcnaddict (841664) | about 6 years ago | (#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. []

Re:Steve Drasner (0)

Anonymous Coward | about 6 years ago | (#25339465)

Second that. I took a Java course as my introductory programming, and it was very focused on OO. Nobody understood anything of that class, as OO was not motivated for at that point.

So start with basic structured programming concepts and take it from there, is my two cents.

Re:Steve Drasner (4, Insightful)

mattMad (1271832) | about 6 years ago | (#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.

Re:Steve Drasner (1)

aunchaki (94514) | about 6 years ago | (#25339683)

+1 on pseudocode. My second college-level programming course spent the first month in pseudocode, using real-word examples to teach algorithms. One of the fist assignments was to write a pseudocode "program" for grocery shopping.

It was great! Everybody had to make choices about how to best traverse the aisles. Start with fruit? End with frozen foods? It was surprisingly challenging (especially with today's super grocery stores).

Given a list of foods and the "program," one could shop for everything. Of course, depending on the list, some algorithms might be more efficient than others. Cool!!

Re:Steve Drasner (1)

rhsanborn (773855) | about 6 years ago | (#25339733)

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.

SEE Program Resources (4, Informative)

TarrVetus (597895) | about 6 years ago | (#25339341)

You could check the Stanford Engineering Everywhere program's resources [] . They released some great beginner level programming courses [] under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported license [] . Those could be adapted for teaching the subject to students, and the content used for instructional material.

I Haven't, But Know Someone Who Has (3, Informative)

ricegf (1059658) | about 6 years ago | (#25339343)

I attended a fascinating talk by Mr. Vern Ceder [] 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 (2, Interesting)

FirstEchelon (1013697) | about 6 years ago | (#25339345)

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 (Java, HTML, Ruby, etc.) and build from there.

Start at the beginning (1)

bigbigbison (104532) | about 6 years ago | (#25339359)

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 explain how to do things rather than some sort of lecture.

This is one of the biggest challenges of teaching anything dealing with technology. Even in classes that aren't about technology, if you ask them to do anything on a computer you will run into difficulties. For example, I've had students turn in papers electronically and, like nearly every class, I've told them to double space the papers. In every class I've had at least one student who made the paper double spaced by hitting return twice at the end of every line.

Different types of students (3, Informative)

mrroot (543673) | about 6 years ago | (#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 (2, Informative)

Dan East (318230) | about 6 years ago | (#25339363)

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 (1)

chfriley (160627) | about 6 years ago | (#25339373)

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 (1)

Animats (122034) | about 6 years ago | (#25339397)

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 the CPU is really doing (do you know what a CPU's "retirement unit" does?). Still fewer will ever wire logic gates together, write VHDL, or deal with timing constraints in IC layout.

A bit of understanding of what goes on behind the screen is a help, though. A reasonable place to start might be PHP, followed by some MySQL to give a sense of how data is stored and looked up.

python (1)

omar.sahal (687649) | about 6 years ago | (#25339407)

Python is a simple but powerful language. Cambridge University Press [] is about to publish this book by Allen B. Downey. The link above shows a free online version.

Re:python (0)

3seas (184403) | about 6 years ago | (#25339499)

Ask Slashdot: How Should I Teach a Basic Programming Course?

Amazing how it seems nobody has yet made the headline connection to this programming language called "BASIC".

Make a few decisions first (1)

eples (239989) | about 6 years ago | (#25339421)

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.

How about a non-programming example? (4, Interesting)

VikingBerserker (546589) | about 6 years ago | (#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.

Don't Teach Down (1, Insightful)

Anonymous Coward | about 6 years ago | (#25339443)

Don't teach down. By this I mean please do not be shy about giving more complex examples. I had a professor who would constantly keep things very basic on purpose in order to not confuse people. The problem with that is that the top 10% get VERY bored and leave with questions unanswered while the bottom students (those who will go on to write inefficient insurance company database query code) still struggle to understand the difference between ++i and i++.

You should keep your advanced students in mind and nurture them. Do your part to help out our future.

Thing my professor did well (-1, Troll)

Anonymous Coward | about 6 years ago | (#25339459)

what are some things your teacher or professor did that worked well,

He knew how to teach a course, and didn't seek job advice from a community that sponsors and endorses the likes of kdawson.

Computer science is hard for most people. (5, Insightful)

gillbates (106458) | about 6 years ago | (#25339469)

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.

Teach how to make millions from spamming (1)

3seas (184403) | about 6 years ago | (#25339475)


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 (2, Interesting)

cjonslashdot (904508) | about 6 years ago | (#25339477)

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 enable intentional decomposition so that one can be sure a program is correct. The failure of OSs to be secure, and why that is. People think this technology is mature. It is anything but. The situation we are in has to be transitional, or we are in "deep sh**". While teaching them how to hack in the current languages (one can do no better than that), give them the message that this stuff is fundamentally broken, and that something better is needed.

The Camel has Two Humps (4, Interesting)

eddy (18759) | about 6 years ago | (#25339479)

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 []

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.

I was going (1)

The Cisco Kid (31490) | about 6 years ago | (#25339483)

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 suggest shell scripting on either Linux or even OSX. Maybe some perl. Yes, I know these are considered old and archaic, but either one avoids all the bells and whistles and distractions of Visual-(anything), and would give them a solid understand of what actual programming is. Thats assuming that programming is the object of the course.

You might also get a bit better description of the course than it sounds like you have. From what you've said, it sounds like they told you 'go teach something about computers', so that student who have to take a 'computer' elective to graduate can do so, but they don't really expect you to teach them anything.

If thats the situation, you would serve them (and the IT field in general) well to introduce them to non-Microsoft systems, so they understand something else exists. Requisition some systems, and burn some copies of your favorite Linux distribution and let them install it.

Suggestions (1)

Spazmania (174582) | about 6 years ago | (#25339487)

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. Catering to them will aggravate and waste the time of the students who -are- ready for a programming course.

Step 3: Pick one structured, strongly typed language like Pascal or Java. This is the -only- programming language you will be using in the course. Survey of programming languages comes much later, after the student knows how to program in a structured, strongly typed language.

Step 4: Go pirate one of the open content freshman CS courses from the colleges that publish them on the web. This is the content you will be teaching, only you'll want to stretch it out over a year instead of packing it into a semester. That should also give you some time to throw in some fun stuff of your own, but keep it parallel with the general lesson plan.

HTML & Notepad++ (3, Informative)

Pakled (1145971) | about 6 years ago | (#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.

Start low level (1)

grub (11606) | about 6 years ago | (#25339495)

You want your students to learn something about computers along the way. Start with something like C. The last thing you want are a bunch of grads knowing shit about computers but knowing all about how to function in the Java sandbox.

Let them show off! They need immediate results! (0)

Anonymous Coward | about 6 years ago | (#25339509)

From what I have observed in my classes, students like to see immediate results. I think the robot exercise posted a very good idea. Having the students make it perform an easy task like stand up and walk until you get to the wall. I also think dividing each of the parts of the 'program' and giving them to groups of 2-3 students would be worthwhile so they can see how they have to work together and what assumptions they should make.

Once they have mastered that, they should see that programming doesn't have to be math based, instead its giving very specific instructions for every little intricate thing.

Id lecture for a little bit about what a variable is and a loop and then jump into something with more immediate results, like Alice (

Re:Let them show off! They need immediate results! (1)

pkgingo (1173859) | about 6 years ago | (#25339771)

Going at programming from a non-math base may be beneficial for those looking a general understand without the need of formal mathematics.

Programming Teaching Tool (1)

RWarrior(fobw) (448405) | about 6 years ago | (#25339519)

Take a look at Alice. [] There are even textbooks based on it.

you need to teach concepts first and foremost. (1)

ralatalo (673742) | about 6 years ago | (#25339521)

You need to teach concept not concrete skills. If you teach the concepts they will be able to adapt them to other things if you teach skills the will either need to learn the concepts behind them or forever need someone to teach them the new skills for the next thing.

There was one comment that really stuck with me from my lookover of Knuth's books. He developed a virtual machine and teaches everything based upon that, why? because if he has used C or Java or Basic or Fortran or anything else he would have to continuously update things to the new standard language. I am not advocating that you teach an assembler language but you do need to make few basic decisions first is what OS are you going to use? If you are going to use a command like based OS then you skip all the complexity of a GUI and still use almost any language you want to focus on the concepts. If you are going to use a graphical OS then you will either need to go into the concept of building a GUI or pick a language with some envelopment which handles the GUI aspect.

The first concept I would suggest is that computers are stupid or mindless. The second is that no matter how complex the program or the computer, the computer is still only performing one of a few possible operations at a time, basically working with numbers which mean different things at different times. You should explain the difference between concurrent and simultaneous and the concept of threads (the concept, not necessarily multi-threading) You should teach the concept of interrupts and events and event driven concept versus procedural programming concept.

As for a language I would suggest that you cover multiple language conceptually and maybe a few concretely. Teach in a pseudo code so they need to understand the concept and fill in the gaps.

Knowing what ages and experience and the time frame... ie..once a week or daily would make it easier to give a better list of ideas.

Last thought, ask them to write down how to tie a shoe lace both at the beginning and at the end of the class and let them see how they few that problem differently after learning how computers work.

Former teacher.. (2, Informative)

Anonymous Coward | about 6 years ago | (#25339525)

Former teacher here. I was in a similar situation. Here are some pointers:

* Go low level. Dedicate a lecture early on to bits and bytes and how binary logic becomes maths. The students don't need to know how to build a processor, but you need to dispel any notions of magic from the bottom up. Without some understanding on this level, computers will forever seem slightly magical. (Keywords: Relay, light-switch, bit, byte, register, instruction, Assembly, bus, ram, hard drive.)

* Build upon the previous and explain digital audio and more importantly, graphics, as examples of how the numbers become sounds and pictures. (Bitmaps, graphics memory, sample rates, bit depth.)

* Operating systems. Students should know which ones are out there how they differ and what they have in common. (Driver layer, process, program, gui)

The more you put into these steps right away, the easier it will be to teach programming. Also, it tends to equalize the student pool. I put it into two two-hour lectures, but you may want to be even more through.

Proceeding from there depends a lot on what the goal is, but for programming, I found that interwoven lectures and exercises with support time (teacher/TA in the computer room) usually works the best.

Don't do pascal... (1)

Jastiv (958017) | about 6 years ago | (#25339529)

Don't do pascal. It is a useless language that is missing fun features like the goto statement. Also, the biggest gift you can give your students is enthusiasm. Encourage them to play around with the code rather than just doing the assignments. Better yet, have them create their own small project assignments that use the language features you are trying to teach (rather than say, making a student who has no interest in buying a house write a program to calculate mortgage payments.) I remember the most fun I had programing in school was getting the computer to print "I hate algebra" 100 times in basic. Unfortunately, the fact of the matter is so many instructors teach programming poorly and/or don't really know it themselves. Insist that the programs actually compile and run. This way you know the students know the concepts rather than writing a bunch of garbage. Also, don't forget to teach important things like the compiler or interpreter (use a good free-software one like gcc, don't make students buy expensive toolkits they don't need. It should work on Linux, Windows and Mac so that students can do it at home. ) If you somehow fail to teach programming and/or you students are unhappy with you, don't be surprised. It means you are just a normal person rather than an extraordinary teacher.

Absolute beginners, or knowledgable coders. (0)

Anonymous Coward | about 6 years ago | (#25339531)

Figure out what this class is. If absolute beginners, then teach as such, including programming concepts as well as basic syntax. It it's experienced coders, you simply teach the new syntax of the language, as well as specific new and unique features that the language has.

On First Reading The Title: (0)

Anonymous Coward | about 6 years ago | (#25339533)


BASIC, obviously

Kilgore Trout .

First and foremost (1)

n9hmg (548792) | about 6 years ago | (#25339539)

or else they'll hate doing the actual work... typing. If their fingers aren't fluent, they'll spend all their time trying to save keystrokes, by cut/paste, or just not doing some things. Let them wrestle with it for just enough time to start to get frustrated, then switch to typing training, with a good tutor program, and time trials. The people whose fingers to go the home row and eyes to the screen are always far superior to and enjoy their work far more than the ones whose index fingers poise above the keyboard under their eyes.

Thank you, Ms. Castellucio, wherever you are.

Re:First and foremost (1)

n9hmg (548792) | about 6 years ago | (#25339555)

D'OH! wide editing window and narrow screen... s/to go/go to/

Here's an example (1, Informative)

Anonymous Coward | about 6 years ago | (#25339545) []

IIRC, the site's creator is Bryce Embry. His python stuff was, again iirc, created for high school students. I found it extremely helpful when I was learning python.

You can give students too much information and they just get lost and confused. bembry gives just enough to get the students going. I send him a big KISS (keep it simple stupid) award.

what's this blank box fer? (0)

Anonymous Coward | about 6 years ago | (#25339549)

Teach them to outsourse, for class and future employers.

Fun... (1)

cpicon92 (1157705) | about 6 years ago | (#25339563)

at my school "computer programming" is playing flash games on the school computers

Greenfoot (0)

Anonymous Coward | about 6 years ago | (#25339571)

You might want to take a look at Greenfoot ( [] ). It's a nice programming framework for beginners using Java. Unfortunately it's not open source.

There's a Google tech talk about it at [] .

Basics or BASIC? (1)

Trevin (570491) | about 6 years ago | (#25339575)

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

IMO, computer basics have no place in a programming course. If your students don't know the fundamentals of operating a computer, they shouldn't be trying to program one.

Having said that, the first programming language I learned was BASIC (specifically Atari BASIC), which was great because it was easy to learn and we got immediate results/feedback from our efforts (no need to wait for a compiler or even have a completed code block). But that wasn't part of any course; the school just provided computers and instruction manuals and let the students explore programming on our own.

The first actual class I took in computers used Apple II. I actually don't remember whether our assignments were done in Apple BASIC or Pascal; it was probably the latter. Either way, it did introduce us to more structured programming (loops, subroutines, algorithms). I would imagine that most of those concepts can be taught using any procedural language, but I would advise picking just one language and sticking to it. Comparison of different computer languages should be saved until after the student is familiar with programming concepts in general.

I would also suggest not introducing students to object-oriented programming until they've learned procedural programming to the point that they understand what a data structure is.

Re:Basics or BASIC? (1)

theshowmecanuck (703852) | about 6 years ago | (#25339641)

IMO, computer basics have no place in a programming course. If your students don't know the fundamentals of operating a computer, they shouldn't be trying to program one.

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 memory allocation in a computer are the same ones that tell me that Java never has memory leaks because it has a garbage collector.

But in terms of high school students, that would be an overwhelming way to start. Can't argue with starting with the fundamentals like BASIC... or even pseudocode.

my experiences with computer science education (3, Interesting)

MyDixieWrecked (548719) | about 6 years ago | (#25339599)

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.

One word (0)

Anonymous Coward | about 6 years ago | (#25339601)


Don't assume any knowledge. (1)

stm2 (141831) | about 6 years ago | (#25339607)

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

Teach JavaScript (1)

LimeBits (1383007) | about 6 years ago | (#25339623)

It's the coolest and most interactive language -- most immmediately available (in every browser), and you get immediate and gratifying feedback (seeing results and interacting in your browser).

And it's cool because the JavaScript language itself has understandable structure, with an ultramodern approach to functions, scoping, and objects. Use the excellent book "Javascript: The Good Parts" [] .

With a WebDAV [] server like [] (disclaimer: I work there), you get automatic state storage and data storage, which overcomes limitations of running in the browser. LimeBits is an execution platform for open-source JavaScript, as well as a free storage server.

Don't gloss over the basics (1)

sycamorenonesuch (1367263) | about 6 years ago | (#25339633)

I'm in an Intro to Visual Basic class now, and in the beginning the instructor started with a "jump right in" approach: he would show us how to design a form, add a couple lines to a button event, and voila! Most of the class thought it was magic. He never has bothered to give the definition of a variable, a method/function, or explain why it is that you can say strExampleString.Trim() and your string knows what to do. A thorough grounding in the conceptual basics will do your class a world of good.

the basics (3, Interesting)

fermion (181285) | about 6 years ago | (#25339639)

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 single program over the year. Different subroutines could be written by member of a teams, and then put together to form a basic function. This could be then stitched together into an application. This also satisfies the desired for objective level mastery by all students. If the application does not run, i.e. the student has not learned all the objectives, then the student does not get a passing grade. Of course some would consider this harsh, and expect the student to get a good grade if half the subroutines work. Good luck getting a job when only half the subroutines work.

So I would say the first year is very basic with few significant products created. Perhaps one two original bits of code at the end of the year. The significant product in further years, with much less emphasis on coding. The products would be used to allow the student to learn large concepts. If it is a four years program, the last year should be something original by the student, using tools the student feels most comfortable with. For instance everyone love those god awful robot competitions, and it would be possible to create something other than the canned routines.

Teach them basic hygene. (3, Funny)

bennomatic (691188) | about 6 years ago | (#25339653)

We need to change the stereotypes of future generations of programmers!

Teach them how to do algorithms. (1)

elrick_the_brave (160509) | about 6 years ago | (#25339667)

When I was being taught, we were shown how to do algorithms for everyday tasks. What are the steps to show someone how to make a BLT. You get them to start at the beginning but don't tell them. Show them that they must use deductive reasoning and let them learn what assumptions are. If they miss something obvious, ask them - what about x? Also, show them that there is no real one way to do things but there are logical ways of doing certain things better or more efficiently *functions, loops, etc.

LOL Code (0)

Anonymous Coward | about 6 years ago | (#25339669)

Try using LOL code (:

Teach them the most basic rule of all (1)

NotSoHeavyD (1367115) | about 6 years ago | (#25339677)

And that rule is to make your god damn code readable. Use comments if it makes sense, break up blocks of code into digestible blocks, useful function names and variable names. I can't remember how many times I've seen unreadable code with 1000 line functions, no comments at all, different classes with similar names, braces that don't line up, etc. Oh well, given slash dot I expected to have this one moderated down.

Teach (0)

Anonymous Coward | about 6 years ago | (#25339685)

You must approach it as a hamster would when teaching a baby squirrel to fly.

Consider Delphi (1)

concept03 (1143979) | about 6 years ago | (#25339695)

I'd highly consider teaching Delphi for beginners. Why? Because it is easy for beginners to grasp, and as the student progresses, you can teach them about memory management, pointers, references, inline assembly, etc. Check out this site for some great tutorials and resources ( Also, you can download Turbo Delphi for FREE here: [] The beauty of Delphi is that it is easy to get into, and also very very powerful. I believe it is also a great foundation for moving to other languages, like C++ or even C#. Regards

If you going to start from the very-very basic (1)

S3D (745318) | about 6 years ago | (#25339701)

Start from assembler.
Mwa ha ha ha ha!

Algorithmic approach (2, Interesting)

Amigan (25469) | about 6 years ago | (#25339735)

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.


No problem (1)

JustNiz (692889) | about 6 years ago | (#25339743)

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.

Use The Simpsons - GOTO MOES (0)

Anonymous Coward | about 6 years ago | (#25339755)

Back in High school, in an "Introduction to CS course", we started with our own made up language. Since CS wasn't really an organized thing at the time, I had already taken a course that used QBasic, so when the teacher started using Homer Simpson as an example of a computer (since "computers are dumb"), I started recognizing it as effectively bring Basic. Variables were equated with post it notes, functions with sheets of instruction, and every program ended with "GOTO MOES" to get beer.

Very simplistic, but it was meant for people who had no idea how to program. Plus I laughed.

Z, if you're reading this, thanks again :)

That all said, you might want to consider a "placement test" if you're not sure. That way you can at least try to deal with or even avoid the "half the class knows C++ and the other half has never seen the command line before" problem.

How? (1)

ScrewMaster (602015) | about 6 years ago | (#25339757)

How Should I Teach a Basic Programming Course?

Very simply.

Teach it in Chinese (1)

NeverVotedBush (1041088) | about 6 years ago | (#25339759)

So your students will be able to understand their supervisors and employers...

Teach an interpreted language (1)

thomasoa (759290) | about 6 years ago | (#25339761)

Use an interpreted language for most of the beginning teaching. Especially if the language has a shell where the user can tinker.

Basics, web and programming (1)

louzerr (97449) | about 6 years ago | (#25339773)

I would recommend dividing the class into computer basics, using the web, and then hit programming.

The basics I would make VERY basic - talk about what an OS is, hard drives vs. USB drives, how computers process and store data, how computers are networked - all from a very high level. Make sure they understand how to save files, and where they go when they are saved.

For web, specifically "web 2.0", take a look at [] . Whether it makes sense to just do the "23 things" from that site, or pick and choose (perhaps even have students pick and choose different projects, and then show & tell would showcase the widest variety of stuff on the web).

Programming should start very basic, maybe with an interpreted language like Perl or Python, and then maybe discuss compiled languages such as java or C/C++ or even C#. Once you get beyond "Hello World", I'd highly recommend pointing to some of the design patterns that are out there - show them how to find good examples on their own.

I've seen basically two types of courses - one follows a book (SAMS, for a bad example) that walks you by the nose step-by-step, and at the end, you can repeat the steps (maybe), but have no idea what you've really done. The better course says "this is one way to do it, here's another way, and if that's not enough, here's where to look for more". The second way is a lot more involvement between student and teacher, but I think it helps the student with problem solving and analysis down the road (where the first method teaches them to grab the first easy answer they find).

Back in the Day (1)

Greyfox (87712) | about 6 years ago | (#25339785)

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 language has a library for those things already, it is still important to know how they work under the covers.

If you still have time in your course after that, you'll probably want to touch on object oriented programming a bit, though that subject really deserves a course entirely of its own. I don't think you can really do justice to OOP and design patterns in less than a semester.

Introductory Programming (1)

JoeCommodore (567479) | about 6 years ago | (#25339789)

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 nowadays teaching HTML wouldn't hurt. Many languages interface to it and the web is now a hot method of app delivery.

Introductory class... if this is going to be a prerequisite for something better cover those bases needed for the next class.

Languages, I like the ones with some clear understandable syntax that is not overloaded with obscurity. PHP and Python are pretty straight forward (what you read is what it will do). But if it will lead into something like OS design, then you have to get into C/C++.

But the most important thing you can do is:
- get them to be able to get an environment loaded onto a system
- write some code that works and make sure they know what to do in order to execute it. (Programming is no fun if you can't figure out how to get your code to work.)
- Also steering them in the right direction with some good syntax highlighting editor, IDE, discussion about setting up a project file structure, etc. all are valuable to the noob.
- Next would be to give an explanation about some useful but simple code works (how a forum works, or a simple game maybe) those into it at this point will pick it up and do more research and mess around with it, and the others hopefully you wont bore them too much.

On the importance of Generative Models (1)

jonaskoelker (922170) | about 6 years ago | (#25339791)

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 what it does, and for two between what one piece of code does and what another piece of code does.

Three interesting reads:

No matter which languages and tools you teach, and no matter which problems you make the students apply their tools to, help them obtain a generative model, and help them help themselves obtain a generative model.

As for which tools to teach them, I would recommend python. It allows you to go straight to the meat of the matter without having much in the "this part is magic, you're not supposed to understand this". Also, it supports the teaching of multiple paradigms. Procedural and OO programming are its strengths, but you can definitely teach the ideas of functional programming in it as well--it already likes doing things with lazy lists (called generators), such as map-filter-reduce.

There's also a good book, How To Think Like A Computer Scientist, freely available at [] . Be sure to also look in its parent directories.

(There are also other programming paradigms or computational models, such as prolog-style declarative programming, string rewriting systems or cellular automatons; python doesn't lend itself naturally to do those, but it should be simple to write a simple string rewriter; besides, I wouldn't suggest teaching esoteric computation paradigms).

So my vote is Python, How to think like a computer scientist, and a lot of attention to the generative models.

If you need an example of real-world python, I'd suggest the official bittorrent client (it'd also give you a good excuse to talk about networking if you feel like it).

Also, try to take something the students already know how to do and show how they are following an algorithm; make them implement the algorithm. Math should be rich with examples (gaussian elimination, computing derivatives or simplifying expressions), but the examples may also be a bit on the boring side.

Use a useless language (1)

Anrego (830717) | about 6 years ago | (#25339793)

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

Load More Comments
Slashdot Login

Need an Account?

Forgot your password?