3 ms·
I'm of the school that measuring trivial knowledge is not a good way to identify good programmers I'm right there with you, but this list isn't trivia. It's a
by Dove 16y ago
I'm of the school that measuring trivial knowledge is not a good way to identify good programmers
I'm right there with you, but this list isn't trivia. It's a broad set of basic questions. In fact, these three . . .
- What's the difference between accessing an array
element with $items[$index] and @items[$index]?
- What's the difference between == and eq?
- What do parentheses around the variable name in my
($value) = @_; mean, and what would happen if you
removed them?
. . . are so critical that if you can't answer them instantly, I would expect you to experience long, painful debugging sessions on a daily basis.
- spudlyo 16y agoYou can write a lot of Perl code without ever needing array slices, but I agree on the last two questions.
- chromatic 16y agoYou don't have to know about array slices to answer that question effectively. You get a bonus for knowing about array slices, but the most important point is understanding the difference in context.
- Dove 16y agoOh, certainly. But it's hard to write a lot of perl code without accidentally writing an array slice. At least, I find it hard.
- Isamu 16y agoI like that as an answer: "the difference is you almost always want $items[$index] and rarely @items[$index] but somehow frequently type the latter"
- bayareaguy 16y agoIndeed, as this poor student discovered the hard way... http://yro.slashdot.org/story/01/03/13/208259/Sophomore-Uses-List-Context-Cops-Interrogate http://yro.slashdot.org/story/01/03/13/208259/Sophomore-Uses... Believe the Camel when it says -- third edition, page 69 -- "You will be miserable until you learn the difference between scalar and list context."