News for hackers. Stuff that matters.
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.