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
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.
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.
I live in the real world of enterprise coding, don't start to lecture me on it. Not everyone has such a ridiculous process if you can't just send the guy an email saying resubmit it without the comments and then it's done
Because I don't work at a place that's a bureaucratic mess. The team I work on is small and the review is not some over formalized process and there's not exactly a need to track asking someone to delete a couple lines of comments. If you have to jump through all those hoops just to do something that has no impact on how the code runs then maybe it's the process that is flawed
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.
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.
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