Thursday, February 5, 2015

The Technical Interview

I'm no stranger to the technical interview.

During the last 8+ years, I've gone through the Microsoft Interview Loop dozens of times. That is the price I pay for being a contractor.
The interesting thing about the process is that they always ask the same questions, regardless of what's on your resume.

Recently I got a chance to interview people, and I got a surprise of my life. Most people will fail the interview process because they never prepared. That's so sad, since the Internet is filled with great resources. Additionally, plenty of books have been published on the technical interview.

1. Basics
In a technical interview, the interviewer is looking for two things:
   1: They want to know if you can create effective code.
   2: They are looking to see how well you can think on your feet.

1.2. Efficient code
The first part revolves around data structures and algorithms.

1.2.1 Data Structures
Data structures include:
    - Singly Linked Lists
    - Binary Search Trees
    - Arrays of Integers

Questions include:
    - Sort an array of integers
    - Add/remove an element from/to a BST
    - Find the second to last element of a linked list.
    - Reverse words in a string (Linear time)

More questions can be found in my blog below.
Also, remember to Google for "Technical Interview"

When answering technical questions:
  1. Aim for the most efficient algorithm possible. That is:
    1. Aim to solve problems in linear time - that is, using only one loop.
    2. Use N Log(N) time if absolutely necessary.
    3. Never use N squared time (embedded loops). They will question anything above linear time.
  2. Avoid shortcuts:
    1. Never use built-in functions to do the job. This is a test.
    2. You build your own nodes and classes for the linked list and BST problems.
  3. Always explain what you are doing.
    1. Tell why you used one algorithm over another.
    2. Offer suggestions on how to best leverage existing frameworks.
1.2.2. Algorithms
Algorithms include:
    - Fibonacci sequence
    - Get Nth Factorial
    - Prime numbers
    - Use recursion
    - Don't use recursion

As with algorithms, you need to explain your reasoning. Also remember, linear time is always the best.

1.1. Thinking on your feet
They will ask probing questions to see your thought processes.

This is also the place where they will ask test related questions. You need to test your code by giving various inputs. Again, this is a skill that must be mastered.

2. Show and Tell
Keep in mind, interviewers expect people to lie and spout stuff.

As an example, I interviewed a person who loved saying, 'I create effective test cases'. I asked him to test a hat. (My hat was a standard baseball hat with a logo.) He couldn't think of basics such as durability, attractiveness, marketability, maintainability (easy to clean, etc.), production (material costs, labor costs, manufacturing related laws, etc.), disposal (environmental impact of its disposal, etc.), etc.

I also met people who claimed to know how to program. When questioned, they admitted they didn't know how to program.

Interviewers don't care about the past. You helped create the Internet? That was years ago, and that technology is now obsolete. Are you obsolete?

Remember: Your resume only serves to get you to the interview. After that it is useless.

So what should you do?

2.1. Show and Tell
I interviewed a man with acceptable skills. I then asked him if he published anything. He then showed me a 3-D game on his phone where you rotate objects on the screen. That proved to me he had mastered the data structures and algorithms skills the company was looking for.

If you have published something cool, show it.

2.2. Reputation
Smart recruiters will not bother with resumes. Instead they will troll professional web sites for candidates.

These sites include, but not limited to:
    1. http://stackoverflow.com/
    2. http://www.codeproject.com/
    3. http://www.codeplex.com/
    4. https://github.com/

Also remember to blog.

By publishing to these places, people can see what you are capable of and have confidence in hiring you.

3. Conclusion
  1. Your resume serves only one purpose. That is to get an interview. After that, it is useless.
  2. Regardless of your experience, if you can't answer the above questions, you will fail the technical interview.
  3. Mastering the technical interview is an essential skill. Master it and you will land your next gig.
  4. Remember - your search engine is your friend.
Finally: Share your knowledge and experience, and your reputation will skyrocket. In the world we live in, this is the best way to secure your future and earn what you are entitled to.

4. Resources

My Blogs:
Some Books:
Some sites: