News for hackers. Stuff that matters.
Re:Poll: Is the leetcode grind necessary to land a high payi... by throwaway2037 on Thursday January 27, 2022 @10:26AM (#30101645)
Woah. This is a great post! Zero trolling: Can you share your interview question? We would love to have something similar!

Deeper question: Did you think about why some people are able to "show me things you've built, tell me how this function you built works", but fail miserably on a straight-forward coding test?

Sometimes, during an interview, it seems obvious the person is very intelligent, but having a bad day. Some part of interviews is pure performance to me.

Re:Poll: Is the leetcode grind necessary to land a high payi... by neilsimp1 on Thursday January 27, 2022 @10:51AM (#30101989)
Not OP, but we often include these two in our interviews:

1. Write code that will find the second largest item in an array on ints.

2. Write SQL that selects the second highest number from a DB table.

I'm floored how few candidates can do these. Many end up giving up or fiddling for 10 minutes before giving something like `SELECT table WHERE 2`.

Re:Poll: Is the leetcode grind necessary to land a high payi... by deckard1 on Thursday January 27, 2022 @03:09PM (#30105706)
wouldn't be surprised people miss the SQL question. Full stack devs are rather rare nowadays, and it's a bit obscure SQL trivia considering the answer is dependent on which SQL db you're using.
Re:Poll: Is the leetcode grind necessary to land a high payi... by throwawaygh on Thursday January 27, 2022 @05:45PM (#30108075)
Modulo syntax/keywords, I think the following query would work in any modern dialect:

    SELECT num FROM 
        (SELECT num FROM nums ORDER BY num DESC LIMIT 2)
    ORDER BY num ASC LIMIT 1;
which is actually nearly identical to the simplest Python solution in terms of the computation that's specified:

    lambda xs: None if len(xs) == 0 else sorted(xs)[-2:][0]
I think the reason the question is tricky for some is because they either:

1) haven't used SQL in a long time and forgot all the syntax, or else

2) don't really "grok" SQL as a model of computation (as opposed to e.g. a data structuring language or something like that).

But both of those seem like good reasons to disqualify someone from a full stack role?

Re:Poll: Is the leetcode grind necessary to land a high payi... by SpicyLemonZest on Thursday January 27, 2022 @01:17PM (#30104027)
A common reason in my experience is that the things they've built were done very slowly. I've failed my share of interviews because I was having a bad day, certainly, but I have direct professional experience with many people who require hours of dedicated working time to produce even the simplest of pull requests. This isn't a complete justification (if I have professional experience with them doesn't that mean they passed our straightforward coding tests somehow?), but I do think that there's a real selection problem there people are trying to solve.