Live data from Hacker News

Ask HN: Does LeetCode/HackerRank make you a better developer?

news.ycombinator.com

1–10 of 29 posts

Ask HN: Does LeetCode/HackerRank make you a better developer?

#1
I know this is question is very broad, but bear with me.

I consider myself a strong engineer. I have 14 years of experience, I'm mostly autodidact, and I can learn new stacks/technologies pretty easily.

Being an autodidact, I don't possess a degree, however I know about basic algorithms such as binary sort, quick sort, graphs etc.

Recently, I started to interview again, and some interviews require HackerRank test. Some tests are designed to evaluate a specific knowledge, say SQL or multithreaded programming, while other questions are purely algorithmic (in the style of: "find if a string is an anagram").

I don't have a problem with specific domain knowledge questions, such as SQL or multithreading. I do have a problem with purely algorithmic questions. I never used binary search, or needed to reverse a string as fast as possible, in my career.

And, sadly, I start to question my career. Do I suck at those questions because I never worked with something algorithmically hard? Do I suck at them, simply because I'm not used to solving them? Are they even good evaluation tools to understand if the candidate is suitable for the work he/she is going to perform?

So my questions is: do you think that being able to solve LeetCode/HackerRank questions (not brute forcing them, but rather understanding the underlying algorithm) help you become a better developer (rather than better at solving these types of questions), or are they, mostly, useless and it's better to build and ship software?

Re: Ask HN: Does LeetCode/HackerRank make you a better developer?

#3
I share your sentiments. I, too, have never needed to reinvent the wheel and implement my own list class in Python say instead of using the one from the std lib. And countless other similar cases and things.

That being said I think places do Algorthimic tests for two reasons:

Laziness Scale

Laziness. They choose this because they can’t be bothered to come up with a puzzle from the work and make it scoped well enough to fit an interview but also challenging enough to show the interviewer the candidates skills. So instead they have you implement some algorithm you memorized.

Or they’re lazy because they’re incompetent interviewers and use these as a proxy for IQ. If that’s the case just leave. You don’t want to work there.

Then there’s scale. Google likely gets 1000 applicants or a given role. (Maybe more by a factor of 10?) How would they filter out enough candidates before you sit for an hour with an expensive engineer? They need a way to quickly filter out a ton of folks.

So that’s scale. It’s got a bit of laziness in it. But it’s primarily about managing the number of folks looking to try for a single job.

All of that said I’m just a tardigrade in a fast chasm of space trying to take on the Death Star; there’s no way the tech firms will change their hiring ways because of some logical aren’t on my side.

And who knows? Maybe you’ll get hired at Google and then go work on the next generation of kubernetes 2.0 — the point being this is a necessary evil that stands between you and many others to get paid 500k/year.

Re: Ask HN: Does LeetCode/HackerRank make you a better developer?

#4
The short answer is, No.

> Do I suck at those questions because I never worked with something algorithmically hard?

You probably have done some algorithmically complicated things in your 14 year career. Of course someone has always done something _more_ complicated but whatever.

> Do I suck at them, simply because I'm not used to solving them?

Yes. LeetCode can be compared to the SAT or ACT in the United States. It's a standardized test where you can improve your score simply by knowing some tricks and how the test works.

> Are they even good evaluation tools to understand if the candidate is suitable for the work he/she is going to perform?

Absolutely not, unless the LeetCode questions are somehow directly related to their day-to-day job, which is in the small minority.

> do you think that being able to solve LeetCode/HackerRank questions (not brute forcing them, but rather understanding the underlying algorithm) help you become a better developer (rather than better at solving these types of questions), or are they, mostly, useless and it's better to build and ship software?

I think understanding the underlying algorithms can help one become a better software engineer. Mostly things about data structures focused on when to use one over the other, some efficient sorting algorithms, that sort. Not an obsession with Big O notation, questions with very specific algorithmic solutions such as "given a list of integers from 1-100, in a random order, and one is missing, how would you find the missing number", and the like.

But yes it's always best to build and ship software. That's supposed to be the point of learning these things in the first place. Shipping trumps everything else, always.

Re: Ask HN: Does LeetCode/HackerRank make you a better developer?

#5
Not really. You get some exposure to a few concepts that are interesting and maybe a bit understudied in school (like dynamic programming) but challenges like the Advent of Code are better at that in my opinion.

You need to understand where they come from, namely the need for a standard and reproducible way to test candidates in 4 or 5 slots of 45-60 minutes each, in companies with huge and generic hiring pipelines where any developer can be tasked to interview any candidate. Unfortunately a lot of companies have copied the practice from Google and other big companies while they would benefit from a small scale and more personal approach. I feel like today's situation is better than it was 5 years ago though, maybe the prevalence of full or mostly remote interview rounds and/or Copilot plus ChatGPT have helped make companies and teams reconsider.

Re: Ask HN: Does LeetCode/HackerRank make you a better developer?

#6
I think they make for poor evaluations, though understanding the underlying performance characteristics and limitations of common data structures and algorithms can certainly be important. That said, you'll probably need to get at least somewhat comfortable with these sorts of problems if you want to interview successfully.

FWIW, the last time I was on the job hunt, I found it quicker and more helpful to use a guided/structured refresher on common data structures and algorithms rather than to drink the firehose of random leetcode problems. I'm sure there are many options out there, but I used AlgoMonster[0] and was fairly happy with it. (I have no connection with them other than being a satisfied customer.)

[0]: https://algo.monster

Re: Ask HN: Does LeetCode/HackerRank make you a better developer?

#7
I think a good developer is composed of many things, and LeetCode/HackerRank type learning can help you become better at only a small subset of those things.

It's like trying to get your body into good shape, you need to work on different parts of the body, not just focus on your left arm (unless your left arm is especially weak and you want to focus on that).

Re: Ask HN: Does LeetCode/HackerRank make you a better developer?

#8
sure, in the same way pushups make you stronger. unless you do other exercises too, your body will not be strong. you can get strong without pushups, if they aren’t fun. being strong and staying strong should definitely be fun. in fact, it had to be. it’s the only way to sustain it.

Re: Ask HN: Does LeetCode/HackerRank make you a better developer?

#9
I think leetcode helped me quite a bit as a software developer. I was in a similar boat as you, 12+ years experience doing software. I have an electrical engineering degree (famous for being bad programmers ha!) but no CS background. I could normally hack at problems, figure things out, and get things done in different settings (Linux, embedded, web, etc).

However.. studying leetcode really helped me understand fundamentals much better. I also read some algorithm books. I feel like I have a better understanding of software in general! And it has helped my career tremendously. Just my experience, I totally understand why people don't like the interview but for me I appreciate how coding problems are at least more straightforward than other arbitrary interviews.

Post reply on HN