News for hackers. Stuff that matters.
Re:The greatest resume I've ever seen by monster_group on Thursday September 30, 2021 @09:52AM (#28706307)
Interviewer - "That's impressive Daniel. Now can you invert a binary tree on the whiteboard?"
Re:The greatest resume I've ever seen by arenaninja on Thursday September 30, 2021 @10:25AM (#28706695)
Recently I went through a phone screen by a gentleman I imagine to be in his 50s or 60s and it was an immensely pleasant experience. No gotcha questions and any time I mentioned how his problem reminded me of so-and-so tech he would gush in excitement that he also worked in that tech

Compare to a recent interview with the world's best employer (tm): the interviewer was young, was upset that my solution wasn't written in Java (???), and when I described my experience I talked about dashboards and he didn't know what that was. I described it as charts and he didn't know what that was. I described it as graphs and he also didn't know what that was. The interviewer had a bit of an accent so maybe it was a language issue but I had never run into someone who hasn't heard of a chart!

Re:The greatest resume I've ever seen by vxNsr on Thursday September 30, 2021 @12:09PM (#28707976)
> I described it as charts and he didn't know what that was. I described it as graphs and he also didn't know what that was. The interviewer had a bit of an accent so maybe it was a language issue but I had never run into someone who hasn't heard of a chart!

It’s at this point that I would end the interview and let them know it doesn’t feel like it would be a good fit.

Re:The greatest resume I've ever seen by NikolaeVarius on Thursday September 30, 2021 @10:59AM (#28707126)
The amount of time people spend complaining about solving trivial problems would be better spent studying for those problems in the first place.

If you literally know what questions are being asked in a test, you should probably fucking just learn it an move on.

Re:The greatest resume I've ever seen by snarf21 on Thursday September 30, 2021 @11:21AM (#28707395)
I think the issue is that the interviewee doesn't always know what is on the "test". It is also a waste of everyone's time. If a company's only data store is SQL of some kind, which do you want: Someone who can barely do joins but has memorized red/black tree function implementations in several languages or some one who knows SQL at a production level and if they had to do something with red/black trees would just have to spend a day or two re-reading how they work? I think the thing this underscores is that we really need an association like the "bar". So you can go study all the things on the test and prove you have the knowledge and ability and then skip that as part of hiring and just focus on experience. The only thing we have today is tech company specific certification which is okay for certain things but not for more general software needs.
Re:The greatest resume I've ever seen by irateswami on Thursday September 30, 2021 @01:00PM (#28708505)
"If you know the volume of a toilet bowl 1.3 gallons, how many radii of the earth's rotation would fill the visible universe" - Google interviewer
Re:The greatest resume I've ever seen by moron4hire on Thursday September 30, 2021 @10:57AM (#28707093)
Jesus christ.

Inverting a binary tree is not hard. That people keep using this as a joke is more a testament to the stubbornness of people believing they shouldn't have to do no learnin' no more than it is bad interviewing practices.

Re:The greatest resume I've ever seen by mcntsh on Thursday September 30, 2021 @11:12AM (#28707278)
> shouldn't have to do no learnin'

Expecting engineers to develop skills they don't learn/use in their actual professions to prove they're capable of working a job makes no sense. If these leetcode puzzles were actually relevant, why do so many engineers have to spend time outside of work "grinding" in order to get better at them?

Re:The greatest resume I've ever seen by dahart on Thursday September 30, 2021 @11:43AM (#28707656)
> Expecting engineers to develop skills they don’t learn/use in their actual professions to prove they’re capable of working a job makes no sense.

I used to feel this way, but I think I’ve changed my mind. Interviews aren’t really primarily testing for skills you’ll use day to day, they’re testing for breadth of skills and knowledge and more importantly breadth of understanding. When I’m interviewing, knowing if the candidate has the specific skills for the job is the bare minimum needed to get in the door. I’m really more interested in potential, how much they can grow, and indicators of growth potential include how interested they are in the art of programming in it’s many different forms, whether it’s algorithms or math or software architecture, or coordinating people who write software. Puzzles are only the tiniest fraction of all that, but they’re still a signal that you like thinking about algorithms, and have exposure to different ways to write code and lots of algorithmic concepts.

