I encounter plenty that used a for loop when something else would have been advisable.
I encounter plenty that used a for loop when something else would have been advisable.
The task was to write a simple sum of a list, but they had to convert the list to a pandas dataframe and then call some series of arcane functions. I originally thought this was just a preference but when I asked them for the simpler version while standing over their shoulder they were unable to do it.
They had ~8 years of claimed experience at the time and were from a country notorious for faked credentials. Turned out to be an ok hire overall (friendly, hardworking) but definitely lacking 80%+ of their supposed competencies.
(Source: I've helped hire lots of programmers.)
I found most of the people who couldn’t program were not the nervous ones, but were smooth talkers who probably didn’t write much code. Maybe they did at one point, maybe they never did, it was hard to know, but I couldn’t get even logical steps to solve straight forward problems out of them. Those were the worst interviews, not because the candidate wasn’t a fit for the role, but because then I had to panic to try to keep the experience positive, constructive, and collaborative. When I expected to fill 20-40 minutes talking through a problem with someone who can’t solve problems, let alone produce anything remotely looking like code, I always found that painful.
The questions I asked could be solved by non-programmers (my wife, who was an elementary teacher and even my kindergarten son could come up with reasonable solutions, but of course not code). That was probably the biggest issue I ran into with nervous people - they didn’t think about the problem first, they’d try writing code before really thinking through. That was usually easy to correct and I didn’t fault anyone who could handle correction and guidance.
The bigger issue is not having seen fizzbuzz before, really.
I’m not talking about devs who got hung up on integer overflow issues (or even off-by-one errors), but rather “just couldn’t get started at all”. I have no idea what they did before or what they expected to do if they got the job, but I doubt it would turn out well.
My pet theory: A lot of companies are very, VERY big, and a clever person who doesn't know how to do their job but can identify a weak manager, can simply get lost in them. Hiding away getting the paycheck, but doing nothing except convincing their manager they're doing things. I've definitely met a few people in my career that I believe were doing exactly that.
I don't have a good explanation for how candidates with zero ability to write code can make it through a hiring funnel to sit in front of you. Maybe they don't know what they don't know.
Fizzbuzz is used to confirm an already present suspicion of complete incompetence, not to assess skill (ability to pass is not a meaningful signal).
I feel that you did not address the specifics of what I wrote. It's a silly test because it's meant to cover the bare basics but it still relies on knowing/remembering the modulo operator, which junior hires might reasonably not have seen. If everyone didn't already know about fizzbuzz it would be even more stupid.
Worked for 25+ years in regular business software - banking , insurance etc. I never recollect using the modulo operator.
But any time you're walking over a discrete multidimensional list packed into a linear list, or walking over any discrete periodic signal (one very common example would be walking a linear array of screen pixels, walking over pcm samples in an audio waveform, literally 100% of GPU programming and 90+% of SIMD programming) you will want to be able to translate between "how far from the start am I" and "how far into the current cycle am I", and modulo handles that.
Similarly for almost anything involving time calculations (and for the same reason: because they are periodic). Modulo is literally described as "clock arithmetic" after all.
Here you can find Tempestt Bledsoe singing about it, lol https://youtu.be/fqtzqcJ6agE?t=570s
So you are absolutely correct that there do exist avenues in programming which can dodge this particular raindrop, I hope you aren't opposed to the idea that they are at least few and far between? ;)
Absolutely not. Part of the reason why I mentioned the areas that I work in, are for that reason. I suspect that the vast majority of software jobs are of the kind I mentioned.
As the HN user 'strken' correctly pointed out, fizzbuzz can stump an experienced job candidate if he has never used the modulo operator.