4 ms·
I am just curious, why do you need to test somone's ability to find max of a list. Language designers have recognized this as a basic utility and incorporated t
by deepGem 8y ago
I am just curious, why do you need to test somone's ability to find max of a list. Language designers have recognized this as a basic utility and incorporated them into the language. Is the hypothesis that - if someone cannot write a simple algo to find the max of a list then what other difficult tasks he/she can perform ? Even though in reality we all understand no one needs to write a max algorithm.
- thrower123 8y agoIt's a fizz-buzz bozo filter. If you can't write a loop over a list, chances are you are a charlatan that can't provide any value as a programmer.
- tempestn 8y agoYeah, I'd say the latter. Finding the max element in a list is an extremely straightforward thing to code; if someone can't do that, it's almost certain they're going to be lacking in a lot of other ways as well. Of course it's not the only thing you would check, but it would make for an easy early filter (which, unfortunately but conveniently, would probably weed out the majority of your resumes).
- LoSboccacc 8y agoFizzbuz removed us 90% of potential hires and saved a lot of money in cutting interview short. Granted this is a rural area and ymmv depending on the local average skill level, but still if you want to grade someone from zero to ten you need to start with exercisers close to zero. Otoh if your interview questions are all 9 or 10 in difficulty most of your candidate will fail them and you'll have no data for a decision because all 8s will fail to answer in the same way as 6s and 3s Much better to start with some stupid loop and work up from there.
- tempestn 8y ago> Otoh if your interview questions are all 9 or 10 in difficulty most of your candidate will fail them and you'll have no data for a decision because all 8s will fail to answer in the same way as 6s and 3s Besides, it's a waste of their time and yours to have someone attempt a 9 or 10 before they show they can pass a 1.
- maxxxxx 8y agoYou don't need to write one but if you have only a little bit of coding skills you definitely should be able to whip one up if you have to. Same for fizzbuzz or maybe invent some simple sort algorithm.
- catdog 8y agoWe use such things too, it's exactly to test if someone is at least in general able to code. Surprisingly often there seem to be candidates which look good on paper and talk like that but are unable to perform such toy coding tasks. Even if you usually would use a library function, finding the max of a list or similar problems are still sufficiently simple tasks which every programmer should be able to perform. It's straightforward and not about remembering some complicated algorithm from some CS class years ago nobody ever implements themselves.
- edanm 8y agoYep, being unable to write a function to find the max of a list correlates pretty highly with being unable to do pretty much anything else in programming. It's one of the simplest possible things you can do.
- toomanybeersies 8y agoNot GP, but I'll add my 2 cents. It's to test that you have at least a tenuous grasp of the programming language at hand. It should be an absolutely trivial task and take only a couple of minutes to do. It shows you can iterate over an array and use conditionals, something literally everyone should be able to do if they know the language. These kinds of tests are a quick way to screen out applicants who are straight up lying about experience with a particular language. It's not like asking them to write a sorting algorithm or implement Dijkstra's algorithm, which requires specific knowledge of algorithms and isn't trivial to implement. And it's not some obscure brainteaser that has no relevance to their normal work. Iterating over arrays and using conditional logic is something I do every day. In fact, I'd say that's basically 80% of what my job is.
- eximius 8y agoAs everyone else has said, it's essentially just a fizzbuzz test without using FizzBuzz. I don't need someone to write an algorithm to compute max, but I DO need someone who can take simple verbal requirements and write a program to do it. Everyone understands max/min/mean/median (or can quickly understand if they are unfamiliar). If they can't take that concept and apply it to code, then I don't trust them with inevitably more complex requirements. One problem we just encountered in production that I'm trying to work into a prompt was our impression generation created a large amount of duplicates. Identifying the duplicates and eliminating them takes some simple verbal requirements but has a lot of depth. If they cant't do max/min/mean/median, they surely can't do answer that (which our least senior developer was able to do, with guidance (mostly on optimization)). We have other questions that are much more relevant to day-to-day tasks, but both kinds are important.
- spike021 8y ago>One problem we just encountered in production that I'm trying to work into a prompt was our impression generation created a large amount of duplicates. Identifying the duplicates and eliminating them takes some simple verbal requirements but has a lot of depth. If they cant't do max/min/mean/median, they surely can't do answer that (which our least senior developer was able to do, with guidance (mostly on optimization)). Does that problem not require separate thought processes though? In terms of a max/min/mean/median style problem, the candidate needs to come up with an algorithmic solution to find those values. In the later case of finding duplicates, there is minimal (depending on problem complexity, I suppose) amount of algorithmic complexity and the focus is more on data structures; for instance, does the candidate know they could use a data structure like a hashmap or variant to find unique items with the drawback being an additional storage unit. So, I guess what I'm trying to trace back to is how you say if they can't answer one then surely they can't solve the other, but (while relatively 'simple' problems) I'd argue they take different mindsets to solve. Obviously in the grand scheme of things one mindset works for both, but in this it can vary a bit. Anyway, late-night thoughts so hopefully that's not a jumbled-up response.
- eximius 8y ago
- ascar 8y agoIt's a very basic filter for the right way of thinking. Even if you have never programmed it before you should not have any problem with it. I interned in a medium sized cloud company this summer and they require you to complete a homework project within 4 hours before interviews. You have to setup an environment in your language of choice, query an rest api, parse some json, do a rather easy rearranging of data and post that back to the api as json. Took me about 1 1/2 hours with simple documentation and cleaning up my code. It really only asked basics you should know, if you ever worked with a CRUD app. They also told you before the clock started that it's about HTTP, REST and JSON so you could prepare. I heared from multiple people from the local colleges that were friends with other interns that this project was way to hard and they had no way of doing it. But it was the bare minimum you needed to do your job there without having to be babysitted by a senior fulltime.
- deepGem 8y agoI don't mind getting downvoted but can someone please explain why - this is an honest question. Many devs have scoffed at interviews when I've asked them some really basic quesitons such as finding max element in an array.
- eximius 8y agoI don't think you should have been downvoted. Likely, people expected you to already understand the purpose of the question because I called it a variation of FizzBuzz - which is fair as it's quite well known, though maybe not worthy of downvotes. Those devs don't understand the reality of interviewing or take offense too easily. The reality is that people lie on their resumes, which makes such questions necessary. If they can pass, they can feel scoff all they want, but they had best answer the question or I will assume they are acting to avoid showing they can't answer it. It's an unfortunate waste of everyone's time.