News for hackers. Stuff that matters.
Re:The Surprising Number of Programmers Who Can’t Program by patio11 on Friday August 23, 2019 @11:07AM (#20778385)
In my experience one sees roughly similar results with:

"Write a function which counts the number of a's in the input string."

"We will give you an array of words. Print out each word which appears more than 3 times in the array."

"We will give you two arrays of words. Print out each word which is in exactly one of the arrays."

It's not just the mod operator. These are toy problems for difficulty but they're not "implement the rules to a children's game"; with a few seconds of effort you can describe a boringly plausible business reason for having to implement them during a fairly pedestrian career.

Re:The Surprising Number of Programmers Who Can’t Program by ciao_ciao on Friday August 23, 2019 @11:48AM (#20778816)
Bear with my potentially dumb solution, but i'm trying to understand what an interviewer would look for in answering questions like these. For the third, in python, could you make both sets and print the symmetric difference? Does this (a) demonstrate practical knowledge of python or (b) necessitate a follow up from the interview to provide a solution that does more of the "work"?
Re:The Surprising Number of Programmers Who Can’t Program by wikwocket on Friday August 23, 2019 @06:09PM (#20783177)
Since these are riffs on fizzbuzz, the goal is just to evaluate whether a candidate can use programming to solve these at all, i.e. whether they can 1) think through how to accomplish a basic task with some data and code, and 2) implement it in a language they know.

The goal of fizzbuzz in a phone screen should not be to see if someone can solve it in an optimal memory-efficient framework-idiomatic way. Clever syntax and data structure use is lovely, but these are really about finding whether someone can use a 'for' loop and an 'if' condition.

Re:The Surprising Number of Programmers Who Can’t Program by jdboyd on Friday August 23, 2019 @12:43PM (#20779406)
If they take that shortcut in Python, it tells you that they probably know Python, which also likely suggests they could think it out if they had to. If they think it out the harder way, that shows they can do that, which suggests they can get some things done. It isn't rare to find applicants who have more than 10 years of experience who somehow can't do either.