Monday, October 22, 2007

21.MyISERN-1.2

Team: MyISERN-1-Gold
Wiki: http://code.google.com/p/myisern-1-gold/w/list
Source: HERE

Task 1:
First, we re-organize our MyISERN 1.1 file and divide all method into different files. This is what we do on first meeting. Why are we divide all method into different files, because we reallize that there are a lot of thing will increment on MyISERN 1.2, so we cannot put everything into one single class, if we do that, it may mess up our code later on. So, now is easy to modify our code, becasue each class hold it's function, for example, print class would print all data from XML file.

Second, we talk about what kind of thing would be increment on MyISERN 1.2 . We planning to put all add function to one class, and start implement code on function "add researcher" because once we finish "add researcher" after that may very easy, since it is a same idea for organization and collaboration. Next step is create a menu for let user choose. We have no problem up to this point. But the big challenge is coming, that is data entry.

Task 2:
This part of assignment it seem to be very easy to do, but it is not. One reason is too much data we need to entry. Second reason is we need to enter those data step by step. So we use another way to input data to XML file. We edit the XML manually, not go through the system. Then the problem is come out, because the XML format must be match the format that the system required, if not. It won't be pass the verify and cannot read the xml file. So this is the problem of those we got. We spend almost 4 to 5 hour to redo all the xml file into right format that can be read by the system, otherwise the researcher, organization, collaboration table won't be print out properly.

Task 3:
This task is the almost easy part of this assignment. And everybody could see our progress throught this powerpoint slide show.

What do I learn:
I learn some more java skill on exporting text to XML file, and I thought it may be useful for future. Also, the term work is very important, we rely on each other, share knowlegde to each others.

19.UseCaseSpecification

To view our use case: http://code.google.com/p/myisern-1-gold/w/list

What do I learned:
I feel write a use case is very difficult, because I need to go through each detail on the project and divide it to different part, then think about what would happen working on this project. Finally write a scenario for each session. Describe what should we do or what feature may appear on the system.

I create our use case by using template from web, so the template provide a table that list all important things on most use case would appear. I just based on the note that I took on class and come up this user case. Of course, I am not the one that come up the whole use case. Me and my groupmate do it together.

Use case is important that it is a demo of how to use or understand what is the system doing, what value I input and what is the system would respond. Just like a procedure, it guide the user to use the system step by step. let user to understand how to use the system as well.

Tuesday, October 16, 2007

22.MyISERN-1.1.Review

Reviewed Author: Michal Zielinski
Source Code: Here

Installation Review:
-There are no problem to run "ANT".
-JAR file can be generate.
-Be able to import project to eclipse.
-No error appear on eclipse.

Tool Execution:
Junit - OKey! Successful run all the test.
-Enable to see a print out table of information from XML file, when it run.

Checkstyle - OKey!
checkstyle.tool:
-Created dir: C:\svn-google\myisern\build\checkstyle
-Running Checkstyle 4.3 on 10 files

PMD - Okey!
pmd.tool:
-Created dir: C:\svn-google\myisern\build\pmd
-No problems found!

FindBugs - Okey!
findbugs.tool:
-Created dir: C:\svn-google\myisern\build\findbugs-Running FindBugs...
-Output saved to C:\svn-google\myisern\build\findbugs/findbugs.xml

Emma - Okey!
Emma Coverage summary
class: 100% (9/9)
method: 100% (41/41)
block: 92% (2798/3039)
line: 91% (459/507)
It seem pretty good for emme coverage, it cover all class and method but some line of code didn't cover, it still okey. If you want to improve your coverage that you need to worry about some code such as try & catch, loop and some import function. It may cause your coverage not reach to 100%.

Verify - Okey! Successful run all the test.
BUILD SUCCESSFUL

Code Format and Conventions Review:
FileLine# violationComment
No Violation Found!


So far has no error appear up to this point, next going to test is command line argument.

Black Box Perspective:
It is not doing well this part, since user does not know what format of argument they should put in, so it is the best way to print out what command line with no argument input to system, then user will understand how to access the system. So, I am a user in this case and I going to use your system, but I suppose know nothing about this system, so I have no idea how to access this system to get information that what I want. Therefore, I cannot do test on this part.