A university CS degree isn’t particularly good at teaching job skills per se either, there isn’t much I use in my job day to day that I practiced in school, at a superficial level. But the school degree is pretty good at covering the broad concepts of computer science, and that has lasting value over the course of a software career.

Re:The greatest resume I've ever seen by otterley on Thursday September 30, 2021 @12:18PM (#28708080)
How do these questions give you any indication that the candidate can do the essential job functions of shipping working code that is actually useful to your business and being a good teammate?
Re:The greatest resume I've ever seen by moron4hire on Thursday September 30, 2021 @12:22PM (#28708121)
That question is impossible to answer. However, the negation is answerable. "Is the candidate incapable of the essential job function?" Questions like fizz-buzz, et. al. answer that readily.

Put up a job posting on a job board and you'll get hundreds of applications. 90% of those you're going to throw out because the resume doesn't match the job description at all. What does that tell you about the candidate pool? It's an all out assault of candidate spam. You have to employ these sorts of basic filters to even get the number of interviews you do down to a managable number.

Re:The greatest resume I've ever seen by Jiro on Thursday September 30, 2021 @12:48PM (#28708378)
What it tells you about the candidate pool may be less than what it tells you about the qualifications for the position. Job requirements in the computer industry routinely include nonsensical requirements (5 years experience in something that's been around 3 years, 2 years experience in each of 8 items for an entry level position, etc.)

This is endemic to the point where applying only for jobs where you fit the job description is a losing strategy.

And even if your own job posting isn't one of those, how is the applicant supposed to know you're one of the few employers who actually means what's in the job description?

Re:The greatest resume I've ever seen by dahart on Thursday September 30, 2021 @03:53PM (#28710546)
This is a good question. However, there is nothing that will tell you this reliably aside from employing the person.

Most people who are smart and get things done will be capable of shipping code, if they can stay motivated. And that’s where having some signal about their interest can help. I want to know if people can inspire their teammates, not just get along, I want to know if they can lead by example, whether they’ll rise quickly, and whether they’ll love it for many years. The essential job functions are just plumbing, the important parts are more than that and aren’t demonstrated by evaluating for narrow, specific job skills.

Look, I don’t in a million years think grinding on Leetcode is some singular answer, or even particularly good. But I don’t see anything wrong with people who are interested doing it, and I also don’t see anything wrong with asking interview questions. I never put a huge weight on such algorithm questions, and there are a dozen other major interview categories. So there’s nothing wrong with asking a few algorithm theory questions, to see the bounds of what people know. I like getting into questions that people don’t know the answer to, whether it opens a conversation about what it means, or whether the candidate has no idea or doesn’t care, that is a small amount of useful signal to me.

Re:The greatest resume I've ever seen by recursive on Thursday September 30, 2021 @12:01PM (#28707872)
If playing scales were actually relevant for a professional musician, then why do they have to spend time outside of concerts practicing them in order to get better?
Re:The greatest resume I've ever seen by TheCoelacanth on Thursday September 30, 2021 @04:41PM (#28711061)
Inverting a binary tree is nothing but basic pointer-chasing and recursion. Both skills that software engineers need.

It's like a chef complaining about being asked to make a fried egg. They might not be making that exact food in their job, but it's trivial for anyone proficient with the basic techniques that they need in their job.

Re:The greatest resume I've ever seen by mcntsh on Friday October 01, 2021 @03:27AM (#28715641)
I'll say it again -- if these skills were something software engineers needed, there wouldn't be a need for services like Leetcode because SWEs would just learn these skills at their jobs.
Re:The greatest resume I've ever seen by eps on Thursday September 30, 2021 @11:49AM (#28707730)
Reversing a tree is not a skill. It's a test of rudimentary experience working with fundamental data strutures. You are not expected to know the solution, but you are expected to produce one if asked.

"Leetcode puzzles"... jeez.

Re:The greatest resume I've ever seen by mcntsh on Thursday September 30, 2021 @02:38PM (#28709587)
Again, if this "experience" so "rudimentary", why do top engineers spend time on leetcode trying to get better for interviews? Wouldn't this "rudimentary" experience be learned through their, you know, actual work experience?
Re:The greatest resume I've ever seen by eps on Thursday September 30, 2021 @06:34PM (#28712135)
Because these "top engineers" are self-taught with massive gaps in their base CS education? Reversing a tree tests for the knowledge of binary trees and recursion, which is... what?... a second year of a CS program, conservatively?
Re:The greatest resume I've ever seen by mcntsh on Friday October 01, 2021 @01:41AM (#28715013)
Go on Blind. There are plenty of engineers at top companies in the Bay Area talking about “grinding leet code” as a part of their job searches.
Re:The greatest resume I've ever seen by stephenhuey on Thursday September 30, 2021 @12:23PM (#28708129)
Neither is counting on your fingers in binary, but would you time someone on that with a stopwatch if they would never use such a party trick during the course of a job in your company? Or perhaps we should just test their Spanish pronunciation since that would be about as relevant as inverting binary trees for any position I’ve held in 2 decades of software jobs (I’ve almost done consulting in Latin America which means my Spanish skills would be even more relevant for solving technology problems than inverting binary trees—at least for me).
Re:The greatest resume I've ever seen by moron4hire on Thursday September 30, 2021 @12:41PM (#28708307)
If I'm hiring you to develop GUIs and work with relational databases, I'm hiring you to work on tree structures. I think you should have to prove you aren't completely clueless about tree structures.

If I were hiring you to work on raw data streams, I'd expect you to be able to figure out how to count in binary on your fingers in 10 seconds, if you hadn't already figured it out while sitting around bored somewhere.

Re:The greatest resume I've ever seen by stephenhuey on Thursday September 30, 2021 @04:04PM (#28710675)
So, I just read more about what you do, and you do some cool stuff. I know a ton of developers and most of them do nothing like what you do. The point is lots of people are annoyed at being asked interview questions about things unrelated to the job.
Re:The greatest resume I've ever seen by moron4hire on Thursday September 30, 2021 @09:02PM (#28713263)
I wasn't always a VR developer leading my own dream project, and I didn't get to be where I am by crying about "why should I know this? I don't need it for my job every single minute of every single day."

You know what my first job was out of college after graduating with the highest GPA in my major? QA tester. That's all I could get. I had to beg to get commit access to fix bugs I found that I knew exactly how to fix.

Re:The greatest resume I've ever seen by recursive on Thursday September 30, 2021 @11:59AM (#28707856)
Wait, inverting a tree is a real thing? What does that even mean? All the terminal leaf nodes become roots? That can't be right. I thought part of the joke was that it was impossible.
Re:The greatest resume I've ever seen by eunoia on Thursday September 30, 2021 @12:05PM (#28707923)
Horizontal inversion (mirror). I was equally confused though the first time I was asked lol.
Re:The greatest resume I've ever seen by recursive on Thursday September 30, 2021 @12:09PM (#28707973)
I would have called it "reversing", but I guess that sounds less technical. Now I'm confused, just in a different way. There's no obscure algorithm for this, just maybe 4 straight-forward lines, depending on language. I guess it tests whether you've ever heard of recursion.

I thought the meme depended on it being some obscure, difficult, and irrelevant thing.

Re:The greatest resume I've ever seen by moron4hire on Thursday September 30, 2021 @12:25PM (#28708155)
Well, now you know. It's a meme that has become its own meta-meme.
Re:The greatest resume I've ever seen by Arcuru on Thursday September 30, 2021 @12:12PM (#28708011)
The root is still the root, but everything else is just flipped: https://leetcode.com/problems/invert-binary-tree/

It is also extremely simple:

  TreeNode* invertTree(TreeNode* root) {
    if (root) {
      invertTree(root->left);
      invertTree(root->right);
      std::swap(root->left, root->right);
    }
    return root;
  }
Re:The greatest resume I've ever seen by approxim8ion on Thursday September 30, 2021 @11:39AM (#28707602)
The difficulty isn't the point. Your ability to invert a binary tree has very, very little to do with you writing CRUD applications.
Re:The greatest resume I've ever seen by moron4hire on Thursday September 30, 2021 @12:15PM (#28708056)
I see this attitude all the time. It's usually from people who don't know anything about basic data structures like trees. How would you know that they don't apply?

It does apply. GUIs are fundamentally tree structures. Relational databases are fundamentally tree structures. JSON documents are fundamentally tree structures. Almost everything you're touching in a CRUD app is some kind of tree and you think knowing how to work with trees has "very, very little to do" with writing them? Again, how would you know?

I'm so serious that not knowing how to invert a binary tree is ludicrously bad. It's just a swap operation. You walk the tree and you swap the left and right branches of every branch you find. That's it. It's not black magic.

    invert(tree):
      if(tree not null):
        temp := tree.left
        tree.left <- tree.right
        tree.right <- temp
        invert(tree.left)
        invert(tree.right)
That's why it's used as an interview question. It's not meant to be a test of skill. It's a shiboleth. It's one of the easiest ways to quickly answer, "is this the sort of 'programmer' who is likely to import a whole package for padding strings with spaces?"
Re:The greatest resume I've ever seen by krapp on Thursday September 30, 2021 @12:19PM (#28708099)
>It's one of the easiest ways to quickly answer, "is this the sort of 'programmer' who is likely to import a whole package for padding strings with spaces?"

But that's the sort of programmer who gets hired, because SOP for Javascript development (and oftentimes elsewhere) is to import the existing library, and any developer who insists on writing that code themselves would be considered a code cowboy wasting company time and resources, and likely writing less safe code in the process.

Re:The greatest resume I've ever seen by dragonwriter on Thursday September 30, 2021 @12:22PM (#28708123)
> How would you know that they don't apply?

Because implementing low level algorithms like that is almost never an issue for application programming in modern languages, for which robust libraries for such operations exist and are data agnostic.

Unless you are using Go, pretty much the only modern popular language that both features static typing and lacks generics, so that kind of algorithm re-implementation task might make some sense for screening application programmers using Go.

Re:The greatest resume I've ever seen by foobarian on Thursday September 30, 2021 @12:57PM (#28708484)
> Because implementing low level algorithms like that is almost never an issue for application programming in modern languages

Except it is. You spend a lot of time traversing nested tree-structured data, validating it, sorting it, filtering it. If you can't do the simple inversion operation you have no hope with the more complicated stuff.

Re:The greatest resume I've ever seen by moron4hire on Thursday September 30, 2021 @12:37PM (#28708271)
You usually have a structure that is already tree-like and need to write custom code to walk over it. If you're taking a tree-like thing and first extracting it to another tree structure just to do basic tree operations, then you're already performing tree-traversal and just wasting a lot of time, disk, CPU, and memory just to bundle every person-under-the-sun's tree structure needs into one place.
Re:The greatest resume I've ever seen by dragonwriter on Thursday September 30, 2021 @12:55PM (#28708465)
> you're taking a tree-like thing and first extracting it to another tree structure just to do basic tree operations,

Why would you do that? The whole point of libraries of generic operations is that you can apply them to thing you have without copying.

Re:The greatest resume I've ever seen by ThrowawayR2 on Thursday September 30, 2021 @06:12PM (#28711979)
So who writes the libraries? It certainly isn't people who can't manipulate tree structures.
Re:The greatest resume I've ever seen by andrei_says_ on Thursday September 30, 2021 @12:12PM (#28708012)
I’ve never in my 10+ year career needed to invert a binary tree.
Re:The greatest resume I've ever seen by moron4hire on Thursday September 30, 2021 @01:03PM (#28708542)
Well, good for you. In my 20 year career, I've never not had a job that didn't eventually require me to flex my computer science degree.
Re:The greatest resume I've ever seen by koonsolo on Thursday September 30, 2021 @01:46PM (#28709022)
Most of the time the work is trivial for all developers involved. But in some special cases, some developers might reach their limit while other don't. That is my experience.

And most of the time, you can rely on the Master degrees to pull through. Although I once worked with someone without a degree, but he could do magic like no other programmer I met.