There are 9 articles on this title. You are reading the article ranked and rated #5 by Helium's members.
In the CS department where I currently teach I recently got involved in a debate on which programming language should be used to teach beginners. Java and C are the most commonly used languages in the department, and for many subjects this is appropriate, but not (I believe) for absolute beginners. I believe Python is a much better choice for beginners, and to firm up my own position I performed the very brief, very unscientific test described below.
*
The Test
I wanted to look at what was involved in writing very simple programs in a (small) variety of languages. The languages I chose were BASIC, C, Java and Python. I used C and Java because these are in common use in the department (and in other teaching institutions. I chose Python because I love it, and think it an excellent choice for teaching, and I chose BASIC because, well, it was just too easy.....
"Hello World" seemed a bit too trivial, so I decided on the relatively simple task of reading two numbers from the user, adding them together and printing out the result. My interest was
How long did it take to write and debug the code
How many things does a student need to understand in order to write this code
The times given to write the code are obviously not meant to be representative of the time required by a student, but I believe that they give a roughly accurate measure of comparison. I am reasonably skilled (1-5 years professional experience) in each language, so I don't think I was unreasonably biased.
-
BASIC
I learned to program, back in the late 70s, on a Level I TRS-80, and on a time sharing system that my high school had occasional access to. The program is trivial in good 'ol BASIC:
10 INPUT A
20 INPUT B
30 C=A+B
40 PRINT C
RUN
Time to write:
15 seconds. I admit I don't have a BASIC interpreter handy and did not test this, but I just know it works. (OK, I fired up the TRS-80 emulator and actually ran it - it works...)
Things to explain:
Line numbers
Variables
INPUT
PRINT
RUN
Pros and Cons
BASIC is very easy for beginners to get started with, but it is an old, poorly designed language, lacking in almost every modern feature. Visual BASIC adds a lot to "good 'ol BASIC", but it is not appropriate (I believe) to teach a single-platform proprietary language. And it's still not really a good language....
-
C
#include
int main(int argc, char*argv[])
{
int a,b,c;
scanf("%d",&a);
scanf("%d",&b);
c = a+b;
Below are the top articles rated and ranked by Helium members on:
I believe that the main and most important part of teaching computer use to absolute beginners is to ensure that they... read more
When introducing computers to beginners, a student can quickly prove to be a natural whiz, or a paranoid hesitant. B... read more
Ops! an absolute beginner has plenty to learn before using a computer like an expert. You will have a very long way t... read more
by Steve Martin
A lot of people think they have missed the boat when it comes to computers and, because of this, have developed a mil... read more
by Varun Sharma
In the CS department where I currently teach I recently got involved in a debate on which programming language should... read more
View All Articles on:
Teaching computer use to absolute beginners
Add your voice
Know something about Teaching computer use to absolute beginners?
We want to hear your view.
Write now!
Already a member? Log in.
Cast your vote!
Click for your side. Must be logged in.
Featured Partner
Dogs Deserve Better has partnered with Helium, giving you the chance to write for a cause. Browse Dogs Deserve B...more
hide