Live data from Hacker News

Green Lumber Fallacy in Software Engineering

chrisbehan.ca

51–60 of 238 posts

Re: Green Lumber Fallacy in Software Engineering

#51
post #26

While trying to read more about the actual case of the trader who didn't know what he was trading, I found [1] which contains this quote: > The “green” in green Douglas fir refers to the fact that it has been newly cut (it has not been dried), just like someone who is new at something is referred to as green. This was interesting/funny to me, since I was sure that the name "green lumber" comes from the fact that it i…

It's the other way around: the "green = new" is derived from the usage of green timber, where newly cut timber is literally green.

Re: Green Lumber Fallacy in Software Engineering

#52

The test isn't so much about the ability to invert a binary tree (for example), but the ability to problem solve complicated problems where the obvious solution is probably not the best one. In interviewing, it is hard to produce real world problems that don't require a huge amount of context and details of some obscure software stack, so we go with abstract problems which are kind of irrelevant to real work, but the…

This actually seems like a pretty simple problem, to be honest, where the obvious solution is the best one.

Inverting a binary tree means reversing the order of the sequence of elements that it represents. Thus inverting a binary tree is simply swapping the left and right edge of every node recursively down the tree.

You could do this with a recursive algorithm by modifying the tree in-place or by constructing a new tree. I don’t see any obvious candidate optimizations other than the fact that it’s straightforward to do in place (e.g. using std::swap in C++, or mem::swap in Rust).

However I don’t think this is as good of an interviewing question as other potential questions. See my other comment in the thread for one that I think is better. The reason is that programming tasks like this are pretty uncommon to encounter as a professional software engineer.

Better questions (IMO) are tasks that professional software engineers are likely to encounter while doing their job at the company — or representations of them, while testing knowledge of A&DS as necessary.

Even if a company does particularly a lot of work with binary trees, then that company would be likely to have number of such A&DS already implemented. If you’re working at Google then I can’t imagine that you would need to build a binary tree data structure or an algorithm for inverting them; undoubtedly these implementations already exist within their standard libraries.

Personally, I can’t immediately ever recall encountering a binary tree in business logic while working as a professional engineer. I wouldn’t expect to unless I was building some thing like a collections library or a specialized solution to a large scale problem like implementing a novel data store of some kind.

And if I was doing that kind of work I’d break out references (e.g. Knuth as a starting point, and any relevant recent research), and review open source software for comparison or as a candidate for directly solving the problem (SQLite, MySQL/InnoDB, LevelDB & BDB, Apache Commons libraries, etc.)

Re: Green Lumber Fallacy in Software Engineering

#53
post #49

I've heard bitching about some of the interview questions our team asks before, but here's the thing: each of those questions is about a problem our team actually had to solve before, reformulated into an interview-style question. Yes, we've had to use Hamming distances, worry about the scaling (N log N vs N^2) of particular solutions, use error-correcting codes, interesting data structures and all of that. Is that m…

I bet you have. But how long did you have to solve it? Did you have access to the internet, talking out ideas with your colleagues, coffees? I agree that you can’t simulate real scenario in an interview, but you can also acknowledge that the process is a little cartoonish.

Re: Green Lumber Fallacy in Software Engineering

#54

If I have money for every article that rail against DS&A algorithm.... I don't understand why people hate DS&A so much. Just do it. Get money, jump ship, get more money, it also makes you a better engineer. It gives you better compensation, it helps you, helps everyone, helps your team, your company. It helps avoid wasting time as well on both sides. There is no downside of studying DS&A and Leetcode, if there is, th…

I came here to basically say this. You want the big salary at the fancy company, show me you put in the work to earn it.

Re: Green Lumber Fallacy in Software Engineering

#55
Article says "There’s no better way to see how someone performs at the job than having them actually do the job." and argues for a trial work period.

Well sure, except the first part of any job is coming up to speed on the domain, the codebase, who the key people are, etc. So if you want to see how someone really performs, you're going to have to wait a while past that initial period. And that means you're going to have a lot of people who won't make it past the trial needing support.

Re: Green Lumber Fallacy in Software Engineering

#56

