10
mkchan
4y

String.replace and String.replaceAll in Java. Doubly anti-intuitive naming... First it makes you think replace will replace a single instance in the string but aCtUaLlY replace is replaceAllByExactMatch and replaceAll is replaceAllByRegexMatch.

Just as bad are C's fwrite and fseek which have the target FILE* in opposite ends of the parameter list

Comments
  • 1
    Eurgh, amen to that first one. The number of students in particular I've seen make that mistake is horrendous. Whoever signed off on that naming should be ashamed.
  • 0
    Reminds me of the entirety of PHP
Add Comment