3 ms·
I got asked it one time and did it fine. Then they asked me to do it without a modulo operator. I had a mental block as it is so easy and obvious to do it with
by collyw 6y ago
I got asked it one time and did it fine. Then they asked me to do it without a modulo operator. I had a mental block as it is so easy and obvious to do it with a modulo operator that it was kind of difficult to think about doing it another way.
Likewise I got asked about python with 2 list comprehensions. Then I got asked to do the same thing without an intermediate variable. Basically they wanted a nested list comprehension. This was not a difficult task, but not something that I ever do, as I find nested list comprehensions terrible for readability - I always use an intermediate variable. It would be easy to mess this up under the stress of an interview.
- kristopolous 6y agoWhat's the demonstration trying to show here? Those things frustrate me in interviews, I can think of 4 ways to immediately do it but I know for a fact they only have 1 way written down and it's my job to guess it. If I say "you can make a field" and they have zero knowledge of number theory well my chances go right out the window. To them I obviously have a "wrong" answer. They ask you to be clever but only in some proscribed secret way that they have no intention of disclosing. Nonsense. If instead I respectfully show them the multiple ways, it's still naturally "combative" because there's no other way to reliably answer the question. They're just asking for experience to fail. They're looking for something who coached themselves, not someone who actually knows anything. No wonder silicon valley is awash in cargo cult driven shit software. Look at the process. Yet again an interview process that selects for dimwits. Might as well guess what number they're thinking of
- AnimalMuppet 6y agoThat's only because the interview process is being run by people who don't know what they're doing. They may be able to code, but they're amateurs at interviewing. You could do the exact same thing, but with sanity. When you ask what they do without the modulo operator, you're looking to see if they just have a cookbook method memorized, or if they can handle having to adapt it. You don't have a "right" answer - if their answer works, it works. If it's kludgy, that might be a bit of a mark against them, but less so if they know that what they did is kludgy. And so on. It's not all like what you describe. There are people who can actually interview.