News for hackers. Stuff that matters.
Re:Ask HN: Code examples to find out if a person is addicted... by nostrademons on Monday June 26, 2017 @02:43PM (#14639186)
Have them build "A framework for X", where X is some commonly-done problem most programmers in their field have worked on (webapps, CMSes, forums, build systems, big data, etc.), ideally related to your business. If you want to do this in an interview or take-home setup, you will likely need to use a cut-down version of this problem, although really, much of the point of it is to see just how much the problem expands.

An engineer who doesn't overengineer will first ask a lot of questions about why you need X, and then will build X, and then only after you have tweaked the problem requirements will generalize that into a framework. They are likely to think this is a bad interview question, which it is, and push back to get the actual concrete requirements. That's exactly what you want; overengineering happens when people guess at the requirements instead of making sure of them.

An engineer with a propensity toward overengineering will love this question, and immediately jump into all the features their framework will support. They'll carefully get lost in thought brainstorming new features that might be cool, but when it comes time to implementing it, they'll either completely fail to reconcile all the contradictions that have crept into the design, or they will come up with a very complicated mess that does everything but trades off unspoken requirements (like performance or simplicity) for them.

This mirrors how frameworks actually work in the real world: basically every framework that people actually use was extracted out of a working app that solved one problem well, while every framework designed from scratch is an overengineered mess.

Re:Ask HN: Code examples to find out if a person is addicted... by stinos on Monday June 26, 2017 @03:10PM (#14639389)
> will first ask a lot of questions about why you need X

Have an upvote, I love advice like this: a good engineer has the capability to have the one posing the problem also reflect on the problem and the requirements and should never just say 'ok let's do this' without making sure it is really needed. Because face it, there are a lot of people out there coming to engineers with a question and a 'solution' which is actually already partly an implementation - in a domain they're not really good in. (example of that style: I want a sandwich! Engineer, build me a sandwich vending machine!) Good engineers know how to deal with that as well, and will ask as many questions as needed to figure out the optimal (combination of good enough/least work/least technical debt) solution in a given situation. Which, sometimes, might be as simple as 'wont fix, no real need for it'.

Re:Ask HN: Code examples to find out if a person is addicted... by ianleeclark on Monday June 26, 2017 @03:28PM (#14639557)
I don't know if I necessarily agree with this. I'm not necessarily coming at this from the question OP proposed, but from an interviewing standpoint. I've seen a lot of interview questions that didn't necessarily have a real use in reality, so asking the interview _why_ they wanted something implemented can be seen as badgering them and like you might not be a good fit. On the other-hand, if you were to focus your questioning on the implementation, and the interview was fishing for you to question _why_ they wanted something, you may be seen as an someone with a propensity to over-engineer. It's potentially a lose/lose situation.
Re:Ask HN: Code examples to find out if a person is addicted... by humanrebar on Monday June 26, 2017 @03:13PM (#14639416)
Good thoughts here, but there's some generalization in the closing paragraph. Not every framework from scratch is unuseful or a mess. But the track record there is very bad in my experience.
Re:Ask HN: Code examples to find out if a person is addicted... by kristoft on Monday June 26, 2017 @02:57PM (#14639302)
Thanks a lot!