Can you advise a high school Pascal teacher?
Date: Around 1993
I am interested in hearing from professionals in the field about
what you think is important for students in their pursuit of learning computer
programming. I teach Pascal to level I and level II (A and AB) students in
Virginia. Students are always asking about 1) Documentation, 2) How much
structure is necessary, and 3) Why should we avoid global variables in our
programs, among other things. Also, do you have any good ideas for project-
type programs? We are moving towards case studies in our teaching and I do
not have much to go on in this area.
The 3 issues you mention depend STRONGLY on who is going to use
the code you write. If you are going to be the only user and you are only
going to use the program for a while, then why not be quick and dirty. Do not
document, do not use structure, and make everything a global! BUT, if you are
writing code for someone else to use, especially if someone else needs to
understand the code, or if you are writing it for yourself and it is something
you will be using and maybe modifying for a long time, THEN document. Use
structured programming to enhance the code's readability and maintainability,
and, as far as globals go, encapsulated data is one of the buzz terms from
object-oriented programming. For small software projects, I do not think it
matters much as long as you do not run out of memory.
Regarding project type of programming, how about getting together
with some of the science teachers there and arranging at least an optional
experiment that requires programming, or a program that simulates some
experiment. Computers are certainly used more in science than anywhere else.
Click here to return to the Computer Science Archives
Update: June 2012