Brad Swerdfeger – April 24, 2009 TECHNICAL INTERVIEWS.

Post on 16-Dec-2015

217 views 0 download

Tags:

Transcript of Brad Swerdfeger – April 24, 2009 TECHNICAL INTERVIEWS.

Brad Swerdfeger – April 24, 2009

TECHNICAL INTERVIEWS

Why do you care?Interviewing method for premiere tech

companies.MicrosoftGoogleApple

If you go into industry, you should be prepared.

The questions are challenging and fun!

Disclaimer

I’m not saying that this is how companies should interview people, but rather how they do interview people.

Hopefully this is helpful if you do get an interview.

OutlineHistoryTypes of InterviewsProblems & Techniques/Tips

BehaviouralProgrammingDesignLogic & Geometry‘Impossible’ Questions

My experience @ MicrosoftSuggested Reading

History1957: William Shockley

Helped invent the transistor (Bell Labs)Big Idea: Build transistors with siliconInterviewing Jim Gibbons (Stanford PhD.)

Pulls out a stopwatch There’s a tennis tournament with one-hundred and

twenty-seven players...

Rationale:Tonnes of reasons for and against. We can talk

about them later.It’s about avoiding False PositivesFor now, what matters is that you survive.

Types of Interviews@ Microsoft, but captures the gist:

Software DeveloperProgramming problems

Program ManagerDesign/Behavioural problemsWill have to code something

Software Dev/TestProgramming problems

Interested in boundary conditions/special cases.

ProblemsBehaviouralProgrammingDesignLogic & Geometry‘Impossible’ Questions

Behavioural ProblemsYour typical HR questions but with a twist.“Tell me a time when...”Shows that you’ve thought about and learned

from past experiences.Examples:

Tell me about a difficult decision you've made in the last year.

Give me an example of when you showed initiative and took the lead.

Give me an example of a time when you motivated others.

Tips for Behavioural ProblemsGet a list of questions and write out

answers to them beforehand!Not for memorization.To make you think and give you a repertoire of

experiences.Failed experiences:

Make sure you talk about:What went wrong and why.What you learned.What you would do differently.

Don’t be hypothetical. Be concrete.

ProblemsBehaviouralProgrammingDesignLogic & Geometry‘Impossible’ Questions

Programming Problems

The meat of a developer interview.Can code in any language

Interviewer may insist on one that is on your resume

Likely that pseudo-code is fine.Concerned about:

What clarification questions you askHow you go about solving the problem

Planning/Implementation/Testing/IterationYour thought process

Programming ProblemsLinked ListsTrees/GraphsArrays and Strings

RecursionConcurrencyOO ProgrammingDatabasesOther

Example Problems: Linked ListsImplement a stack in C using a linked list

Tests basic understanding of pointers

Maintain a linked list tail pointerTests handling of special cases

Mth-to-last element of a linked list

Cycle detection

Example Problems: Linked Lists

Example Problems: Trees/Graphs

Preorder TraversalTests knowledge of recursion.

Now with no recursion...

Lowest Common AncestorTests knowledge of simple data structures

Example Problems: Arrays/StringsFind the first non-repeated character.

Tests knowledge of data structures and code optimization.

Remove specified charactersReverse words

piglet quantum -> quantum pigletTests pointer manipulation

Integer/String conversionsTests knowledge of data representation, math

tricks.

Tips for Programming ProblemsAsk clarification questionsVocalizeCome up with multiple answers – trade-offs.Start off with an example and discuss solution in

terms of example. Then move to general case.Write pseudo-code first!Discuss complexity

TimeSpace

TEST your solution.Don’t forget boundary cases.

ProblemsBehaviouralProgrammingDesignLogic & Geometry‘Impossible’ Questions

Design ProblemsMeat of Program Manager or User

Experience interviews.Design a...Concerned with:

CreativityFeature prioritization/trade-offsDesign process knowledgeCustomer/End User advocacySalesmanshipDesign Rationale

Design Problem ExamplesDesign Bill Gates’ washroomDesign a 21st century...

