Algorithms are fun... I guess?
Something happened to me last week I didn’t expect: I enjoyed working my way through algorithms.
You may find me overly dramatic, but remember, I’m from the art world. “Algorithm” is a fancy term to describe the act of painting rectangles of colour in a specific pattern.
As for the past five years, I’ve hated algorithmic coding tests with a passion. Let me explain why.
Five years ago, fresh out of my coding bootcamp, I was interviewing with an analytics company. Two 20-year old engineers asked me to explain how I would parse coordinates to find a restaurant without throttling the database. And they asked me to do this on a ✨whiteboard✨.
Ten (embarassing) minutes later, I started seeing annoyed frowns and eyes checking watches every 30 seconds. The only thing that came out of this interview was my undying hatred for companies asking people to solve algorithms on whiteboards. Or so I thought until now.
A few weeks ago, a company told me there would be some algorithmic work in the upcoming test.
So I did what I had to do. I went to codewars and practiced coding katas. A first, I was reluctant (please read “grumbling”), but then, I kinda liked it?
The hidden pleasures of algorithms
Here’s what I liked about working on algorithms:
- Well-defined scopes.
- Complex business rules.
- Real-life use cases (like transposing RGBs to HEX values).
- The process of learning the rules, making sense of them, researching, and writing a lovely solution.
It’s the perfect rabbit hole!
I was so surprised about liking working on algorithms that I wondered why I had hated them for so long.
One of my hunches is that companies DO NOT leverage the real potential for algorithms in their technical tests. Most companies look for:
- Static knowledge: “How much do you know about this topic now.”
- Speed: “Can you implement a binary search in Ruby in less than 15 minutes.”
Are these data points ever useful in someone’s career? I don’t know. What I know, though, is that companies miss a lot by wearing such blinders.
Here what I would look for instead:
- What is the thought process of the candidate?
- How does someone organize their work? Pen and paper, whiteboard, in their mind?
- Do they know how to backfill their existing knowledge?
- How do they communicate while working? Do they talk? Do they write? Do they share asynchronously?
- Is the result promising?
- Do they treat everyone the same? Meaning: are they talking more to men than women?
Eventually, the technical test I was preparing for did not involve any crazy algorithms, just uncovering some nasty querying problems.
Nina Torgunakova from Evil Martians wrote about her experience coding algorithms on leetcode for a year. Her post is much more in depth and has convinced me of trying this out myself.
Cheers,
Rémi - @remi@ruby.social
ps: The third part on this mini-series, Technical tests in 2023: were they any good?, is live.