News for hackers. Stuff that matters.
Re:Stop Interviewing with Leet Code by bruce343434 on Thursday June 09, 2022 @07:00AM (#31679716)
>it kept happening for seniors and people with a lot of experience

Why would this be? Old brains not being as "flexible" to think up novel solutions?

Re:Stop Interviewing with Leet Code by sourabhv on Thursday June 09, 2022 @07:07AM (#31679758)
If you think it’s about flexibility or brilliance or intuition or experience, you couldn’t be more wrong. Leetcode and others and purely about practice and that too recent practice, all questions follow similar patterns and if you have it fresh in memory you can write it in 5 mins. But writing it from brainstorming can take more time tha allotted.

So are top leet coders better programmers? Not really, a lot of them are colleges students who have time to practice and they are in similar competitive circle. I’ve interviewed many and couldn’t hire even one

Re:Stop Interviewing with Leet Code by skeeter2020 on Thursday June 09, 2022 @07:21AM (#31679840)
You think LeetCode problems require novel solutions? It's the exact opposite: they're great for new grads who just spent 4+ years cramming for exams.
Re:Stop Interviewing with Leet Code by EdwardDiego on Thursday June 09, 2022 @08:22AM (#31680286)
Bingo. I was asked recently to find the maximum subarray of an array, in a live coding exercise. In TypeScript. So, JS, but with type annotations.

The interviewer themself said "this is probably more aimed at someone who just graduated."

It was for a senior data engineering role, where the odds of me implementing classic dynamic programming problems on the regular are slim to none.

They made me an offer anyway, but I just wonder what value they found in that. Oh, he knows about Big O? He's heard of memoisation?

They were big on FP, apparently. But not Scala, there was too much FP in that for them, hence the TypeScript.

Mind you my first ever rejection was for a Python role back in 2011 when Python was still very niche in my country, and while I had a portfolio of, imo, pretty decent Python code, they weren't interested because I didn't have a degree, and people without degrees write unstructured code.

Which is a very long way of saying, every interview process ultimately devolves into people hiring people like them.

Re:Stop Interviewing with Leet Code by zinclozenge on Thursday June 09, 2022 @01:08PM (#31683889)
I'd hire you on the basis that you know that it's memoization and not memorization.
Re:Stop Interviewing with Leet Code by 0x20cowboy on Thursday June 09, 2022 @04:27PM (#31686373)
I was once asked "how do you sort a list of integers?" - the question was so ill defined that I thought it was a joke (in a database?, how long is the list?, in a flat file?, memory only?, on an embedded system?, a dataset in spark? ...).

Thinking, ok, this must be an ice breaking joke I responded, "I don't know, how _do you_ sort a list of integers?". In a condescending tone they responded "are you even a programmer?". At the time, I had been in the game for more than 10 years.

I am really not sure how one could successfully build several companies and have shipped several products without knowing "how to sort a list of integers".

Trying to find a good place to grow your career is difficult on many levels, but if you find leetcode questions silly, you might be too advanced for entry level jobs. ...and you probably don't want to work there.

Re:Stop Interviewing with Leet Code by kristopolous on Thursday June 09, 2022 @12:16PM (#31683111)
In that way it also acts as a legal form of ageism.
Re:Stop Interviewing with Leet Code by dragonwriter on Thursday June 09, 2022 @12:19PM (#31683142)
Or, perhaps more accurately, a layer of plausible deniability to cover illegal age discrimination.
Re:Stop Interviewing with Leet Code by MichaelBurge on Thursday June 09, 2022 @07:08AM (#31679762)
People straight out of college will spend a month doing 100+ Leetcode problems targeted at the companies they're aiming for. Leetcode tracks problems used at interviews, so there's a very good chance they'll see a problem identical or similar to one they've solved already, and it's just pattern recognition.

After the 3rd or 4th time doing this, practicing the same problems just to pass interviews isn't very appealing, especially if you've saved money and can do something more interesting.

You could try to "wing it" and derive it on the spot, but you'll be outcompeted by someone doing a lookup of a solution + alternate solutions from cache.

Re:Stop Interviewing with Leet Code by azemetre on Thursday June 09, 2022 @07:16AM (#31679806)
Nah, it’s just that LC problems take practice to get good at. Similar to weight lifting you wouldn’t expect to bench 250 lbs your first week, but after training and making progress you’ll get there (or close).

If you’ve never done LC (or any competitive programming) you’ll struggle. Practice more and you’ll recognize the dozen or so patterns.

Also LC is not “novel,” maybe at the time when the algorithm was first devised but not when you have 20 minutes to solve one.

Re:Stop Interviewing with Leet Code by ehnto on Thursday June 09, 2022 @08:26AM (#31680315)
The tests aren't testing for competency at the job, and after a decade of experience writing software you have long ago realized that party tricks and cute algorithms are a fairly rare part of the job (generalizing here of course), so you stop thinking about them as much and get out of practice. When they do show up, you certainly don't have to do them in 10 minutes, and I think everyone would rather you didn't anyway, so that you write a robust solution rather than a clever one.

Students are often better at leetcode because school has been drilling this shit into them for the past three years, but it will probably be the last time they see such a compelling algorithmic challenge until their next leetcode exam.

Re:Stop Interviewing with Leet Code by bruce343434 on Thursday June 09, 2022 @11:17AM (#31682297)
>write a robust solution rather than a clever one

but why must it be mutually exclusive? Are you implying all "robust" solutions, whatever that means, are dumb? Surely you put some thought in it to make it "robust"?

Re:Stop Interviewing with Leet Code by tsimionescu on Thursday June 09, 2022 @02:09PM (#31684727)
In general in this type of use, "clever" and "dumb" would better be called "tricky" and "obvious" respectively. Usually people describe very tricky solutions as "clever", and much more obvious solutions as "dumb" jokingly.

For example, storing some flag in the high bits of a pointer field of a struct is a "clever" solution, whereas having a separate bool field is a "dumb" solution. In most cases, the "dumb" solution is much more robust over time (less likely to cause bugs as the code changes and is modified by various people). Of course, the "clever" solution is necessary in some situations (very constrained environment, critical infrastructure such as an object header used for every type etc), but should often be avoided if possible.

What's important is that the way this is often presented is that more experienced people will prefer "dumber" solutions, as experience often shows that long-time maintainability trumps many small losses of efficiency. So using "clever" and "dumb" in this way is not at all intended to put down the engineer writing the more robust version.

Re:Stop Interviewing with Leet Code by ehnto on Friday June 10, 2022 @01:30AM (#31690408)
When it comes to everyday software solutions you are usually aiming for obvious and clear, and often 'clever' is obtuse and opaque but definitely not always.

I think there might just be some vernacular nuance here though, maybe we can call it smart and robust, versus clever and opaque. Some problems are just difficult though, and if you get to work on that kind of problem regularly then that is pretty lucky.

Re:Stop Interviewing with Leet Code by aantix on Thursday June 09, 2022 @01:52PM (#31684479)
Novel solutions aren't as helpful as you think. Pragmatic, simple, vanilla solutions are reliable.

You won't create your own linked list library, you'll use one from the standard library.

General runtime analysis can be helpful - but production, real-world benchmarks trump all theoretical performance values.

Code changes - how do I make a change to a production system in a million line code base that has good test coverage and when deployed, won't bring the entire system down. That's an exercise in the coding interviews that is completely ignored but most useful in the day-to-day professional setting.

Re:Stop Interviewing with Leet Code by atraac on Friday June 10, 2022 @05:25AM (#31691834)
> General runtime analysis can be helpful - but production, real-world benchmarks trump all theoretical performance values

This is what I always found funny. Most of the software development work these days is related to web apps. Optimizing that nested loop won't do anything if you have to wait 300ms on some shitty API to answer anyway. It literally doesn't matter, noone cares.

Related meme I saw on reddit some time ago where senior developer says 'haha nested for loop go brrrrr':

https://i.redd.it/lmrf72ko0ro41.png

Re:Stop Interviewing with Leet Code by jmopp on Thursday June 09, 2022 @07:52AM (#31680035)
I've forgotten most of the algorithm stuff I learned at university that I haven't used in my job. I know how dynamic programming works and I can recognise such a problem, but don't ask me to implement it in an hour. I know how graphs work and what the various algorithms are, but why would I implement any of them when I can just import networkx?
Re:Stop Interviewing with Leet Code by vidarh on Thursday June 09, 2022 @09:54AM (#31681155)
More likely a lot of us don't feel we have to cram for problems suitable to screen entry-level candidates at most.

Personally I'm perfectly happy to be filtered out by such tests and refuse to practice for them, as companies that use them for senior level positions are companies I really don't want to work at.