Originally posted by John Donoghue:
On the other hand, it clutters the code and decreases readability.
Hmmm - maybe. The same argument could be used against including comments. I personally find that a well placed log message will work instead of a comment when I am reading the code, and simultaneously give me good debugging information when I am trying to look at a run that has a problem.
Originally posted by John Donoghue:
It isn't a requirement,
Very true, and we do argue several times throughout the book that going beyond the requirements
can be against your best interests (and there is even a comment to that effect in your instructions). I personally feel that this is one area where a little step outside the minimum requirements is actually a good thing, and shows a little more professionalism.
Originally posted by John Donoghue:
...and is a place to lose points it you make a silly mistake
True.
Originally posted by John Donoghue:
...(like inconsistent names ...
Perhaps - I think this sort of problem could happen even just as easily with comments in the code, so I don't see it as a particular problem.
Originally posted by John Donoghue:
or misconfigure a class and sending a bunch of logging output to the standard output/error).
I think this is possibly a reason
for the logging - these sorts of errors will then be apparent when you run the application, rather than when the assessor steps through your code.
Regards, Andrew