White Box Perspective:
Since, I can read your code and understand what are you doing on your code, then I run the system and put arguments on it to test it work.
On the other hand, your emme report you have
class: 100% (9/9)
method: 100% (41/41)
block: 92% (2798/3039)
line: 91% (459/507)
that mean some of block is not covered, the major result is on validation of argument that you need to use alot of error check things, but these error check will make some code cannot be cover, because error check including a lot of if statement, so these statement will block some conidition never exist will cause so code never be execute, then coverage will never be 100%.

Break da buggah:
In this case, it cannot break the system, if you have well error checking, but I found some condition that will break the system. when I input command "-listOrganizations -collaborationLevelEquals " that I put MAX_VALUE on argument will cause the system break.

Summary and Lessons Learned:
I read through your code and I really like you applet table, you make a table as applet and pop up by execute the system. It is a little off track to use applet print out table, but it is good to reference for me that how to write applet in java.

Sunday, October 14, 2007

18. MyISERN-1.1

Group: myisern-1-gold

The source code can be downloaded from here.
--------------------------------------------------------------

Objective:
Three task on this assignment:
1. Build command line that user can access the database.
2. Make unique ID and error check on loading database.
3. Make test case to bring up emma coverage.

Progress:
On first meeting, we come up three major task that same with above. Before each of us work on different area, after finish our part then combine it together at the end, but we found that don't work very well, so this time we change everyone work on same task, then choose the better one. This method can fill up our weakness, three brain thinking is better then one brain.


On second meeting, we got stuck on task 2, we have no idea how to check duplicate unique ID that many question pop up in our mind, how to we keep check the checked unique ID? Where to store checked unique ID? Store it into array? Then, we post question on disuession, hope someone can help. We put away the error checking thigs and start work on command line argument. This is a easy part on this assignment, but we got stuck again, we cannot test command line without unique ID arguments, so we have to get back to work on unique ID & error checking stuff. Finally, we make it by read the disuession post. After that "life is easy", we finish up all the thing on time. but a little bit thing not good is emme coverage are not all 100%.

For my own view, overall of this assignment are good and I am happy to work with our partner, everytime we change some new that we will announce each other, then commit to server. So far I enjoy working in this group.

What do I learn?
I learn planning our work before we get start, otherwise we may not success on this assignment. Since, everythings could happen, so if we not do well planning before start that the worse is we need to start it over again when getting problem.

Tuesday, October 9, 2007

16. MyIsernReview

Reviewed Author: Edward Kim
Source Code: Here

Installation Review:
First, I run the project in command line and it compile in "ANT" with no error. It passed all test and also build a jar file for execute application.
Second, I import the project to eclipse and run project into eclipse, it print out valid data in table.

Tool Execution:
---------------
Junit - OKey! Successful run all the test.
-Enable to see a print out table of information from XML file, when it run.

---------------
Checkstyle - OKey!
checkstyle.tool:
-Created dir: D:\ICS413\Myisern1.0\myisern-xml-1.0.1007\build\checkstyle
-Running Checkstyle 4.3 on 2 files

---------------
PMD - Okey!
pmd.tool:
-Created dir: D:\ICS413\Myisern1.0\myisern-xml-1.0.1007\build\pmd
-No problems found!

---------------
FindBugs - Okey!
findbugs.tool:
-Created dir: D:\ICS413\Myisern1.0\myisern-xml-1.0.1007\build\findbugs
-Running FindBugs...
-Output saved to D:\ICS413\Myisern1.0\myisern-xml-1.0.1007\build\findbugs/findbugs.xml

---------------
Emma - Okey!
Emma Coverage summary
class: 100% (1/1)
method: 90% (9/10)
block: 98% (497/508)
line: 96% (104/108)
You have some code didn't cover in "printTable" method, and you call "printTable" method in main, then it only have 90% coverage in method.

---------------
Verify - Okey! Successful run all the test.
BUILD SUCCESSFUL

After done verify project that I invoke the command line use "ant jar" to generate the jar file, then I run "java -jar myisern-1-green.jar" that it print a table from xml file. Up to this point, everything is okey which it pass verify all test and the application can be run as command line.

Code Format and Conventions Review:
FileLine# violationComment
MyIsernXmlLoader.java 149,166,*EJS-9Use meaningful names
MyIsernXmlLoader.java 124,180,*EJS-7Only put white space to delineate method, but it is notthe methods


