Lab notes are made collaboratively with a partner as you work on each lab,
and are used later to write more thorough explanation in your
individual lab report.
These tips aren't just about taking lab notes, but they do affect your notes.
Some details below assume Java and a UNIX-like system, but
all the advice applies in most any programming environment.
- One bug at a time.
Finish off each failure before you tackle the next one.
Don't tackle two at once.
- Save and reuse test input.
Keeping input in a file makes it easier to repeat the exact same test,
which is a very good idea.
Show the contents of those files in your notes.
An easy way to do this in the command shell is to run
cat test-input.txt (or whatever your file is)
and paste, again, the command and the output into your notes.
- Make debugging output readable.
Instead of System.err.println(var), write
System.err.println("var: " + var).
Instead of "got here", print
"entered methodName()" or
"inner loop iteration " + i.
Your grader will appreciate it, and you'll thank yourself later.
- Save, but disable, debugging code.
In the Java class, define a constant like
static final boolean DEBUG = true;
and then put if (DEBUG)
before each debugging statement.
Then, instead of deleting or commenting out code, just set
DEBUG = false and recompile.
Debugging statements you wrote in lab should remain in your final code
but be disabled.