When I was young and stupid, I made modifications to my code at will. A little here, a little there, a little everywhere. And I always knew what I changed and what I have to undo and what is still missing. Unless I forgot.
When I was a little older, I started marking changes that had to be undone with comments.
Then Borland (or was it Inprise at that time? Who cares) added TODO support to the editor and since then I'm writing
This makes a nice entry in my TODO list, which is visible at all times.
Later I started adding warnings that don't show in the TODO list, but in the Messages window:
{$IFDEF LogSomething}
{$MESSAGE WARN 'logging of Something enabled'}
An added bonus of this approach is that $MESSAGE messages are shown by the command-line compiler. I always write code that contains no hints nor warnings and such messages really stand up from the normal compiler output.
Recently, however, I started to doubt my sanity. I caught myself writing
{$MESSAGE WARN 'An important module is disabled'}
rrEventLogger.LogEvent('An important module is disabled!', svWarning);
(In reality, messages were more descriptive.) First line is warning me to remove this code before creating a release version of the program. Second line warns me when I'm compiling the code and the third one logs a warning into program's log. I had a reason for all this - I had to run this version at a customer for debugging purposes but I didn't want it to be used anywhere else.
Still, I'm asking myself since this day - am I being overprotective to myself?