Fizz with no Buzz

It was not long before the impatient student inside him started to turmoil. It was the time that he be given a new kata to work on. Something grand, something like the universe. He had to conquer it now. Time was short...less time remaining now. He went to the master. Master, as usual was in his good self, consuming the internet with a straw. It was amazing the man like this is a renown master. The student was trying to open his mouth when master stopped him.Smiling at him, the master gave him a new challenge.

Write a simple class which represents a typical "Fizz Buzz" game between children, with no smells.

The student was happy. His katana is sharp and gleaming. He accepted the challenge. He within minutes came back with an implementation. Master laughed when he saw the implementation. An attr_accessor had crept in. The student was embarrassed. Master gave him one more chance to prove his mettle, as he had some more spare time.

The student had another implementation within an hour. Master laughed again when he saw the implementation. A public method was calling a private method. The air was full of code smells. Master was happy that student realised that writing the simplest classes is the toughest. As usual, to drive his point home, the master started explaining the Fizz Buzz test.

Fizz Buzz test was designed by a great master to select only the best programmers for the job. Not only was it tough, it was also infamous for the fact that 99% of programmers can't do it. The toughness arises not from the logical part of the question, but it came from the structural issues that Fizz Buzz had. A normal branching condition wouldn't work here as the problem has a compounded logic in the test case where the number is divisible by 3 and 5.

Master had something to say to the new students.

Listen up, maggots. You are not special. You are not a beautiful or unique snowflake. You're the same decaying organic matter as everything else.

The student was enlightened.

Written on July 13, 2015