Sunday, July 25, 2010

Commenting out code blocks.

In Java and other languages that support it, when I comment out a code block, I do this:

/*
whatever();
/**/


Because when I want to comment the code back in, all I need to do is change one character:

//*
whatever();
/**/


It saves time and editing.  Good generally, but especially for temporary debugging blocks.

No comments:

Post a Comment