Friday, January 14, 2011

interview day. ugh.

I had a full day of interviews at Company X in Palo Alto today. 2/3 of them did not go poorly! The other two might be enough to torpedo my chances. I realized that I'm extremely rusty at coding, something that only becomes harder when you're doing it on a whiteboard with some stranger waiting for you.

Coding problems I screwed up:
  • Given a sorted binary tree, print out the values, from lowest to highest. This is called an "in-order" traversal, and it took me about 30 seconds to do it recursively. Then it took me 25 minutes to cobble together a non-recursive, iterative version.
  • Given an integer, calculate the corresponding Excel column number. For example, numbers 0-25 correspond to A-Z, 26 is AA, 27 is AB, 78 is CA, 79 is CB, etc. This is a slightly different case of an ancient and well-known problem, of converting an integer to a string (itoa(), if you're curious: normally you would be converting the number 25 to the string "25." This took me the entire 30-40 minutes and I did a really bad job.
To be fair, the others were fine:
  • Write some code for a build system scheduler.
  • Write some Java code for a hashtable. (That was exciting. I've never actually written a hashtable, because every modern language has one that's more efficient and better-tested than anything we would cook up. The interviewer said, "That's good!". Also, apparently I can still write correct Java after 5 years.)
  • Model a game of Monopoly using objects.
  • Describe how to search a list of objects with given attributes. Make it faster (by adding indexing).
The two problems that I screwed up would have been hard even if I were in coding-shape. With itoa(), in particular, I've never really internalized why it works. Something about it has always blocked my complete understanding.

The Director of Engineering was the last guy I talked to, and he was wonderfully honest and direct: he wanted to talk to me and get a sense of me and my experience, because given the interview feedback, hiring me would be more of a risk than usual. He recognizes I haven't really actively coded in a long time, and they'd be hiring me based on my past accomplishments (which are more important to them), and especially based on my friend's recommendation. If it doesn't work out, the company and I part ways amicably.

Anyway, I feel crappy and incompetent. Which I'm not, really, but my competence wasn't exactly on display today. Either of the guys from those two bad interviews could torpedo the job with their feedback, so we'll just have to see what happens.

I got home late and needed to eat and unwind, so I bailed on aikido tonight. I decided to go to the early class tomorrow--completely forgetting tomorrow is the first Zen sangha event of the year--when I checked my mail and discovered the instructor asking if I could teach the class. I love teaching and she needed somebody, so in theory I'll go for the early part of Zen stuff and then go to the dojo.

Blech, what a day.

No comments:

Post a Comment