[Links] Interview questions

This time, it’s about interview questions. I’m essentially sharing links to good interview material that can be used by candidates and interviewers. Don’t miss the last one, as itÔÇÖs very special.

1. What Great .NET Developers Ought To Know

http://www.hanselman.com/blog/WhatGreatNETDevelopersOughtToKnowMoreNETInterviewQuestions.aspx

As usual, a link to Scott Hanselman’s blog. You should definitely check all the questions, here are a few:

What is strong-typing versus weak-typing? Which is preferred? Why?

Describe the difference between Interface-oriented, Object-oriented and Aspect-oriented programming.

Conceptually, what is the difference between early-binding and late-binding?

How is a strongly-named assembly different from one that isnÔÇÖt strongly-named?

How does the generational garbage collector in the .NET CLR manage object lifetime? What is non-deterministic finalization?

Contrast OOP and SOA. What are tenets of each?

What is the difference between a Debug and Release build? Is there a significant speed difference? Why or why not?

Does JITting occur per-assembly or per-method? How does this affect the working set?

Contrast the use of an abstract base class against an interface?

How would one do a deep copy in .NET?

Explain current thinking around IClonable.

What is boxing?

Is string a value type or a reference type?

2. New Interview Questions for Senior Software Engineers

http://www.hanselman.com/blog/NewInterviewQuestionsForSeniorSoftwareEngineers.aspx

And… another link to Scott Hanselman’s blog. But this time it’s not .NET related.

What is SOLID?

Why is the Single Responsibility Principle important?

What is Inversion of Control? How does that relate to dependency injection?

How does a 3 tier application differ from a 2 tier one?

What is the Repository pattern? The Factory Pattern? Why are patterns important?

What are some examples of anti-patterns?

How do the MVP, MVC, and MVVM patterns relate? When are they appropriate?

Explain the concept of Separation of Concerns and it’s pros and cons.

Explain the differences between stateless and stateful systems, and impacts of state on parallelism.

Discuss the concept of YAGNI and explain something you did recently that adhered to this practice.

What do you do to stay abreast of the latest technologies and tools?

Tell me about 3 times you failed.

What elements of OO design are most prone to abuse? How would you mitigate that?

3. Google Interview Questions: Software Engineer

http://www.impactinterview.com/2009/10/140-google-interview-questions/#software_engineer

This is a link to Impact Interview, it’s an interview coaching site. They have a huge page on Google interviews.

Google is known to ask riddle like questions:

Why are manhole covers round?

You have eight balls all of the same size. 7 of them weigh the same, and one of them weighs slightly more. How can you fine the ball that is heavier by using a balance and only two weighings?

You need to check that your friend, Bob, has your correct phone number, but you cannot ask him directly. You must write a the question on a card which and give it to Eve who will take the card to Bob and return the answer to you. What must you write on the card, besides the question, to ensure Bob can encode the message so that Eve cannot read your phone number?

A man pushed his car to a hotel and lost his fortune. What happened?

They also ask standard programming questions:

What is the difference between a mutex and a semaphore?

Describe the algorithm for a depth-first graph traversal.

What is multithreaded programming? What is a deadlock?

If you have 1 million integers, how would you sort them efficiently? (modify a specific sorting algorithm to solve this)

Write some code to reverse a string.

Write some code to find all permutations of the letters in a particular string.

Finally, they ask to solve a concrete problem:

Given a function which produces a random integer in the range 1 to 5, write a function which produces a random integer in the range 1 to 7.

Design a class library for writing card games.

Design the SQL database tables for a car rental database.

Design an algorithm to play a game of Frogger and then code the solution. The object of the game is to direct a frog to avoid cars while crossing a busy road. You may represent a road lane via an array. Generalize the solution for an N-lane road.

Design a 2D dungeon crawling game. It must allow for various items in the maze ÔÇô walls, objects, and computer-controlled characters. (The focus was on the class structures, and how to optimize the experience for the user as s/he travels through the dungeon.)

4. Programmer Competency Matrix

http://sijinjoseph.com/programmer-competency-matrix/

Here is something I’ve been using for a long time when I needed to conduct an interview.

It’s a table that helps interviewers to grade candidates from 0 to 3 on various skills.

Here is the “data structures” row:

Level 0: DoesnÔÇÖt know the difference between Array and LinkedList

Level 1: Able to explain and use Arrays, LinkedLists, Dictionaries etc in practical programming tasks

Level 2: Knows space and time tradeoffs of the basic data structures, Arrays vs LinkedLists, Able to explain how hashtables can be implemented and can handle collisions, Priority queues and ways to implement them etc.

Level 3: Knowledge of advanced data structures like B-trees, binomial and fibonacci heaps, AVL/Red Black trees, Splay Trees, Skip Lists, tries etc.

And this is the “algorithms” row:

Level 0: Unable to find the average of numbers in an array (ItÔÇÖs hard to believe but IÔÇÖve interviewed such candidates)

Level 1: Basic sorting, searching and data structure traversal and retrieval algorithms

Level 2: Tree, Graph, simple greedy and divide and conquer algorithms, is able to understand the relevance of the levels of this matrix.

Level 3: Able to recognize and code dynamic programming solutions, good knowledge of graph algorithms, good knowledge of numerical computation algorithms, able to identify NP problems etc.

5. The Five Essential Phone-Screen Questions

https://sites.google.com/site/steveyegge2/five-essential-phone-screen-questions

This comes from Steve Yegge’s blog, while he was working at Amazon. It’s a long article, but everything is interesting.

Here are a few examples:

Write a function to reverse a string.

Write function to compute Nth fibonacci number.

Format an RGB value (three 1-byte numbers) as a 6-digit hexadecimal string.

Design a deck of cards that can be used for different card game applications.

Create a class design to represent a filesystem.

What are some really common data structures, e.g. in java.util?

When would you use a linked list vs. a vector?

Can you implement a Map with a tree? What about with a list?

Tell me how to test whether the high-order bit is set in a byte.

Write a function to count all the bits in an int value; e.g. the function with the signature int countBits(int x)

This article also contains good analysis on candidatesÔÇÖ profiles:

This is where most candidates fail with OO. They can recite the textbook definitions, and then go on to produce certifiably insane class designs for simple problems.

In my experience, a programmer who only knows one language (where C and C++ count as one language for this exercise) is usually completely lost in one of these Five Essential Areas.

SDE candidates need to demonstrate a basic understanding of the most common data structures, and of the fundamentals of “big-O” algorithmic complexity analysis.

6. Questions I’m asking in interviews

http://jvns.ca/blog/2013/12/30/questions-im-asking-in-interviews/

This one is by Julia Evans. It’s the opposite of the previous articles: instead of listing the questions asked to the candidates, she listed the question she asks to the interviewers.

Here are a few examples:

Can you give me an example of someone whoÔÇÖs been in a technical role at your company for a long time, and how their responsibilities and role have changed?

How are disagreements solved - both technical disagreements and other kinds? What happens when personalities clash?

How many hours do people work in an average week? In your busiest weeks?

What is your turnover rate like? How many devs were hired last year and how many left?

Do you cover travel to conferences? How many conferences a year do devs typically go to?

How do you determine if someone is a poor fit for your company?

Can you tell me about how the interview process is structured? How many interviews are there?

How often do you offer above asking? Can I speak with someone who got such an offer?

What do you wish you had known when you joined this company?

WhatÔÇÖs the single biggest issue or problem facing the team/department/company?ÔÇØ WhatÔÇÖs currently being done to address it?