When you turn in your assignments, you need not make a hard-copy. You are encouraged to put your files of final version into the directory,
$(jwhaah)/dropbox/
where
$(jwhaah) = /tweedledee/home/users/misc/jwhaah
It will be convenient to make a symbolic link in your home folder.
cd ln -s /tweedledee/home/users/misc/jwhaah/dropbox ./to_ta
Then you will be able to put your files in the directory as follows.
cp my_file ~/to_ta/
In assignments, you are usually asked to plot graphs. Inasmuch as you can print the graphs, you can save the graph in ps, eps, or pdf format. The method depends on the graphing tool you use. Copy the graph files as well as your code files into the dropbox. The plain text format for all files is preferred except graphs.
The name of your final file should be in the form:
(yourname)_(assigment number:1-7)_blabla.tgz
A tgz
file is an archive, which you can make by
tar cvzf (yourname)_(1-7).tgz (list of files or the directory containing them separated by spaces)
Note that, as the name indicates, dropbox is write-only directory; you will not be able to see the content of the dropbox. In other words, once you turn in your work, you cannot revise them. If you want revision, you should work on your original file and copy the revised version into the dropbox again. The previous files will be OVERWRITTEN if their names were the same as the new.
It is a good idea to make your own dropbox in your home direcotory, so that your TA can write you or comment directly on your source code, and turn them back to you when needed. By means of dropboxes, you and TA are establishing a secure channel, although it is not perfect.
cd mkdir drobox chmod 733 dropbox
The conditions are listed according to their level of importance. The second is very important especially if you are programming for the first time. Programming is much more than writing a formula. Think it as though you are writing a math proof. Your source code is the proof itself. Leave no tricks behind. Try to explain every line if it is not self-explanatory.
valarray g_field( double mass, double x, double y )
valarray total_g_field( double stars[][3], int n, double x, double y ) / / stars[i][0]: mass, 1:x-position 2:y-position
valarray next_velocity( valarray& field, valarray& now_velocity, double time_step )
for
loops and if
-statement must have higher indentation level than for
or if
statementA graph must contain each of the following:
A graph is an efficient way to express an idea of the data. If a graph is missing any one of the above, the effectiveness of it is degraded, and sometimes becomes worse than a plain sentence.