Accessing The System
Accessing The System
Accessing The System
Terminal emulators
On most UNIX servers:
The cost of running a GUI is prohibitive.
Imagine keeping track of a graphical environment,
mouse movements, multiple windows for each
user.
The overhead is enormous.
e.g.
In code documentation
Proper header blocks for main()
Proper headers for each function you write
Descriptive variable names. If you pick GOOD variable
names, a knowledgeable code reviewer can read the code
fairly well and therefore requires fewer comments.
Sufficient in-code documentation to allow a casual reader
to understand whats going on for each chunk of code.
They need not understand the programming language, just
the intent of the code.
Do NOT over document your code.
Documentation
Documenting your sample runs:
You will be asked to run your program for
some test cases.
It is expected that you include additional test
cases to show the robustness of your code.
Examples should include your testing of
invalid input. Your code should respond in an
appropriate manner.
Whats in a documentation header?
/*======================================================================
| Monte Carlo evaluation of Pi
|
| Name: monte_Carlo_Pi_erand48.c
|
| Written by: Jacques Beland - November 2015
|
| Purpose: Calculate a value for Pi using a Monte Carlo approach.
|
| usage: ./monte_Carlo_Pi_erand48.o #random_points_to_use
| e.g. ./monte_Carlo_Pi_erand48.o 1000000
|
|
| Description of parameters:
| argv[1] - number if random number pairs to generate
|
|
| Subroutines/libraries required:
| See include statements.
| this routine uses the erand48 random number generator from the
| math library. Include the -lm option at compile time
| (gcc -o monte_Carlo_Pi_erand48.o monte_Carlo_Pi_erand48.c -lm)
|
|------------------------------------------------------------------
*/
Documentation
You will find a document called Documenting
your code on Blackboard.