2 ms·
The worst is when that second comment isn't there and you're left wondering what's going on, which leads back to naming things well. Compare: findNeedles(hays
by nickjj 8y ago
The worst is when that second comment isn't there and you're left wondering what's going on, which leads back to naming things well.
Compare:
findNeedles(haystack, needlesList)
[insert a few nested loops which are hard to follow unless you run the program to see what it does]
vs:
countWordsInString(str, wordsList)
[same code as above]