News for hackers. Stuff that matters.
Re:Ask HN: What to do about ‘Good at programming Bad at Leet... by colinmhayes on Friday May 20, 2022 @02:44PM (#31451080)
Here's the thing, large tech companies aren't looking to hire engineers, especially juniors, who are great at being an engineer because that's incredibly hard to test for in an interview and almost impossible to scale fairly. They're looking for people who will devote their life to the company and can quickly learn new skills. That's exactly what leetcode tests for, so it really isn't surprising at all that every tech company does leetcode interviews. Really the answer is either commit to the grind or go for a job at a non-tech company.
Re:Ask HN: What to do about ‘Good at programming Bad at Leet... by Hermitian909 on Friday May 20, 2022 @05:12PM (#31452576)
> They're looking for people who will devote their life to the company and can quickly learn new skills

This doesn't reflect my lived experience in SV. People I know who learned leetcode skills and got into big companies usually work less than people who passed more practical tests and get into smaller companies.

I'd say big companies are trying to hire employees who are a "good" mix of:

1. Smart

2. Conscientious / willing to work hard on the right things

3. Existing CS knowledge you know well enough to explain and apply.

For some vague handwavy definition of "good"

(2) is probably worth expanding a bit. Many people are willing to work very hard on the wrong thing, this extends to engineering. As an example, a common failure pattern you might see is someone constantly struggling with how React works and what they really need to do is sit down and read the ~15 pages of documentation. But they never do, and just keep putting in 10 hour days with subpar output.

I've met some legit geniuses (think Putnam winner) for whom basically no studying was required to pass these interviews. Companies paying top dollar are happy to have them. For people like who are less smart and need to dedicate ~100-200 hours of focused studying and practice, companies paying top dollar are happy to take our mix of smarts and willingness to do that work. But once in the company I haven't noticed any expectation to "devote my life" to it.

Re:Ask HN: What to do about ‘Good at programming Bad at Leet... by colinmhayes on Friday May 20, 2022 @05:27PM (#31452727)
Right, I think you've explained it better than me. I was just going for the idea that the point of leetcode isn't to figure out if someone is currently a great engineer, but if they have what it takes to become one. Everyone complaining that leetcode isn't related to their day to day job is missing the point.
Re:Ask HN: What to do about ‘Good at programming Bad at Leet... by mikymoothrowa on Friday May 20, 2022 @03:20PM (#31451472)
> an quickly learn new skills. That's exactly what leetcode tests for

I don’t know where people get this idea. Leetcode used to test programming proficiency

I feel the only reason companies continue to take leetcode to absurd levels is because (a) they think harder questions would get them better engineers and (b) other companies are doing it

Re:Ask HN: What to do about ‘Good at programming Bad at Leet... by dijit on Friday May 20, 2022 @03:25PM (#31451505)
> Leetcode used to test programming proficiency

The discussion is exactly this, that leetcode is used to test programming proficiency, but it's an inadequate bar.

The parent is postulating that it's a lie; that actually leetcode tests for malleability, and we're getting bent out of shape because we think it's a poor test of coding ability.

However it might be a good test of malleability, and that might actually be it's intended purpose, but that's not communicated.

Re:Ask HN: What to do about ‘Good at programming Bad at Leet... by nowherebeen on Friday May 20, 2022 @03:29PM (#31451552)
I don't know about malleability, but I know Big Tech uses it to filter down the number of applicants. They get 200 applications in an hour so HR needs a way to pick a few that won't get them sued.
Re:Ask HN: What to do about ‘Good at programming Bad at Leet... by mikymoothrowa on Friday May 20, 2022 @03:31PM (#31451578)
Understandable when big tech does this.

200 person tech companies are doing the same.

Re:Ask HN: What to do about ‘Good at programming Bad at Leet... by tlextrait on Friday May 20, 2022 @03:25PM (#31451506)
Not quite but almost: Leetcode doesn't evaluate programming proficiency but ability to solve complex and abstract problems using programming. Doing so doesn't require being good at programming but being good at solving problems, and doing so using a programming language. It doesn't require knowing a language well, but only well enough to solve the problem.
Re:Ask HN: What to do about ‘Good at programming Bad at Leet... by infamouscow on Friday May 20, 2022 @11:39PM (#31455060)
This is fine, except when the candidate knows substantially more than the interviewer about how to solve the problem. I was once asked to implement a spsc circular buffer, and I used C++11 atomics rather than a mutex. I wrote up a working solution, but most of the interviewer's followup questions fundamentally didn't map to my wait-free solution. I spent most of the time explaining to the interviewer how atomics and non-blocking algorithms work. The FAANG rejection email came a few days later.

So I don't think these interviews evaluate the candidate's ability to solve complex and abstract problems. They seem to evaluate the candidate's ability to grind contrived sophomore-level computer science homework. Experience solving the real-life version of the problem rather than the academic one is unwanted.

Re:Ask HN: What to do about ‘Good at programming Bad at Leet... by b20000 on Saturday May 21, 2022 @04:59PM (#31461740)
this illustrates the problem very well. your lock free solution is superior yet the interviewer had no clue and you only know about this solution due to experience which is not what leetcode optimizes for.
Re:Ask HN: What to do about ‘Good at programming Bad at Leet... by maerF0x0 on Friday May 20, 2022 @04:15PM (#31452016)
I've had zero or near zero gotcha string problems in my professional career, which are many of the leetcode problems.

Find the (gotcha) in this string and emit len(gotcha) ... Now do it computationally efficiently (or be able to explain tradeoffs to other resources).

Re:Ask HN: What to do about ‘Good at programming Bad at Leet... by tlb on Sunday May 22, 2022 @06:12PM (#31473323)
String problems are rare, though may come up more in search engine companies.

But manipulating sequences comes up a lot in many contexts. Usually it's sequences of more complex things: instructions, packets, files, polygons. It's hard to assign tests directly on those, because you have to explain the objects themselves first. So it's a reasonable shortcut to test ability to manipulate sequences of characters.

Re:Ask HN: What to do about ‘Good at programming Bad at Leet... by Ancalagon on Friday May 20, 2022 @08:06PM (#31454068)
Don't forget: in 45 min, without bugs
Re:Ask HN: What to do about ‘Good at programming Bad at Leet... by maerF0x0 on Sunday May 22, 2022 @06:06PM (#31473281)
oh and do it in Go* ... Good F'ing Luck .

Go makes normal string operations tricky due to rune being an alias for int32, ranging a string gives []byte indexes ...

https://go.dev/play/p/33jCwNG6Eu6

Re:Ask HN: What to do about ‘Good at programming Bad at Leet... by Tomis02 on Friday May 27, 2022 @07:50AM (#31528435)
It's a bit sucky but you can use the standard library function "utf8.DecodeRuneInString(a)".
Re:Ask HN: What to do about ‘Good at programming Bad at Leet... by mikymoothrowa on Friday May 20, 2022 @03:30PM (#31451568)
> It doesn't require knowing a language well, but only well enough to solve the problem.

I guess that really depends on the language. IMHO, if you can solve a reasonably complex problem using a language, you know that language.

Re:Ask HN: What to do about ‘Good at programming Bad at Leet... by Floegipoky on Friday May 20, 2022 @05:15PM (#31452601)
I am on the interview team for the company I work for and I wrote what some consider to be our canonical python solution (fastest and simplest) for one of the problems we use. I had to look up the syntax for a "for loop" because I hadn't written python since my first year at university. To me, being able to stitch together simple concepts present in almost all mainstream programming languages doesn't mean I know python, it means I know how dynamic programming works. I don't know the python ecosystem (history, present, or future), know the standard library, know what idiomatic code looks like, deeply understand what makes the language unique, have the mindset of a python programmer, etc. Maybe I just have a high threshold for feeling like I "know" a language.
Re:Ask HN: What to do about ‘Good at programming Bad at Leet... by b20000 on Sunday May 22, 2022 @01:44AM (#31465206)
i did a leetcode interview in c++ and didn’t remember some syntactic details of lambdas and that was the end of it. please stop with this nonsense that interviewers are understanding and that you can look things up or that you will be able to take your time to produce the optimal solution to a problem.
Re:Ask HN: What to do about ‘Good at programming Bad at Leet... by Floegipoky on Tuesday May 31, 2022 @03:32PM (#31573860)
Well I can't speak for other interviewers especially at other organizations, but I try very hard to make it a positive experience. In fact I'll give as much help as necessary to get to a working solution, within reason. I would much rather fix the lambda syntax myself or help the candidate find an example on stackoverflow so we can go back to the interesting part. If the interview ends with a working solution but needed a ton of help, the candidate probably did not pass but maybe they learned something. And maybe they'll tell their peers that it seemed like a place where they could fail without embarrassment, collaborate, and learn.
Re:Ask HN: What to do about ‘Good at programming Bad at Leet... by pxx on Friday May 20, 2022 @03:46PM (#31451717)
This doesn't seem right at all. I can kludge together a solution to an arbitrarily complex problem in any language, but that doesn't mean I'm writing it in a way that can be extended and developed upon by other people. The latter is also what takes up the majority of development time.
Re:Ask HN: What to do about ‘Good at programming Bad at Leet... by lupire on Friday May 20, 2022 @04:37PM (#31452217)
A one-day interview can't test you on things that take up the majority of your career time.
Re:Ask HN: What to do about ‘Good at programming Bad at Leet... by lupire on Friday May 20, 2022 @04:36PM (#31452206)
You mean simple abstract problems, right?

LeetCode problems are solved with under 50 lines of code, using textbook models.

Re:Ask HN: What to do about ‘Good at programming Bad at Leet... by mountainriver on Friday May 20, 2022 @05:07PM (#31452518)
As I understand it, programming is only part of it, a big part is just seeing if you will study hard to learn meaningless stuff
Re:Ask HN: What to do about ‘Good at programming Bad at Leet... by the_only_law on Friday May 20, 2022 @05:21PM (#31452667)
If they’re so interested I have a massive catalog of things that can fulfill such a requirement.
Re:Ask HN: What to do about ‘Good at programming Bad at Leet... by AshamedCaptain on Friday May 20, 2022 @03:45PM (#31451713)
> Really the answer is either commit to the grind or go for a job at a non-tech company.

There is quite a world outside these mammoths Google/Facebook/Amazon/(MS, depending on how their IBMization is going these days) and their minions/wannabes. Personally I would not work for any of these even if they paid me in gold bars.

Re:Ask HN: What to do about ‘Good at programming Bad at Leet... by mikymoothrowa on Friday May 20, 2022 @03:56PM (#31451818)
Off topic: what’s this IBMization at Microsoft?
Re:Ask HN: What to do about ‘Good at programming Bad at Leet... by mountainriver on Friday May 20, 2022 @05:06PM (#31452502)
Yup exactly, that’s the whole thing. They want people who will devote their lives to meaningless tasks
Re:Ask HN: What to do about ‘Good at programming Bad at Leet... by nowherebeen on Friday May 20, 2022 @03:20PM (#31451471)
> devote their life

Sounds like they are trying to breed a cult...

Re:Ask HN: What to do about ‘Good at programming Bad at Leet... by filoleg on Friday May 20, 2022 @04:06PM (#31451915)
More like, sounds like the parent comment you replied to has no idea what they are talking about.

I worked across a couple big tech companies mentioned in the thread, and I've met maybe a couple coworkers at most who "devoted their life to the company". And that's across almost a 3-digit number of people i worked with in some capacity over the years. People take vacations often, they work 40 hours a week or less on average (over the year).

One big thing about most teams at big tech companies (probably sans Amazon, from what i hear, haven't worked there myself) is the work/life balance being an important priority. We had a manager giving stern talks to the few teammates who would reply to work emails on their days off ("you left for a week of vacation in Hawaii, why are you replying to work emails or even brought your work laptop with you? Please stop doing that and enjoy your vacation, everything will be totally fine when you come back.").

I don't even care to defend any company, that's their problem. But seeing the whole "cultism" and "expected to dedicate your life to the employer" accusations just make me feel like I am reading some alternate timeline fiction story.

Re:Ask HN: What to do about ‘Good at programming Bad at Leet... by colinmhayes on Friday May 20, 2022 @04:25PM (#31452101)
I didn't mean it in a "cultism" way at all. I was more saying that the point of leetcode isn't to discover if someone is a great engineer but to discover if they are capable of becoming one. Big tech figures if you're capable of becoming a great engineer you either already are due to experience or soon will be because they'll make you into one.

They've decided things like ability to devote time to a meaningless skill that is required to get the job, attention to detail, and problem solving skills are what is required to become a great engineer and see that letcode is a good way to test for those things at massive scale.

Re:Ask HN: What to do about ‘Good at programming Bad at Leet... by tfigment on Friday May 20, 2022 @03:41PM (#31451674)
They are exaggerating but not all wrong. As hiring manager my job is not to train you for your next job. I'm hiring for productivity and that takes time. If you are going to jump ship before you "pay" back the company then I'd rather skip on you. There is no test but I want 2-3 years if you take 9 months or more to get going and I'd be foolish if I didn't want more.

Lots of programmers think they are 10x but few are. Even my best senior engineers took 2-3 months to settle in and contribute more than they take and juniors are bigger gamble.

The best proxy now is will you spend 1 hour on a simple set of tests, if not you are not serious or are shopping for counteroffers.

Re:Ask HN: What to do about ‘Good at programming Bad at Leet... by depr on Friday May 20, 2022 @04:22PM (#31452082)
I appreciate the cynicism but isn't it more likely that they use it just because everybody uses it?
Re:Ask HN: What to do about ‘Good at programming Bad at Leet... by samhw on Friday May 20, 2022 @06:42PM (#31453440)
Yeah, it's clear these people have never hired for a company. I've sat in on a thousand hiring committees, helped design these processes, all that boring shit, and the idea that someone would say "let's do Leetcode challenges so that we select for people who are willing to subordinate their lives to our company" – presumably followed by a "mwahahaha!" – is fantasy, it's something out of a movie.

I mean, look, it sucks when you can't get a job. I've been there (when I briefly tried to escape programming for a different metier) and it's awful. But pretending that the entire outside world is a dark mass of malevolent forces arrayed against you.. well, it may be psychically necessary in some Freudian, Jungian sentence, to prevent ego death or whatever, but in the long run it's neither (a) true (obviously), and (b) nor is it going to do your mind and mindset any good.

Re:Ask HN: What to do about ‘Good at programming Bad at Leet... by VictorPath on Saturday May 21, 2022 @12:22AM (#31455224)
> But pretending that the entire outside world is a dark mass of malevolent forces arrayed against you.. well, it may be psychically necessary in some Freudian, Jungian sentence, to prevent ego death or whatever, but in the long run it's neither (a) true (obviously), and (b) nor is it going to do your mind and mindset any good.

Maybe you can post this in the endless Russia threads posted here, which seem to have crowded out the endless China threads.

I guess what you're saying is that apprehension about the motives of of corporate executives is so irrational, it's akin to a psychological problem.

Re:Ask HN: What to do about ‘Good at programming Bad at Leet... by neonsunset on Saturday May 21, 2022 @05:19AM (#31456466)
It is low of you to conflate the two. While both companies and russia pursue goals in somewhat pragmatic manner, the former aims to maximize profit while the latter aims to execute an entire nation and take their resources with calculated brutality (most war crimes committed were under direct orders).
Re:Ask HN: What to do about ‘Good at programming Bad at Leet... by samhw on Saturday May 21, 2022 @07:02PM (#31462959)
> I guess what you're saying is that apprehension about the motives of of corporate executives is so irrational, it's akin to a psychological problem.

No, that wasn't what I was saying there, but coincidentally, yes, I would agree with that statement. For one, 'corporate' is a phenomenally lazy word used to invoke some mental image of besuited sociopathy, from a million children's movies and internet debates. In the real world, 'corporate executives' - human beings, mothers and fathers, working in management careers at (large) companies - are humans doing jobs, like any other humans doing jobs.

I've been involved (as an engineer) in C-level meetings with people like that, as well as worked alongside them in the same teams, and my experience - thoroughly unsurprisingly given what I said above - is that they are pretty ordinary human beings on the whole. I'm sure there are differences between companies in terms of their cultures or values, but that's company-specific and not discipline-specific or seniority-specific.

I get that your experience is that these are people who mete out decisions from on high, which affect you in sometimes-negative and always-unforeseen ways, and that makes you feel like a mediaeval peasant might have felt towards his feudal liege. And maybe it's helpful, from a cathartic standpoint, like I said above, to picture them as evil baddies from kids' movies. But no, the reality is more banal.

(Incidentally, I think those who worship company CEOs - and suchlike - are equally stupid, from the Elon bros to the HackerNews types who recite stories about startup founders as though they were superheroes. These people underestimate the role of chance and – in a way, very similarly to you – overattribute the differences between execs/founders vs regular workers to a proportionate difference in their inner essence [in their case, they think intelligence & industry; in your case, you think amorality]. Both are fantasies.)