Submission timeline
2007–2026One slot for every year since HN launched. Height is that year's peak points; orange marks a 100+ point or 50+ comment breakout. Select a bar to open its strongest thread.
First comments on top threads
HN comment ordercases = ( (3, 'Fizz'), (5, 'Buzz'), (7, 'Bazz'), (11, 'Boo'), (13, 'Blip'), ) for i in range(1, 101): out = [] for c in cases: if i % c[0] == 0: out.append(c[1]) if out: print ''.join(out) else: print i Edit: not to detract from the post's point, I think it's valid. Monoids are cool and all but simple counting arguments can take you a long, long, long, way when case analysis fails you.
Python can produce extensible solutions! It can! (Edit from sillier comment.) def fizzbuzz(n): outstring = "" outputs = {5: "buzz", 3: "fizz", 7: "bar"} for x in sorted(outputs.keys()): if n % x == 0: outstring += outputs[x] if outstring: return outstring return n Then all you gotta do to add more prime numbers is stick them in the dict (or factorize composite numbers you want to put in). Which is more idiomatic in python than endless if elif elif elif…
Actually, the control flow only requires you to know that you've done SOMETHING out of the ordinary, but not WHAT you've done. A C example that is easily extensible: void fizzBuzz(void) { bool alternateUsed = false; for(int i = 1; i <= 100; i++) { if(i % 3 == 0) { printf("Fizz"); alternateUsed = true; } if(i % 5 == 0) { printf("Buzz"); alternateUsed = true; } if(!alternateUsed) { printf("%d", i); } printf("\n"); alternateUsed = false; } } All you…
The first top-level comment from each of the four biggest threads, in HN’s own order. Excerpts are shortened; open a comment for full context.
- Breakout years
- 2
- Total points
- 254
- Total comments
- 195
100+ points or 50+ comments
reference only — not used in Hall rules or ranking
reference only — not used in Hall rules or ranking
Every submission
| Date | Title as submitted | By | Points | Comments |
|---|---|---|---|---|
| 2012-10-04 | Fizzbuzz, Interviews, And OverthinkingFirst breakout · Best thread | timf | 126 | 110 |
| 2013-04-21 | FizzBuzz, A Deep Navel to Gaze Into | ashleyblackmore | 3 | 3 |
| 2016-01-12 | FizzBuzz, a Deep Navel to Gaze Into | kornish | 2 | 0 |
| 2017-09-13 | Overthinking Fizzbuzz with MonoidsLatest 20+ point return | KirinDave | 123 | 82 |