FizzBuzz with Eclipse
After reading the blog posts by Jeff Atwood here and by Scott Hanselman here, I implemented the FizzBuzz program using Eclipse in about 7 minutes - including coding a
junit test class. Since I knew a solution ahead of time, the bulk of the time was spent typing, rather than devising an algorithm. Using junit for the first time, I used control+space in Eclipse to see the available methods in the org.junit.Assert class. When I forgot to use String.valueOf() when dealing with integer values (the method return type is String), Eclipse flagged this error in real-time as I was typing. I was able to correct it immediately rather than wait for a compile time error to realize my mistake had I been using an ordinary text editor and javac.
FizzBuzz.java
FizzBuzzTest.java
I implemented an alternate FizzBuzz algorithm by adding another method to my FizzBuzz class and tested it using junit as well. I used "refactor code" in Eclipse and all the method names in the junit test class were changed for me automatically. In addition I used "window->preferences" in Eclipse to change the style of the braces and add blank lines to the code automatically while typing as well as when using "source->format" from the context menu.
Summary
I learned some valuable lessons by reading the blog posts mentioned above and coding the FizzBuzz program with Eclipse. It's a good thing to be able to commit a working knowledge of correct Java syntax to memory, even though it's easy to look at or cut-n-paste existing code, use the API documentation, or search for code examples using Google. With so many Java classes in the API it's not possible, or even time well spent, to memorize every class! However, the basic syntax, such as what's needed to create the FizzBuzz program, is a requirement for any programmer taking his profession seriously. I also gained some insights into the mindset of interviewers, and feel that becoming an expert Eclipse user will be a very valuable skill, increasing my productivity and efficiency when coding.
Reflection on ICS 613
Based upon our assignments and readings to date, I feel ICS 163 will benefit us by introducing and/or reinforcing concepts and skills that are essential to being a successful software engineer.

