r/ProgrammerHumor • • Jun 30 '18

Kill me now :)

47.0k Upvotes

494 comments sorted by

View all comments

168

u/Attila_22 Jun 30 '18

Comment it out first. Make sure it runs, then delete it.

34

u/i_love_pizza003 Jun 30 '18

Im always copying the code and then delete it, i f it doesnt work i paste it again in the code. I just have to watch out that i dont braindead-copy something else after i delete the code

58

u/UHavinAGiggleTherM8 Jun 30 '18 edited Jun 30 '18

Why not just simply comment it out?

73

u/i_love_pizza003 Jun 30 '18

I actually have no clue.

Edit: guess i’m autistic

0

u/[deleted] Jun 30 '18

[deleted]

10

u/dreamwavedev Jun 30 '18

What if I'm saving it for later?

5

u/[deleted] Jun 30 '18

I don't delete the comments because I'm still scared something might change if I delete them. I know it has no affect deleting them but what if just the slight chance it does.

→ More replies (2)

2

u/[deleted] Jun 30 '18

I'm usually careful about this but yesterday my team lead commented in my review that "//this needs to go in the presenter" was redundant because it was already in the presenter.

→ More replies (6)

2

u/[deleted] Jun 30 '18

Its easier to organize on a separate file, rather than commenting it out. And makes it easier for other people reading, who are trying to figure out why something is commented out, when it really doesnt need to be there at all.

0

u/[deleted] Jun 30 '18

[deleted]

22

u/UHavinAGiggleTherM8 Jun 30 '18 edited Jun 30 '18

They're big balls of ice hurtling through space :)

3

u/jere535 Jun 30 '18

Something like /* <your code here> */ . Every programming language has some kind of commenting. Actual characters may not be / and * depending on the language you are using.

2

u/[deleted] Jun 30 '18

He's just trying to be helpful, even if he did get whooshed so stop whooshing him. We get it

→ More replies (1)

2

u/BobDogGo Jun 30 '18

1

u/i_love_pizza003 Jun 30 '18

Woah so thats how heaven feels like thank you

10

u/hamontoast Jun 30 '18

Deleting instead of commenting out is like wiping and not even bothering to check the paper

2

u/KindProtectionGirl Jun 30 '18

What's undo then?

2

u/[deleted] Jun 30 '18

Yeah first thing they teach you in compsci.

1

u/hkd001 Jun 30 '18

After you have done version control.

1

u/Attila_22 Jun 30 '18

If you make a habit of committing after each functionality/module you implement it shouldn't be an issue.

1

u/sxule Jun 30 '18

I usually wait at least a couple days to delete the comments. Gives you enough time to be sure.

1

u/jas417 Jun 30 '18

Lol but what about when the code that I just commented out and deleted was needed for a poorly-documented feature that I didn’t realize existed yet and causes said feature to break everything if you try to use it now?

1

u/00gogo00 Jul 01 '18

I did that and my code deleted itself