Department of Energy Argonne National Laboratory Office of Science NEWTON's Homepage NEWTON's Homepage
NEWTON, Ask A Scientist!
NEWTON Home Page NEWTON Teachers Visit Our Archives Ask A Question How To Ask A Question Question of the Week Our Expert Scientists Volunteer at NEWTON! Frequently Asked Questions Referencing NEWTON About NEWTON About Ask A Scientist Education At Argonne Can you advise a high school Pascal teacher?
Name:  Jmitchel
Status: N/A
Age: N/A
Location: N/A
Country: N/A
Date: Around 1993


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



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

John Hawley


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.

Arthur Smith


Click here to return to the Computer Science Archives

NEWTON is an electronic community for Science, Math, and Computer Science K-12 Educators, sponsored and operated by Argonne National Laboratory's Educational Programs, Andrew Skipor, Ph.D., Head of Educational Programs.

For assistance with NEWTON contact a System Operator (help@newton.dep.anl.gov), or at Argonne's Educational Programs

NEWTON AND ASK A SCIENTIST
Educational Programs
Building 360
9700 S. Cass Ave.
Argonne, Illinois
60439-4845, USA
Update: June 2012
Weclome To Newton

Argonne National Laboratory