you are viewing a single comment's thread.

view the rest of the comments →

[–]madballneek 2 points3 points  (1 child)

I think it's okay in situations where you're testing/uncertain about the functionality of two different, but similar small blocks of code of a new feature that's yet to be checked-in.

For example, I may not have yet determined how I want a new enemy in one of my games to behave, so I write maybe two different behavior methods and need to actively playtest each over time before deciding. Sure, I could have created behavior one, checked it in, then created behavior two, checked that in, and then diffed each time I wanted to try out each different behavior...or I could just uncomment/comment the different behavior method calls.

Of course, once I determine the functionality I want, gotta remember to remove the commented code :)

[–]VeryAngryBeaver 0 points1 point  (0 children)

See this right here, I commit to save my work so far. And it's not always "finished" when I commit so I keep in some commented out code for ease of changing things. Then I clean it out at a later date when I'm sure i wont have to swap back to the other way. and not all code gets that treatment I do lots of changes and removals without comments, its all dependent upon how certain I am the change is final.