15

What do you do?

Delete the code or comment it out just in case you need it again?

Comments
  • 4
    I branch on Git to have a version to easily reference, then delete when the issue is settled.
  • 5
    delete and then commit. keep the code clean
  • 4
    comment because maybe it'll come in handy?
    delete once solved
  • 8
    Comment it out until I'm coding again and I forget why it was commented out to begin with. Then it's time to delete it.
  • 0
    Comment until QA release. Remove before staging. You'd better have figured out what to do with the code by then. :-)
  • 0
    Comment out just in case I need to revert the changes
  • 2
    Early in the process I tend to comment things out. If nothing else it shows what I already tried :) Then I'll clean it up when stuff is working as expected and it's time to send the patch on it's way.
  • 0
    comment only, because could serve in future
  • 0
    nowadays ddd is in fashion. which simply says develop as per need and incremental. try it out
  • 1
    Delete, it's way too easy to forget to come back to it later and it's much easier for other people to read without all the comment clutter, if you really need it you've always got version control
  • 0
  • 0
    @erasmuswill I do use git but I'm talking about small tutorials I experiment on not professional level stuff
  • 0
    Comment if the code is not in source control then delete when merging to stable branches. Otherwise delete.
  • 0
    Comment until just before shipping, unless it's just a shitty block, then it's buh-bye.
  • 1
    Comment it out, I like to leave my mistakes in the code, to remind myself I'm improving
Add Comment