Friday, August 31, 2007

07.CodeRulerReview

  • Reviewer: Chiao-Fen Zielinski
  • Reviewee: Jared Sunouchi
  • Review Comments:

File
Lines
Violation
Comments
MyRuler.java
10
EJS-35
The MyRuler class
MyRuler.java
52
EJS-46
@param String
MyRuler.java
104,105,236,*
EJS-9
Use meaningful name


After I read the book "The Elements of Java Style", I went through Jared's MyRuler, I could not find more than 3 violations in his code. I guess he has a good knowledge of Java coding and documentation standards. After I ran Jared's code, he codes his peasants to cover every single land that have not yet been owned. Reading someone else's code, it gave me an opportunity to compare my code and others. Then, I can absorb those good coding and forget those bad coding habits.

Wednesday, August 29, 2007

05.CodeRuler

  • Team Members: Michal Zielinski & Chiao-Fen Zielinski-Liu
  • Strategy:
    1. Our peasants will follow a specified direction based on how many rounds have been running. This will help us to generate more lands.
    2. We send our knights to capture any enemy peasants in any direction.
    3. Knights and peasants will be produced regularly as we get more lands.
  • Results:

Result 1Result 2Result 3
michalz-chiaofen vs. migrate ruler
524 - 135481 - 32441 - 73
michalz-chiaofen vs. gang up ruler
198 - 220512 - 302225 - 189
michalz-chiaofen vs. split up ruler
189 - 221147 - 178114 - 152

  • Lessons Learned:
  1. CodeRuler: I think it is an interesting and a challenging game because I am the person who decide to win or lose. If I code well, my knights can easily capture all enemies and my peasants can generate more lands. Then, more knights and peasants can be produced. I did not know coding can be so fun.
  2. JavaDoc: After I run JavaDoc over my code, I realize that couple HTML JavaDoc pages are generated. They give me an overview of some Java classes that are used in my code.
  3. HTML Table: I have learned how to write codes for creating HTML table to put the nine evaluation runs.
  4. After I downloaded and unzipped the CodeRuler file in C:/eclipse, I could not find the "Other" tab. Finally, I found out I had to unzipped the CodeRuler file on my desktop and moved two jar files into plugins directory. Then I could open the "Other" tab.
  5. It is nice to work with Michal, because he can think very fast. We first used the code that we found under IBM CodeRuler to play the game, then we inspired the code to have our own strategy. However, we still could not fight with split up ruler. It is always good to work with other members, because bugs can be easily seem and fixed.


Monday, August 27, 2007

02.OSS.Experience

  • Reason: I found a Java-based "BORG Calendar" from the http://sourceforge.net/, and I decided to download because I like to see at a calendar with my objectives to have an idea on what I have or have not accomplished and what I am going to achieve.

  • Overview: "BORG", http://sourceforge.net/projects/borg-calendar/, is a calendar and task tracking system written in Java. "BORG" stands for Berger-Organizer. The calendar provides a nice day view, week view, month view, month-print, email reminders, popup reminders and to do list. "BORG" is written in Java and it is compatible with all 32-bit MS Windows, all POSIX(Linux/BSD/UNIX-like OSes), OS Independent(Written in an interpreted language), Linux, OS X, and HP-UX. "BORG" is also available in different languages other than English. Two developers created this project and was registered on Oct 26, 2003. The activity percentile from last week was 99.81. The user interface is the Java Swing. Swing is a GUI(graphical user interface toolkit for Java and is one part of the Java Foundation Classes(JFC).
  • PD#1: "The system successfully accomplishes a useful task". After I download and start to enter my tasks in a specific date on my "BORG", I can see a red mark with a flapping star in the red mark in front of each task that really catches my eyes, so it really reminds me what my next assignment is. When a box is in light red color, it tells users the current date of the year. The navigation function enables users to see the previous, current, next day, week or month. Users can also store addresses in "BORG" and browse public calendars when using a remote BORG servlet and MySQL. I believe that "BORG" is met the PD#1.
  • PD#2: "An external user can successfully install and use the system". From the moment I clicked the download button, it took me about 5 minutes to install the "BORG Calendar" software. Hence, I believe that there will be no problems for other users to download as long as the users' OS met what is required for this software. Once the users open the "BORG Calendar", he/she can easily start to schedule his/her tasks. It is simple, so users can understand fast. Therefore, I believe that "BORG" is also met the PD#2.
  • PD#3: "An external developer can successfully understand and enhance the system". The package I downloaded has the BORG source code. However, if I were going to attempt to modify and improve the system, I believe that I would spend quite some time to accomplish this task because I did not find any documentation to support this process. Hence, I believe that "BORG" is met some parts of PD#3.
If you are interested in seeing some screenshots, click this link http://mbcsoft.com/index.php?option=com_content&task=view&id=28&Itemid=50 for more information about "BORG Calendar".

04.FizzBuzz

It took me about 1 hour to complete this assignment.

Firstly, I closed the "Welcome" page and clicked on File>New>Java Project, then I entered a project name, then I clicked Next, then clicked Finish.

Secondly, I opened File > New > File, then I selected a parent folder and entered a file name.

Thirdly, I started to write "FizzBuzz" program. After I wrote the program, saved it and run it, a launch error was appearred and said "Selection does not contain a main type". After spending a while to think what went wrong and why I had this error.

I decided to exit the eclipse platform. Then, I re-opened it again. I decided to read the contents of "Welcome" page and I found a "Tutorial" on the "Welcome" page. After I opened the "Tutorial", I learned how to create a Hello World application.

For my project, I basically followed the steps of Hello World application and wrote a "for" loop to run each number from 1 to 100. Inside the "for" loop, I have if-else if-else to check each number whether is multiple of both 3 and 5, or 3, or 5.

The following is my "04.FizzBuzz" program.



public class FizzBuzz {

public static void main(String[] args) {

for (int number = 1; number <= 100; number++){

if ((number % 3 ==0) && (number % 5 == 0)){
System.out.println("FizzBuzz");
}//end if

else if (number % 3 == 0){
System.out.println("Fizz");
}//end else if

else if (number % 5 == 0){
System.out.println("Buzz");
}//end else if

else{
System.out.println(number);
}//end else

}//end for

}//end main

}//end class FizzBuzz



Introduction

My name is Chiao-Fen Zielinski and I am from Taiwan (R.O.C.).

I am a senior ICS student at UHM and will graduate in Fall 2007.

Thanks for visiting my blog & Have a nice day.