Live data from Hacker News

Fifty Fizzbuzzes

vihart.com

31–40 of 64 posts

Re: Fifty Fizzbuzzes

#32
post #28
post #4

Vi's site is down from the onslaught. In the meantime, enjoy the ever-classic Fizz Buzz Enterprise Edition: https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpris...

I opened the link thinking ”hah, what a gag!” But then I thought it’d be funny to try to find the core fizzbuzz logic. Turns out that it hits way too close to home, I just got really annoyed. Not sure what I expected.

I think it's a work of art, and your feelings corroborate this opinion :)

Re: Fifty Fizzbuzzes

#35

  #include 
  #include 
  
  static const char str[] = "fizzbuzz";
  
  static inline void out(int i, size_t offset, size_t sz)
  {
  	if (sz) {
  		fwrite(str + offset, sz, 1, stdout);
  	} else {
  		fprintf(stdout, "%d", i);
  	}
  	putchar('\n');
  }
  
  int main(void)
  {
  	for (int i = 1; i 
There's a way to remove that conditional, too. Probably.

Re: Fifty Fizzbuzzes

#36
I didn't know that fizzbuzz was a children's game.

That explains a LOT. As in most descriptions of it are annoyingly ambiguous.

Whereas if you knew the game, you know it already.

Re: Fifty Fizzbuzzes

#37

I didn't know that fizzbuzz was a children's game. That explains a LOT. As in most descriptions of it are annoyingly ambiguous. Whereas if you knew the game, you know it already.

> As in most descriptions of it are annoyingly ambiguous.

My very first interviewer (intentionally) didn't spec fizzbuzz correctly. The real test was whether the candidate listened to the customer's/lead engineer's spec instead of jumping to conclusions.

Fortunately, I was just entering college and hadn't heard of fizzbuzz before. I passed the "test" but for the wrong reason.

Re: Fifty Fizzbuzzes

#39

I didn't know that fizzbuzz was a children's game. That explains a LOT. As in most descriptions of it are annoyingly ambiguous. Whereas if you knew the game, you know it already.

> As in most descriptions of it are annoyingly ambiguous. My very first interviewer (intentionally) didn't spec fizzbuzz correctly. The real test was whether the candidate listened to the customer's/lead engineer's spec instead of jumping to conclusions. Fortunately, I was just entering college and hadn't heard of fizzbuzz before. I passed the "test" but for the wrong reason.

Being purposely misleading then penalising those who are misled doesn't seem like a good hiring strategy, but then again, I've never tried to hire someone.

Re: Fifty Fizzbuzzes

#40
post #21

Earlier quoted context omitted.

Yes

More or less so than running a static site generator that lives on one particular machine, and using Git to push your changes to the server?

More like use a static generator to push to S3, optionally with a Cloudfront distribution in front of it.
Post reply on HN