You're looking at Less Wrong's discussion board. This includes all posts, including those that haven't been promoted to the front page yet. For more information, see About Less Wrong.

Emile comments on Specification failure - Less Wrong Discussion

5 Post author: cousin_it 04 November 2010 06:56PM

You are viewing a comment permalink. View the original post to see all comments and the full post content.

Comments (18)

You are viewing a single comment's thread.

Comment author: Emile 06 November 2010 09:43:14AM *  1 point [-]

I wrote the search function without problems; I'm surprised that so many failed in the comments. After all, unlike the people from Bell Labs / IBM, they had the extra info that 90% of programmers fail at this; so they should have been extra careful about edge cases. Or do people really think "I'm so sure I'm smarter than 90% of IBM programmers that I won't double-check my code"? It's not as if a bit a thinking can't bring up the expected edge cases (empty array, element not in the array, element at an extremity).

(That being said, maybe my solution has a bug I haven't seen yet ^-^ The only 'problem' I had is that my function will say that 2.0 is in an array containing [1, 2, 3], but the spec doesn't say how we should handle different types (would unicode and non-unicode versions of the same string count as the same?))

In the blog's comments, and especially on Reddit and Hacker News, I was amazed at the amount of rationalization by people arguing that this wasn't a good test - that since it wasn't representative of "real-world programmer work" (because a programmer would be able to test, or would use a library function), it wasn't a good metric of programmer skill. Now, it may not be a perfect metric, but I'm sure I'm not the only guy who, all else being equal, would rather work in a team with other programmers who pass that test.

(There also seemed to be a few people on Reddit saying "Oh, I passed the test, except for this little bug that doesn't really count")

Comment author: cousin_it 06 November 2010 11:43:29AM *  3 points [-]

I was amazed at the amount of rationalization by people arguing that this wasn't a good test

Yeah, but you yourself fell prey to the same trap in reverse: claiming the test is important after passing it successfully :-)