FridgeParking meterKitchen timer<Insert Consumer Electronic>

Design a spice rack for a blind personHow would you explain Excel to your

grandmother?

Design Problem TipsASK QUESTIONS!Always consider the user.

Who are they?What do they do?What do they like?

Think of the customer vs. the end userHow can you save the customer money?

Be good at drawing on a whiteboard.Stick to your guns!Stay simple and elegant.

ProblemsBehaviouralProgrammingDesignLogic & Geometry‘Impossible’ Questions

Logic & Geometry QuestionsMost controversial.Makes you:

Question assumptionsThink creativelyThink logically to the point where it’s

inhumane.Tests intelligence?

Or just ability to solve logic puzzles...Either way, you need to learn how to solve them,

just in case.

Logic Puzzle TypesSpatial ReasoningProbabilityMeasuringComputer Science – Disguised!Recursive ThinkingRiver/Bridge CrossingChase QuestionsSo many more...

Logic Puzzle Examples

I could spend hours giving examples and solution techniques.Ian’s UDLS redux?Future UDLS?

Here are a few...

Logic Puzzle ExamplesFour people must cross a rickety footbridge at night.

Many planks are missing, and the bridge can hold only two people at a time (any more than two, and the bridge collapses). The travelers must use a flashlight to guide their steps; otherwise they're sure to step through a missing space and fall to their death. There is only one flashlight. The four people each travel at different speeds. Adam can cross the bridge in one minute; Larry in two minutes; Edge takes five minutes; and the slowest person, Bono, needs ten minutes. The bridge is going to collapse in exactly seventeen minutes. How can all four people cross the bridge?

Logic Puzzle ExamplesYou have b boxes and n dollar bills. Seal the money

in the boxes so that, without thereafter opening any box, you can give someone any requested whole amount of dollars, from 0 to n. What are the restrictions on b and n?

You have 26 constants, labelled A through Z. Let A equal 1. The other constants have values equal to the letter's position in the alphabet, raised to the power of the previous constant. That means that B (the second letter) = 2A = 21 = 2. C = 3B = 32 = 9, and so on. Find the exact numerical value for this expression:

(X-A) * (X-B) * (X-C) * ... (X-Y)*(X-Z)

Logic Puzzle Examples

There are four dogs, each at a corner of a large square. Each of the dogs begins chasing the dog clockwise from it. All of the dogs run at the same speed. All continuously adjust their direction so that they are always heading straight toward their clockwise neighbour. How long does it take for the dogs to catch each other? Where does this happen?

Logic Puzzle Examples (my fav)

Every man in a village of fifty couples has been unfaithful to his wife. Every woman in the village instantly knows when a man other than her husband has philandered (you know how small towns are) but not when her own husband has ("always the last to know"). The village's no tolerance adultery statute requires that a woman who can prove her husband is unfaithful must kill him that very day. No woman would dream of disobeying this law. One day, the queen, who is known to be infallible, visits the village. She announces that at least one husband has been unfaithful. What happens?

Logic Puzzle Examples

You have five jars of pills. All the pills in one jar only are "contaminated." The only way to tell which pills are contaminated is by weight. A regular pill weighs 10 grams; a contaminated pill is 9 grams. You are given a scale and allowed to make just one measurement with it How do you tell which jar is contaminated?

Tips for Logic PuzzlesRead lots of examples and lots of solutions.

Try to figure them out firstClassify types of questions.Question assumptions.Other tips:

1. Decide what kind of answer is expected. (Monologue vs. Dialogue).

2. Whatever you think of first is wrong.3. Forget you ever learned calculus.4. Big questions usually have simple answers.5. Simple questions demand complicated answers.6. Perfectly logical beings are not like you and me.7. Reason about disjunctions.

ProblemsBehaviouralProgrammingDesignLogic & Geometry‘Impossible’ Questions

‘Impossible Questions’Designed to overwhelm you.Tests for:

PerseveranceComposureProblem solving skills

Small, manageable steps

