3 ms·
This praised Ruby code in article is crap. It abuses side effects(unnecessary 3 invokes of printing) and needs to resort to using helper (@printed = "Fizz"). I
by machiaweliczny 9y ago
This praised Ruby code in article is crap. It abuses side effects(unnecessary 3 invokes of printing) and needs to resort to using helper (@printed = "Fizz"). I would never let something like this through code review.
Like you can't simply first generate data and then print it...
- KirinDave 9y agoFor a high pressure situation like an interview, I think it's quite good code to produce. Post fact we could separate concerns.