Saturday, August 30, 2008

02. OSS.Experience

Introduction
The exercise Open Source Systems Experience exposes students to working with open source projects. The task also makes sure we understand the three prime directives of open source development.

Overview
EasyEclipse is an open source system that distributes various versions of Eclipse with each release tailored towards a particular area of development. For example a Java developer can download an Eclipse IDE tailored for Java programming. Or a Rails coder will be able to use Eclipse without having to search for Rails libraries and plugins. The EasyEclipse version under review is geared for Java programming.


Prime Directive #1: The system successfully accomplishes a useful task.
At that heart of the system is the EasyEclipse plugin that allows users to add an Eclipse distribution. EasyEclipse is useful in the sense that developers will find it convenient to retrieve a version of Eclipse that is dedicated towards their area of development without having to hunt down a necessary plugin. EasyEclipse provides many tools for the Eclipse IDE ranging from web development to Java coding for mobile devices.

Prime Directive #2: An external user can successfully install and use the system.
Installation of EasyEclipse is a simple task where any Windows, Mac, or Linux user can install the application with minimal effort. EasyEclipse's help page instructs the user on which systems are valid and how to perform an install for each OS. There is also a FAQ page to alert users of common inquiries.



EasyEclipse is intended for an experience programmer who is looking for a powerful interactive development environment for their next project. Documentation for EasyEclipse is found by clicking on Help> Help Contents, a guide will open on the machine's default web browser. So access to the internet is necessary in order to use EasyEclipse's Help function. Within the Help function the developer will find how to set up and adjust the work area to an overview of Java development. Making the switch to EasyEclipse a painless task.

Prime Directive #3: An external developer can successfully understand and enhance the system.
The developers of EasyEclipse set their system up for anyone interested in creating plugins or making improvements for the next build. The EasyEclipse team maintains a CVS or Concurrent Version System where source code for the application and plugins are available for developers to make their additions. EasyEclipse code follows Java coding standards with proper indentation, naming convention, and comment. With some time the source code can be interpreted and understood so a developer can start working on a new builld.

Conclusion
EasyEclipse is an useful application for developers looking to make the switch to an IDE like Eclipse. EasyEclipse is well documented so any programmer can jump in and start working. The people responsible for EasyEclipse has done a good job at making their code understandable and available so any developer can jump in and make a contribution.

Monday, August 25, 2008

FizzBuzz

Introduction
FizzBuzz is an exercise that iterates from one to one hundred print "Fizz" for every multiple of 3, "Buzz" for every multiple of 5, "FizzBuzz" for every multiple of 15, otherwise print the number.

The Exercise
The FizzBuzz exercise is not new to me I first encountered the task in Professor Altenberg's ICS 241 course. I wrote two versions of FizzBuzz, the first version FizzBuzz, is something similar to what Professor Johnson wrote in class, the second version FizzBuzzTwo, is a program I conjured up. Unfortunately, I did not keep track of how long FizzBuzz took to write however, I do know it took less than thirty minutes, FizzBuzzTwo took six minutes to write. FizzBuzzTwo makes use of more than one print statement which is not a good way to output values from a method in Java. FizzBuzzTwo runs the entire program in the main method but for unit testing purposes it would be easier to build a separate method for the conditional part of the FizzBuzz problem. So the code in FizzBuzz is better than FizzBuzzTwo because it returns values after checking the conditions and it is easier to test thanks to the fizzBuzz method.

Issues
There were no problems encountered with Eclipse, was introduced to Eclipse in Mike Paulding's ICS 211 class, the only issue was reacquainting myself with Java. There was difficulty in recalling which String method to use when trying to convert an integer to a String. The dilemma with which method to use was solved by checking the String class section in the Java API .

Conclusion
FizzBuzz is a very good exercise at checking for a programmer's competence. The task was an eye-opener for me and a good reminder to limit the use of print statements. The FizzBuzz exercise, I think, showed how to take advantage of the tools available for use. My uncertainty of the String method forced me to check the API to find a solution to the problem. I expect that many a issue in software engineering and this class will be solved by using Google, API, teammates, etc.

The code: FizzBuzz

/**
* The FizzBuzz class is a program that prints Fizz for each multiple
* of 3, Buzz for each multiple of 5, FizzBuzz for each multiple
* of 15, and the number for all other instances.
*
* @author Daniel Arakaki
* @version 1.0, August 25, 2008
*
*/
public class FizzBuzz
{
/**
* The fizzBuzz method checks for the multiple 3, 5, or 3 and 5.
*
* @param buzzNum An integer for checking.
* @return A string called Fizz, Buzz, or FizzBuzz.
*/
public static String fizzBuzz(int buzzNum)
{
if(((buzzNum % 3) == 0) && ((buzzNum % 5) == 0))
{
return "FizzBuzz";
}
else if((buzzNum % 3) == 0)
{
return "Fizz";
}
else if((buzzNum % 5) == 0)
{
return "Buzz";
}
else
{
return String.valueOf(buzzNum);
}
}

/**
* The main method, runs the for loop up to 100.
*
* @param args
*/
public static void main(String [] args)
{
for(int i = 1; i <= 100; i ++)
{
System.out.println(fizzBuzz(i));
}
}
}

The code: FizzBuzzTwo

//Start time 8:33
//End time 8:39

/**
* The FizzBuzzTwo class is a program that prints Fizz for each multiple
* of 3, Buzz for each multiple of 5, FizzBuzz for each multiple
* of 15, and the number for all other instances. FizzBuzzTwo is a rewrite
* if FizzBuzz.
*
* @author Daniel Arakaki
* @version 1.0, August 25, 2008
*
*/
public class FizzBuzzTwo
{
/**
* The main method, runs the for loop up to 100 and checks for the
* multiples 3, 5, or 3 and 5.
*
* @param args
*/
public static void main(String [] args)
{
for(int i = 1; i <= 100; i++)
{
if(((i % 3) == 0) && ((i % 5) == 0))
{
System.out.println("FizzBuzz");
}
else if((i % 3) == 0)
{
System.out.println("Fizz");
}
else if((i % 5) == 0)
{
System.out.println("Buzz");
}
else
{
System.out.println(i);
}
}
}
}