Yeah, so I’ve succumbed to the Web2.0-ishness that is the tumblelog. I’m hosted by tumblr - the must have of tumblelogs, apparently. Anyway check out http://tumblelog.duder.net/ I’ll probably start putting the smaller things that I find online there, and keep the real blog for writing things.
I read all the comments on the codinghorror.com post and was appalled at the number of wrong and technically right, but stupid answers. So, here are a few of my takes on it. This problem is ridiculously easy. If an interviewee could not solve this one in all the languages on their resume in short order, there is a serious problem. If you lazies did not read the links, here is the actual problem:
Write a program that prints the numbers from 1 to 100. But for multiples of three print “Fizz” instead of the number and for the multiples of five print “Buzz”. For numbers which are multiples of both three and five print “FizzBuzz”.
This is posed to people in an interview and supposedly not many people get it right.
OK, here we go:
VB6/VB.NET
Dim lCtr asLongFor lCtr=1To100IfNot lCtr Mod 15Then
Debug.Print“FizzBuzz”ElseIfNot lCtr Mod 5Then
Debug.Print“Buzz”ElseIfNot lCtr Mod 3Then
Debug.Print“Fizz”Else
Debug.Print lCtr
EndIf
Debug.PrintvbCrLfNext lCtr
I was going to post C++/C# and PHP examples as well, but really, they follow the same idea as above. I’m not really sure where people get tied up. Perhaps they are going for a really clever solution and miss the obvious one, or maybe they really can’t write code and have been lying through their teeth for the entire interview.
This is a post that was made from Word 2007. The more I play with Office 2007, the more I like it. Outlook is still terrible at IMAP, however. I was really hoping that I would be able to make use of Outlook, as the integrated calendar is something I could really use. I don’t want to have to run that behemoth just for the calendar though. Oh well. The new “Ribbon” thing in Word is pretty neat. I don’t know that it’s really that much better for productivity, but it looks nice and is set up in an intelligent way.
I posted this a long time ago in the hopes to quell a few myths about bock beer, but lately I’ve been seeing the same things again, so here is my original post from October 23, 2002:
Firstly, Bock is NOT the German word for goat. I’ve maintained this for a while, but it remains a common myth. To find out why this myth exists, I fired up my trusty browser and Google.
Bocks are usually brewed in the winter months so they can be lagered for a few months and drank in the spring. The original brewers of bock, German monks, drank this in the spring because spring time is Lent for us Catholics. The monks would fast for 40 days. They were, however allowed drink, so they brewed a strong beer to act as a “liquid bread” for the 40 day fast.
Anyway, during the months that bock is brewed, is the time of Capricorn for anyone interested in astrology. Capricorn is usually represented as a goat. The German word for Capricorn is “Steinbock” (according to Babelfish)
This seems like a convenient explanation, except that these monks were Catholic. I can’t really believe that Catholic monks would name their beloved beer after a pagan astrological sign, especially during the Lenten fast. If you are not Catholic, Lent (the period of time 40 days before Easter) is probably the most sacred, holy time of the year.
In conclusion, the mystery of its name remains unsolved, but I feel there is little probability of it being because of astrological signs. So, please stop saying so. At the very least stop saying that Bock is German for goat. “Zeige” is the German word for goat. NOT BOCK.