Hacker News new | past | comments | ask | show | jobs | submit
I have a question I usually ask which is "How would you convert a Julian yyyy-ddd date string to a military yyyy-mm-dd date string?" (I explain how a Julian date works if they aren't familiar with it.)

The answer that almost guarantees I'll hire you is "there's got to be a library function for that, so I look in the manual". Almost as good is somebody whiteboarding how they'd convert ddd to mm-dd (and then account for leap years, etc.)

I get a disturbing number of people who say things like "I would communicate with the person asking for this to see what they're really intending blah blah"

My favorite answer was on a phone interview where he just hung up and wouldn't answer when we called back.

> I get a disturbing number of people who say things like "I would communicate with the person asking for this to see what they're really intending blah blah"

Sounds like they know this question is a “gotcha” question but just misinterpreted which direction you were going with it.

Some will ask a question like this expecting you to treat it like a puzzle and outline how you’d solve it as-is; others ask it as a way to probe how you’ll deal with strange or misguided requests (the case you noted as disturbing); and others yet will ask it to see how you’d practically solve it (your intention).

Seems like a bad interview question without context regarding kind of answer you’re looking for.

No, it's a pretty good interview question because it tells me if somebody's instinct is to reinvent the wheel or not. What I didn't expect was how many people couldn't say how a wheel even works.
loading story #48502841
loading story #48503493
loading story #48504159
> My favorite answer was on a phone interview where he just hung up and wouldn't answer when we called back.

Heh ... yeah well I wish I had it to do that.

However, you are asking gotcha questions.