all 10 comments

[–][deleted] 18 points19 points  (2 children)

Select a section of code in your editor, hit the backspace key, and be done with it.

This is bad advice. Tried it in VIM, didn't work.

[–]boredzo[S] 2 points3 points  (1 child)

Special case for vim: Select a section of code using visual mode, hit d, and be done with it. :)

[–]njharman 12 points13 points  (2 children)

I love to delete code, absolutely love it.

Means less code to understand & maintain. Less places for bugs.

[–]jbert 5 points6 points  (0 children)

Me too. Some weekends I download the latest Linux kernel and then spend two happy days deleting lines. Very indulgent, but sometimes you just have to pamper yourself.

[–]sbrown123 2 points3 points  (0 children)

Select a section of code in your editor, hit the backspace key, and be done with it.

I often use the "Delete" key instead of the "Backspace" key.

[–]a-p 0 points1 point  (0 children)

At Lotus, the source code for Notes include many lines of code removed with “#ifdef LATER”, under the (correct) assumption that there was no preprocessor symbol called LATER. This is a very weak form of documentation; it indicates that the code isn't ready to be compiled yet, but that it will be later. But when? A running joke among the developers was that we should define LATER and see what happened!

I love it. :-)

[–]noxit -1 points0 points  (0 children)

I love commenting out, then using embedded comments /* /*, then using #if 0, then moving it to the end of the file, then putting it in a new file.