by danielbarla · 9y ago · 0 comments
A distant acquaintance interviewed for a secretary position. It didn't go well, because she was asked a general knowledge question (something along the lines of: "name some of the planets in the solar system"). She was furious with how irrelevant and unfair this was. It makes me wonder though, would I have hired her? I probably wouldn't have asked that question, but still. When someone is missing some really basic knowledge - even if it's irrelevant - it's not a good sign, per se.
These are part of the warm-up, I'll ask one or two right at the beginning of the interview and then move to the real questions.
Examples are: "How does the autorelease pool work?" (Objective C before everyone switched to ARC.) or "How do you ensure that an object is garbage collected," (C# and Java.)
These are more about judging a candidate's real knowledge versus stated knowledge. Someone who's spent 8 years in Objective C better know how to use the autorelease pool; and someone with at least a year of experience in a garbage collected language better know how to ensure that an object is collected.
You can call `GC.Collect()` and hope. But far as I know the GC will do a best effort and gives no guarantees.
Of course that's besides that fact that I would need strong arguments to accept a `GC.Collect()` anywhere in the code. But to call it just to ensure an object is collected? Oh boy..
Depending on the case you could add some code to the `Dispose(bool)` method to know when your object is collected, but also in that case you risk flipping a Bozo bit.
Similarly, if a programmer fails the question "in the alphabet, which letter comes after A", I'd be worried, and rightfully so. I'd give them a chance to recover from that, just to make sure it wasn't a once-off, but it's not excusable.