Notes+10.3

Some remarks after quick viewing of Stack programs:
I see that the mOOdlething works well enough. Future assignments should be submitted via mOOdle. Put all your files into a zip file to submit them.

Planning a program: draw boxes and arrows. If it is hard, you really need the exercise. It is very hard to beat the speed of a sketch on paper (or whiteboard). Do not spend a bunch of time trying to make a fancy formal diagram.

Comments: I am not the purist Kent Beck is, but I tend to agree with the camp that says: if you think you need a comment, your code is not yet well-written. I won't punish comments which are merely redundant. But: In the stack submissions, I see comments which are misplaced, obsolete, and cannot possibly be true in what is presented. Such comments are much worse than useless.

Variables: 1 l i n m e. One letter is not mnemonic enough. If you use some form of text editor as a programming tool (most do), can you get the editor to highlight all occurences of the variable named "i"? for (i=0;i<maximum;i++) { might work for a compiler, but it is hard for people to read. Try instead: for (ix=0; ix<maximum; ix++) { supposing it is an IndeX, or perhaps for (ii=0; ii<maximum; ii++) { where a string search will find few false positives unless you are in Hawaii.

Make tests straightforward. You want to be able to look at the results and quickly see what was tested and that it worked. Well, Rik wants that.

Keep stuff bundled... eg. showStack should handle empty stack.