3 ms·
The stressful situations tend to be things like "We just broke the production database, we need to figure out how to recover the data ASAP"... not "We need a ne
by nsxwolf 9y ago
The stressful situations tend to be things like "We just broke the production database, we need to figure out how to recover the data ASAP"... not "We need a new algorithm in FIVE MINUTES!"
- lopatin 9y agoThe interview question I was referring to is the appointment overlapping one. It's a middle school math question and it's a lot easier than failing over a database without data loss.
- nsxwolf 9y agoI've been doing this for 20 years and I'm not even sure where I'd start on your middle school math question. I hate working with calendars and dates and I don't think I know anyone who enjoys it and can write totally bug free code that takes care of all edge cases. I'm sure good at fighting database fires though. This probably is at the heart of the answer to the question "how could this programmer with such a long resume have botched this interview so badly?" It would be insane to believe they've never added value to any organization and have just been coasting along all this time. Maybe your interview sucks and isn't good at finding value.
- lopatin 9y agoDon't over complicate it. Given two number ranges, of UTC timestamps, determine if they overlap. I think you know where to start with that.
- throwaway29292 9y agoI'd probably go for 4 if() checks, some 'less than'/'greater than'/'&&' checks should do it.
- BeetleB 9y ago>We just broke the production database, we need to figure out how to recover the data ASAP I know you did not mean it this way, but in some ways that's even worse. If that type of thing were routine enough to merit asking every interviewee that question, I would seriously reconsider working there.