News for hackers. Stuff that matters.
Re:Red flags I saw while doing technical interviews by cellularmitosis on Wednesday September 16, 2020 @05:00AM (#24490845)
> this is a whole order of magnitude more difficult than FizzBuzz

Sorry, in my mind the input was restricted to positive integers. My fault for not making that clear.

    def mul(a, b):
        accum = 0
        while b > 0:
            accum = accum + a
            b -= 1
        return accum
You are correct that accounting for floating point would make this more complicated than fizzbuzz.

> But this is precisely the opposite of FizzBuzz. The goal is to weed out horrible candidates, not identify great ones.

This accomplishes both at once. That's a super set, not an opposite.

Re:Red flags I saw while doing technical interviews by joks on Wednesday September 16, 2020 @12:11PM (#24494025)
It's even easier to do it with the inclusion of non-integers, though - `prod = a / (1 / b)`

Granted, that may be counter to the spirit of the question, but it's a valid answer lol