Monday, August 29, 2011

FizzBuzz In Java - 4 and 1/2 minutes

FizzBuzz is a simple program that prints out all of the numbers from 1 to 100, one per line, except that when the number is a multiple of 3, you print "Fizz", when a multiple of 5, you print "Buzz", and when a multiple of both 3 and 5, you print "FizzBuzz".

Significance: 

http://www.codinghorror.com/blog/2007/02/why-cant-programmers-program.html

http://www.hanselman.com/blog/YouCantTeachHeightMeasuringProgrammerCompetenceViaFizzBuzz.aspx


From the time I opened my IDE (eclipse) to when I successfully ran the FizzBuzz program took me right around 4 and a half minutes.  This is a very simple way to implement the FizzBuzz program, and it is not optimised for testing. I didn't run into any problems and had no coding errors during the process, this is mainly due to the fact that I had recently written this exact program about a week ago.  Most of my time spent writing this program actually originated from messing around with the IDE.  From my experience I would like to stress the importance of using a good IDE, because it will save you a lot of time in the long run, and being familiar with its functionality to avoid getting tied before you being a software project or during development. 

No comments:

Post a Comment