You don’t have to get the right answer!Just be intelligent during your reasoning

process.

‘Impossible Question’ ExamplesHow long would it take to move Mount Fuji?How much water flows through the Mississippi

River annually?How many gas stations are there in the United

States?If you could remove any state, which one would

you remove?How would you locate a specific book in a big

library? There's no cataloguing system and no librarian to help you.

How do they make M&Ms?

‘Impossible Question’ Tips

Don’t panic!Attack the problem methodically.Strike up a dialogue with the interviewer.Practice making ‘back of the envelope’

estimates.E.g. How many hours does a grad student

spend working on their thesis in two year?Be strictly rational.

General Interview TipsBe yourself.*Take suggestions from interviewers*Ask questions!Realize that your interviewers were in your

shoes before.They’re just people. Smart people who want

to hire you.Speak assertively and confidently.Be self-critical, but not too much.Don’t be arrogant!

My Experience at MicrosoftSent resume to campus recruiter.Got invited for phone interview.30 minute interview with

design/programming questions.~3 weeks later, invitation to fly to

Redmond.Asked about career objectives~3 weeks after that, was in Redmond.

Trip to Microsoft CampusAll expenses paid!35 minute flight to Seattle.Rented a car for me.Swanky hotel room.

King sized bedHD TV$75 a day for meals (room service!)Paid long distance calls

Interview DayNight before – impossible to sleep.Day off – drank a shitload of coffee, had a big

breakfast and drove to campus.Did a practice run driving there the night before.

Building 19 is SWEET.Played with the MS Surface with other interview

candidates to break some tension and kill some nerves.

Met with a recruiter.Briefed me about the day.

InterviewsInterviewed for a PM position with Office.Do between 3 and 5

If you do 3, you didn’t get the job.I did 5:

1. Outlook PM 12. Outlook PM 23. Sharepoint PM 24. Sharepoint GPM (Hiring manager)5. Enterprise Search GPM (Objective

viewpoint)

Interview 1Really, super nice guy.

Been there 3 years, serious number of patents.

Q1: What do you know about the PM position?

Q2: Write a program to solve Boggle.Q3: Design a kitchen timer that times

multiple things.

Went well, gave me lots of tips.

Boggle

Interview 2PM 2 with Outlook.Designs the location of buttons/menu items.

Q1: Tell me about yourself (I couldn’t print your resume).

Q2: Why PM and not Usability Designer?Q3: Design a 21st century parking meter for

the city of Vancouver

Went OK... But she was merciless with design.

Interview 3Sharepoint PM 2 (~90 minutes)Really nice Irish guy.

Q1: Tell me about your experiences working on a team.

Q2: Design a 21st century fridge.

Went out to lunch with himAsked him all about Sharepoint.

Interview 4 Group Program Manager (Sharepoint)

CRAZY nice guy. I want to work for him.

Q1: Tell me about yourself. Q2: (puts code on board) – it was a recursive formulation of

the Fibonacci sequence in C. Trace it. Make it iterative . How else could you do this?

Q3: Design an alarm clock for a college student. Q4: Give me 3 things you hate about Office and how would

you make them better? Q5: Sell me something cool (now something else)

What’s the next feature for that? And the next?

Interview 5Group Program Manager @ Enterprise Search

Really philosophical dudeOffice was really Feng Shui (Banzai trees ...)

Q1: Why software?Q2: Why PM and not Usability Designer?Q3: How would you explain how the internet

works to your grandmother?Q4: TiVo wants to break into the car market.

You are a PM for TiVo, design a product.Spent 2 hours on this!

Conclusion

It was a long freaking day, but I’m glad that I did it.

Suggested ReadingMUST READ:

How would you move Mount Fuji? – William Poundstone

Programming Interviews Exposed -- John Mongan, Noah Suojanen, Eric Giguère

PMsThe Art of Program Management – Scott BerkunThe Design of Everyday Things – Donald Norman

Developers:Programming Pearls – Jon BentleyProbably more... I was interviewing for PM.

Thanks!