News for hackers. Stuff that matters.
Re:I got asked LeetCode questions for a dev-ops systems engi... by varjag on Friday June 14, 2019 @02:25PM (#20185375)
It's a great point we hear often, so I incorporated it into our last round of hiring. Some still couldn't do it with an IDE, their language of choice and access to Google.

(sorting an array, with any algorithm you want)

Re:I got asked LeetCode questions for a dev-ops systems engi... by blub on Friday June 14, 2019 @05:27PM (#20186803)
I must have written a couple dozen sorts, but only in high-school or when preparing for interviews. It's the one thing that is very well supported in most programming languages. C++ has stable/unstable sorts, partial sorts, whatever you want.

Accepting things like bubble sort also makes the exercise doubly pointless.

Re:I got asked LeetCode questions for a dev-ops systems engi... by varjag on Friday June 14, 2019 @05:45PM (#20186916)
Since people still fail it, even with all might of Google at their command, even with bubblesort allowed, it's anything but pointless.

And if you are unable to sort an array it's a strong signal that command in all other areas of CS is lacking. Does C++ has a standard library for RSTP? Do you think a person who can't sort an array after 5 years of school would be able to fix a bug in a switch' spanning tree implementation?

Re:I got asked LeetCode questions for a dev-ops systems engi... by blub on Friday June 14, 2019 @06:25PM (#20187153)
You're looking at this the wrong way IMO. One should not give exercises and try to eliminate candidates, instead they should prepare a set of exercises so that at the end, if the candidate solves them correctly they can confidently say "this candidate knows X, Y and Z", so they should do a good job in our project.

In your case, at the end you've only figured out that your candidate knows how to sort an array, which even high-school students can do. You can confidently say that your candidate has a level somewhere between student and Donald Knuth, a pretty useless piece of information.

Is there any connection between sorting arrays and spanning trees? If I'm not mistaken, the latter involves graphs.

Re:I got asked LeetCode questions for a dev-ops systems engi... by varjag on Friday June 14, 2019 @06:39PM (#20187255)
Problem is however that a good crop of candidates doesn't know how to sort an array, am not sure why am finding myself explaining it for the 2nd time. So all I can say is they are below high school student in your neck of the woods, even if they have Masters in relevant discipline. And if you can't sort an array with all help of Wikipedia and Stackoverflow, you would not be able to walk a graph, let alone do anything useful with it.

So I'm not quite sure what is your beef with it exactly. Do you think I should have used a more complicated task? Like, Dijkstras' on a graph? Are you sure that you wouldn't find that objectionable too, given that sorting an array is apparently asking too much?

Re:I got asked LeetCode questions for a dev-ops systems engi... by blub on Friday June 14, 2019 @07:15PM (#20187429)
I was saying all along that your exercise:

a) is too easy

b) doesn't have enough meat to differentiate between junior / regular / senior

c) covers very little if anything at all from what a SWE does on their day to day. OTOH I guess/hope you had more things, not just this.

Re:I got asked LeetCode questions for a dev-ops systems engi... by varjag on Monday June 17, 2019 @03:54AM (#20200805)
It was a junior position.

This was the only coding test but we also either talked through opensource code candidates brought in or discussed some parts of one our real project here.

Re:I got asked LeetCode questions for a dev-ops systems engi... by scarface74 on Friday June 14, 2019 @07:02PM (#20187367)
Let’s say someone didn’t know any sort algorithms since he has been using one provided by the language. Would you have been willing to explain on a high level how the algorithm works? I wouldn’t be opposed to any algorithmic type question if you explain the requirements on a high level and let them do it within an IDE.

But, you are hiring for a software developer, who should be able to translate business problems that you face everyday into a working system. Don’t you have any real world scenarios that you could use to test on?

Re:I got asked LeetCode questions for a dev-ops systems engi... by varjag on Monday June 17, 2019 @03:56AM (#20200817)
I would be willing to explain sorting to someone without formal CS training, but not to one with Masters degree in the discipline. They had 5 years to figure it out.
Re:I got asked LeetCode questions for a dev-ops systems engi... by scarface74 on Friday June 14, 2019 @06:49PM (#20187310)
Seeing that the Bubble Sort was something I did in 6th grade in the 80s as part of an AppleSoft BASIC programming class - congratulations, the interviewer has now proven he can hire a programmer with the skillset of a middle schooler....
Re:I got asked LeetCode questions for a dev-ops systems engi... by varjag on Friday June 14, 2019 @06:52PM (#20187326)
I would totally hire a middle schooler who can program over a PhD who can't. That said the guy we hired did an insertion sort.
Re:I got asked LeetCode questions for a dev-ops systems engi... by scarface74 on Friday June 14, 2019 @05:59PM (#20187001)
It depends on the position. If I’m looking for a developer for yet another software as a service CRUD app, I may not need anyone that understands “CS fundamentals”. Heck it’s been 20+ years since I graduated from college with my CS degree and over a decade since I’ve had to do any low level programming.

Does C++ has a standard library for RSTP?

Maybe not, but I know that there are very few new problems under the sun that most people face and someone has solved the problem before. I also know how to use Google.

https://stackoverflow.com/questions/1460010/best-c-rtp-rtsp-...

Re:I got asked LeetCode questions for a dev-ops systems engi... by varjag on Friday June 14, 2019 @06:01PM (#20187012)
You mixed up RSTP with RTSP, I would revisit my Googling skills if I were you.. making a beautiful case though for this kind of interview process.

(before you go on googling again, the algorithm operates over the switch port forwarding fabric, you can't really use a library)

Re:I got asked LeetCode questions for a dev-ops systems engi... by scarface74 on Friday June 14, 2019 @06:11PM (#20187074)
So are you really saying that you could not look at an open source implementation and reimplement?

https://github.com/shemminger/RSTP

Re:I got asked LeetCode questions for a dev-ops systems engi... by varjag on Friday June 14, 2019 @06:21PM (#20187126)
Yes, I am saying exactly that. This is a userspace implementation not making use of switch hardware fabric. You can probably hack hardware forwarding into it (haven't looked into this, our implementation predates it by 2 years). Or you can read an RSTP spec and implement it. None of it is secret, like none of CS in general is.

Both approaches however would be beyond the skills of a programmer who can't sort an array. And really it's not a high bar, I don't understand this obsession with anti-intellecualism. Everyone likes plumbing analogies, well I wouldn't trust a plumber who doesn't know that water generally tends to flow downwards - it's this level of CS knowledge we are talking about here.

Re:I got asked LeetCode questions for a dev-ops systems engi... by scarface74 on Friday June 14, 2019 @06:31PM (#20187191)
I’m saying that you don’t need to memorize an algorithm. For one job I had to maintain a proprietary compiler/VM/IDE that never saw the light of day outside of the company. I needed to solve an arbitrarily complex algebraic expression in a string. I had no idea how to do it. I found both algorithms I needed with a quick google search and implemented them in C - one was converting the expression to RPN and the other was implementing the “Shunting Yard Algorithm”. Would I have also been dinged because I didn’t know those two algorithms off the top of my head?
Re:I got asked LeetCode questions for a dev-ops systems engi... by varjag on Friday June 14, 2019 @06:40PM (#20187259)
No? I asked to sort a bloody array, that's it.
Re:I got asked LeetCode questions for a dev-ops systems engi... by scarface74 on Friday June 14, 2019 @05:44PM (#20186903)
I partially agree, but a bubble sort is slightly harder than FizzBuzz (?) and even if you give them the algorithm, it might be a little more fair since knowing how to do a nested for loop is less esoteric than the mod operator.

Now if someone did a BogoSort, I would hire them just for their ingenuity and sense of humor.

Re:I got asked LeetCode questions for a dev-ops systems engi... by james_s_tayler on Saturday June 15, 2019 @09:22AM (#20189916)
10/10 I would go for randomize the array and check if it's sorted. Repeat if it's not.

I like the people I work with to have a good sense of humor.

Re:I got asked LeetCode questions for a dev-ops systems engi... by scarface74 on Friday June 14, 2019 @02:45PM (#20185551)
Would using a built in library be acceptable? Actually in C knowing how to use qsort() does require having a little knowledge of how function pointers work. If they did, I would ask them what could be some drawbacks of using the built in qsort function (function call overhead).

On the other hand, would you accept a bubble sort as a solution? Or the most degenerate case- a bogosort ;) ?

Re:I got asked LeetCode questions for a dev-ops systems engi... by varjag on Friday June 14, 2019 @03:01PM (#20185719)
Bubble sort, bogosort, sleepsort, anything that solves the assignment (gets an array sorted) of course. And no, a library call would not count towards implementation, but it's not too much to ask from candidates with masters degrees.