> Some many times this. I absolutely hate seeing commented out code. There's a reason we use source control.
How is an unfamiliar developer supposed to find out that the deleted code exists?
How is an unfamiliar developer supposed to find out that the deleted code exists?
[1] Including if(0){} abominations
git bisect
That should identify the/your commit in (usually) < 10 tests. At which point the previous code is still intact.
Or
git blame
and look at the problematic lines, see who changed it and when. Now look at the git log (filtered just for this file if you want) and identify the last changes to this part of code that way.
More complex than just
// timestamp, initials: Changed foo, commenting the following 100 lines out
maybe, but makes the day to day code so much more readable.