Here's what I do while coding in between svn commit especially when doing lots of experimental code and trace messages : use temporary Code Marker. These marker basically function as "recycle bin", edit buffer for referencing original code and tag for cleaning things up after the code is working so less code clutter. Using this, I could focus on the goal of the task without having to memorize many little stuff too much since I can refer the old code anytime , do little "manual revert" easily when I need to and just do search for clean things up before commit.
Marker that I use :
- //TEMP : Added before the new added line(s). Temporary console output for debugging marked as this too.
- //DELETE : Added before (commented/uncompiled) lines that will be deleted when the current coding task is working. In the case of changing some part of a block of code, I copy that block and paste below it, comment and mark the original with this mark and play with the copy (with the bonus of having the original above it for reference and rollback just in case something happen).
- //TODO : I don't use todo for task that I will done later/tomorow/next week (I use other stuff for that i.e: trac, xplanner), I use it only to mark todo list within update-commit window. I use this marker for todo list that come up in that window when I code something else and not yet finished.
Those zen-programmer might not need this, but for us mere mortal, any help that can help our already-crowded brain to focus will be very much appreciated.
No comments:
Post a Comment