If I have money for every article that rail against DS&A algorithm.... I don't understand why people hate DS&A so much. Just do it. Get money, jump ship, get more money, it also makes you a better engineer. It gives you better compensation, it helps you, helps everyone, helps your team, your company. It helps avoid wasting time as well on both sides. There is no downside of studying DS&A and Leetcode, if there is, th…

My objection is maintaining an entirely unrelated skillset that I have never encounter in my day to day work. It is a skill that you will lose if you spend a year without interviewing/leetcode practicing. Sure I’ll do it, but you may as well test me on painting famous oil artwork from memory too. > I don't understand why people prefer "here take home questions/work for 5 hours for free" over DS&A interview. The alter…

Yes, well said. If these skills maintained themselves after being learned through day to day, I wouldn’t mind interviews centered around them.

But they don’t, and probably won’t unless I shift to much lower level work, so it’s a ton of extra work and stress for the sake of being able to pass an interview.

Re: Green Lumber Fallacy in Software Engineering

#57
post #49

I've heard bitching about some of the interview questions our team asks before, but here's the thing: each of those questions is about a problem our team actually had to solve before, reformulated into an interview-style question. Yes, we've had to use Hamming distances, worry about the scaling (N log N vs N^2) of particular solutions, use error-correcting codes, interesting data structures and all of that. Is that m…

I bet you have. But how long did you have to solve it? Did you have access to the internet, talking out ideas with your colleagues, coffees? I agree that you can’t simulate real scenario in an interview, but you can also acknowledge that the process is a little cartoonish.

Interviewees are encouraged to use Google, code on a laptop rather than on a whiteboard, etc. Sadly, I only get an hour to interview people rather than a week. But I have had people complain about "completely unrealistic problems unrelated to the real work" when the problem is something I literally had to solve 3 months ago.

Re: Green Lumber Fallacy in Software Engineering

#58

If I have money for every article that rail against DS&A algorithm.... I don't understand why people hate DS&A so much. Just do it. Get money, jump ship, get more money, it also makes you a better engineer. It gives you better compensation, it helps you, helps everyone, helps your team, your company. It helps avoid wasting time as well on both sides. There is no downside of studying DS&A and Leetcode, if there is, th…

My objection is maintaining an entirely unrelated skillset that I have never encounter in my day to day work. It is a skill that you will lose if you spend a year without interviewing/leetcode practicing. Sure I’ll do it, but you may as well test me on painting famous oil artwork from memory too. > I don't understand why people prefer "here take home questions/work for 5 hours for free" over DS&A interview. The alter…

> My objection is maintaining an entirely unrelated skillset that I have never encounter in my day to day work.

This is precisely my objection. Time is the one thing you can't make more of, so to have companies force you to learn and maintain a skillset that's completely irrelevant to doing real work is incredibly demoralizing.

Re: Green Lumber Fallacy in Software Engineering

#59
post #32
post #23

Earlier quoted context omitted.

>>partly responsible for why so many devs stay in the same position That is why I am staying put for the time being; hate the interview process, hate being asked stupid questions about solving problems that I will never have to solve in real life. Ask me about projects I have worked on, ask me about code I have developed ask about my experience etc - but I am still looking for the development job where I will be requ…

I have a very talented SWE friend who only left a now-public unicorn because they were recruited by a former colleague at a startup they knew wouldn't involve leetcode in the interview process. I have another very talented SWE friend who has been doing leetcode exercises off and on for months and is struggling to start doing applications even though they do not like their current work and are undercompensated. They f…

> From what I've observed leetcode screens are problematic enough that they are causing market inefficiency.

Totally agreed, I know of many similar situations like this.. however at the same time the question is whether there’s any other system that’s better in practice.

“Capitalism is the worst system, except for all the others” etc.

You want a controlled trial or natural experiment where two large successful software companies experiment with two different approaches to hiring over a number of years holding all other factors equal. That’s hard but may happen at some point in our lifetimes.

Re: Green Lumber Fallacy in Software Engineering

#60
Data structures and algorithms questions are a perfect proxy for (1) is the candidate smart and (2) can the candidate write moderately complex code (arrays, hash maps, pointers, nested loops). 90% of candidates will fail 2, and you will get a good idea of the rest with 1.

Unless your company can afford a month-long interview process for every candidate which the author suggests, this is the best we have.

Post reply on HN