4 ms·
By extracting the modulo operator (%) into its own function, at least we've made the code more self-documenting. If someone else were to read the code and they
by jessaustin 12y ago
By extracting the modulo operator (%) into its own function, at least we've made the code more self-documenting. If someone else were to read the code and they didn't understand how the modulo operator worked, they could work it out based on the function name.
Someone's taking the piss. Would anyone in the "audience" for FizzBuzz code (coders, managers... HR?) really not understand modulo? That seems like kind of the point of FizzBuzz.
Sure the whole thing is a satire, but this aspect is sort of straw-mannish.
- placeybordeaux 12y agoDid you finish the article?
- jessaustin 12y agoYes that's why I specifically noted "sure the whole thing is a satire". I just felt that this particular aspect of the satire was unfair.
- placeybordeaux 12y agoApperently I didn't read the comment. I think the point being that fizzbuzz is already a strawman of a programming excersize.
- morgante 12y agoI've met plenty of supposed "coders" who don't know what the modulo operator is. And don't even get me started on managers.