Treat Names With Suspicion

An extension of TreatCommentsWithSuspicion.

Class/Method/Variables names don't always say what they mean. If you didn't write the source code, and you haven't read the source code, take all the names with a grain of salt.

This approach, while sane in some environments, will often lead to to paranoid paralysis where more time is spent verifying existing code than creating new code. Writing a bed of TestCases is probably the best solution.

Unless you trust the discipline of the creator of a piece of code, method names are no more guaranteed of correctness than comments are.


Of course, even possibly-incorrect names are better than totally meaningless ones. (If you think otherwise, you can always take the code that you have been tasked to maintain, written by someone else, and run it through an obfuscator first...)


EditText of this page (last edited November 21, 2014) or FindPage with title or text search