Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> The modulo operator is somewhat rare in real code

Even if a candidate didn't know that modulo even existed they could still get the remainder with simple division and subtraction. Modulo might be slightly different depending on the language, but for fizzbuzz that's not important and most likely not what you're expected to know in such an interview question. And while it is not the most common operator it is still one of the most basic ones and present in all languages you'd use during a job interview.



> Even if a candidate didn't know that modulo even existed they could still get the remainder with simple division and subtraction.

And they'd probably fail some interviews for doing so.

> And while it is not the most common operator it is still one of the most basic ones and present in all languages you'd use during a job interview.

This is true, but I also expect some otherwise-competent programmers would fail a test that expected them to remember the specifics of bitwise operators or bitshifting. It's been years since I've needed to use any of the three in a paid job - they're just not very common in my day jobs, whereas they crop up a lot in side projects.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: