Readit News logoReadit News
Fattestmoron commented on Leetcode has taught me that I'm a bad engineer    · Posted by u/Fattestmoron
babarock · 4 years ago
My role isn't to assess if you're competent or not. My role is to assess if I want you on my team or not. There's a difference.

And yes, if I ask you a technical question and you freeze, I don't want you on my team. It doesn't mean you're a bad engineer. It means you're not a good fit.

Fattestmoron · 4 years ago
My role isn't to assess if you're competent or not. My role is to assess if I want you on my team or not. There's a difference.

Pretty much sums up how the hiring process is a gamble. So if you don't like somebody and they could be an asset to the company you would not hire them?

Fattestmoron commented on Leetcode has taught me that I'm a bad engineer    · Posted by u/Fattestmoron
thw09j9m · 4 years ago
Are you failing interviews or are you just failing leetcode?

I've done 700+ LC and I still regularly get stuck on Meds/Hards, but I imagine if you know all these concepts and can explain tradeoffs during an interview, you have a better chance of passing than someone who immediately spits out a memorized solution but can't explain why they chose that specific approach over another.

Fattestmoron · 4 years ago
FAANG just wants immediate, perfect solutions. The OA is also now exclusively hards. People on Blind talking about giving interviews and only accepting perfect, canned solutions. No talking through, no hints, or you fail.
Fattestmoron commented on Leetcode has taught me that I'm a bad engineer    · Posted by u/Fattestmoron
whiskyant · 4 years ago
It was 2019, so things may have changed but I doubt it. Maybe I was lucky? Or maybe you were unlucky. I also applied as a Senior SWE (mobile) if that makes any difference.

Out of the 12 companies I applied for I was given 2 hards (both were private startups), the rest were all mediums.

>nearly 100 lines of code involving multiple steps

I was never given anything even close to involving a 100 line solution. Are you sure this was even the correct/optimal solution? Either that or you're very unlucky. Which companies were asking such questions?

>50 medium problems could span all of the possible topics.

I was given problems that I hadn't encountered before, but I was able to solve them by deduction/critical thinking and applying the appropriate algorithms/patterns. Often the easy solution and the optimal solution weren't even that different, and just involved using a hashtable.

Grinding through hundreds of LC to try and memorize/familiarize yourself with the solutions really isn't the right method. Have you read Cracking the Coding Interview? Gayle McDowell has some videos on youtube in which she explains her process.

Fattestmoron · 4 years ago

   I was given problems that I hadn't encountered before, but I was able to solve them by deduction/critical thinking and applying the appropriate algorithms/patterns. Often the easy solution and the optimal solution weren't even that different, and just involved using a hashtable.
Yeah, no.

Fattestmoron commented on Leetcode has taught me that I'm a bad engineer    · Posted by u/Fattestmoron
VirusNewbie · 4 years ago
I think that's a great reason to throw out the hard and harder medium questions.

I've never ever even heard of an interview problem where a b-tree or RB tree was required to solve it.

But my point stands that there are a ton of great little questions that involve very very basic data structures and tree traversal algorithms that you can use to glean quite a lot about a candidate.

You're absolutely right that asking a candidate if they can solve a 2D DP problem isn't telling you anything other than if they'd either seen this problem or they are good at this algorithm. I'm stating that you can learn a lot and eliminate some bad folks by asking some basic coding LC questions.

Fattestmoron · 4 years ago
If you're talking FAANG you're talking hard level. If you're talking a company that fancies itself FAANG, you're talking medium-hard while being treated like a human septic tank, which could happen at FAANG as well.

I think most candidates could give a solution, just not while they are being treated like sardines and prodded with a stick.

It has made me ask myself: do I really want a job at FAANG, or any high level company? I mean if it's pumping out leetcode while simultaneously dealing with office politics and sadistic managers, I think I'll just go back to selling cocaine.

Fattestmoron commented on Leetcode has taught me that I'm a bad engineer    · Posted by u/Fattestmoron
seer · 4 years ago
10+ YOE myself, ranging from CTO to big orgs. I can tell you when I was fresh out of school I actually liked those kinds of challenges, but I trained on them relentlessly as part of participating in programming olympiads and the like.

The more experience I have the harder they are for me to solve, as engineering problems tend to have very different mental models to reach the solution.

First thing you do is you ask people is that the problem they are actually need solving - most of the time refining the problem leads to there being something totally different that is requires. A process of asking people “why you want this hard to implement thing” and discovering that what they actually need is something smaller and more aligned with whats currently working. Leet code is the opposite usually - you see a simple problem but “there is a twist” that would be considered scope creep generally.

Then the implementation of the solution itself requires knowledge in your head, whereas years of experience has led me to put a lot of that knowledge out of my head and into “places I trust to find the answer” - google stack overflow, HN etc. And keep in my brain only the general abstractions of how to apply them. This allows for vastly more powerful solution making as you can stand on the shoulders of giants.

Example - see you have a leetcode puzzle. My first instinct is to use my google fu to find out what the best current solution is out there, understand it and either apply it or modify it a bit if it needs tweaking.

But that would be considered “cheating”. Leetcode: 1, Life skills: 0.

And there is the damn time pressure. Every time I’m pressed for time on my day job, its a signal something in tech or management has gone wrong, and I seek to optimize and fix that. Rushed engineers make poor, shortsighted decisions.

Each time I do an interview I feel out of sorts as all my instincts scream “something is really bad, you should _not_ be doing this solution this way it will bring pain in the future” But you have to power through. And I probably look way less impressive than someone who has the solution memorized.

Fattestmoron · 4 years ago

  The more experience I have the harder they are for me to solve, as engineering problems tend to have very different mental models to reach the solution.
That is what I think the true purpose of it is. It's poorly hidden age discrimination.

Fattestmoron commented on Leetcode has taught me that I'm a bad engineer    · Posted by u/Fattestmoron
xtracto · 4 years ago
My take as someone with a PhD in CompSci , Bsc in Software Engineering, and with 10+ in the software dev industry my take is that Leetcode type problems suck. They are "gotcha" types of tests for which you only need to know their specific answer.

As an interviewer I learned that they don't tell me anything useful: people who show they can solve them just show that they spent months churning.

Most of the problems in Leetcode are related to CompSci theory (DP, DFS, efficient graph or tree reversal, etc). Reality in most software Engineering jobs couldn't be further away from the that. Even if you are working with C, you'll likely use Boost or a similar library to solve a problem that requires any of that (implementing your own low level libraries is a sign that you are a jr dev... I've seen lots of them trying to implement their email validation fn or similar).

Fattestmoron · 4 years ago
Funny thing is I had an interview some years ago and he asked me about cycle detection, so I gave the basic set approach, then added the tortoise and hare as a memory free solution.

It immediately made him uncomfortable and I didn't get the job, because he didn't like the tortoise and hare solution not being as "tractable" as the set solution.

Damned if you do, damned if you don't.

Fattestmoron commented on Leetcode has taught me that I'm a bad engineer    · Posted by u/Fattestmoron
VirusNewbie · 4 years ago
You don't think using maps, trees, recurison, bounds checking, conditionals has ANY correlation with day to day programming?
Fattestmoron · 4 years ago
Dude, that will not carry you through a hard problem.

You need the pocket Dijkstra, Kruskals, Union-find, Bellman-Ford, KMP, Kadanes (sliding window), LCS, DP (1-n dimensional), Topological Sorting, NP-hard heuristics (usually DP), BFS, DFS, Backtracking, Memoization (basically DP, but usually used in DFS), Prefix sums (DP as well), that weird palindrome-specific algorithm I can't remember, binary search, bisection (numerical anaylsis ftw!)

You also need tries, heaps, red-black trees, B-trees, DAGs, priority queues (heaps)

But wait.. there's more!

Euclidean algorithm, Josephus Problem, Sieve of Erastosthenes and all the number theory bullshit I can't remember and refuse to, because it has fuck all to do with daily engineering.

Fattestmoron commented on Leetcode has taught me that I'm a bad engineer    · Posted by u/Fattestmoron
whiskyant · 4 years ago
Yeah, I practiced leetcode by spending about an hour a day for 2 months, but I had only done around 60 LC total (25 medium, 35 easy).

I didn't feel a need to do much more as they had very similar patterns. I did attempt the ones I had solved more than once though, but it was to really drill in the principles behind the problem rather than to try and "memorize" them.

Prior to my prep, I had almost 0 algorithm experience. I got an offer from every FAANG I applied for.

Fattestmoron · 4 years ago
Going to call bullshit on that, since in recent interviews most people have been getting hard problems and not "trapped rainwater" prefix sum hard problems, but the kind where the optimal solution has nearly 100 lines of code involving multiple steps (topological sort combined with dp and other garbage at one go).

Easy problems literally mean jack and I don't even think 50 medium problems could span all of the possible topics.

Sounds like you got in when it was easier.

Fattestmoron commented on Leetcode has taught me that I'm a bad engineer    · Posted by u/Fattestmoron
VirusNewbie · 4 years ago
Honestly curious, how long does it take to do an average medium problem and pass all test cases? Are you spending like, an hour or ten minutes? Somewhere in between?
Fattestmoron · 4 years ago
Can be anywhere from 1 minute to hours, depends on the problem. The whole classification thing is kind of ridiculous, because some hard problems are easy and some mediums are hard.
Fattestmoron commented on Leetcode has taught me that I'm a bad engineer    · Posted by u/Fattestmoron
e-clinton · 4 years ago
The problem is that it takes a lot of effort to fire people. And every time you do, you increase your exposure to legal trouble.
Fattestmoron · 4 years ago
Not in the US it doesn't. The turnover rate if anything is a symptom of the problems in the industry.

u/Fattestmoron

KarmaCake day278January 5, 2022View Original