5 ms·
If someone can explain what happens, then one of two things is probably true: they've purposefully memorized an edge case for the sake of trivia, or their knowl
by scott_s 17y ago
If someone can explain what happens, then one of two things is probably true: they've purposefully memorized an edge case for the sake of trivia, or their knowledge of language semantics and runtime behavior is deep enough to figure out what happens in an unusual circumstance.
I agree that doesn't tell you if the candidate is good at solving problems using C++, but there is potential to discover how deep their understanding is.
- tptacek 17y agoIt also selects for developers who deliberately code up to the limit of what the runtime will allow, regardless of the obvious fact that having code like this is like sprinkling landmines across your product.
- scott_s 17y agoYou're conflating actually doing it with being able to reason about what would happen based on prior understanding.
- flaub 17y agoWhen you're looking for an expert in a field, do want to find someone that claims to know what they're doing because they read a book somewhere? Or do you want to find a seasoned pro that has actually tried and possibly failed using different techniques? Their failures may give them more insight and experience than their successes. Especially if they can tell you what they did to improve themselves afterwards.
- Retric 17y agoBecoming an expert has far more to do with knowing how to get things done in a known time frame than knowing every little piece of triva. One you code in the same language with 3 or 4 compilers you start to look at edge cases as a dangerous no mans land to be avoided if at all possible. PS: I worked with code from the 1984 Macintosh days that was still in use in 2005. You could see where people had updated from Motorola 68020 to PPC and if it had not been stripped out some poor coder might have updated the remaining ASM to x86.
- philwelch 17y agoIt's probably a good interview question for a language lawyer.
- kscaldef 17y agoThe question is not whether or not the language spec permits you to do this. The question is about what happens if you do.
- philwelch 17y ago...it's probably a good interview question for a C++ compiler programmer? I just figured a good language lawyer, like a good real lawyer, would be able to both interpret the law (spec), but also tell you what would happen in reality if you violated it a certain way.
- pivo 17y agoIt's been years since I worked with C++, but my recollection is that C++ programming involved a lot of memorization of edge cases just as a guard against running into them.