News for hackers. Stuff that matters.
Re:Harder programming questions do a worse job of predicting... by Apocryphon on Monday February 18, 2019 @03:26PM (#19194084)
> Not knowing when to use a hash table instead of a nested-for loop

On the flip side, the O(1) look-up nature of hash tables make them the no-brainer data structure to use, at least for passing programming interviews. Perhaps more interesting test questions would be when not to use hash tables.

Re:Harder programming questions do a worse job of predicting... by entee on Monday February 18, 2019 @04:07PM (#19194468)
Fully agreed. Most questions I got when I started out as a data scientist interviewing for jobs were pretty simple: "use a hash table to count stuff, join stuff, lookup stuff". However not once did I get asked, "why do databases not exclusively use hash tables if they're so good?" That's a much more interesting question, though perhaps out of scope for a data scientist. I'd add that I've never heard that question being asked of engineers, I'd love to hear of people out there getting it though.
Re:Harder programming questions do a worse job of predicting... by tombert on Monday February 18, 2019 @04:10PM (#19194488)
I actually got that exact question once, or pretty close to it. I'm paraphrasing, but the question was "Hash tables are cool, but what's a data structure they might use in a DB besides that?". This was pretty early in my career, so it stumped me, and he pointed out that a binary tree is used semi-often because of ordering.
Re:Harder programming questions do a worse job of predicting... by pedrosorio on Tuesday February 19, 2019 @12:06AM (#19196743)
I am surprised B-trees were not the first data structure in that discussion, as they are "famous" for being used in DBs.

Although these days one should talk about "learned index structures" instead, I guess :)