I was asked to give a course on computer programming.
So, to prepare accordingly, I have 2 questions:
- For the persons who want to learn computer programming for professional purposes: what topics (examples) would be of interest: administrative programming (e.g accounting, inventory), scientific (eg. 100.000 decimals of Pi, AI), games (chess) and multimedia (mazes as quake types, presentations)
- Same question for hobbyists and recreants.
It is important to make the distinction between potential professionals and recreants.
Thanks for all reactions.
It really all depends on the goals of the participants. However, if this is an introductory class for people who’ve never programmed before, your assignments will probably be pretty simple, moreso than anything you listed. Any idea what language you’d be using?
I’m echoing ultrafilter here: what level is this course supposed to be taught at? Is it a “here’s the basics of how to program” or a “here’s how you write programs to get your computer to slice, dice, and make breakfast for you” kind of course? What level of students (high school, college, etc.)?
If it’s more towards the beginner, try to have examples that are more useful than “Hello World”.
It’s easier to pick up on the ideas if things relate to the real world somehow. (And please no Towers of Hanoi!)
And for things you’ll want to point out to those students who intend to program for a living: they will need to know how to work with other people on the same project, so perhaps having groups work on code together would be good. Either the ‘for a job’ or the ‘for the hell of it’ groups will be able to use pointers on how to reuse, adapt, and debug code others have done.
<< A computer’s attention span is as long as its power cord. >>
More info:
The purpose is a hard-going beginners course: emphasis would be on learning
how to program, not on how to write code.
This is IMHO not the same since I found that in the common courses (at
least those that I know of) the analytical part is mostly negelected: the
solutions (or algorithms if you want) are presented and the pupil just must
turn that into code.
I’d rather show, how to find the solution to a given problem, and then
turning it into code. This must be exercised by the pupil.
My problem at this moment is to find the right pace for the course.
My approach will be, giving examples and exercises with an increasing
level of difficulty within the chapters. Finally projects (I want to
prepare several projects, also in different levels, for the pupil to
choose) will be presented thru the time of the course and assessed at the
end of the course. A certain entertainment factor, coupled with practical
examples is desired.
Though not easy for the audience, I am absolutely sure that they will be
able to start and, last but not least they will know that they did all by
THEMSELVES.
Coaching, mentoring and webassistance are primordial for achieving the
goal.
However since writing code is anyway neccesary, I’d tend to use plain C
since it is a good starter for CPP and JAVA.
I’d start by having them code and use classic elementary data structures…arrays, linked lists, and user-defined structures. Linked lists are good because it helps to understand their underlying architecture even if, when they get to Java, for example, it’s a primitive.
If they’re somewhat receptive to math, you might try the Josephus problem…have them do it first by a linked list, then demonstrate the formula for solving the Josephus problem. That eliminates the need for the linked list.
Ahhh. Good idea… Let’s see. What have I encountered that would be good for newbies to programming that is a) challenging enough to make them think and b) simple enough so that they won’t give up over trivial details.
For teaching them all about fiddling with arrays, I found the ‘game’ of Life to be interesting, and it’s scaleable. (Life = cell is ‘alive’ if X cells around it are, dies if less than X cells are alive around it, etc.) Those who are having problems getting the concepts can do a no-frills version, those who are good can add on things like: user defined start-up scenarios, color ‘graphics’, etc. A very good way to test how well they understand how arrays work, and how to avoid the pitfalls of array-index out of bounds, etc. To a lesser extent, it can assist in them thinking through algorithims clearly: figuing out how to test a cell for life, testing the cells around to see if a cell should live/die, boundary conditions, etc.
<< Hm. >>
Zweistein , as somebody who trains fresh college grads from around the world, let me emphasize that I’ve had much more difficulty with people who learned how to “Program” but didn’t know how to write code than I’ve had with people who knew how to write code but didn’t know how to program.
The latter, you can tell them exactly how to do something, and, when you have time, explain to them why you told them to do it like that and why it’s better than other ways.
The former, you don’t explain as deeply to start with, as they seem like they understand the concept. But the code that comes out of them, even when it works, is so attrocious that you have to spend a large amount of time helping them fix it (to the point where it would have been quicker to do it yourself).
This makes the coders more useful in the short term, and almost equally useful in the long term.
Typically, I see this in foreign grads. Do you realize that you can get a computer science degree in some countries and barely know how to run a compiler? (You can spit out the theories behind compilers and how to build them, but you haven’t run one).
Writing code is important, and should not be neglected.
-lv
I think something that would be good for many of those who might take it is to present a chunk of source code that they have to analyze and/or modify. Obviously you have to give them from-scratch problems, too, but this shows them how a working program goes and also is good for those who after taking the class will often only need to understand code and won’t have to do a lot of programming.
Giving them a fairly complex program (presented simpler by say, using a class library) may give them a greater feeling of power when they see what they can modify in a program. Of course, getting something like this prepared for the class may entail a lot of work, unless you’ve got something already available. And they might need more help with debugging, but it’s important to learn that too.
If people have never touched programming before, it’s imperative to teach them good coding skills first. Then you have a common background for whatever you want to do next. C is a good choice of language.
First thing you want to teach them is algorithms. Second thing is to teach them “step-wise refinement” and pseudo code. Third thing is a methodology, OO works great with beginners. Teach an actual language last. If you choose to teach OO Java is an ideal choice.
Another thing you may want to teach them is good programming practices. No, Hugarian Notation is not a good practice.