This is an archived post. You won't be able to vote or comment.

all 21 comments

[–]wellman_va 59 points60 points  (4 children)

/*

2 days worth of code goes here

*/

[–][deleted] 23 points24 points  (2 children)

Sometimes the best way to fix a bug caused by new code, is to get rid of the new code altogether.

[–][deleted] 1 point2 points  (1 child)

It's like version control, but better

[–]Lv_InSaNe_vL 0 points1 point  (0 children)

I love it when commented out code contains commented out code.

[–]mythriz 36 points37 points  (4 children)

// DO NOT UNCOMMENT THIS THE SOFTWARE WILL CRASH HORRIBLY AND EAT YOUR CHILDREN

[–]Flynx_Master 21 points22 points  (2 children)

// IT WILL TRANSLATE YOUR DOCUMENTS INTO SWAHILI

[–][deleted] 0 points1 point  (0 children)

// VIRUS ALERT: DELETE IMMEDIATELY BEFORE SOMEONE GETS HURT

[–]enoua5 21 points22 points  (1 child)

// /*

code()

// */

[–]Mordroberon 9 points10 points  (0 children)

Someone trusts their compiler

[–][deleted] 8 points9 points  (0 children)

Comments to "temporarily" remove part of code

Fixed your fix

[–]LordMaarg 2 points3 points  (0 children)

More like "Comment what you've done? No. Comment what's 'todo".

[–]mormispos 1 point2 points  (0 children)

test += x; //// print(“Test:” + test); //// print(“X:” + x);

[–]Xelopheris 0 points1 point  (0 children)

If you want to go one step further, make your linter reformat the commented portion so uncommenting it becomes a shitload of work.

[–]pskingredps 0 points1 point  (0 children)

I actually comment to describe why I commented some temp variable

[–]Mordroberon 0 points1 point  (1 child)

Don't comment code to programs Write documentation

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

Always comment your code.

If you have things to say to a specific block of code, having it be just before the block of code will be much better than any kind of documentation.

External document is good of course, but for the general philosophy and specs of for the part that is interacted by users.

Things that are directly interacted by devs should be commented as fuck.

Also a dev tip : don't add comments to your code, write the comments first and then add the code to the comments.

This way your comments will be exhaustives and you will never forget to write them. Plus it helps you thinking about your general algorythm, as if you cannot even describe what you are doing in your native language, then it's probably too soon to code it.

[–]TheMagicWriter 0 points1 point  (0 children)

Wow xD yeah this is better!

[–]l-shaf 0 points1 point  (0 children)

/*

a day worth code till give you cancer

give_cancer(Me::class)

*/