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?
> 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.
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.
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).
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.
So 1) don't feel bad. it's just like a muscle you don't normally exercise. Start exercising it and you will get better. 2) accept that this is part of our shifty industry - it is what it is. It's pretty dumb but you will have to go through this hazing ritual every time you get a new job.
That said, writing more code and solving harder problems is what makes you a better developer - so if leetcode is what gets you to do that then it will probably have the desired effect
I've been a professional programmer for a long time. My opinion is that what we mostly do is more akin to plumbing than "engineering". When we say "complex" we mean DAGs, CI/CD pipelines, a self-healing K8s setups, and so on. But this stuff -- at least in my opinion -- just isn't very hard, not in the way that a fancy video game, a robotics control system or a sophisticated compiler can be.
Computer science and mathematics applied to coding and internalised in your practice will not merely make you a better developer, it will put you on another level; you won't see code the same ever again.
Finally, I'd suggest that solving puzzles is more indicative of what you already know rather than a good way to acquire new knowledge.
Onto your question, the answer is yes, very much yes. Solving puzzles indeed makes you stronger. It exercises your brain exactly like lifting weights exercises your muscles. Almost any skill can be trained the same way; there are chess puzzles, writing "puzzles", acting "puzzles", even musicians have certain "puzzles" they hone their techniques on (e.g Segovia scales).
I don't know why puzzles have such a bad rep on Hacker News. It may be a case of sour grapes. Like you see a jacked dude and you think "Eh, easy with steroids!" or "Yeah, but does he know basic arithmetic?" Cause admitting that he spent countless hours in the gym while you (like me) spent countless hours watching movies and eating chocolate is a too big of a blow to your confidence.
Apparently some dude didn't land a job with Google because he couldn't invert a binary tree. So he thought it was useless. I looked it up (https://leetcode.com/problems/invert-binary-tree/) and had a laugh. Because the solution was readily obvious and required no more than three lines of Python.
I myself though implemented BFS once for a factory which planned tight supply for scheduled orders. That was it. Highest CS I ever needed.
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
Being aware and understanding what it does is enough, like in “it does x in log” or “it does x in nlogn with these caveats”. I’d never try to reinvent/reimplement any of it and would object if anyone tried. Because it’s trivial to screw up an edge case, and given the amount of screw ups in plain dumb code… I don’t believe anyone who claims they could do it in the wild. It must be an academic setting, not a regular company at least.
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
i have come to the conclusion it is a mechanism for veiled discrimination and for testing how much effort you put into “preparing” for an interview… which makes no sense because you have been “preparing” for 14 years.
the hiring process needs to be fixed so it prioritizes other things but unfortunately it seems we are stuck with it for now. myself i have no patience to deal with arrogant engineers who think i should be able to answer their cute trivia question or be the fastest developer in the west to implement binary search.
Most HN posts are way technical for me, but there's a lot of other good tech news on here.
I'm interviewing now and I feel like I chose the wrong career because leetcode is a requirement everywhere. I graduated 10 years ago and didn't even know what leetcode was until around 5 years ago. Although to be fair I wasn't taking programming as a career very seriously during my degree which was in CS, I have to embarrassingly admit.
There's certainly a positive to being able to work through some complex/theoretical problems. These skills won't help you much at all in practical every day development, but they would certainly help take your problem solving up a level from where ever it is.
Though.. I would argue that time is probably better spent building practical knowledge/experience through project based learning.
It’s pretty well established that the skills required for interviewing in the tech industry are not in line with the skills necessary to be an effective software engineer.
Anecdotally, I’ve worked with some complete utter doofuses who somehow passed the leetcode tests, but are completely incompetent otherwise.
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.