Talk:Fizz buzz

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Why is there an article here?[edit]

I see no discussion on keeping or not keeping, and it seems absurd to me. Uucp 02:23, 17 August 2006 (UTC)[reply]

It appears the discussion you wanted to see was at Talk:FizzBuzz and was deleted (inadvertently?) when the page moved from FizzBuzz to Bizz buzz. I just ran across FizzBuzz as a quiz a co-worker posed to an engineering applicant, and this page was useful in getting the specifics down. Its nature as a drinking game may not merit its inclusion here, but the popularity of it as a simple CS question (over 750,000 hits on a Google search for fizzbuzz coding, which is 85% of the overall fizzbuzz hits) certainly justifies its presence here in my opinion. --Adam Katz 21:46, 19 October 2007 (UTC)[reply]

How does a redirect talk about some "game" with needed citations get a whole page whereas the page redirect item only get a mention with a couple citations? Can't we switch the order of this page? Phrasz (talk) 01:48, 7 April 2012 (UTC)[reply]

Other bases[edit]

Correct me if I am wrong, but shouldn't the section containing:

The game can be played in a mathematical base other than 10. For example, playing in base 5 would proceed as follows:
1, 2, Fizz, 4, Buzz, Fizz, 12, 13, Fizz, Buzz, 21, Fizz, 23, 24, Fizz Buzz, 31, 32, Fizz, 34, Buzz, Fizz, ...

have the second occurance of Fizz replaced with 11? In a base 5 there is no 6 en therefore no direct Fizz possible after de first Buzz, which is 5??
Josvanreenen (talk) 21:42, 27 October 2013 (UTC)[reply]

I was thinking something similar at first, but although 6 (base 10) is written as "11" in base 5, it is still in fact the same number, and as such, still divisible by 3.

Thjelm (talk) 14:50, 23 February 2015 (UTC)[reply]

Exactly, the fizzes and buzzes come in exactly the same places regardless of the base; the real challenge is getting the numbers in between correct. --Walnuts go kapow (talk) 14:57, 23 February 2015 (UTC)[reply]

We had better add references to the use of this game as a programming test[edit]

I'll come back here some time, or someone else can, or we all can, to add references to the article about how FizzBuzz is used as a programming test for hiring software developers. There is an extensive literature on this topic. -- WeijiBaikeBianji (talk, how I edit) 02:52, 5 December 2013 (UTC)[reply]

Thanks for the edits that have added information about use of the FizzBuzz game in testing candidates for programming jobs. -- WeijiBaikeBianji (talk, how I edit) 15:32, 16 February 2014 (UTC)[reply]

23="Twenty-fizz" and 50="Buzzty" example doesn't make sense[edit]

This section says that you're supposed to replace "23" with "Twenty-fizz" but the example doesn't actually do that. I can't tell what the example is even trying to convey, I think it may be old vandalism. But since there's a tag to include more citations on this article, perhaps instead of fixing it this variation should this just be deleted altogether? Becker911 (talk) 19:25, 9 March 2015 (UTC)[reply]


Possible Variant[edit]

Obviously this game is not very interesting when you have 3 or 5 players (as one is stuck saying the same thing all the time). The rules when I used to play were that Fizz is used for any number that is divisable by 3 **or contains the numeral 3** and likewise for buzz with 5. This is suggested in the Fizz Buzz Wolf Variant that appears on the page. But furthermore the actual divisors should be changed to 4,5 (for 3 players) or 3,4 (for 5 players). -- 23:20, 4 December 2015 (UTC)

My elementary school class circa grades 6-8 played this, in our class of about 28-30 students, we would go up and down each column of desks. We used "buzz" for numbers with a 3 or divisible by 3, and the class held its collective breath as we went through the 30s to see if the persons at 38, 39 and 40 would get it right or break the game (in other words, if it was blown, we started over at 1). In grade 7 or 8, our French teacher would have us do it in French, saying "bonjour" instead of "buzz", and counting in French. It's a great team game and demands paying attention to the other students to make sure you don't break the game on those critical 30s. I'm wondering if there's a record of how high any group has ever gotten, especially to get past the 300s, 3000s or 30,000s! GBC (talk) 15:31, 20 May 2016 (UTC)[reply]
These are the correct rules for the original Fizz Buzz game. Not sure why the "or contains a numeral '3'" and "or contains a numeral '5'" rules are not mentioned here. They really are part of the actual rules of Fizz Buzz. 66.225.134.125 (talk) 18:02, 29 May 2017 (UTC)[reply]

Code samples are wrong[edit]

"Fizz Buzz" might be two words in the children's game, but not in the programming exercise. The output of a correct FizzBuzz program is a series of whitespace-separated strings, one string for each input number. Both of the programs in the current article will output "Fizz Buzz" for multiples of 15 instead of FizzBuzz. That's two strings when it should be just the one. The point of this exercise is to see how well people deal with awkward edge cases. It is possible to write non-awkward versions of FizzBuzz, but it's better to write an awkward version that performs to spec than an "elegant" one that doesn't. I hope whoever wrote these versions isn't planning on interviewing anytime soon! --69.172.156.69 (talk) 09:30, 2 November 2016 (UTC)[reply]

Incorrect, Mr. Generic IP Address. The point of FizzBuzz is to weed out applicants who can't code at all. Clayhalliwell (talk) —Preceding undated comment added 15:24, 17 July 2017 (UTC)[reply]
It is trivial to write
if(i%3==0&&i%5==0)printf("FizzBuzz");
else if(i%3==0)printf("Fizz");
else if(i%5==0)printf("Buzz");
else printf("%d",i);
printf("\n");
Of course other ways of writing the program are possible, but some code duplicity or additional variables are hard to avoid.
The deeper challenge of this puzzle is to reduce it to something which lists each condition only once and doesn't use variables, such as this example which relies on Short-circuit evaluation of the && and || operators:
#define FIZZ(n,s) (i%n==0 && fputs(s,stdout))
FIZZ(3,"Fizz") |
FIZZ(5,"Buzz") |
FIZZ(7,"Zazz") ||
printf("%d",i);
putchar('\n');
Jiri Programagor (talk) 10:14, 15 July 2022 (UTC)[reply]

Other Uses[edit]

This section only talks about one other use: programming. Unless we mention other uses of fizz buzz in the wild, maybe we should change that section header to refer to programming? Unpredictabru (talk) 03:51, 1 August 2018 (UTC)[reply]

Sources needed[edit]

I just removed all but one of the sources in this article. Aside from the single book used in the lede, all the other sources were blogs, and one of them was just a Google search. None of those qualify as WP:RS. I'm going to try doing some research myself, but I'm hoping some other people can help locate actual sources for the article, or else this is probably going to have to be deleted. — The Hand That Feeds You:Bite 13:40, 13 May 2023 (UTC)[reply]