Friday, 16 May 2008

My First Interview...

We need to hire a dev vendor in my team at Microsoft IDC, for the (top secret ; ) ) project I'm working on.

I was waiting with anticipation for some candidates to show up... because I'd just finished my "Smart Hiring @ Microsoft Interviewer Training", and I couldn't wait to get my hands on a smart but nervous, unsuspecting candidate... to experiment with! Bwahahaha!

The Bakra...

One fine (late) morning I strolled into office to see a Candidate being interviewed by my teammates. The first bakra (erm bakri), had arrived! *evil grin*

Lets call her Candidate. Her resume said that she has a Masters in Computer Applications, and 3 years of work experience in "ITServicesCompany" . It also said that she was proficient in .NET, C#, ASP.NET etc...

They had asked her a few questions about C# etc, and she seemed to have done decently, though she had no clue about ASP.NET or web programming!
So we (My Dev Lead Kiran and I) decided test her "problem solving skills", "object oriented concepts" etc. We dint ask them what they thought of her cos we wanted to form my own independant opinion of her.

The First Question...

After some small talk, we gave her a simple warm up question -

Q. Write a function "IsSmaller" to compare 2 dates, where the dates are represented as integers with the 4 most significant digits being the year, then the month, then the day.
eg. int todaysDate = 20080516;
int tomorrowsDate = 20080517;

// Today's date will be smaller than tomorrow's.

She took 5 mins to settle down and understand the required function signature. (For some reason she wanted to print the smaller date in the function instead of returning a bool - reminding me of our college programming

She : Ventures a guess - "We can use the .net class Date and its Convert function".
We : "Erm... How?"
She : Rambles unclearly about Date.Convert.
We : "We're glad you know about the Date class, but is there any other simple way of doing it... really simple... without any library classes? Use any language, even pseudo code is fine."
She : "We can convert it into string and then compare the year."
We : "Uh huh" (gave her some examples to work out...)
She : "We'll also need to parse the month."
We : "That's it? Only year and month?" (gave some more contradicting examples)
She : (still lost...)
We : "Apart from strings and converting...any other way?"
She : "Date Class"
We : *sigh* "Ohk... can you write a function to convert the integer to a string?"
She : "We can use the Int.ToString() method."
We : "Erm, we meant without using that library method!"

Struggling, she finally figured how to convert a single digit number to a character after lots of prodding and hinting. But she failed to realise why or how it wouldn't work if the number was more than one digit, say 12.

We gave up : "Ok... we'll get back to this problem... Moving on..."

The Next Question...

Q : How would you sort an array of a million integers where all the integers are within the range from 1000 to 2000?

She : (goes into QuickSort, MergeSort etc.)
We : "Ohk.. what all sorting techniques do you know?"
She : "QuickSort, MergeSort, BubbleSort... erm... umm... InsertionSort..."
We : "Complexities? "
She : "Quick and Merge are O(nlogn)... Bubble is erm... O(2n)"
We : (Scared to ask her what the "Big Oh" meant...)
We : "Are you sure... about BubbleSort... how many loops are there?"
She : (after fumbling for 2 mins) "N squared!"
We : Phew!

We : "Ohk... what if i have an array of 20 numbers all between 1 and 4?"
She had no clue we were trying to get her to think of CountingSort/BucketSort!

Then I had her sort 10 numbers manually... Still she couldn't describe the BucketSort Algorithm that she used!

We : "Ok... If you had to write a routine to sort 10 numbers, what would you use?"
She : "InsertionSort"
We : "1 million numbers?"
She : "QuickSort"
We : "10,000 numbers?"
She : "InsertionSort"
We : "Good...Why?"
She : Thinking... Struggling... "I had read this long back in a book... but I cant remember now!"

I gave up...
Kiran gave her some very basic, typical problem on inheritance, and overriding functions, and again she had no clue!


Hell NO!

Frankly, I wouldn't hire her to write code if someone paid me for it! Cos I'd have to sit and clean up all her crap, after spending a day trying to explain to her what she needs to do and how!

It's not that the Candidate was stupid. The problem is that she probably doesn't care about programming and/or doesn't have very much of an aptitude for it. She probably just studied MCA to get a job in the "hot" IT industry.

I came out thinking...
"What a waste of time... She wasn't even cute! How can someone be so clueless?!
WHOA! I am SOOO much better than her! Ouch... did I just compare myself with her?
Now I know why it is so hard to find good programmers and why Microsoft/Google etc pay us so much!"

The interview gave me a brand new appreciation not only of my own programming skills, but of everyone at MS... Especially those guys who we sometimes judge for not being as sharp or fast or good programmers... Every single developer, every single tester and almost every PM at MS understands, likes, and "gets" software!

This is one of THE reasons I love working at Microsoft! I'm surrounded all day by awesome, supersmart, or at the very least super intelligent people who love what they do!

What about you? Can you answer the "super-tough" questions we asked our candidate? ; )

Which reminds me, I need to import my post on "Microsoft/Google Tech Interview Tips" from My Space to this Blog.


Tosif said...

"The problem is that she probably dint care about programming or have very much of an aptitude for it. She probably just studied MCA to get a job in the "hot" IT industry."

That is so true, and its everywhere of all the four batches here in collg i just know a handful of ppl who are really into software/coding/innovating or even thinking on their own (so its pretty easy to spot them :-) ). It really hurts, wen i see final yr folks writing unindented code or wonderin abt really basic stuff. And its not just students there are lots of ppl to blame.

Pratik Stephen said...

"It really hurts, wen i see final yr folks writing unindented code or wonderin abt really basic stuff."

Seriously man... writing unindented code is like walking around with a neon sign telling the world "I have no clue about programming"
You don't know how much I had to convince a few of my friends in college that indenting code is GOOD, and well worth the effort!
(I wouldn't help anyone if they'd come to me with unindented code...
... but in the end I just wrote a quick program to indent the darn code)

The percentage of "real engineers" is really really low... and very very sad...

Archis Gore said...

What hurts isn't about "programming" so much as it's about the inherent flaw in our culture.

Culturally, we're a wierd defensive people. Instead of looking at our problems today, we like to quite Nalanda and Takshashila and "we invented the zero" (a phrase that pisses me off by now).

10 years ago, it was "Medical Transcription", 20 years ago it was "Mechanical Engineering", lest we forget, "Engineering" itself gained prominence above Science because government jobs had that requirement.

As a people, we're still pretty much a slave-race. Go to your college - heck go to an IIT and tell them you came up with something new and they'll ask you to first show a paper by a foreign author on the same subject (I've seen this happen in person).It's sad, but that's the price we pay for being a democracy.

USA took 300 years before they learnt that a democracy only works if everyone participates in it. With any luck, in another 240 years, we would have learnt as well.