Black Box Perspective:
In this case, the black box perspective is simple, because we only expect the application print out a table contain valid information, so there are no argument input to command line. We only type "java -jar myisern-1-green.jar" to run an application and print out table. I tested it and return reasonable outcome that the black box test is pass.

White Box Perspective:
I read through your code and found out something that I thing it could be improve your EMMA coverage in order to 100%. Since, your coverage is nearly 100%:
class: 100% (1/1)
method: 90% (9/10)
block: 98% (497/508)
line: 96% (104/108)
but it didn't mean your code is bad. It could be improve a little bit more, I read your code and see you put everything on one method and invoke it in main, so it is not testing detail inside the method, I suggest you to seperate your print method by each types of xml file, then I can invoke each types print method on test case then it can see which is not coverage.

Break da buggah:
For black box perspective, there are no chance to break the system, no matter you input any argument, it still return valid result.
For white box perspective, it must happen to break the system by insert another location of xml file, and you didn't do any error checking to due with this situation, then it will break the system.

Summary and Lessons Learned:
I learned to see the emme result coverage is not exactly need to be 100%, in other word, emme coverage result return 100% is not mean pass the test fully, all code can coverage, but it only invoke main to test case. It is not tested in detail, so that emme have 100% coverage is mean not "really" good on testing.

Sunday, October 7, 2007

15. MyISERN-1.0

Group: myisern-1-gold

The source code can be downloaded from here.
--------------------------------------------------------------

Objective:
Manipulate XML in Java, understand how JAXB work and manipulate XML in Java. Practice Scrum methodology.

Progress:
JAXB is powerful, it done 90% of those code, and we only need to do is finish up the rest of 10% code.
First, our group meet together read and understand what is the code do. Once we figure out the given code implementation, then everythings is easy start to this point.

Second, start implement code to get data from XML file by using JAXB generated code, we spend a little bit time to implement code, since we understand the given code before, so that's make more easy.

Third, we can print out all data from XML file, then we start testing our code by using junit, pmd, checkstyle, findbugs and emma to see it can pass these tests. we try to insert and take out some code to make emma test be 100% coverage. There some problem generate, we need to generate JAR file when compile the project, since this is a command line application, we must generate JAR file to make application run as command line.

Fourth, we finalize our project, and solve the problem of generate JAR file by change some code on build.xml file.

What do I learn in this assignment?
In this assignment I learn group work, participation and practice Scrum method. This is a good chance for me to learn how to work with other people, no matter how profess you are, you only human that mean your skill is limited, so you need other people help, that you must work together, especially programming. This is a good for me to practice work with someone else.

14. CM.Practice

Project Page
Disuess Page
SVN Page


I feel this assignement is really useful, it is a totally new thing for me. Before, I don't know "Google" is really powerful, it can host the project related to subversion. This assignment help me to understand how to setup project in google.


Subversion part is very easy to do, the only thing to do is download and install, then it can be use, In windows XP, we can choose using command line or right click the mouse to check out the subversion. Create a new folder and download the code from google project website then we will see the mark on each file.


Google hosting part is little bit hard to do, I need to spend a hour to figure out the setup progress. I am following the lecture note to setup the google hosting, but the lecture note slide is unclear. If Philip can improve those lecture note quality would be much batter.


What I learn in this assignment is google project hosting, it is useful in my future, because google project can host any source code and commited by subversion. Also, this is a good time for me to experience how to use subversion and google project hosting.

Monday, October 1, 2007

12.WebSpiderReview

Reviewed Author:
Jon Lao

Installation Review:

I try to run the program in command line but it doesn't work, it has an exception about wrong argument position when Itype default command "java -jar webspider.jar -totallinks http://www.hackystat.org/ 100", Then, I trace the code and see it is not support command line argument, which is cannot use command line to start run the program.

Tool Execution:

Junit - Okey! All test pass.
-------------------------------
Checkstyle
- Fail!
The most reason why fail testing on checkstyle is missing javadoc comment and unclear comment.
-------------------------------
PMD - Fail! Found 8 problems
edu\hawaii\webspider\WebSpiderExample

