[OT] partialy I was wondering what suggestions for programing

Brian Kelsay BLKELSAY at kcc.usda.gov
Wed Feb 11 14:48:57 CST 2004


When I had Fortran in college, they called this psuedocode or logic code.  We had to write this 
stuff up before we were allowed to try to enter anything on the time-shared terminals.  I think you 
had to show your code to the TA on the way into the lab.  In fact, I think the prof. told us he 
preferred us to also write down and debug before going to the lab.  You could debug in your head or 
on paper.  I did this in my dorm room and then went and typed in the program.  Usually I would only 
have one or 2 bugs or non at all after doing this kind of prep.   Spelling errors (syntax error) 
and bad typing in general were the biggest culprits.

Brian Kelsay

>>> Leo J Mauler <webgiant at juno.com> 02/11/04 03:51AM >>>

They exist.  What is taught is all the basic programming design skills
prior to bringing in the choice of a high-level language (for purposes of
this posting, even Assembler is technically a High Level Language).

For example, you can teach someone how to write a basic Loop function
without bringing in a programming language.  The words you use to "write
the function" will not be from any particular programming language, but
they may resemble one or more languages.

For example, a program to count from 1 to 100 and print out each number
and the n-squared value of each number, could look something like this in
a fundamentals of structured programming textbook:

-Start Program.
-Create a number variable called NUMBERS.
-Create a number variable called SQUARED.
-Set the value of NUMBERS to 0.
-Set the value of SQUARED to 1.
-[Start of Loop]
-Add one to NUMBERS.
-Display NUMBERS.
-Display the value of NUMBERS.
-Set the value of SQUARED to NUMBERS multiplied by NUMBERS.
-Display the value of NUMBERS times NUMBERS.
-If NUMBERS is less than 100, go back to [Start of Loop].
-Otherwise, end the Loop.
-End Program.

This is a perfectly good example of a Loop function with some Math
operators and a Conditional statement, without using a single language
specific example of C, Pascal, BASIC, Assembler, etc.  It also teaches
good programming techniques, such as remembering to Initialize all your
variables with dummy values which are still within the parameters of the
intended program.  Another good technique taught by learning programming
in this manner is to think about source code documentation in terms of
Plain English, rather than using language-specific terms.




More information about the Kclug mailing list