How to Conduct an Algorithms Interview

Jay Wengrow’s article “How to Conduct an Algorithms Interview” leads off the August issue of PragPub. It starts out like this:

By the time you read this article, my book A Common-Sense Guide to Data Structures and Algorithms will either be in print or be going to print shortly. While the book aims to demonstrate the power these concepts can provide in everyday programming, I suspect that a fair percentage of people who buy the book will do so to help prepare for technical programming interviews. (I even list that as one of the book’s benefits in the introduction.)

Yet, there’s an irony here that simply cannot be ignored: I just authored a book on algorithms, yet I’m certain I’d fail plenty of whiteboarding and algorithm-based interviews. How can this be? If someone understands data structures and algorithms, how could such a person fail an interview that quizzes that person on these topics?

This reveals the big flaw with our interviewing system: There is not one, but two distinct skillsets at play here. The first skillset is the ability to reason about algorithms. The second skillset is the ability to succeed at an algorithm interview. And while these two skillsets may have a little overlap, they are actually very different skillsets.

The ability to reason about algorithms is the ability to understand an algorithm’s efficiency in terms of time and space — that is, how fast does it run and how much memory does it consume. The ability to succeed at algorithm interviews, however, involves many other things, including prior knowledge of certain algorithms and data structures that may have no practical application other than on technical interviews.

I recently showed someone the various books on the market that have titles along the lines of, “How To Succeed At Programming Interviews,” and his response was on the mark. He said, “Shouldn’t the book be called, ‘How To Program?’” From the fact that there are specific books on how to succeed at programming interviews, that clearly reveals that interviewing to become a programmer has little correlation to what programmers actually do.

There’s been a lot of debate on this topic over the years. Proponents of algorithm-based interviews believe that such interviews can reveal much about the candidate’s thought process, as well as reveal their aptitude for writing efficient code. I can appreciate that, but I believe that such an interview has to be conducted correctly to properly achieve those results….

Jay Wengrow is the founder and CEO of Actualize, and the author of A Common-Sense Guide to Data Structures and Algorithms.

The August issue of PragPub is on sale now at The Prose Garden. Two measly bucks. Twenty for an entire year.

Functional Programming: A PragPub Anthology

My functional programming book is now on sale!

Explore functional thinking and functional style and idioms across different languages, through these articles drawn from PragPub magazine, plus articles written specifically for this book. Led by expert guides, you’ll discover the distinct strengths and approaches of Clojure, Elixir, Haskell, Scala, and Swift and learn which best suits your needs.

Get it here.

Chris Crawford vs. the Dragon

In the July issue of PragPub:

Chris Crawford was at one point the best-known computer game developer on the planet. That was back when he was training game developers at Atari under Alan Kay, launching and running the Game Developers Conference, editing and writing much of The Journal of Computer Game Design, writing The Art of Computer Game Design, and collecting royalties on best-selling games like Balance of Power.

Then one day he gave a famous speech that ended with his drawing a sword and running out of the room shouting “Charge!” and never returning. He was off to fight the dragon. From that point on he dedicated himself to the quixotic quest to create a new kind of computer game, a new approach that didn’t glorify combat and small-muscle skills, that was built around realistic human emotions and interactions.

He’s still at it, and he recently released a tool that he thinks might be a key component of that new kind of software. It’s an editor for character interactions. It’s fun to play with, and it suggests interesting applications. Chris sees his new kind of game as more than entertainment: it’s interactive storytelling, it’s sales training, it’s a new category of software. Or it will be, if he manages to slay that dragon. This month we report on his quest and this new tool for editing interactions.

Also in this fat July issue of PragPub are an entertaining and rich essay on floating-point gotchas by Jim Bonang, the final wrap-up of Mark Pearl’s series on Mob Programming, the latest in Venkat Subramaniam’s series on refactoring to functional style in Java 8 (this time focusing on the Execute Around Method pattern), and Erica Sadun on new capabilities and tricks in Swift.

Of course columnists Marcus Blankenship, Johanna Rothman, Antonio Cangiano, and John Shade contribute to the issue, your editor shares some tech news, and there’s a bit of advice on writing from Derek Sivers.

I hope you enjoy it!