323_Avoid using implementation types like 'LinkedList'; use the interface instead
270getTotalLinksAvoid reassigning parameters such as 'Url'
398getTotalLinksAn empty statement (semicolon) not part of a loop
3110getMostPopularAn empty statement (semicolon) not part of a loop
3120getLogAvoid using implementation types like 'LinkedList'; use the interface instead
3136checkArgumentsAvoid calling toString() on String objects; this is unnecessary
3139checkArgumentsAvoid calling toString() on String objects; this is unnecessary.


Total number of violations for this class: 7
-------------------------------
FindBugs - Fail!

CorrectnessWarnings1
PerformanceWarnings2
DodgyWarnings1
Total_4


Correctness Warnings
GC com.meterware.httpunit.WebLink is incompatible with expected argument type
java.lang.String in edu.hawaii.webspider.WebSpiderExample.getTotalLinks(String, int)
Bug type GC_UNRELATED_TYPES

Performance Warnings
Dm Method edu.hawaii.webspider.WebSpiderExample.checkArguments(String[]) invokes toString() method on a String
Bug type DM_STRING_TOSTRING
Dm Method edu.hawaii.webspider.WebSpiderExample.getLog(LinkedList) invokes toString()method on a String
Bug type DM_STRING_TOSTRING

Dodgy Warnings
REC Exception is caught when Exception is not thrown in
edu.hawaii.webspider.WebSpiderExample.getTotalLinks(String, int)
-------------------------------
Emma - Okey! Successful run all the test
Emma Coverage summary
class: 100% (1/1)
method: 88% (7/8)
block: 94% (171/181)
line: 90% (43/48)
each type is near 100%. For "method", it get 88% becasue it include one blank method that do nothing with this method.
-------------------------------
Verify - Fail!
Since, checkstyle test is fail before, so that verify.build.xml was stop executed where it got error on checkstyle.
-------------------------------
Dist - Okey!
It successful generate file to C:\eclipse\webspider-rong\build\dist\webspider-rong-1.0.930.zip.
Also, it generate "webspider.jar" at C:\eclipse\webspider-rong, but I cannot successful run the program.

Execution:

I type in default command "java -jar webspider.jar -totallinks http://www.hackystat.org/ 100", but it doesn't run properly.and I try to not input argument, it return right exception message. I try different combination
Code Format and Conventions Review


FileLine# violationComment
WebSpiderExample.java 70,79EJS-25Avoid using uppercase at first letter of each subsequent
WebSpiderExample.java 70,95 EJS-25Avoid using lowercase at firstword
WebSpiderExample.java 75,80,89EJS-9Use meaningful names
WebSpiderExample.java 59EJS-7Only put white space to delineate method, but it is notthe methods



Black Box Perspective:

In this case, the black box perspective that I expect is input something argument and return a reasonable answer.For example, I type this command line "java -jar webspider.jar -totallinks http://www.hackystat.org 100"to run the program with some default argument, that I expect it will return a number of link for the website I type in.If the result is not a number or equal less than zero, that's mean something wrong inside the program.

I tried to not input "-logging" argument in command line that it return error.It's run when I turn on log mode, but return 0 link for default URL, which mean it didn't search for links.

I think Jon's program could allow no page number input that still can show the result. If not input page number thatthe program would find all link until it reach a empty link page.Other black box test case is input a large number at page argument and would crush the program.

White Box Perspective:

I go through Jon's code and see his did not finished getMostPopular method, so that only 88% method coverage in emma reportEmma report also show try and catch statement did not cover in checkArguments method. The main result why the emma reportdid not get 100% because he did not finished getMostPopular method, so most of code cannot coverage.

Break da buggah:

For jon's program, I tried input 9999999999 value to page number, it return 0 link and argument format is invalid.If I input URL that contain javascript, the program will be crush, because it is no try and catch exception implemented.If I not input logging argument, that it return an error.

Summary and Lessons Learned:

For this assignment, I feel my webspider program not doing well after I saw somebody codes, and I found that I spend most oftime on small parts program, and I ignored whole part of program, which is code style, good comment, detail test case and the design of program. These all thing together will make a good program. In this assignment, I learned to be a good programmerthat may need different perspective, because program is a public source that people can use it, and other programmer would read our code, so everytime I write program that need to think about this condition, then start make my program, that could improve the quality of my future software systems.