General information
Category:
Computing in general
>>>I don't know that source control (which I would not be without in general terms) would be a silver bullet for me in situations such as Jay describes. I probably went through a dozen modify-save-test cycles today of the program I am developing, but only checked it into VSS at the end of the day. I don't want 200 versions of every program. So if I had wanted to go back an hour I would have been equally hosed.
>>>
>>>One thing I do to mitigate all this is comment out rather than delete code while a module is under development. That way it's easily accessible if I want to get it back. One of the last things I do when a module is "done done" (more or less) is use Code References to search for character strings *!* and !!!. The commented-out code can at that point be safely deleted. The strings consisting of three exclamation points (which I think I picked up from Whil Hentzen) indicate open issues or things I am otherwise unsure about. It more or less means "don't forget about this." I know I can use the Task List for this now, and probably should, but !!! is a simple convention that has worked well for me over the years.
>>
>>I do pretty much the same - I comment out pieces of code, and wait about a dozen iterations before deleting stuff. I also write a comment explaining why is this commented out, so when the time comes to clean up, I know why was it there, and why (or whether) it should vanish.
>>
>>As for the !!! - accidentally, I've done exactly that today for the first time; my traditional mark was $$. Another habit is one I picked from Steven Black:
>>
>>*!* !!! KLUDGE ALERT !!!
>>
>>He uses that (albeit he spells it "KLUGE") for special cases when there's a need for a nasty workaround, going against the framework, or there's a hotfix patch which would need to be done right once time permits. And, of course, there's a matching "END ALERT" comment after that block of code.
I worked on a program once where one particular block of code had been modified two different times. The original insertion was prefixed with this comment line:
// hack!
The inserted code was subsequently modified and the comment that time was:
// even bigger hack!
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only