On 6 Apr 2009, at 9:55 pm, Walter Milner wrote:
I agree - not C++.
I think it depends whether or not you take the 'objects first'
you do, and you reject C++, you are only left with Java.
If you take the 'objects first' route,
- what is wrong with Smalltalk?
Still around, commercial and free versions, powerful as heck,
consistent objects-all-the-way-down (unlike Java),
- what is wrong with Eiffel?
The basic design is clean and elegant, and consistent
objects-all-the-way-down. A certain amount of cruft has
accumulated over the years, commercial and free versions,
the commercial version is free to students and has a good IDE,
there's a book by Meyer aiming to teach programming using it,
which takes an interesting approach,
- what, for that matter, is wrong with Python?
We're (somewhat tentatively) using it in a service paper,
and it seems to work quite well as a first language.
However I think objects-first is not a good idea, and there is a small
amount of evidence to support that, relating to understanding main()
the dynamics of execution. My concern is that a student cannot write a
method unless they know about primitive types, loops, conditionals and
arrays. And there is an enormous amount of evidence to show that many
students find those ideas very challenging.
100% agreement about that.
(Mind you, Smalltalk and Eiffel don't *have* "primitive types" in
that sense. There is no syntactic or semantic distinction between
numbers and other objects.)
Therefore start with C, using a debugger that allows students to step
through code and see how variable values change. Start with a concrete
understanding, about bits and bytes - abstraction can come later. Look
(briefly) at compiled C to see how it relates to machine code. Use
pointers. Without pointers the idea of references in Java seems
completely mysterious. Use structs. Then it's just a little step to
I think the key point is that you have to decide what you want
people to learn before you can decide how you are going to teach
Arguably, you might come up with quite an interesting course
that starts with the lecturer pulling a mobile phone out of his
pocket and saying "I am going to teach you how to program THIS".
Then the lecturer proceeds to explain the ARM architecture and
teach ARM assembly programming. The next semester, the lecturer
says "I am going to teach you how to program this EASIER" and
The original poster said:
I have to choose between Java, C and C++ since these languages have
their compilers already instead in our computer labs.
One download will get you a good free Smalltalk or Eiffel or Python
Burn it to a CD. A day's work will install it on every machine in
your labs. What's the price of a day's work compared with the cost of
doing it wrong?
are just coming from secondary school and they have general computing
skills which are taught in secondary schools in Malawi.
What are those skills?
If they include using office (Word, Excel, &c) applications on Windows
or OpenOffice on practically anything, there is an argument for
using Visual Basic for Applications (M$)/Office Basic (OpenOffice).
Horrible language, but it has all the basics, and the immediate payoff
is high. And you probably already have _that_ on your lab machines too.
The Surveying department here has VBA taught to first year surveyors.
My personal preference would probably be either Eiffel or Ada, as
worthy successors to Pascal. But my preference is unimportant. Your
explicit _educational_ goals are what matters, constrained by your
financial and technical resources. The technical resources really
need not be limited to C, C++, and Java.