Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
@fyroc Yes, I do, and I do this as well. I'm not sure why, since I know I can always revert.
-
fyroc58608y@spongessuck I don't even revert. I just do a compare, copy the code block I need, paste it into my updated file and then commit. It's cleaner and has less room for errors.
-
arminiae5658yI did this one time when I had to refactor some legacy code to visualize the impact it had on number of lines. Took days, but ended up with a class consisting of 300 lines code, and 1200+ lines commented out below. That moment I got to delete them and commit the clean file was rather satisfying..
-
Voxera113978yI have done this to. Especially if I a unsure if markup is calling the code (does not show in intellisense or resharper).
Removing it makes it harder when/if markup complains to find where I removed the code.
And even more so if another dev is following up the error.
Its harder to search in git since you cannot do that direcly inside visual studio.
When a release has a few weeks behind it I can then clean up all commented code. -
aaronraff718y@fyroc I do use a VCS for most projects but this is just a funny thing that I sometimes find myself doing while testing.
-
aaronraff718y@Jase I have definitely hoarded some code before until I found the correct solution.
Related Rants
When you're trying to fix your code but you don't want to delete anything valuable so you just comment out half of the file 😂
undefined
coding
comments
genius