Welcome to my blog.

Sunday, August 31, 2008

Open Source Software Experience - blueMarine

| 0 comments |

OVERVIEW

My goal was to find, install, and evaluate a current Java-based open source software application. After searching sourceforge for sometime looking for something good, I found an application that looked very practical and useful. blueMarine is a Java based digital photo editing application that can load, show, edit, organize photos, and is able to generate web galleries. The version on sourceforge was v 0.8.6. However, after visiting the official blueMarine site, I saw they had a new v 0.9 beta. I decided to try out both.

Offical Project Page: http://bluemarine.tidalwave.it/

Prime Directive #1: Does this application successfully accomplish a useful task?

The blueMarine application seems to me a very, very useful program, similar to programs like iphoto or Apple Aperture, both of which cost lots of money. Almost everyone has a digital camera these days and people store thousands of photos on their computer. Organizing these photos can be very time consuming and complicated, depending on what sort of program you are using. I found the ideas behind the blueMarine system to be very intuitive and top-notch for organization (although not fully operational yet). 

  • TAGS - like many photo broswers, batches of photos can be tagged based on content with blueMarine. You can then view photos based on tags. Its quite simple. A cool feature of blueMarine is the use of location tags. If you travel, this is an amazing feature. In v0.9 you can actually set up 'trip' galleries, and then even view where your photos were taken on a map. I thought this was really cool.
tags based on location (click for larger view)
  • Photo Editing - Although this feature isn't fully implemented you can view stats on your photos quite easily, as well as look at the exif data. 

  • RATING: blueMarine employs a photo rating system which you can then use to view photos by.
  • SLIDESHOW: Both versions have a working slideshow function. However, the real trick is exiting this slideshow. I couldn't figure it out.
  • v0.9 BETA - This newer version not only employs a new gui, but gives the user more options for organization. The coolest thing for me with this version was the map view of your photos depending on your location tags.

Overall, I found this program definitely accomplishes a useful task. Although many said functions do not work yet (photo editing, web gallery generation, etc) the program functions quite well. If you travel or just have a lot of photos, it is very useful. 

Prime Directive #2: Can an external user successfully install and use the system?

This was actually the simplest part of the entire process. It literally took me under 2 mintues to download and instal the application (the mac version has drag & drop installation, very simple). There is a readme file that outlines installation but I did not need that. Both versions are available for OS X, Windows, and Linux. I would imagine installation on a windows machine might take a little longer than on a mac. Even so, this part of the software is made very simple and easy to understand.

Prime Directive #3: Can an external developer successfully understand and enhance the system?

The source package I got from sourceforge was laid out fairly simple in different categories. I went and explored the 'core' source files and I found build files as well as a javadoc directory. Everything is right there. I also went to the official website and found a great deal of easy to understand documentation on the developers page. If I were to actually start developing for this project I would probably return to the website often. There are coding guidelines and structure diagrams.

Overall, I think it would be challenging for me to modify and improve the system because it is such a large scale program. The good thing is that there are a lot of things that could be added to improve the overall application usability. One thing I would like to see would be the added functionality of a web gallery generation program. This would enable users to not only use the program on their computer, but back up all their photos on their personal server in an organized fashion. I plan on following the development of this program because it can only become a better system as people add to it. 

Tuesday, August 26, 2008

FizzBuzz Development in Eclipse

| 0 comments |

TASK & PURPOSE:
The task was to implement the FizzBuzz program: 

"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”."
For me this seemingly simple program was more than just an easy assignment, it was an exercise in using Java/Eclipse and an introduction into using JUnit. I decided to go about creating FizzBuzz using a test-driven development style, where the program is created through a series of small test case iterations. For each case, the code necessary to pass the test is implemented, and after all cases tested pass, the program becomes correct. This type of development style is really different for me as I usually go about things in the opposite way - the creation of code, then testing. Creating the FizzBuzz program was the perfect chance for me to try it out through the use of JUnit.

Using Eclipse again was a dream. I forgot how much it simplifies things and how much more efficient it makes programming on a whole. It took me around 15 minutes from the startup of the program to complete the FizzBuzz program. Although that might sound long for a small program like this, the actual code for FizzBuzz flowed swiftly and smoothly. What took the most time was setting up the test cases in JUnit. Since it was new technology for me, I inevitably ran into some problems. 

PROBLEMS:
The main problem I ran into while doing this was creating the program using the test case development style described earlier. I had a hard time linking the test class up to the FizzBuzz class. It would not recognize my getValue() function and it was confusing me.

SOLUTIONS:
I finally realized the simple solution to my problem was to use 'FizzBuzz.getValue()' instead of just 'getValue()'. This also brought upon another error that was fixed (using hints from eclipse!) by inserting 'import static org.junit.Assert.*;' Eclipse is wonderful.

CONCLUSION
For me doing this program was a nice little refresher into programming again in java. It also was really nice to go in and use the JUnit test case development in Eclipse. Although test-driven development is a bit overkill for a simple program like FizzBuzz, I can see how on a larger scale this development system could be really efficient. It would be easier to solve a large problem by first testing out and solving smaller problems. I like the simplicity of this. It seems like it would lead to less bugs and smoother overall development.

The creation of FizzBuzz has shown me that this class (ICS413) is going to be very practical and fun. I am excited to learn about tools that real software engineers use as well as concepts they use in creating software. I feel more motivated to learn about this sort of thing as it will make me a better programmer. Overall, I am looking forward to the class.

SOURCE CODE:
FizzBuzzTest.java

import static org.junit.Assert.*;
import org.junit.Test;

public class FizzBuzzTest {

@Test
public void testFB() {

assertEquals("Test 1", "1", FizzBuzz.getValue(1));
assertEquals("Test 3", "Fizz", FizzBuzz.getValue(3));
assertEquals("Test 5", "Buzz", FizzBuzz.getValue(5));
assertEquals("Test 15", "FizzBuzz", FizzBuzz.getValue(15));
assertEquals("Test 100", "Buzz", FizzBuzz.getValue(100));

}

}


FizzBuzz.java

/**
* A Simple program that runs through the numbers 1 - 100,
* printing either "Fizz" for multiples of 3, "Buzz" for
* multiples of 5, "FizzBuzz" for multiples of both, or just
* the number itself for all others.
*
* @author Tyler Wolff
*/

public class FizzBuzz {

public static String getValue(int iNum) {

if ((iNum % 3 == 0) && (iNum % 5 == 0)) {
return "FizzBuzz";
} else if (iNum % 3 == 0) {
return "Fizz";
} else if (iNum % 5 == 0) {
return "Buzz";
} else {
return String.valueOf(iNum);
}
}

public static void main(String[] args) {

for (int i = 1; i <= 100; i++) { System.out.println(getValue(i));
}

}

}