(edit: fixed fizzbuzz name)
I have questions with a variety of add-ons, so I can tune the difficulty to each person. A more junior person might take 30 minutes to give a complete answer while a more senior person might finish the base question in a few minutes so I need to add things on to make it more difficult. Some people might not have the ability to solve the problem at all. Either way, I try to get the interview to a place where the interviewee is beyond their ability to easily spit out answers.
Then the interview should turn into a back and forth discussion where they're asking me clarifying questions and possibly getting completely stumped. Either way, now we're communicating and seeing how quickly they can learn and utilize new information. That might be providing them clarifying info or teaching them something they don't know yet.
I don't care if someone can answer FizzBuzz or spit off facts about hash tables or anything like that. All that can be learned. If I'm interviewing a developer, I want them to be able to work on a project in a programming language they've never used and doing things they've never done before and become reasonably competent in a few weeks of learning.
No loops are required, no data structures, no algorithms, really: just a simple predicate expression. It is one example of what I think of as "programming in the small", this basic survival skill of being able to relate some values and correctly characterize a situation. You just have to be able to do this correctly if you're going to write correct if statements and while loops. Lots of bugs boil down to errors in examples of this kind of expression.
I've had PhDs from good schools write doubly-nested loops looking for a point in common. I've have very experienced engineers write expressions that have false negatives or false positives. A depressingly small proportion of candidates can think of a good way to test their answers.
So be careful with this kind of stuff. You may not be filtering what you think you are.
And sometimes I am.
1) Obvious: If the question is failed, even a non-technical hiring manager understands how bad this is.
2) Fast: Quick to ask, quick to answer. Everyone agrees in advance that if it's failed, we can shorten the rest of the interview.
3) True negatives: Some bad candidates might pass the test. But no good candidate will fail.
4) Real: Write real code live in any programming language. Emphasize that perfect syntax is not important.
I've helped interview candidates for student positions, programming teacher positions, junior and intermediate programmer positions. It is shocking to some how often people fail filters like this. My current favourite:
In any programming language, write a program that prints the numbers 1 to 100, except if the number is divisible by 3, then print "turtle" instead. Example:
1
2
turtle
4
5
turtle
7
...
100
I suspect it’s the OP unwillingness to find the good in people or find commonalities interview process.
That's not a positive method to approach an interview or conversation. If I knew that an interview was going to be a "gotcha" type interview, I would politely pass, I don't need this nonsense.
Write a program to make
a == 9 && b == 7
No, I don't care how many new variables you use and what language you use.
Yes, I had people not be able to complete this. I would say this is something that is so basic that:
a) It's not testing any knowledge b) It's basic enough that you can figure out under stress, while never seen it before c) It's short, easy to explain (in 5 different ways if need be), and easy to validate d) It's an idiot filter. It doesn't even test if you can program, it's more like "If you know how type out code, are you also capable of reasoning about the basic logic of that code".
- function to reverse a string - function to sum an array of integers - function to get a deeply nested property value from an object
Since I work a lot with React and also interview people for that, I use the following to determine if people are at least somewhat familiar with react:
- take a static array of objects (first name, last name) and render a list of those objects
If people can’t write the map function, or are confused about the console warning for needing “key” that is usually a great indicator that they don’t actually know react.
What consistently surprises me is that I’ll interview people with 5-10 years of directly related experience, who will see questions like this and laugh or say it’s trivial, and then absolutely bomb. One person complained that they were senior and above these types of questions, and then spent 20 minutes trying to reverse a string.
Tell me everything you know about the hash table data structure.
Plenty of Staff level applicants don’t know anything about it.
There are 3 tiers of answer:
1) Don't know what a hash table is, when to use one, etc. Have never had a candidate in this category this do well in the rest of the interview, even for totally unrelated tasks like distributed system design.
2) Know it's a key-value store, know it's "fast". Some candidates whose main experience is in frontend dev get to this point, and then demonstrate other ability in the rest of the interview and get hired.
3) Rattle off that it's O(1) amortized, might be O(N) in the resize case, chaining vs linear vs quadratic probing vs other clever methods like cuckoo hashing, discuss how those methods effect cache behavior, etc. These candidates typically crush the rest of the interview effortlessly, even totally unrelated tasks like distributed system design.
Design a website with a user login, a password reset feature. And then go on from there.
E.g. talk about how to build your infrastructure. How to protect against CSRF. What is your stance in tokens in the front end. What about sessions. How to do force logout. Which database, why? When to use caching. How would you store Information about a password in a database in a safe manner. Salting hashing.
Synchronous vs asynchronous api. Idempotency. Different database transaction mechanism. How to do monitoring. Why is cardinality important for prometheus. How to do api first design.
This gives the candidate time to shine and I can at least understand where they are. And you can dig deeper.
Works for non-software engineers too. Filters out if they've done any research at all into our work and if they're curious.
What you want to look for is their ability to process information, ability to internalize it, and their ability to bring it to bear in solving the problems they will be confronted with. You may have to do this with markers that don't necessarily match your own.
The richness of the network of information they have acquired so far is a marker. The nuances of the insights into that information they have acquired is a marker. The organization of this information into readily usable tools is a marker. These are what you should be looking for, rather than some preconceived ideas of what the markers need to be.
Disclosure: I do not even know if the title "Software Engineer" in the USA requires a formal education as such. I do not hold that title myself, I've just been working in IT for three-plus decades and provided net positive bottom line value to every firm I've worked for along the way.
Most, if not all, of the "idiot-filter questions" (note the tone?) in this thread, I've seen for the first time today.
I don’t care if it’s buggy, how much time it takes or whether the first scratch is any good, because it shows fundamental things every decent programmer knows or knows how to discuss and reason about imo. Unlike fizzbuzz, if you pre-solve this question at home and remember these details, you’re already good enough for the next question.
I wouldn't say you're an idiot if you don't know the answer, but we need people who can work with concurrency and a surprising number of developers haven't.
I have asked to estimate the amounts of skittles in a litre cube box.
It's clearly not something like "Code Complete"
Is javascript case sensitive (I got the answer right purely by guessing, but the hesitation gave me away) ?
What is a closure?
This culls a lot of non mathematical people. (And we find that Mathematical people generally make for better STEM employees in a tech setting).
If they answer correctly (and many who get through the initial resume culling process do) then we follow up with a second question that is not important to answer but will show a candidates sense of curiousity (super important).
What is the answer to the first question to the power of the answer to the first question?
Fascinating answer to this second question that can delight the candidates we are after.
not idiot-proof but enough to inform me on what level we're working with, what their thought process is like, what tech they know, etc.