Writing Code on a Whiteboard
Posted Friday, April 16 2004 by The JobsBloggersGosh - I was so wrapped up in The Apprentice that I didn’t have a chance to post on the in person interviews at Microsoft! Excuses, excuses, excuses....
I do have a good pointer for those that are interested in the SDE and SDE in Test positions and may be interviewing soon. Eric Lippert is currently a SDE over in the Visual Studio area and he interviews candidates occasionally. He sent us this post he wrote on how to approach writing code on a white board during interviews. You’ll have to do this at least once or twice if you are interviewing for these types of positions :)
This is just a teaser to the longer post I have in mind for the actual interview process. I *think* I might actually get to that one this weekend. Till then – happy reading!
Tagged as: zoe, interview-tips, the-microsoft-interview-process, interviewing


Comments
I even had to write on a whiteboard during my interviews. Obviously, I wasn't writing code. In my case, I was designing a website (and I have no web design experience ... plus, my job has nothing to do with web design.) but the point was I had to show I could get up on a white board, ask the right questions, and map out the right detail. Same sort of concept ... just different.
Okay, do you expect a PM type position would require code? I'm comfortable with half a dozen languages, but would be much happier doing flowcharting or site design (I was a senior graphic / web designer for 2 years in a past life).
Just curious, as this has been bothering me for about 2 weeks (ever since I read Joel Spolsky's big "here's how to interview" post, which talked about him even requiring PM's to write code).
Yes, but it depends on the type of PM position. Some are more process oriented; some are more technical. Can you send me the link to Joel's post? I didn't see it on his website.
But I'd say, if you are interviewing for a Dev, Test, or PM role, be prepared to write some code.
Gretchen, did you watch the latest Channel 9 <a href="http://channel9.msdn.com/ShowPost.aspx?PostID=2949">video</a>? Chris Sells actually mentions whiteboard coding, and complains about the lack of Intellisense... :-)
Argh. Try this link: http://channel9.msdn.com/ShowPost.aspx?PostID=2949
nice, I hadn't seen that!
I agree that it's not easy, but it helps if you've had some experience (I know some people who write code quite well on whiteboards, though they were actually tutors at my university, so I guess they had practice!).
I think in my recent interview that lead to my current job, I did quite well with the whiteboard, drawing diagrams of how I think the website that they wanted me to do would look like. Just drawing from the descriptions of what they just told me a few minutes beforehand. I think that's probably what led me to get the job! I kept apologising for how messy it all was (I was very nervous, and my hands were getting a bit shaky). I had actually grabbed my little notebook from my bag and was going to start drawing on it, then one of the interviewers suggested I draw it on the whiteboard, so I just went right onto the whiteboard and started drawing (though their whiteboard markers were all running out of ink!).
I guess this just goes to show the interviewer that you are confident, and you know what you're doing. It also goes to show that you were listening to what they were saying (my interviewers gave me details of something that was similar to what I would end up doing if I got the job). I actually realised that I may have said the wrong thing, and was actually fortunate enough to be asked for another interview, and told them about my mistake that I realised (don't know if that's a good idea or not, but I did that). I think for me it wasn't too bad because while I was getting a description from the interviewer, I was putting together a jigsaw from the pieces of information that was given to me into a picture of what I thought the website might look like. I mentioned many examples that they may have used (I assumed many people would have used web mail programs such as hotmail before) so I described certain things to be similar to hotmail. I think giving the interviewers something they can relate to also helps (but yeah, this isn't code related).
Gretchen,
The only reason I'd be nervous with coding on a whiteboard is that they'd likely ask some arcane questioning (reversing a string being a favourite one). I'm quite comfortable writing code and whiteboarding... Just not sure how comfortable I am at both.
Guess I'll practice beforehand, and make sure I practice some of the more common coding questions as well :)
J
I cannot wait for the post you "have in mind for the actual interview process"! My SDE interview is coming up shortly here, and as a former intern who is now ready for the stimulating rigors of MS, I'm gonna nail it this time. :)
Thanks for all the help on this blog!
I just had an interview day at Microsoft and got the whiteboard experience. The task was string reversal (so, Jeremy, you're right, make sure to practice that one). I think I switched languages at least twice and totally blew some syntax. As others have said, it didn't feel like a true test of my ability to write code. Due to some advice I got ahead of time, I kept a verbal stream-of-consciousness going throughout in an effort to show that I knew what I was trying to do.
In the end I didn't get the job offer, but I haven't given up on the idea of working for Microsoft in the coming months. And, I do have a whiteboard at home, so I can see if practicing on it improves my technique.
Thanks for putting out such a good blog, Gretchen and Zoe. I just wish I'd discovered it before I went in.
Is this how you become a junkie? Because I've had the free samples, but after four or five days, I'm jonesing. Where do I put in the quarters?!?
ObWhiteboard comment: I went TEN YEARS before being asked to write code on a whiteboard. But they warned me they'd do this, nine days ahead of time. All the time I needed to memorize the contents of Programming Interview Exposed.
It was a great test of my memory to reverse linked strings on the whiteboard [sic... joke]. It didn't show off my on-the-fly coding skill, but hey, they asked for what they got.
My 2 cents:
http://msdn.microsoft.com/msdntv/episode.aspx?xml=episodes/en/20031204FxCopMM/manifest.xml
I have had the chance to "host" a blackboard in my office for 3 years now and I believe it is a *very* powerful tool to share/clarify/sharpen ideas between you (and you) and you co-workers. Between you "and you" because by writing ideas an stepping back you can already have a critical view on your ideas and "serialize" them. Between you and your co-workers, because, like the old man says "a schema is worth a lot of words" (oops was that correct English?).
Of course, the blackboard is a nasty beast and you have to learn to use it. The most obvious problem is that it turns you (almost) blind: you have your nose sticked to it and the perception of the world is reduced to 20cm^2, you cannot see the people behind you (the recruiter or the teacher or the students): your are alone. I have been in those situation where you are unsure about the things you want to write on the blackboard (as a student or in the PhD); the blackboard is pityless: you look stupid (or you feel like you do).
Now the good news, the blackboard "beast" is a very powerful tool. Ideas literally flow out of your head on it. It's a playground to discuss design questions, to explain approach, show a process flow control, etc. (I guess the 3 previous paragraphs are obvious if you have a blackboard in your office :) )
Now, back to writing code on the blackboard. I had the chanced to monitor C/C++ course in Engineer courses for 3 years now and, "oh boy", it involved a lot of "blackboard coding". The most annoying thing is that it's slow, which is usually good for the students. About "code blackboarding", I really think exact syntax is not a major requisite: e.g. dropping the "public/protected/private" is ok because it is obvious, dropping the type declaration in methods is ok because it is obvious, in fact, obvious things can be spoken loudly and not written to the blackboard (this reminds me of "concise and to the point"). Usually writing code on the blackboard actually involves a lot of colors and drawing. It ends up looking like a huge mess filled with arrows and connections, elipses, etc.
Cheers,
Jonathan
Generics presentation on MSDN-TV (by Sam Gentile blog)
http://msdn.microsoft.com/msdntv/episode.aspx?xml=episodes/en/20040429CLRKC/manifest.xml