Refactoring obscurely commented code

Posted by wraith808 on Programmers See other posts from Programmers or by wraith808
Published on 2012-10-26T21:00:36Z Indexed on 2012/10/27 23:19 UTC
Read the original article Hit count: 259

Filed under:

In refactoring code, I came across code that had comments. Looking closer at the comments, I could see that the code was clearly not doing what the comments said.

Without access to the coder nor documentation, and without clear direction regarding the code (i.e. defects as to the fact that the code is operating incorrectly), is the best practice to assume that the code is correct, and clean up the comments?

© Programmers or respective owner

Related posts about refactoring