Monday, October 22, 2007


Project home: myisern-1-ivory
Use cases in Wiki

Use case is a very useful way to clear up my mine of what is need to be done in the system developing. Writing use case is to look into the system in terms of actor. Looking as user give me better comprehension of the system. The most important part of writing use case specification is to make it simple, as concise as possible.


Project page:

All tasks have been completed.

This assignment is not a technical difficult one. All it needs is to read command line input in runtime and put it into data. There are many field in each of 3 objects and adding codes are very similar, but not similar enough to use some methods to group them all. Though we can divide our job by different input part, we cannot divide it into different file. So this comes the first time we try hacking into the same file in the same time, but with different part. Though we try our best to not modify any codes in others part, we still get a commit error. At last, I have to put my partner's hacking by copy and paste into my code to make it a whole.

After built the first runnable version, we got lots of bugs and fixed them. One of the most critical bug is cause by Java's parameter passing mechanism. When doing input in multi value fields, it comes out to input a List of String, so we use a method to deal with all these fields. At first, we send the original one as parameter, and try modify it directly inside the method, but the result came out to be incorrect. Then we found out that is because we use the expression like currentList = inputList. Later we change it to return the result List of String and it finally work well. This is because Java pass the parameter by pass the pointers of the object by value, not the object itself. So we doing currentList = inputList, it actually change the value of the pointer passed from parameter, but not the original object. Now I know that if we need to modify the object from parameter to a new one, we need to use the method within the instance, not the "=".

During the next milestone, we will probably add more help and make input more convenient.

Tuesday, October 16, 2007


Project reviewed: myisern-1-green


At the first try, I was astonished that the code I downloaded cannot even compile. Then I found out that is was because I am using Java 1.5 while the code use the java.lang.String.isEmpty() method which is added in Java 1.6. Java is evil, and Macintosh with java 5 is evil too.
At the review perspective, my review cannot going any further now. Meanwhile, I hacked into the code and fixed it so that it can work with Java 5 and continue my review.

Code format and conventions
Document all members
Use meaningful name

Test case
Whitebox perspective:
The test case did a very good coverage as much as 96%. Only some lines of printing out error message are not reached. However, the results are not checked. Tester can only look into the output to see if thing goes right.

Blackbox perspective:
There is no blackbox test. All test, except those come from example, are to call the main method with different arguments. There are actually many methods that return meaningful object, which should be test with quality.

I notice that the system did not maintain the Unique ID to be unique across the entire system. Only duplicate within Collaborations, Organizations or Researchers will be prevented, but not between them, such as a researcher and an organization with same name.

What I feel is that things can go wrong in any possible way. I have never image the Mac with Java 1.5 will cause me trouble until I faced it today. However, try to avoid use the very new things will be a good idea unless it is necessary. In case of check empty String, String.length() = 0 will also finish the work. That will avoid some more problems.

Monday, October 15, 2007


Project page:

All tasks have been completed.

The main difficulty of about this assignment is to deal with various commands. We did this by create a class contains enum fields and switch these fields. It works good, but not good enough. I think in our next Milestone, which need more commands, I will change it to instance factory model, producing sub class of the parser to separate different enums and situations.

We are using the issue driven method in this assignment. The first thing we did is to write issues, and then we pick issues to deal with. On Thursday, we met in library and work together in the afternoon. During that time, we finish building the whole main structure of this assignment. Working together like that is really great, and is of efficiency.

Monday, October 8, 2007


Code Author: MyISERN-1-Blue: Marcius Bagwan, Sonwright M. Gomez and John Hauge
Project Page:

Installation is smooth. All ant check pass. But when I import the project into Eclipse, there is a warning of unused import: import static org.junit.Assert.assertTrue; in

Code format and Convention:
There are a few violations:
Use meaningful name
Document all members
One sentence summary

Test Case:
As all 4 methods, which are new from example, return void, there is nothing much to assert in test.
In white box perspective, the test coverage is 100% according to EMMA, so it is well done.
In black box perspective, there are only a few conditional statements and all of them all satisfied at least once.
However, I found some problems:
1. Two format mistake when printing organizations. First, it prints the country as "CounterUSA", which should be "Countery: USA", I think. Second, name is printed like "Name:University of Hawaii", where I think a space is missing because every other places in the table, ":" always follow by a space.
2. Though he program has a good command-line arguments and also help message, the program exit without any word when using error argument. Help message should come out in this situation.
3. If the xml file contain an empty element like , or missing a element which would contain other elements, the program will end with NullPointerException. However, these kind of xml files will fail when running Therefore, the mistake of the program will be running without validate the XML files first.

I am surprise that though code format and convention has been used and emphasized for so long, there are still violations in our codes. It seems to be easy to follow exactly the rules required. But actually, it isn't. Lots of practice is needed.
About test, though methods return void is evil and hard to test with assertion, we still ought to do it seriously, at least to guarantee that the output looks right, such as correct message with proper format.
Null object are evil and can usually break down a program. Most of the reasons when it happens in actual application is because of illegal input, for example, miss some essential parts or mis-structure format. So we really need to make sure to validate input before processing it.

Sunday, October 7, 2007


Source and Distribution can be found at

Here is the first task of collaboration. My group have two people, me and Ben Karsin.
In Thursday, the day after last class, we meet as required in library. But, as none of us have actually initiate coding, we think the meeting is useless. Then we change our plan to keep in touch online, mostly by email.

In Friday and Saturday, we did not meet each other. Then problem came out. Our emails are replied with delay as long as 20 hours. Then our whole schedule has been postponed. I then realize how important the daily meeting is. However, as Sunday comes, we don't want to meet in school again. So we decided to keep contact online by Skype. But it works! We can communicate as well as face to face. Therefore, we complete most of our code in an afternoon.

In my opinion, daily meeting is significant, but real-time communication via internet is important too, or even better. Because meeting is only a short time in a fixed time, while communication can be all the time. However, it maybe just the case when only 2 people in a group, when members become more, meeting should be more efficient, especially in initial design.

In the first day we meet, we don't settle down an overall design. When I start to write codes, I have to worry about what my partner will write, will our code be able to combine? Though change may be applied latter, we do need to get a better design at the beginning. As least define some interfaces, which will guarantee usability in certain way.
The result of our collaboration is that I write codes and Ben test it.

Overall, this is a very helpful experience of group development. It is interesting to develop with others.


The Google Hosting Project I created :

In this assignment, our goal is to install SVN, try it and create a new Google Hosting Project.

In my practice, everything goes well. I finish the first 2 tasks without problems.
When creating Google Hosting Project, I face a small problem that when modified codes, no log is sent to svn group. My problem is cause by adding wrong member in svn group. At first I thought that the "googlecode" in should be replace by the project's name. The right way is to add "" as a member.

What I learn, or say realize is that the experience in previous assignment is really helpful. Now I can install tools, modify environment variables and test code smoothly.