Hi,
While coding a few moments ago, I realised that I was using comments for something else other than merely explaining code. I composed the following line:
HRESULT error = e.GetErrorCode(); // 23 = data error
When I finish trying to figure out how come my error is occuring, I plan to expunge this nasty and unclear comment from the source forever.
I use these comments to reduce my load on short (or perhaps medium-term) term memory. M$ IDEs allow you to define a categories of 'comments'. Common ones that I have begun to use are '//TODO:' and (shhh!, don't tell anybody) '//HACK:' You can even define you own, like //BODGE:, //FUDGE: or //FLAKEY: When you compile, the compiler can potentially be used to alert you about your bodges and fudges.
I have no idea how long my temporary 'working memory' reminder comments last. It depends upon what I'm called away on. They can be increibly very idiomatic. Relating to one Ron proposed, I could feel myself writing something like /* p.23, green file, back of drawer */.
It may be interesting to find out how long these comments last. Perhaps by analysing a corpora of software versions (in-between 'true' releases) it may be possible to get a view about transitory comment lifetime, if this is considered an worthwhile endeavour.
I find that I rely on external notations constantly while developing software, scraps of paper, UML (occasionally), and comments. Comments is one of the tools that I use (probably without realising) on a daily basis.
Cheers
Chris
