top | item 20260617

(no title)

justasitsounds | 6 years ago

In this case the desired functionality can be encompassed in a single standard library method.

However, the author of the code may have started with a much more complex implementation but still feels like `is_foolike()` is better at describing the _intention_ of the method than the eventual implementation.

Replacing the descriptive method name with the actual implementation may mean the author now feels that they have to append a non-functional comment to explain that in order to test for foo-ness one only needs to do a simple string-prefix match.

discuss

order

james_s_tayler|6 years ago

You know how many times I've seen that exact scenario in code bases? Plenty. Some developers just do really pointless shit and then name is terribly to add insult to injury.

DonHopkins|6 years ago

Especially if your name is Ike and you don't appreciate being called a fool.