Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Refactoring the Technical Interview

Mark
November 14, 2018

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
Tweet

Other Decks in Technology

Transcript

  1. MARK SIEMERS RUBYCONF 2018 THE HIGH COSTS OF BAD HIRING

    DECISIONS ▸ Time ▸ Money ▸ Resources ▸ Opportunity Cost ▸ Reputation ▸ Morale ▸ Technical Debt REFACTORING THE TECHNICAL INTERVIEW
  2. 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
  3. 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
  4. MARK SIEMERS RUBYCONF 2018 EQUIVALENT CARPENTRY INTERVIEW QUESTIONS ▸ How

    do you build a drill? REFACTORING THE TECHNICAL INTERVIEW
  5. 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
  6. 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
  7. 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???
  8. 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
  9. 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
  10. 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
  11. 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
  12. 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
  13. 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
  14. 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
  15. 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
  16. 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
  17. MARK SIEMERS RUBYCONF 2018 REFACTORING THE TECHNICAL INTERVIEW OPTIMAL FOR

    ▸ Algorithm Writers ▸ Procedure Implementers
  18. 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
  19. 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
  20. 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?
  21. 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 …
  22. MARK SIEMERS RUBYCONF 2018 REFACTORING THE TECHNICAL INTERVIEW ▸ Read

    Code ▸ Understand It ▸ Make it better JOB EXPECTATIONS
  23. MARK SIEMERS RUBYCONF 2018 REFACTORING THE TECHNICAL INTERVIEW ▸ Read

    Code ▸ Understand It ▸ Make it better JOB EXPECTATIONS JOB INTERVIEW EXPECTATIONS
  24. MARK SIEMERS RUBYCONF 2018 REFACTORING THE TECHNICAL INTERVIEW ▸ Read

    Code ▸ Understand It ▸ Make it better ▸ Read Code JOB EXPECTATIONS JOB INTERVIEW EXPECTATIONS
  25. MARK SIEMERS RUBYCONF 2018 REFACTORING THE TECHNICAL INTERVIEW ▸ Read

    Code ▸ Understand It ▸ Make it better ▸ Read Code ▸ Explain It JOB EXPECTATIONS JOB INTERVIEW EXPECTATIONS
  26. 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
  27. 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?
  28. “IT’S HARDER TO READ CODE THAN TO WRITE IT.” Joel

    Spolsky, A Fundamental Law of Programming
  29. "THE RATIO OF TIME SPENT READING VERSUS WRITING IS WELL

    OVER 10 TO 1.” Robert C. Martin, Clean Code
  30. 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
  31. 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?
  32. MARK SIEMERS RUBYCONF 2018 REFACTORING THE TECHNICAL INTERVIEW EXPLAINING CODE

    - REVIEW ▸ What is the code doing? ▸ Learn how they translate code into human understanding
  33. 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
  34. 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
  35. READ CODE. EXPLAIN IT. MAKE IT BETTER. WHAT MAKES THIS

    A NAIVE SOLUTION? HAS THIS IMPROVED?
  36. READ CODE. EXPLAIN IT. MAKE IT BETTER. ANY ISSUES WITH

    THIS SOLUTION? HAS THIS IMPROVED?
  37. READ CODE. EXPLAIN IT. MAKE IT BETTER. ANY ISSUES WITH

    THIS SOLUTION? HAS THIS IMPROVED?
  38. MARK SIEMERS RUBYCONF 2018 REFACTORING THE TECHNICAL INTERVIEW RECAP OF

    FIRST EXAMPLE - DID THEY ASK GOOD QUESTIONS ▸ About writing tests?
  39. 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.
  40. 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
  41. 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?
  42. BUT DOES IT SCALE? Jeff Bezos - Philosophy on Life

    Also credited to every anonymous Ruby hater, ever.
  43. READ CODE. EXPLAIN IT. MAKE IT BETTER. WHAT ARE SOME

    CONCERNS WITH THIS CODE? HOW DO WE MAKE IT BETTER?
  44. 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
  45. 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