News for hackers. Stuff that matters.
Re:Hiring Is Broken – My interview experience in the tech in... by serge2k on Wednesday April 27, 2016 @06:57PM (#11585278)
or they already learned it because they worked hard during school and they work hard to keep themselves current.

I think the concerns people have about the efficacy of this interview style is valid, but extending it to the point where you start to make claims about how people who can pass them aren't as good is ridiculous.

Re:Hiring Is Broken – My interview experience in the tech in... by p4wnc6 on Wednesday April 27, 2016 @08:24PM (#11585751)
No, overfitting is a real thing. Overfitted learning algorithms are generally worse at generalizing their ability to broader examples and new situations.

The types of candidates who spend the time necessary to memorize algorithm trivia for the sake of passing these exams are exactly like overfitted learning algorithms. What they happen to know is unlikely to generalize well. Of course you could get lucky and hire someone like that who can generalize, but that's rare. More often, since hiring is political, you pat yourself on the back for how "good" the candidate is (based on some trivia) and make excuses when their on-the-job performance isn't what you'd hoped, and find ways to deflect attention from that so that you, as an inefficient hirer, won't be called out on it.

Willingness to waste time overfitting yourself to algorithm trivia absolutely predicts worse later-on performance than candidates with demonstrated experience and pragmatism (e.g. I'm not wasting my time memorizing how to solve tricky things that rarely matter. I will look them up / derive them / figure them out when/if I need them).

If given the choice between hiring a math/programming olympiad winner vs. a Macgyver/Edison-like tinkerer who may not be able to explain how to convert between Thevenin and Norton circuit forms, but who took their family radio apart and put it back together, Macgyver/Edison wins every time (unless you're hiring for bullshit on-paper prestige, and of course many places are while proclaiming loudly that they aren't).

Re:Hiring Is Broken – My interview experience in the tech in... by consz on Wednesday April 27, 2016 @10:29PM (#11586221)
Totally disagree with the final sentence. Most math/programming olympiad winners are way more than capable of handling anything the Macgyver/Edison type would be good at. At least in my industry, every olympiad winner has been a consistently spectacular performer, and I have absolutely no qualms heavily biasing myself towards that credential.
Re:Hiring Is Broken – My interview experience in the tech in... by p4wnc6 on Wednesday April 27, 2016 @11:44PM (#11586440)
Having worked with some such folks in a quant-focused field, I can say that their performance was no better than average and in some cases worse. After a few hires like this, my boss actually pulled me aside and asked me to take over one of the main hiring projects because he and a few other managers were unhappy with the way the emphasis on this type of paper credential had failed to produce good enough analysts, and they wanted a process more focused on probing someone's experience and ingenuity. I didn't enjoy it at the time, but that 9-month project focused on that team's hiring needs (which took me away from some of my technical projects for more time than I liked) ended up teaching me a ton about what candidates in general look like (at least for that type of firm).

But I grant this is reasoning just from the anecdata that I have. I can believe that winners perhaps represent a higher degree of skill, but then we're talking about an extremely small number of people.

Generally you're facing a tradeoff where you have to choose between a sort of rustic self-reliance skill set versus a bookworm skill set. People from either group can learn the other over time, but you can't predict how well by testing them solely on trivia that constitutes their current main group. My preference is to hire for self-reliance and learn bookworm stuff later. I used to believe the opposite (e.g. hire someone good at math because they can always learn to be an effective programmer later) but my job experience made me believe the opposite (e.g. actually it's pretty easy to teach people stochastic processes, machine learning, or cryptography, but it's incredibly hard to teach people how to be good at creative software design).

Re:Hiring Is Broken – My interview experience in the tech in... by microtherion on Tuesday May 03, 2016 @04:46AM (#11618928)
But in original author's interview recaps, it's pretty evident that he's NOT comfortable "generalizing his ability to new situations". A BFS is not a super exotic, highly specialized algorithm. It's pretty much a bread-and-butter application of general principles (linear search of children + storing away hypotheses for later).
Re:Hiring Is Broken – My interview experience in the tech in... by serge2k on Wednesday April 27, 2016 @08:45PM (#11585841)
> Overfitted learning algorithms are generally worse at generalizing their ability to broader examples and new situations.

Source? or just trying to justify your own shortcomings?

Re:Hiring Is Broken – My interview experience in the tech in... by p4wnc6 on Wednesday April 27, 2016 @08:52PM (#11585866)
Here, let me Google that for you.

[0] < https://en.wikipedia.org/wiki/Overfitting >

> Overfitting generally occurs when a model is excessively complex, such as having too many parameters relative to the number of observations. A model that has been overfit will generally have poor predictive performance, as it can exaggerate minor fluctuations in the data.

[1] < https://en.wikipedia.org/wiki/Generalization_error#Relation_... >

> The concepts of generalization error and overfitting are closely related. Overfitting occurs when the learned function f_S becomes sensitive to the noise in the sample. As a result, the function will perform well on the training set but not perform well on other data from the joint probability distribution of x and y. Thus, the more overfitting occurs, the larger the generalization error.

Shall I fetch a ruler?

Re:Hiring Is Broken – My interview experience in the tech in... by serge2k on Wednesday April 27, 2016 @09:24PM (#11585988)
I apologize.

> The types of candidates who spend the time necessary to memorize algorithm trivia for the sake of passing these exams are exactly like overfitted learning algorithms.

I should have asked for a source for that portion. It's the part that is ridiculous.

Again, my bad.

Re:Hiring Is Broken – My interview experience in the tech in... by p4wnc6 on Wednesday April 27, 2016 @10:22PM (#11586199)
Sigh. I wish instead of the sarcasm, you actually introspected on the toxic and needlessly aggressive way you're defending rote memorization of algorithm trivia. For example, you saying

> Source? or just trying to justify your own shortcomings?

is clearly, unequivocally unprovoked and needlessly antagonistic (what do my shortcomings have to do with my point ... either you engage with the claim or not, but use ad hominem insults is not a valid discussion tactic. Yet you seem to assume no responsibility for your completely unprovoked hostility, and continue on with sarcasm, even sarcasm about your own ridiculousness.)

In terms of data, obviously no study is perfect and we should not simply base everything on a single study, but the 2012 PISA results offer at least some evidence < http://www.oecd.org/pisa/keyfindings/pisa-2012-results-volum... >.

The particular sections of the actual study that cover poor performance of those who focus on memorization is not available in the free sample (Chapter 2), but it was reported on, e.g. here: < http://hechingerreport.org/memorizers-are-the-lowest-achieve... >, including this:

> The U.S. has more memorizers than most other countries in the world. Perhaps not surprisingly as math teachers, driven by narrow state standards and tests, have valued those students over all others, communicating to many other students along the way – often girls – that they do not belong in math class.

> The fact that we have valued one type of learner and given others the idea they cannot do math is part of the reason for the widespread math failure and dislike in the U.S.

There is also the discussion from Google that test scores and brainteasers do not predict later-on job success < http://www.newyorker.com/tech/elements/why-brainteasers-dont... > (and many algorithm interviews are absolutely the same kind of brainteaser nonsense).

From the NY article:

> The major problem with most attempts to predict a specific outcome, such as interviews, is decontextualization: the attempt takes place in a generalized environment, as opposed to the context in which a behavior or trait naturally occurs. Google’s brainteasers measure how good people are at quickly coming up with a clever, plausible-seeming solution to an abstract problem under pressure. But employees don’t experience this particular type of pressure on the job. What the interviewee faces, instead, is the objective of a stressful, artificial interview setting: to make an impression that speaks to her qualifications in a limited time, within the narrow parameters set by the interviewer. What’s more, the candidate is asked to handle an abstracted “gotcha” situation, where thinking quickly is often more important than thinking well. Instead of determining how someone will perform on relevant tasks, the interviewer measures how the candidate will handle a brainteaser during an interview, and not much more.

The other thing we have to fight against is self-selection. It's not necessarily in everyone's interest to publicize that their riddles and algorithm hazing process isn't working. Especially not for start-ups which need investors to feel like they are crammed to the brim with stereotypical nerds or something. So if you go looking along the lines of "well, my company uses riddles and we have hired well" you're already done. You haven't hired well. Your company (if it's a startup) probably isn't even remotely proven yet, even if it's well-funded, and the verdict is out on whether the people you rejected really should have been.

Re:Hiring Is Broken – My interview experience in the tech in... by ljw1001 on Wednesday April 27, 2016 @08:30PM (#11585772)
there's nothing 'current' about BFS. It hasn't changed. You'll never write one to meet a real, work-related need. It's just a memory test that puts recent grads at an advantage.
Re:Hiring Is Broken – My interview experience in the tech in... by bnastic on Friday April 29, 2016 @03:03PM (#11597984)
Yes, people will write them; the fact that you do not means nothing. Software field is large, do not project your experience onto the rest of the industry.
Re:Hiring Is Broken – My interview experience in the tech in... by ljw1001 on Sunday May 01, 2016 @12:51AM (#11604928)
Ok, people will write them, but very few people should write them.

Also, the question is, is the ability to write a BFS on a whiteboard a useful way to screen programming candidates for most positions. No it is not.

Re:Hiring Is Broken – My interview experience in the tech in... by bnastic on Tuesday May 03, 2016 @09:47AM (#11620566)
Tree traversal is such a basic algo that anyone who's done any amount of programming shouldn't have trouble working out how to do it, depth- or breadth-first, even if they haven't done that before. If a potential candidate can't figure that out, even in a simple pseudo-code, and even with guidance from an interviewer, I can't imagine ever hiring that person.

Next to arrays and lists, trees are such fundamental part of computer programming that I can't find an excuse for not being aware of some basic operations. I am not suggesting here that the RB or AVL trees and all the tricky stuff about them should be your bed time reading, but a certain baseline should be established.

Re:Hiring Is Broken – My interview experience in the tech in... by p4wnc6 on Wednesday May 11, 2016 @02:46AM (#11673083)
Many highly skilled and experienced programmers would struggle with this kind of thing in a whiteboard interview, but then if hired would be very good at the job.

The interview scenario is just not similar to on-the-job coding. It has different social pressures, time pressures, access to help, access to privacy, etc. etc.

Plus, for someone like me (I studied machine learning and stats, and all data structure knowledge is self-taught post college, yet I have 6 years experience writing scientific code, performant database stuff, etc.) I am always hearing about data structures and algorithms that are supposedly "fundamental" but I never even heard of them before and have yet to need them in a job.

Basically, all of my experience, and all of the experience of hiring software developers in any of the companies I've been in just completely suggests what you're saying is actually not true. It's just a story we tell to allow us to keep our crab mentality hazing rituals.

Re:Hiring Is Broken – My interview experience in the tech in... by serge2k on Wednesday April 27, 2016 @08:41PM (#11585826)
Not BFS exactly, but I did a breadth first traversal of a graph a couple weeks ago.

Could I have dug up a library to do what I needed, sure I guess. Easier to take 20 minutes and just write the tool.

Re:Hiring Is Broken – My interview experience in the tech in... by p4wnc6 on Wednesday April 27, 2016 @08:45PM (#11585838)
> Easier to take 20 minutes and just write the tool.

What? That would be a huge red flag in my book. Where are your unit tests? I'm not trusting your 20 minute off the cuff reproduction of classic algorithms in any business critical piece of the code, not ever.

This would get you booted from a lot of places, or at least given a stern talking to for doing something that seems slick, cool, and time-saving in the short term (yay, let's roll our own!) when really it's immature and time-wasting in the long run.

Never (!) homebrew that shit unless you have to (like, you're in an embedded environment or your use case requires some bleeding edge research algorithm).

It's like seeing someone write their own argument-parsing code. Holy shit, what a bad idea. Never (!) do that.

Re:Hiring Is Broken – My interview experience in the tech in... by lastofus on Wednesday April 27, 2016 @10:22PM (#11586198)
The pseudo-code of BFS is all of 20 lines, and that's accounting for a graph possibly containing cycles. A graph without cycles (such as a tree) would be even simpler/shorter.

https://en.wikipedia.org/wiki/Breadth-first_search

Correct arg parsing is actually significantly more complicated in comparison because of all the possibilities and edge cases.

> Never (!) homebrew that shit unless you have to (like, you're in an embedded environment or your use case requires some bleeding edge research algorithm).

I can't help but think this mentality is what lead to the recent left-pad debacle

Re:Hiring Is Broken – My interview experience in the tech in... by p4wnc6 on Wednesday April 27, 2016 @11:45PM (#11586447)
> I can't help but think this mentality is what lead to the recent left-pad debacle

It borders on category error to compare homebrewing argument parsing with an overreliance on microframeworks extending all the way down to leftpad. Argument parsing is almost always supported directly by the language implementers in a standard library. And even if it wasn't, it's such a critical task with huge overhead for handling corner cases, cross-platform details, etc., that the value of a central implementation is obvious. A left pad operation ought to be part of the standard language (which is actually what the leftpad debacle was about, Javascript's incredible failures as a language), but it's too trivial to compare it to something like argument parsing.

> The pseudo-code of BFS is all of 20 lines, ...

If it's only 20 lines, that's great because it means it was easy for the other 500 library writers to write it, write tests, and observe and fix issues over time. So, whew, that's 20 lines I totally shouldn't waste my time on, plus unit tests and routine maintenance I don't have to commit to.

And also, given the wide acknowledgement that a good programmer should be writing at most a few hundred lines of code per day (otherwise it's probably mostly junk), 20 lines of code is not trivial.

Probably most programmers write a whole lot more than that per day (especially if counting copy/pasted code), but this is in part a sign of a bad programmer, or perhaps more so a sign of the anti-quality constraints placed on them by most employers.

Re:Hiring Is Broken – My interview experience in the tech in... by lawrjone on Thursday April 28, 2016 @06:00AM (#11587589)
What the hell sort of library would you crack out to do a breadth first search traversal? This is my main problem with the OP, BFS isn't some arcane complex cryptic algorithm, it's a way of moving through a data structure that becomes natural and very obvious when you think about how you can effectively traverse it for some tasks.

If I were ever to want to traverse something in a breadth first search manner, then I would just write it. It would take longer to search for another library and read how it's somehow implemented this search than it would to write it, test it, get it reviewed, and we've still avoided adding another potentially crappy dependency to our project.

It's not category error to compare this to leftpad. leftpad actually makes more sense imo, as it's a common microfunction that may be used more than once. BFS is typically far more coupled with the underlying data and is more naturally written inline.

Re:Hiring Is Broken – My interview experience in the tech in... by p4wnc6 on Thursday April 28, 2016 @09:29AM (#11588621)
> we've still avoided adding another potentially crappy dependency to our project.

No, you've just added the crappy dependency == your off the cuff implementation (which is even more work since you have to handle issues and unit testing for it too).

> What the hell sort of library would you crack out to do a breadth first search traversal?

In Python I would use networkx probably, unless there was a good reason I couldn't (such as working in an embedded environment where I couldn't install large libraries). It ought to require an exceptional circumstance to stoop to implementing it myself.

Tell me, if we switched from talking about breadth first search to, say, inverting a matrix with Gaussian elimination and pivoting, do you feel the same? Are you going to trust your implementation over something you can get from netlib?

Re:Hiring Is Broken – My interview experience in the tech in... by lawrjone on Friday April 29, 2016 @05:12AM (#11594553)
In the case where you'd require a bfs to traverse a graph, you're already doing something that is algorithmic, and will otherwise be prohibitively costly if explored in a dfs manner. The most complicated part of this algorithm is highly unlikely to be the bfs itself, with it's highly likely 10 lines of code in total.

In this case, someone who didn't have the time to visualise exactly how the bfs is operating shouldn't be writing the algorithm. Pretending like you don't need to know the details of how it traverses the tree when you needed to choose the specific implementation for this algorithm to be performant is a lie. It's not like Guassian elimination, where the concept is far more abstract, this is a concrete idea of how you're moving through the graph and shouldn't be some black magic.

On top of this, who writes this code and doesn't test that it does what you expected it to do on sample data. If you bfs implementation was bust, then you'd miss nodes or revisit them, which becomes immediately apparent from testing the algorithm you're writing.

> It ought to require an exceptional circumstance to stoop to implementing it myself.

Maybe the problem here is that I see a bfs as a fundamentally simple algorithm. Saying writing it yourself must be an exceptional circumstance sounds about as crazy to me as saying no-one should ever use for loops, they expose you to making mistakes with an index you may forget is zero-based, please use anonymous iterators instead. When something takes 5m to write, is heavily tested by default (as it will be a feature under test anyway and possible flaws will be highly obvious) and is at the same level of abstraction as the code you'll be writing around it, then just write the damn thing.

EDIT - Try writing a BFS that operates on an acyclic graph that outputs the value of each node, that compiles and runs and prints at least two node values that has a bug. Try writing bugs into this, it's actually difficult to screw up.

Re:Hiring Is Broken – My interview experience in the tech in... by p4wnc6 on Saturday April 30, 2016 @12:48PM (#11602423)
> Maybe the problem here is that I see a bfs as a fundamentally simple algorithm.

Yes, this kind of hubris is often the root of the problem when so-called 'simple' algorithms get homebrewed, then later on unexpected corner cases pop up, testing isn't adequate, you didn't implement it in an extensible way, your implementation is unacceptably inefficient, etc. etc.

> On top of this, who writes this code and doesn't test that it does what you expected it to do on sample data. If you bfs implementation was bust, then you'd miss nodes or revisit them, which becomes immediately apparent from testing the algorithm you're writing.

Yes, but the point is that testing isn't free. If you commit to writing your own implementation of something to interface with whatever larger business / domain-specific project created the need for it in the first place, then you have to dedicate not just the time to write it, but also the time to test it, and to test how it integrates, and to maintain the API for it and maintain its integration (possibly backward compatibility, etc. etc.)

If you adopt a standard to use a certain library, then up to the degree to which you trust the library, those problems are mostly offloaded to others. For things like classical algorithms, the libraries are extremely trustworthy, so many of the pitfalls of adding a dependency don't apply.

> In this case, someone who didn't have the time to visualise exactly how the bfs is operating shouldn't be writing the algorithm.

It's not about being too pressed for time. Even if you had all day, it's a poor use of time to create more future work for yourself by yoking yourself to all the extra responsibilities that come along with rolling your own. Yoking yourself to those responsibilities should require an exception reason for doing so.

> Saying writing it yourself must be an exceptional circumstance sounds about as crazy to me as saying no-one should ever use for loops, they expose you to making mistakes with an index you may forget is zero-based, please use anonymous iterators instead.

This is an extremely fallacious comparison. Basic control structure are built in features of the language. You don't have to test or maintain the runtime execution of a for loop, that's the job of language designers. Making mistakes in the usage of something (like an off-by-one index) is completely non sequitur to this entire discussion. I don't see how you would think that type of bug is related to anything I'm saying.

In general, you also assume a much higher fidelity of testing than what happens in the real world. In 99% of software jobs, you'll be extremely lucky if someone even documents their homemade BFS algorithm, let alone writing even the most superficial of tests. Expecting them to give you an adequate bank of automated tests is like believing in the Easter Bunny.

> Try writing bugs into this, it's actually difficult to screw up.

Ugh.

Re:Hiring Is Broken – My interview experience in the tech in... by GFK_of_xmaspast on Thursday April 28, 2016 @12:24PM (#11589972)
In practice it's extremely easy to mess up gaussian elimination and get implementations that are bad or just plain wrong.
Re:Hiring Is Broken – My interview experience in the tech in... by p4wnc6 on Thursday April 28, 2016 @02:13PM (#11590826)
I totally agree. And no one should let hubris make them think otherwise for e.g. graph traversal algorithms.
Re:Hiring Is Broken – My interview experience in the tech in... by microtherion on Tuesday May 03, 2016 @04:40AM (#11618901)
There is, for instance, the Boost Graph library in C++: http://www.boost.org/doc/libs/1_60_0/libs/graph/doc/table_of...
Re:Hiring Is Broken – My interview experience in the tech in... by ljw1001 on Thursday April 28, 2016 @07:21AM (#11587912)
I would use one of the tree implementations in java.util. You may have heard of it.
Re:Hiring Is Broken – My interview experience in the tech in... by ljw1001 on Wednesday April 27, 2016 @09:01PM (#11585900)
Agreed. Spending twenty minutes finding a good library would be time much better spent
Re:Hiring Is Broken – My interview experience in the tech in... by serge2k on Wednesday April 27, 2016 @09:29PM (#11586003)
> It's like seeing someone write their own argument-parsing code. Holy shit, what a bad idea. Never (!) do that.

So we did that. works well. I dunno, maybe this company is just full of incompetents. I mean, I doubt it, but it is possible.

I appreciate judgement without context as well. Really, it's awesome.

Re:Hiring Is Broken – My interview experience in the tech in... by p4wnc6 on Wednesday April 27, 2016 @09:45PM (#11586058)
If you did write your own argument parsing code, then yes the choice to commit to that was incompetent, barring some extraordinary situation.

I don't think it's controversial or insulting to say so in the least. It's a solved problem in every major language and most fringe languages. Spending time re-inventing it is just obviously wrong.

It's not insulting or judgmental to say that it's wrong. It's just a fact. I do not understand being offended or angry about my statement of that fact. If we're talking about what is effective engineering and what is not, writing your own argument parsing tool for actual business usage (as opposed to doing this as a pedagogical side project or something), without evidence of some exceptional corner case, is ineffective engineering. It's practically the definition of ineffective engineering.