Share
Embed
Refactoring the Technical Interview
Is your technical interview optimized? Could it use a refactor?
Do you ask candidates questions that could actually influence your production codebase? Or, do you ask them about problems that are solved and standardized? Or worse, contrived and trivial?
Leverage your production code and commit history to make your next interview more effective in identifying the right hire. All while having more fun.
Mark
November 14, 2018
Transcript
95 slides
-
MARK SIEMERS RUBYCONF 2018 THE HIGH COSTS OF BAD HIRING
DECISIONS ▸ Time ▸ Money ▸ Resources ▸ Opportunity Cost ▸ Reputation ▸ Morale ▸ Technical Debt REFACTORING THE TECHNICAL INTERVIEW -
MARK SIEMERS RUBYCONF 2018 THE HIGH COSTS OF BAD HIRING
DECISIONS ▸ Time ▸ Money ▸ Resources ▸ Opportunity Cost ▸ Reputation ▸ Morale ▸ Technical Debt HOW MUCH IS IT COSTING YOU? REFACTORING THE TECHNICAL INTERVIEW -
DO NEW CANDIDATES WRITE CODE DURING THEIR INTERVIEW? Joel Spolsky
- The Joel Test (#11) -
MARK SIEMERS RUBYCONF 2018 ANY CODING QUESTION IS FINE, RIGHT?
▸ Find min (or max) in a list ▸ Implement reversing a string ▸ Implement a sorting algorithm ▸ FizzBuzz (not actually FizzBuzz, but any contrived algorithm) ▸ “Now can you do it recursively?” REFACTORING THE TECHNICAL INTERVIEW -
MARK SIEMERS RUBYCONF 2018 EQUIVALENT CARPENTRY INTERVIEW QUESTIONS ▸ How
do you build a drill? REFACTORING THE TECHNICAL INTERVIEW -
MARK SIEMERS RUBYCONF 2018 EQUIVALENT CARPENTRY INTERVIEW QUESTIONS ▸ How
do you build a drill? ▸ How do you build a circular saw? REFACTORING THE TECHNICAL INTERVIEW -
MARK SIEMERS RUBYCONF 2018 EQUIVALENT CARPENTRY INTERVIEW QUESTIONS ▸ How
do you build a drill? ▸ How do you build a circular saw? ▸ Imagine a structure where ▸ Every 3rd plank is birch ▸ Every 5th plank is maple ▸ If the plank is divisible by 3 and 5, it must be maple and birch ▸ how many maple/birch planks in a 3 story structure? REFACTORING THE TECHNICAL INTERVIEW -
MARK SIEMERS RUBYCONF 2018 EQUIVALENT CARPENTRY INTERVIEW QUESTIONS ▸ How
do you build a drill? ▸ How do you build a circular saw? ▸ Imagine a structure where ▸ Every 3rd plank is birch ▸ Every 5th plank is maple ▸ If the plank is divisible by 3 and 5, it must be maple and birch ▸ how many maple/birch planks in a 3 story structure? REFACTORING THE TECHNICAL INTERVIEW WTF??? -
MARK SIEMERS RUBYCONF 2018 ISSUES WITH THESE QUESTIONS (CARPENTRY) ▸
Solved ▸ Building drills and circular saws was solved long ago ▸ Standardized ▸ These tools are trustworthy and widely available ▸ Trivial ▸ Last example is an arbitrary and trivial task REFACTORING THE TECHNICAL INTERVIEW -
MARK SIEMERS RUBYCONF 2018 ISSUES WITH THESE QUESTIONS (SOFTWARE DEVELOPMENT)
REFACTORING THE TECHNICAL INTERVIEW -
MARK SIEMERS RUBYCONF 2018 ISSUES WITH THESE QUESTIONS (SOFTWARE DEVELOPMENT)
▸ Solved REFACTORING THE TECHNICAL INTERVIEW -
MARK SIEMERS RUBYCONF 2018 ISSUES WITH THESE QUESTIONS (SOFTWARE DEVELOPMENT)
▸ Solved ▸ Quicksort ~ 1959 (Pre-dates cordless electric drill by about 10 years) REFACTORING THE TECHNICAL INTERVIEW -
MARK SIEMERS RUBYCONF 2018 ISSUES WITH THESE QUESTIONS (SOFTWARE DEVELOPMENT)
▸ Solved ▸ Quicksort ~ 1959 (Pre-dates cordless electric drill by about 10 years) ▸ Merge Sort ~ 1945 (The year World War II ended) REFACTORING THE TECHNICAL INTERVIEW -
MARK SIEMERS RUBYCONF 2018 ISSUES WITH THESE QUESTIONS (SOFTWARE DEVELOPMENT)
▸ Solved ▸ Quicksort ~ 1959 (Pre-dates cordless electric drill by about 10 years) ▸ Merge Sort ~ 1945 (The year World War II ended) ▸ Radix Sort ~ 1887 (About 35 years before the electric circular saw) REFACTORING THE TECHNICAL INTERVIEW -
MARK SIEMERS RUBYCONF 2018 ISSUES WITH THESE QUESTIONS (SOFTWARE DEVELOPMENT)
▸ Solved ▸ Quicksort ~ 1959 (Pre-dates cordless electric drill by about 10 years) ▸ Merge Sort ~ 1945 (The year World War II ended) ▸ Radix Sort ~ 1887 (About 35 years before the electric circular saw) ▸ Standardized REFACTORING THE TECHNICAL INTERVIEW -
MARK SIEMERS RUBYCONF 2018 ISSUES WITH THESE QUESTIONS (SOFTWARE DEVELOPMENT)
▸ Solved ▸ Quicksort ~ 1959 (Pre-dates cordless electric drill by about 10 years) ▸ Merge Sort ~ 1945 (The year World War II ended) ▸ Radix Sort ~ 1887 (About 35 years before the electric circular saw) ▸ Standardized ▸ What language or library doesn’t have sort, max, min, reverse, etc. built in? REFACTORING THE TECHNICAL INTERVIEW -
MARK SIEMERS RUBYCONF 2018 ISSUES WITH THESE QUESTIONS (SOFTWARE DEVELOPMENT)
▸ Solved ▸ Quicksort ~ 1959 (Pre-dates cordless electric drill by about 10 years) ▸ Merge Sort ~ 1945 (The year World War II ended) ▸ Radix Sort ~ 1887 (About 35 years before the electric circular saw) ▸ Standardized ▸ What language or library doesn’t have sort, max, min, reverse, etc. built in? ▸ Studied REFACTORING THE TECHNICAL INTERVIEW -
MARK SIEMERS RUBYCONF 2018 ISSUES WITH THESE QUESTIONS (SOFTWARE DEVELOPMENT)
▸ Solved ▸ Quicksort ~ 1959 (Pre-dates cordless electric drill by about 10 years) ▸ Merge Sort ~ 1945 (The year World War II ended) ▸ Radix Sort ~ 1887 (About 35 years before the electric circular saw) ▸ Standardized ▸ What language or library doesn’t have sort, max, min, reverse, etc. built in? ▸ Studied ▸ Hundreds of publications dedicated to the coding interview REFACTORING THE TECHNICAL INTERVIEW -
MARK SIEMERS RUBYCONF 2018 ISSUES WITH THESE QUESTIONS (SOFTWARE DEVELOPMENT)
▸ Solved ▸ Quicksort ~ 1959 (Pre-dates cordless electric drill by about 10 years) ▸ Merge Sort ~ 1945 (The year World War II ended) ▸ Radix Sort ~ 1887 (About 35 years before the electric circular saw) ▸ Standardized ▸ What language or library doesn’t have sort, max, min, reverse, etc. built in? ▸ Studied ▸ Hundreds of publications dedicated to the coding interview ▸ Trivial (FizzBuzz, Bubble Sort, etc.) REFACTORING THE TECHNICAL INTERVIEW -
MARK SIEMERS RUBYCONF 2018 REFACTORING THE TECHNICAL INTERVIEW OPTIMAL FOR
▸ Algorithm Writers ▸ Procedure Implementers -
MARK SIEMERS RUBYCONF 2018 REFACTORING THE TECHNICAL INTERVIEW OPTIMAL FOR
▸ Object Architects ▸ System Designers ▸ Application Developers ▸ Many, many other roles NOT OPTIMAL FOR ▸ Algorithm Writers ▸ Procedure Implementers -
MARK SIEMERS RUBYCONF 2018 REFACTORING THE TECHNICAL INTERVIEW While the
skills on the left are valuable, Often, the skills on the right are more valuable. OPTIMAL FOR ▸ Object Architects ▸ System Designers ▸ Application Developers ▸ Many, many other roles NOT OPTIMAL FOR ▸ Algorithm Writers ▸ Procedure Implementers -
MARK SIEMERS RUBYCONF 2018 REFACTORING THE TECHNICAL INTERVIEW TWO QUESTION
LITMUS TEST FOR YOUR INTERVIEW -
MARK SIEMERS RUBYCONF 2018 REFACTORING THE TECHNICAL INTERVIEW TWO QUESTION
LITMUS TEST FOR YOUR INTERVIEW ▸ Would you be happy or upset/confused if someone did this on the job? ▸ What if someone actually implemented bubble sort on the job? FizzBuzz? -
MARK SIEMERS RUBYCONF 2018 REFACTORING THE TECHNICAL INTERVIEW TWO QUESTION
LITMUS TEST FOR YOUR INTERVIEW ▸ Would you be happy or upset/confused if someone did this on the job? ▸ What if someone actually implemented bubble sort on the job? FizzBuzz? ▸ Which book would best prepare someone for your interview … -
WHAT IF I STILL NEED AN ALGORITHM WRITER? OR I’M
NOT SURE OF THE RIGHT BALANCE? -
WHAT IS THE POINT OF AN INTERVIEW? TO SEE IF
SOMEONE CAN DO THE JOB -
MARK SIEMERS RUBYCONF 2018 REFACTORING THE TECHNICAL INTERVIEW ▸ Read
Code JOB EXPECTATIONS -
MARK SIEMERS RUBYCONF 2018 REFACTORING THE TECHNICAL INTERVIEW ▸ Read
Code ▸ Understand It JOB EXPECTATIONS -
MARK SIEMERS RUBYCONF 2018 REFACTORING THE TECHNICAL INTERVIEW ▸ Read
Code ▸ Understand It ▸ Make it better JOB EXPECTATIONS -
MARK SIEMERS RUBYCONF 2018 REFACTORING THE TECHNICAL INTERVIEW ▸ Read
Code ▸ Understand It ▸ Make it better JOB EXPECTATIONS JOB INTERVIEW EXPECTATIONS -
MARK SIEMERS RUBYCONF 2018 REFACTORING THE TECHNICAL INTERVIEW ▸ Read
Code ▸ Understand It ▸ Make it better ▸ Read Code JOB EXPECTATIONS JOB INTERVIEW EXPECTATIONS -
MARK SIEMERS RUBYCONF 2018 REFACTORING THE TECHNICAL INTERVIEW ▸ Read
Code ▸ Understand It ▸ Make it better ▸ Read Code ▸ Explain It JOB EXPECTATIONS JOB INTERVIEW EXPECTATIONS -
MARK SIEMERS RUBYCONF 2018 REFACTORING THE TECHNICAL INTERVIEW ▸ Read
Code ▸ Understand It ▸ Make it better ▸ Read Code ▸ Explain It ▸ Make it better JOB EXPECTATIONS JOB INTERVIEW EXPECTATIONS -
MARK SIEMERS RUBYCONF 2018 REFACTORING THE TECHNICAL INTERVIEW ▸ Read
Code ▸ Understand It ▸ Make it better ▸ Read Code ▸ Explain It ▸ Make it better JOB EXPECTATIONS JOB INTERVIEW EXPECTATIONS What about writing new code? -
“IT’S HARDER TO READ CODE THAN TO WRITE IT.” Joel
Spolsky, A Fundamental Law of Programming -
"THE RATIO OF TIME SPENT READING VERSUS WRITING IS WELL
OVER 10 TO 1.” Robert C. Martin, Clean Code -
MARK SIEMERS RUBYCONF 2018 REFACTORING THE TECHNICAL INTERVIEW READING CODE
VS WRITING CODE ▸ Do you want to ask about the part of the job that is: ▸ 90% of the technical work and more difficult ▸ 10% of the technical work and easier -
MARK SIEMERS RUBYCONF 2018 REFACTORING THE TECHNICAL INTERVIEW READING CODE
VS WRITING CODE ▸ Do you want to ask about the part of the job that is: ▸ 90% of the technical work and more difficult ▸ 10% of the technical work and easier ▸ Even with “new” code on the job, do you expect: ▸ Starting from scratch without referencing any other code? ▸ Referencing examples and applying them to the problem at hand? -
READ CODE. EXPLAIN IT. MAKE IT BETTER. ‘ORDER’ AND ‘SORT_BY’
- IS THERE A DIFFERENCE? -
READ CODE. EXPLAIN IT. MAKE IT BETTER. WHY THE ‘TO_S’?
WHY THE ‘TO_I’ -
MARK SIEMERS RUBYCONF 2018 REFACTORING THE TECHNICAL INTERVIEW EXPLAINING CODE
- REVIEW ▸ What is the code doing? ▸ Learn how they translate code into human understanding -
MARK SIEMERS RUBYCONF 2018 REFACTORING THE TECHNICAL INTERVIEW EXPLAINING CODE
- REVIEW ▸ What is the code doing? ▸ Learn how they translate code into human understanding ▸ Explain the differences between ‘order’ and ‘sort_by’ ▸ Depth of knowledge of tools used on the job ▸ Do they consider tradeoffs and the potential for breaking things -
MARK SIEMERS RUBYCONF 2018 REFACTORING THE TECHNICAL INTERVIEW EXPLAINING CODE
- REVIEW ▸ What is the code doing? ▸ Learn how they translate code into human understanding ▸ Explain the differences between ‘order’ and ‘sort_by’ ▸ Depth of knowledge of tools used on the job ▸ Do they consider tradeoffs and the potential for breaking things ▸ Why the ternary? Why the ‘to_s’? ▸ Knowledge of the language’s treatment of operations on different types -
READ CODE. EXPLAIN IT. MAKE IT BETTER. HAS THIS IMPROVED?
IS IT MORE READABLE? -
READ CODE. EXPLAIN IT. MAKE IT BETTER. WHAT MAKES THIS
A NAIVE SOLUTION? HAS THIS IMPROVED? -
READ CODE. EXPLAIN IT. MAKE IT BETTER. ANY ISSUES WITH
THIS SOLUTION? HAS THIS IMPROVED? -
READ CODE. EXPLAIN IT. MAKE IT BETTER. ANY ISSUES WITH
THIS SOLUTION? HAS THIS IMPROVED? -
MARK SIEMERS RUBYCONF 2018 REFACTORING THE TECHNICAL INTERVIEW RECAP OF
FIRST EXAMPLE - DID THEY ASK GOOD QUESTIONS -
MARK SIEMERS RUBYCONF 2018 REFACTORING THE TECHNICAL INTERVIEW RECAP OF
FIRST EXAMPLE - DID THEY ASK GOOD QUESTIONS ▸ About writing tests? -
MARK SIEMERS RUBYCONF 2018 REFACTORING THE TECHNICAL INTERVIEW RECAP OF
FIRST EXAMPLE - DID THEY ASK GOOD QUESTIONS ▸ About writing tests? ▸ About the database? ▸ Foreign key constraints, Indexing, Postgres vs MySQL, etc. -
MARK SIEMERS RUBYCONF 2018 REFACTORING THE TECHNICAL INTERVIEW RECAP OF
FIRST EXAMPLE - DID THEY ASK GOOD QUESTIONS ▸ About writing tests? ▸ About the database? ▸ Foreign key constraints, Indexing, Postgres vs MySQL, etc. ▸ About Rails version and Ruby version -
MARK SIEMERS RUBYCONF 2018 REFACTORING THE TECHNICAL INTERVIEW RECAP OF
FIRST EXAMPLE - DID THEY ASK GOOD QUESTIONS ▸ About writing tests? ▸ About the database? ▸ Foreign key constraints, Indexing, Postgres vs MySQL, etc. ▸ About Rails version and Ruby version ▸ About commit messages or reasons behind the initial implementation? -
BUT DOES IT SCALE? Jeff Bezos - Philosophy on Life
Also credited to every anonymous Ruby hater, ever. -
READ CODE. EXPLAIN IT. MAKE IT BETTER. WHAT ARE SOME
CONCERNS WITH THIS CODE? HOW DO WE MAKE IT BETTER? -
MARK SIEMERS RUBYCONF 2018 CURATING YOUR OWN INTERVIEW QUESTIONS ▸
When doing a bug fix or code refactor, save a gist/snippet of before and after with notes ▸ Or search commit history ▸ Pull a ticket from your current sprint ▸ Run a churn vs complexity report or flog score REFACTORING THE TECHNICAL INTERVIEW -
MARK SIEMERS RUBYCONF 2018 REFACTORING THE TECHNICAL INTERVIEW USE OPEN
SOURCE REPOSITORIES ▸ Use Open Source Repositories ▸ Ruby - 539k Repos ▸ Crystal - 908 Repos ▸ C - 197k Repos ▸ Python - 517k Repos ▸ C# - 173k Repos ▸ Elixir - 3k Repos ▸ JavaScript - 749k Repos ▸ Java - 753k Repos ▸ Objective-J - 443 Repos