Monday, December 10, 2007

33.PrimeDirectivesRedux

PD1: The system successfully accomplishes a useful task.

PD2: An external user can successfully install and use the system.

PD3: An external developer can successfully understand and enhance the system.


1. Interactive Development Environments (Eclipse, VisualStudio, etc.)


PD1: IDEs satisfy the PD1, because one of the properties that IDEs have called “Integrated stepwise execution (debugger) can help programmers to detect errors.

PD2: IDEs satisfy the PD2, because an external user can install and use IDEs on his/her local working environment when he/she follows the IDE installation guide carefully.

PD3: IDEs satisfy the PD3, because IDEs support for coding, testing, debugging, and refactoring. Hence, an external developer who is familiar with IDEs can understand, correct and improve software systems faster.


2. Coding Standards and Coding Standards Compliance Tools (Checkstyle, etc.)


PD1: Coding Standards and Coding Standards Compliance Tools satisfy the PD1, because they can help programmers improve the code readability, understandability and maintainability. When using the Checkstyle tool, a report would be generated to inform programmers whether violations are existed or not in the code.

PD2: Coding Standards and Coding Standards Compliance Tools do not satisfy the PD2, because an external user does not need to know any program code. Since users only care about whether the software they use are running smoothly or not. If not, users can simply call programmers to fix the software. Hence, PD2 is not in this scope.

PD3: Coding Standards and Coding Standards Compliance Tools satisfy the PD3, because when a software system follows the coding standards, an external develop can understand the software system faster. Then, the external developer can improve the software system efficiently.


3. Build Systems (Ant, Make, etc.)


PD1: Build Systems such as Ant (Java-based), and Make (C, C++ based) satisfy the PD1, because the build systems help programmers compile all files with one line of code. If one of the files is changed by a programmer, the build systems would only compile that file and the rest of files stay the same. It saves compiling time.

PD2: Build Systems satisfy the PD2, because an external user can run a software system with a line of code. For example, ant webspider.jar. Build Systems enable users to use the software system other than IDEs.

PD3: Build Systems satisfy the PD3, because an external developer can understand a software system by reading the build file which the external developer can easy know what files are involved when running the build systems. Moreover, the external developer can enhance the software system by adding other different tools in the build systems.


4. Automated Quality Assurance Tools (PMD and FindBugs, etc.)


PD1: Automated Quality Assurance Tools such as PMD, FindBugs satisfy the PD1, because PMD helps programmers improve the code design, and FindBugs helps programmers pay attention on byte code than source code. For example, consider using equals( ) instead of = = when comparing two strings.

PD2: Automated Quality Assurance (QA) Tools do not satisfy the PD2, because an external user does not need to know the QA of a system when running the system.

PD3: Automated Quality Assurance Tools satisfy the PD3, because these tools help external developers understand the code qualities. When the external developers understand the code qualities, they can then enhance the system.


5. Black and White Box Testing


PD1: Black and White Box Testing satisfy the PD1, because the Black Box Testing helps programmers understand whether an input generates the expected output, and the White Box Testing helps programmers understand which line, block, method and class have not been covered by testing.

PD2: Black and White Box Testing do not satisfy the PD2, because an external user does not

PD3: Black and White Box Testing satisfy the PD3, because black box testing helps external developers understand whether an input generates the expected output, and the white box testing helps external developers understand which part of code have not been tested yet. By doing the white box testing, the external developer can write more testing cases for untested code. It is to make sure that the system has a better quality.


6. Automated Testing Tools (JUnit, HttpUnit, etc.)


PD1: Automated Testing Tools satisfy the PD1, because these tools help programmers understand whether or not a system generates a correct result which programmers expect.

PD2: Automated Testing Tools do not satisfy the PD2, because an external user does not need to know any test cases to install and use the system.

PD3: Automated Testing Tools satisfy the PD3, because an external developer can understand and enhance a system by applying these testing tools. If one of testing fails, the external developer can read a automated generated report to fix the error.


7. Configuration Management (CVS, SVN, etc.)


PD1: Configuration Management satisfies the PD1, because it would identify errors and track all relevant elements of the configuration of a system.

PD2: Configuration Management satisfies the PD2, because an external user can install and use the system. For example, a user can checkout a system when using the SVN.

PD3: Configuration Management satisfies the PD3, because an external developer can understand a system, modify the system then commit the system back to trunk for the enhancement of the system.


8. Issue Driven Project Management


PD1: Issue Driven Project Management satisfies the PD1, because every issue is meant to be improved. Hence, a programmer can try to improve the system by following the issues.

PD2: Issue Driven Project Management satisfies the PD2, because an external user can view the issue page to understand the status of a system. Of course, the issue page is needed to be updated regularly.

PD3: Issue Driven Project Management satisfies the PD3, because an external developer can read these issues to improve a system.


9. Use Cases


PD1: Use Cases satisfy the PD1, because any use cases describe the result of certain action.

PD2: Use Cases satisfy the PD2, because an external user can expect the result if he/she reads the description in the use cases.

PD3: Use Cases satisfy the PD3, because an external developer can get information from these use cases to realize whether a system is generating an output as described in the use cases. If not, the external developer can enhance the system by modifying the code.


10. Software Review


PD1: Software Review satisfies the PD1, because a tester tests the software to find out whether or not the software accomplishes what it is supposed to do.

PD2: Software Review satisfies the PD2, because an external user can follow an installation guide to install and use the system successfully.

PD3: Software Review satisfies the PD3, because an external developer can follow an installation guide to install the system. If the installation guide is not well written, the external developer can write his/her feedback about it and suggest how to re-write the installation. If the installation guide is well written, the external developer can improve the system.


11. Agile Methods (XP, Scrum, etc.)


PD1: Agile Methods satisfy the PD1, because agile methods make sure that each member understands every part of the code. Hence, every system would accomplish a useful task.

PD2: Agile Methods do not satisfy the PD2, because an external user does not have to know whether each member understands or not a system.

PD3: Agile Methods do not satisfy the PD3. Since Agile Methods seek once and only once, these methods come and go fast well. It might not be a good way to let an external developer to join the project. If the external developer starts at the beginning of the project, it might work well.


12. Open Source Licenses (GPL, CPL, etc.)


PD1: Open Source Licenses satisfy the PD1, because they are not discriminated to certain people, free redistribution and available for business use. Hence, a system can be modifies frequently by many people. The system accomplishes a useful task.

PD2: Open Source Licenses satisfy the PD2, because an external user can freely install and use the system any time and any place.

PD3: Open Source Licenses satisfy the PD3, because an external developer learns more about open source licenses through discussion board or from the installation guide. Then, the external developer can spend time on improving the system.


13. Online Hosting Services (Google Project Hosting, SourceForge, etc.)


PD1: Online Hosting Services satisfy the PD1, because the online hosting services are for both owners and viewers. Only owners can modify the services. Viewers can view the services and get feedback through discussion board. Hence, the services are tested by many people. Then, the system is able to accomplish a useful task.

PD2: Online Hosting Services satisfy the PD2, because an external user can install and use the system by reading the installation guide and the discussion board.

PD3: Online Hosting Services satisfy the PD3, because an external developer can read the online hosting site to understand a system. Then, the external developer can write some feedback about the system. Finally, owners of the online hosting services can modify the system. With this way, the external developer enhances the system indirectly.

Sunday, December 9, 2007

MyIsern-Onyx-2.0 Review

  • Team Pink decided to distribute the review assignment into four parts.
  • Reviewee: Team Onyx
  • Installation Review:
    • I was able to download the zip file (myisern-onyx-2.0.1205.zip) from the team Onyx google hosting project site (http://code.google.com/p/myisern-onyx/).
    • In the zip file, team Onyx provides a readme file which has a great detail about how to install their system and view their web application.
  • Code Format and Conventions Review:
  • Quality Assurance Tools Review:
    • "CREATE TABLE " appears 8 times.
    • "tbl_RESEARCHER" appears 4 times.
    • "INSERT_INTO " appears 6 times.
    • "VALUES (" appears 6 times.
    • "'," appears 6 times.
    • "FROM " appears 4 times.
    • Most of warnings are about the "nonconstant string passed to execute method on an SQL statement." Consider using a prepared statement instead.
    • Some warnings are about using the plus sign (+) to add string together in a loop. Consider using a StringBuffer or StringBuilder in Java 1.5.
    • A few of warnings are about unread field. Consider removing them.
  • Testing Tools Review:
    • There are no derby unit tests.
  • Test Case Review:
    • After involving "ant -f emma.build.xml", the emma coverage had shown as below.
    • Team Onyx misses a few test cases for class such as LogoutActionBean, SanityCheckErrorItem, SanityCheckErrorMessage, and MyIsernXMLSaver.
  • Summary:
    • I believe that most groups focus on how to use the database with their web application. Hence, some groups might have neglected to take care of the code qualities and testings. I will suggest team Onyx to take a look at our review reports on four different parts of their project. Hopefully, these reports will provide a great help for them to improve their project.

Thursday, November 15, 2007

29.MyISERN-1.3-Review

  • Reviewer: Chiao-Fen Zielinski-Liu
  • Author: Silver Group (Matsuo & Zhang)
  • Installation Review:
    • The myisern-silver-1.3.1114 zip file was successfully downloaded into to my workplace.
    • Myisern-silver-1.3.1114 does not have a 'java - jar' interface to the system.
    • I was able to run myisern-silver in a few minutes because the InstallationGuide was very clear and easy to follow. Myisern-silver also provides a link to their login page in the InstallationGuide. I find this so sweet.
    • CheckStyle = failed.
    • JUnit = failed.
    • PMD = successful.
    • FindBugs = failed.
  • Code Format and Conventions Review:
    • After running the 'CheckStyle' task, there were several warnings. These warnings are all about 'Missing a Javadoc comment'. Hence, it violates 'EJS-35' which is about 'no documentation comments'.
  • Test Case Review:
    • Black box perspective:
      • There are two unit test classes which are 'TestMyIsernModel' and 'TestXmlLoader'. I believe that several unit tests for the MyIsernAction class are missing.
    • White box perspective:
      • Bring up tomcat, involve ant -f tomcat.build.xml, and then run the emma task. I kept getting a message called "could not find ${env.HOME} coverage.ec to copy. However, I changed to ${basedir} coverage.ec. The emma coverage is as follow for the myisern-silver group.
        • [concat] Emma Coverage summary
        • [concat] class: 22% (2/9)
        • [concat] method: 26% (40/152)
        • [concat] block: 53% (1533/2899)
        • [concat] line: 47% (260.2/550)
    • Break da buggah:
      • I could access myisern.jsp and other *.jsp without entering valid username and password. I would suggest to lock other web applications if users try to visit other web application without signing in.
      • I could successfully login the system. However, when I tried to involve more functions, I received a warning "HTTP Status 500-, Exception report".
  • User Interface Review:
    • The user interface for all of web applications is very simple and clear without any fancy images or background color. It contains only boxes for entering information, links, and buttons with white color as background. This user interface is good for users do multi tasks on the window at the same time.
  • Summary and Lessons Learned:
    • I would like to mention again that the installation guide is clear and concise. If any user follows it, it is impossible to make mistake.
    • The only button that works successfully is the 'login' button. I could not involve any function after I signed in. Therefore, I believe that I would try to make at least one function work successfully.
    • This assignment is very interesting because it involves the web application. What if this assignment was an individual project and more time was given, it would be more challenge for each of us in class.

Monday, November 5, 2007

26.StackStripesExtension

  • What was difficult about this assignment?
    • In my case, the first difficult task was that I did not know the localhost was needed to be running in order to login to the Tomcat Manager.
    • The second difficult task was that I did not follow instructions carefully, so I brought up Tomcat from different directory. This caused my verify tool failed.
    • When coding the "Double It" button, I ran into some errors because I did not use the iterator method but tried to get the size of stack. It turned out I changed the original stack instead of creating a new one.
  • What problems were encountered in carrying out the work, and how did you resolve them?
    • My verify task did not pass after I tried many times and I re-did the task1, task2 and task3 about five times. Then, I decided to watch how Michal ran his program. I realized that I did not bring up Tomcat in the right directory. This was because I did not follow the instructions carefully. It is very important to read and follow instructions carefully.
  • Were all of the assigned tasks completed?
    • Yes, I have completed all assigned tasks.
    • Emma coverage:
      • [concat] Emma Coverage summary
      • [concat] class: 100% (2/2)
      • [concat] method: 100% (18/18)
      • [concat] block: 94% (129/137)
      • [concat] line: 90% (37/41)

Sunday, November 4, 2007

25.WebAppQuestions

1. Explain in your own words the meaning of the web "request-response cycle".

After studying the "request-response cycle" from different online sources, the "request-response cycle" is between a client and a server. Normally, a client requests a task and a server responses it. For example, you are looking for some information about the "request-response cycle" on google, so you type the key inside the searching box. Then, you will receive lists of articles about the "request-response cycle". I think what it is.


2. Explain how servlets facilitate processing of the request-response cycle.

To understand servlets, we have to know what the request-response cycle is. Hence, please read the Q1. A servlet runs on a server. In the "request-response cycle", response is represented as a server. Therefore, when a server responses to a client, the server needs a servlet to generate HTML pages (also known as web pages) which are sent to the client. HTML pages can be static, dynamic or both.


3. How do you login to the Tomcat Manager?

Before you login to the Tomact Mangaer, you will need to know what the username and password is. How can you get the username and password?

Apache-tomcat-6.0.14 -> conf -> tomcatusers Then, you will find the username and password.

Then, go to "http://localhost:8080/" and click "Tomcat Manager". Now, you can enter the username and password.


4. What is the Tomcat Manager used for in the StackStripes application?

In the StackStripes application, the Tomcat manager is to implement the Java Servlet (a server) and the JavaServer pages and to provide an environment for Java code to run in a web application. In the StackStripes application, we use commands like catalina start and catalina stop to deploy and undeploy tasks.


5. What is the directory and file layout of an installed web application like StackStripes? (This is NOT the same as the directory and file layout of the StackStripes distribution!)

We would need to install Tomcat tool, Stripes tool and set environment variables. We would also need to copy a .war file from Stripes to Tomcat.


6. How do you build a war directory structure in Ant? Where is this accomplished in the StackStripes application?

When running ant –f build.xml, a war directory would be created under a build directory. Therefore, in our cases, the war directory would be generated inside the build directory.


7. How do you install a war directory in a running Tomcat server? What information does the Ant task need to accomplish this?

In order to install a war directory, the Tomcat tool is needed because a running Tomcat server would create a war directory automatically under the same name within the webapps directory and deployed for use. The information would be like the “catalina start” command to start up a web, then ant –f tomcat.build.xml.


8. What is the "Model2" architecture? What are its advantages?

The “Model2” architecture or Model-View-Controller (MVC) is a hybrid approach for serving dynamic content. Model is included data; View is the interface and Controller is for the requests from client. Its advantages are included the use of both servlets and Java Server Pages. By using both technologies, the “Model2” architecture would have a clean content, clear roles and responsibilities of the developers.


9. What are JSP pages? How are they related to servlets?

Java Server Pages (JSP) is a server side technology that lets you mix static HTML with dynamically-generated HTML. A dynamic Web page contains content that a user can interact with and normally the extension of a file is .jsp not .html. When a JSP page is called, it will be compiled by the JSP engine into a Java servlet. Then, the servlet is compiled by the servlet engine to generate dynamic HTML to be sent to a client.


10. Why is there a delay when retrieving a JSP page for the first time? Where is the Java code for that page stored?

When retrieving a JSP page for the first time, servlet acts a security to check whether or not a web application is dynamical. I am not sure where the Java code is stored. Since the JSP page is from the server side, so the Java code should be stored in the server.


11. What are JSTL tags? Why are they useful? What is an example JSTL tag from the StackStripes system?

JSP Standard Tag Library (JSTL) is a set of tag libraries and is needed when writting dynamic JSP pages.

An example from the StackStripes system would be the "c:forEach" tag in the "index.jsp" file.

12. What are Stripes tags? Why are they useful? What is an example Stripes tag from the StackStripes system?

Stripes tags are included a standard tag library and a dynamic attribute tag library. Their function is to link both a web application and a Java code.

An example from the StackStripes would be the "stripes" tag in the "index.jsp" file.


13. What is HttpUnit? How is it different from JUnit? Why is it useful? What is an example use of HttpUnit from the StackStripes system?

HttpUnit is a framework based on JUnit, which allows the implementation of automated test scripts for “Web applications”. Therefore, when running HttpUnit testing, tomcat needs to be run at the same time. The example from the stackstripes system will be these objects such as Webconversation, WebResponse, WebForm and WebTable which would need to be used in HttpUnit testing.


14. What needed to be changed in order to implement the Double It button? What didn't need to be changed? What did you learn about the MVC design pattern from this exercise?

In order to run the “Double It” button, a method called “doubleIt” should be added in the StackModel class and an object of iterator would need to be created to hold what is in the original iterator because it is not a good idea to manipulate the original iterator. Then, a string list would be created. All the objects in the newer iterator would be converted into string which would be added into the string list. Finally, push each string from the string list to stack.

What does not need to be changed would be the method call “doubleIt” in the StackActionBean class. It is pretty much the same as push in the StackActionBean but without the argument.

Model-View-Controller (MVC) is separated into three cores which are the input, processing, and output of an application. Therefore, I believe that the StackModel class is represented for Model, the StackActionBean class is represented for Controller and the Web Application is represented for View. It is similar to object orient language. Each class does a different task. When all classes are combined, a product is completed.


15. What are the equivalence classes that need to be tested for the Double It button?

When testing the “Double It” button for the StackModel class in the TestStackModel class, some pushes are needed to be done first. Then, the doubleIt() method would be called for testing purpose.


16. Provide two screen images of your new StackStripes application with the Double It button, one showing the page before and one showing the page after hitting the "Double It" button.


Before:




After:



17. What is the singleton design pattern? What is an example of its use in StackStripes? Why is it needed?

The singleton design pattern allows many parts of a program to share a single resource to work out the details of the sharing themselves.

An example from the StackStripes would be as follows:

public class StackModel {

/** The singleton StackModel instance. */
private static StackModel theInstance = new StackModel();
}

18. Some of the StackStripes tests exercise code on the "server side", while others exercise code on the "client" side. Which test classes exercise code on the "server", and which exercise code on the "client"? How does Emma deal with this to create appropriate coverage data?

Server side includes the TestStackModel class and client side includes the TestStackActionBean class.


19. Running 'ant -f junit.build.xml' results in the following target invocations: tomcat.check, tomcat.undeploy, compile, war, tomcat.deploy, junit.tool, junit.report, junit. Explain what each of these targets do.


tomcat.check:

[get] Getting: http://localhost:8080//manager/list
[get] To: C:\ICS413Tools\stackstripes-1.0.1027\list-results.tmp
[delete] Deleting: C:\ICS413Tools\stackstripes-1.0.1027\list-results.tmp
[echo] Tomcat and its management interface contacted successfully.


tomcat.undeploy:

[get] Getting: http://localhost:8080//manager/undeploy?path=/stackstripes
[get] To: C:\ICS413Tools\stackstripes-1.0.1027\remove-results.tmp
[echo] OK - Undeployed application at context path /stackstripes
[delete] Deleting: C:\ICS413Tools\stackstripes-1.0.1027\remove-results.tmp


Compile: checks any new updates which are needed to be compiled.


War: checks any .war files needed to be re-generated.


tomcat.deploy:

[echo] Starting hot deployment to stackstripes.
[unwar] Expanding: C:\ICS413Tools\stackstripes-1.0.1027\build\stackstripes.war into C:\ICS413Tools\stackstripes-1.0.1027\build\tmpwar
[get] Getting: http://localhost:8080/manager/deploy?path=/stackstripes&war
=C:\ICS413Tools\stackstripes-1.0.1027\build/tmpwar
[get] To: C:\ICS413Tools\stackstripes-1.0.1027\install-results.tmp
[echo] Install results: OK - Deployed application at context path /stackstripes
[delete] Deleting: C:\ICS413Tools\stackstripes-1.0.1027\install-results.tmp


Junit.tool: checks whether or not Junit tests are passed.


Junit.report: creates a Junit directory which contains reports to let developers understand what tests are failed and successful.


Junit.: let developers know whether Junit is built successfully or failed.


20. (Optional) If you have experience using one or more other web application frameworks, discuss your initial reactions to Stripes. How is it similar, or different, or better, or worse than your previous experience?

So far, the assignment 26 is my first experience using a web application framework. Hence, it is difficult for me to compare it to other web application frameworks.

Monday, October 22, 2007

21.MyISERN-1.2

  • MyISERN-1-Orange team members:
    • Ivan Wu
    • Chiao-Fen Zielinski-Liu
    • Michal Zielinski
  • What was difficult about this assignment?
    • Besides the test cases, this assignment was pretty straightforward. Basically, the program first follows user's input. If the name is in the system, users can only edit the existing information. Otherwise, we consider it a new information. Then, one or more Xml files will be updated according to users' decision.
    • Since this assignment needs user's input, I find the most difficult about this assignment is to write test cases for adding and editing. This is why our emma coverage report for blocks and lines show only 45% and 55 %.
  • What problems were encountered in organizing the group and carrying out the work?
    • Last Wednesday afternoon we spent five hours together to discuss the assignment and we also wrote a method together for adding researchers. The main purpose of writing the first method together was to let every member in MyIsern-Orange follow the coding format according to the method that we created together. Therefore, our users can easily perform tasks when using our system.
    • We did not really have serious problems when completing this assignment. We divided the assignment evenly to each member and we also assigned the due dates for each small section of the system. Then, other members could update the system by using SVN. On Sunday, we gathered together to run the system and to make sure the system works successfully. If problems occur, three brains are always better than one brain. Then we can easily remove bugs from our system.
  • Were all aspects of the milestone completed?
    • Yes, we completed all tasks for this assignment. For task2, we did our best to enter all data to test our program. Luckily, our system did not have any unexpected errors when inserting information. Everything is under our expectation.
  • What will I do differently during the next milestone to improve the process and the products of your efforts?
    • Weekdays, we really do not have much time to get together except Wednesday afternoon. If we could spent more time and get together more often on weekdays, I am pretty sure that we would complete every assignment before weekend comes, because we can think fast and code fast. This is the only thing that I can think of.

19.UseCaseSpecification

  • Summary:
    • A voice recorder would be very helpful on Wednesday, October 10 while I was trying so hard to take notes down from the professor who lectured on use cases for the MyIsern project.
    • I did not know that there are a lot of restrictions when writing use cases until I read those articles about use cases. When we wrote the use cases, we tried to follow the use case modeling tips on the IBM website. For example,
      • use active voice
      • write from the point of view of users
      • write scenario text
      • alternate courses of action
      • think the user interface
    • The use cases we wrote help me understand features of the system because use cases provide basic and alternate courses from the point of view of users. This is what we have to concern when we code MyIsern.
    • One article says that use cases should be written before a system is created. I agree with this statement because a good use case shows a real situation that a user can face when using the system. Therefore, software developers can code better programs.

Tuesday, October 16, 2007

22.MyISERN-1.1.Review

  • Reviewer: Chiao-Fen Zielinski-Liu
  • Author:Shaoxuan Zhang
  • Installation Review:
    • I have successfully downloaded the "MyIsern-Ivory" zip file into my workplace from the author's blog and I was able to run the software by using "java -jar". There were no difficulties to figure out how to run MyIsern-Ivory's code. In other words, I am getting more confidence in reviewing and testing other classmates' code. After running the "verify" target, there were no errors or warnings. Moreover, the system was able to generate a nice formatted table when entering a correct command line argument. Overall, the whole process of installation review was smooth and successful.
  • Code Format and Conventions Review:
    • When reviewing MyIsern-Ivory's code format and conventions, it was hard to find violations which were very serious. MyIsern-Ivory's code contains a very reasonable amount of comments which explain what a particular block of code is doing. Therefore, their code format and conventions are pretty well written and focused.
  • Test Case Review:
    • Black box perspective:
      • When thinking only in terms of the specification for this assignment, MyIsern-Ivory did pass black box testings because the test file contains test cases for true and false inputs as well as null input. In addition, the expected outputs were shown after entering the queries specified on the "18.MyISERN-1.1" assignment sheet.
    • White box perspective:
      • Emma Coverage Summary
        • class: 100% (12/12)
        • method: 89% (65/73)
        • block: 87% (2648/3091)
        • line: 85% (452.5/532)
      • When looking at the "Emma Coverage Summary", the overall coverage is quite high. In order to get more detail on the coverage, I decided to run the emma target to see a report. After reviewing the "Emma Coverage Report", I found that the only method that has no coverage is the "listOrganizations()" method in the XmlQuery class. However, I do see the "testListOrganizations()" method. Hence, I wonder whether or not the "testListOrganizations()" method tests the "listOrganizations" method. So, I would suggest MyIsern-Ivory to check both methods for the next milestone.
    • Break da buggah:
      • I have found a few ways to crash the system. The command lines are listed below and the exception for these three cases.
        • >java -jar myisern-ivory.jar -describe -researcher Marvin Zelkowitz
        • >java -jar myisern-ivory.jar -describe -researcher Marvin-Zelkowitz
        • >java -jar myisern-ivory.jar -describe -researcher Marvi
Exception in thread "main" java.lang.NullPointerException at edu.hawaii.myisern.ivory.xmlloader.XmlLoader.getResearcherDescription(XmlLoader.java:485)
at edu.hawaii.myisern.ivory.xmlloader.XmlQuery.printDescriptions(XmlQuery.java:106)

at edu.hawaii.myisern.ivory.xmlloader.XmlQuery.print(XmlQuery.java:64)
at edu.hawaii.myisern.ivory.xmlloader.XmlQuery.main(XmlQuery.java:50)

        • >java -jar myisern-ivory.jar -describe -organization University_of_Boston
        • >java -jar myisern-ivory.jar -describe -organization UniversityofBoston
        • >java -jar myisern-ivory.jar -describe -organization University of Hawaii
Exception in thread "main" java.lang.NullPointerException at edu.hawaii.myisern.ivory.xmlloader.XmlLoader.getOrganizationDescription(XmlLoader.java:456)
at edu.hawaii.myisern.ivory.xmlloader.XmlQuery.printDescriptions(XmlQuery.java:103)

at edu.hawaii.myisern.ivory.xmlloader.XmlQuery.print(XmlQuery.java:64)
at edu.hawaii.myisern.ivory.xmlloader.XmlQuery.main(XmlQuery.java:50)
  • Summary and Lessons Learned:
    • After running "java -jar myisern-ivory.jar", I could see a list of acceptable queries and a link ,"http://code.google.com/p/myisern-1-ivory/wiki/UserGuide", about how to run this system in detail. One of these acceptable queries is "-listCollaboraitons -researcher ". Obviously, the word "Collaboraitons" has wrong spelling. Therefore, I have learned that the instructions of how to use a software are very important because this is the first thing that a novice will follow to run the software. Furthermore, if users are given wrong instructions on how to use a software, they will never get the outputs they want.

Monday, October 15, 2007

18.MyISERN-1.1

  • MyISERN-1-Orange team members:
    • Ivan Wu
    • Chiao-Fen Zielinski-Liu
    • Michal Zielinski
  • What was difficult about this assignment?
    • I found the most challenge part of this assignment was to use SVN to commit the project, because most of time I would have to update my project since the version of my project was out-of-dated since the last time I checked out. In order to commit the whole project, I would have to understand what changes were made from my team members and the differences between those changes and my changes. Before committing the whole project , the project must pass the verify target.
    • When committing the project, we encountered an error every time. The error was about "conflicting." Hence, we made a copy of our latest project each time before we committed the project. Somehow we still feel not safe about SVN.
    • When we received this assignment, we decided to schedule a time to read through this assignment together. After reading it together, we had different understandings about some of requirements. The big disagreement was about the "UniqueID". If this assignment could be written more explicit, we could avoid those disagreements.
  • What problems were encountered in organizing the group and carrying out the work?
    • Last week we all had other assignments from other classes and we worked at different places and different schedules. Hence, we spent a short time together to discuss the assignment during the weekday. We also assigned a part of assignment for each member to work. Since we could not meet on Friday, we decided to work our part of assignment individually. Then, we could combine all together on Saturday.
    • On Saturday, we could only meet 2 hours, so we discussed what had been done since last time we met. After discussing the next step, we went home and worked on the assignment. We pretty much did most of the assignment before Sunday.
    • Since we were free on Sunday, we met again at 12 pm. We spent time to add more stuffs in our project hosting group, write more test cases, and try to solve the "conflicting" problem when committing the project through SVN.
  • Were all aspects of the milestone completed?
    • Yes, we completed all aspects of the milestone. I am so proud of all of us because we all know that each of us has to go to work and do other homework. Finally, we are able to complete this project on time. This is a very nice group experience.
  • What will I do differently during the next milestone to improve the process and the products of your efforts?
    • I think the first thing that I will do is to practice more on SVN since the "conflicting" issue had delayed our progress during this assignment.
    • Since we were able to meet almost every day, I hope that we can keep this good habit because these meetings really keep me updated about our project. Therefore, I will still try to have some free time with my team members to discuss our project.

Monday, October 8, 2007

16.MyIsernReview

  • Reviewer: Chiao-Fen Zielinski-Liu
  • Author:Randy Cox
  • Installation Review:
    • I have successfully downloaded the "myisern-xml-1.0.1007" from Randy's blog, and the installation process was very successful. I was not able to run the system with "java -jar". However, After I ran the system with Eclipse, I saw three very nice formatted table outputs . In addition, I did not see any errors or warnings after I ran the verify target. Hence, the whole installation process was very smooth. I am glad that the code that I reviewed for printing out tables is so different than the code I did with my team members. Therefore, it is more interesting to me.
  • Code Format and Conventions Review:
    • After running the CheckStyle target, there were no warnings on code format and conventions. Then, I decided to read through the code. I found that Randy and his team member did a very good job on writing comments, naming variables and how they organized their code. Hence, I could only find the violations as given below.

File
Line(s)
Violation
Comments
MyIsernUtil.java
7,15
EJS-48
"Utility to" can be omitted.
HelloWorld .java
38
EJS-7
Extra white space

  • Test Case Review:
    • Four test classes:
      • TestHelloWorld.java
      • TestMyIsernPrintTables.java
      • TestMyIsernUtil.java
      • TestMyIsernXmlLoader.java
    • Black box perspective:
      • After running the "TestHelloWorld.java" class, three tables were generated and they were the same as when I ran the program in Eclipse. When tracing these test classes, I found the each test class contains methods to test the correspondents in non-test class. However, black box testing is to test a given input and check the output which should be exact the same as documented. Since tables generated by running the HelloWorld.java and tables generated by running the TestHelloWorld.java are the same, I would say that Randy's code passes black box testing.
    • White box perspective:
      • After running the Emma target, the result of the class, the method, the block and the line coverage were all 100%. White box testing is to see the internal structure of the system. 100% coverages tell us that all codes have been traced by these test classes. Hence, I believe that Randy's test cases cover white box testing.
    • Break da buggah:
      • I could not do anything to cause the system to crash or return an incorrect answer after thinking and trying a few hours. I guess I still need to think harder because somehow I believe that there must be a way to cause a system to crash.
  • Summary and Lessons Learned:
    • I am glad that I review Randy's code because his code makes me think how I should improve my code and the structure of my programs. For example, his test cases are clear and simple. This helps me to understand more about what I should do when I need to write test cases.
    • I realize that when reviewing a better coding style, it gives me a chance to improve and enhance my way of writing a program, but when reviewing a careless coding style, it warns me not to make the same violations or mistakes.

15.MyISERN-1.0

  • MyISERN-1-Orange team members:
    • Ivan Wu
    • Chiao-Fen Zielinski-Liu
    • Michal Zielinski
  • Group Software Development:
    • Since we knew we would work as a team and our professor has suggested us to meet every day to discuss this assignment and also get to know the team members, all of us decided to spend some time to meet together from Wednesday (Oct 03) to Sunday (Oct 07). If you are interested in more details of our meetings, you can visit our Wiki page. It was a nice experience to work as a team because it seemed to me that we all knew what the next step was to complete all the tasks for this assignment. I am looking forward to work as a team again.
  • Lessons Learned:
    • Luckily, our professor provides us a nice zip file contains all the source codes, XML documents, and tools we need for this assignment. My first step was to read all the source codes and all three XML documents. After reading them, it reminded me the Abstract Data Type (ADT) that I learned from ICS211. If I would like to use the codes efficiently, I would have to understand how JAXB and XML schemas work with each other. They are like a jigsaw puzzle game. All we have to do is to know how to construct related pieces together. This was my first thought after reading the zip file.
    • What a complicated name "Java Architecture for XML Binding (JAXB)"! After reading more about JAXB, I find that JAXB is a very interesting topic to learn as a computer science student. From the readings, there are two discrete sets of activities that JAXB involves and they help me to understand the process of JAXB.
      • Generate and compile JAXB classes from a source schema, and build an application that implements these classes.
      • Run the application to unmarshal, process, validate, and marshal XML content through the JAXB binding framework.
    • After opening the "examples" folder from the myisern-xml-1.0.1003.zip file, there are three XML documents. These XML documents are in nice format, so they are easy to follow. However, I did not know how to define them. After reading the "Introduction to XML Schemas", I have learned how to define elements and attributes in a document, which elements are child elements, the order of child elements and the number of child elements. Therefore, in order to get values from these XML documents, it is like to go through one layer to another layer. Then, using index to retrieve the values. This is how we figured out to get all the values.

Sunday, October 7, 2007

14.CM.Practice

I have completed all three tasks. Details are given below.
  • Install an SVN client:
    • When I tried to download the SVN client from the TortoiseSVN Download, I was confused because I was not sure I should download the SVN from 32 bit application or 64 bit application. Even though my intuition was to download from 32 bit application, I could not make the final decision for it because I was not sure what system my computer is. Therefore, I took a few minutes to figure out the system of my computer. Finally, I followed the steps such as start->my computer (right click) ->properties->Advanced->Environment Variables->System variables->ComSpec (System32) to find out the system of my computer. This is how I completed the task 1.
  • Modify an existing Google Project:
    • This task was fun to me because I did it with my team member together. Both of us followed the instructions in the SVN lecture, so we checked out the "Stack-Johnson" project at the same time into our individual workplace. Then, I made a small change in the project from my local workplace, and my team member also made some changes in the project from his local workplace. After we ran and made sure our projects pass the verify target, my team member committed his changes to the repository without any error. Then, I committed my changes to the repository but I encountered some errors. After some time of studying the errors, we found out that I could not commit my changes to the repository because my version of the "Stack-Johnson" was not the most updated version since my team member submitted earlier than me. Hence, I would need to update my version of the "Stack-Johnson" to the most updated version. Then, I could commit my changes to the repository. It was fun because we followed the instructions for task 2. My team member did not have any problem but I did. It is always good to learn experience. This is how I completed the task 2.
  • Create a new Google Hosting Project:
    • I followed the instructions in the SVN lecture to create "webspider-chiaofen" google project. This task is very straightforward because the "Stack-Johnson" project is a good example to compare to my "webspider-chiaofen" project. Hence, I did not encounter any complicated issues, so I completed the task 3.

Sunday, September 30, 2007

12.WebSpiderReview

  • Reviewer: Chiao-Fen Zielinski-Liu
  • Author: Marcius, Bagwan
  • Installation Review:
    • When I tried to download the webspider zip file from Marcius's blog, I found the webspider jar file. Even though I could download the jar file successfully, I did not have all the information I needed to complete this assignment. This was the initial problem that I encountered. Therefore, I informed the author to send me the webspider zip file. On Saturday morning, he sent me the “webspider-marcius-1.0.928” zip file.
    • After I received the “webspider-marcius-1.0.928” zip file “, I was able to download it successfully. It was not difficult for me to figure out how to run the code because it took me only a few minutes to complete the installation review.
    • Here are details about JUnit, Checkstyle, PMD, FindBugs, Emma and Verify.


Tasks Available
Results
JUnit
No
No test cases
Checkstyle
yes
No errors, No warnings
PMD
yes
No errors, No warnings
FindBugs
yes
2 high priority warnings
Emma
No
Failed
Verify
No
Failed

    • I could invoke "ant jar" to build a webspider.jar file.
    • I could not invoke "java -jar webspider-marcius.jar -totallinks http://www.hackystat.org 100" because the author did not rename the webspider.jar to the webspider-marcius.jar. However, I was able to invoke "java -jar webspider.jar -totallinks http://www.hackystat.org 100", but it did not return the expected results. Instead, it generated some messages (see break da buggsh).
  • Code Format and Conventions Review:
    • After checking the code format and conventions, I have only found two violations.

File
Line(s)
Violation
Comments
WebSpiderExample.java
110
EJS-35
No documentation comments for the getLinkStats() interface
WebSpiderExample.java121
EJS-24
The method isEmpty() is undefined for the type String

  • Test case review: since the TestWebSpiderExample.java is missing, I would suggest the author to write test cases for a black box perspective, a white box perspective and a break da buggah.
    • Black box perspective: it is a testing where testers try to invoke the program with inputs to which they know the corresponded outputs without knowing the flow of execution. Whether the input is a value or a sequence, the testers should test the code with a max, a min, an illegal, an empty, and a typical value or sequence.
    • White box perspective: in this testing process, the testers know how the system is implemented including data flow, control flow, information flow, coding practices, and exception and error handling.
    • Break da buggah: no matter how I tested his code, it always generated the five lines of message as presented below. Then, it stopped without returning the number of total links or the most popular website.
      • The intial url is:
      • The maximum links to follow is :
      • Next Link to crawl (getNumLinks) :
      • Next Link to crawl (getNumLinks) :
      • Proper URL not specified.
  • Summary and Lessons Learned:
    • The author has a very good knowledge about the Java code format and conventions. I think this is what I need to improve.
    • Since the author did not write any test cases, I was so frustrated because I could not perform the black box perspective, the white box perspective and the break da buggah, fully.
    • I have gained more understanding about the difference between black box testing and white box testing.
    • Now I understand how hard it is for professors to grade assignments that are incomplete.

Wednesday, September 26, 2007

Extra Credit !!!

First, I tried to run "http://www.myspace.com/shakadownstreet" with my code. After I hit the enter key, the screen was filled of some codes that I do not understand and some details why it failed to run myspace. After a closer look, I found out it complained about Javascript. Therefore, I asked my team member if he had the same problem when he ran myspace with his code on Monday. Then, I found out he had the same situation and he also gave me a hint about httpunitoptions. My next question was how to disable the Javascript. Then, I took a look on httpunitoptions. One that with "setScriptingEnabled(boolean scriptingEnabled)" is able to set Javascript false. After trying in my code, no more Javascript exception is listed. This is my suggestion for the extra credit.

11.WebSpider - Revised Version

  • What I did:
    • The pmd test was not successfully built on Monday, because it complained about "ArrayList" interface. Therefore, I used the extra time to check this issue in the text book "JAVA". It suggests to use "List" instead of "ArrayList". Then, pmd now is built successfully.
    • The task 3 is completed. I decided to use "System.out.println" for logging, because the print lines were already in my code. However, I have tried to look up logging online and in the textbook. I believe I will need more time to figure it out.

Monday, September 24, 2007

11.WebSpider

  • My thoughts:
    • I think this assignment is very challenging. If I would start this assignment earlier, I believe I could accomplish all the tasks. However, I have accomplished the task 0, 1, 2 and a little bit of 3. Why do I say:”a little of 3”? Because I always insert “System.out.println” to understand what my program is doing when I program. I like the idea of extra credits. Hopefully, there will be another one soon.
  • What I learned:
    • I am pretty sure that I have gained more experience in "Ant". Ant is very useful when codes have some errors, because Ant is able to generate reports. Then, programmers can have some ideas what goes wrong and where the errors are.

    • JUnit tests in Eclipse, I like to run JUnit tests in Eclipse because I am able to see the testing process. Since Eclipse is a colorful Java application, I can easily recognize whether my tests fail or not. However, there were several times that I received “BUILD SUCCESSFUL” on console but not in Eclipse when running the same codes. Hence, I will suggest running JUnit in both Eclipse and console.
    • I was not able to accomplish the task 3 fully, because I did not have enough time since I started this assignment a little bit late, and I spent a lot of time on the task 1. When I got into the task 1, I could not figure out what went wrong since I was sure that my algorithm was not bad. After I inserted “System.out.println” in the code, I found some links were unable to connect. I realized that I should add try-catch to prevent this kind of errors. Furthermore, some infinite loops took me hours to solve. I hope that I will be able to accomplish all tasks on the next assignments.

    • I am pleased that I was able to write all the test cases. Among JUnit, Checkstyle, PMD, FindBugs, and JavaDoc, PMD still has two warnings. Hence, I am able to run verify successfully. In addition, the emma coverage is 100%, 100%, 92%, and 92%.

Sunday, September 16, 2007

10.Stack

  • Which of the five tasks were you able to complete successfully? If you were unable to complete them all, why not?
    • Luckily, I was able to complete the five tasks successfully. However, "Task 4: Add support for the JavaNCSS static analysis tool to your project" took me hours to complete, because I had a hard time to create the javancss.build.xml even though I was looking at the other *.build.xml. The other tasks were pretty straightforward, because I was able to find solutions from the reports, eclipse, and Google.
  • What problems did you run into, and how did you resolve them?
    • Most of time I resolved the problems by looking for the solutions from the Ant, Checkstyle, JUnit, PMD, FindBugs, SCLC, and Emma home page , checking the error reports or searching online. The problems that I remember the most are:
      • When I invoked the "ant -f sclc.build.xml", it failed and generated an error message about Perl. Then, I found out I had to download and install Perl from the SCLC home page.
      • I did encounter some warnings when I invoked the "ant -f verify.build.xml". Since the Ant would list where the errors were, I was able to invoke the Ant command with the specified warnings to generate the error report. Hence, I could easily know where to check and fix the problems.
      • When I created the javancss.build.xml file, I ran into several problems. First, I opened the other *.build.xml files and read them. Second, I started to generate the javancss.build.xml file by coping and renaming what was in the pmd.build.xml file. I still encountered some problems when I tried to test the command "ant -f javancss.build.xml. Then, I discussed with my team member. I found that we both had the same problem, so we decided to read what was available at JavaNCSS Ant Task and also searched online. Finally, we resolved the problems.
  • What is your impression of Ant?
    • First, it reminds me of the "Make" experience that I have learned in ICS212.
    • My impression of Ant is to save time on compiling. We have to create a file with all the involved property names and import files in it. Then, we only have to invoke one line of code to run through what is needed to be compiled. Ant will tell us what goes wrong, then we will be able to fix the errors in an efficient time.
  • Are there standards that we are using that you do not understand the motivation for?
    • After completing all the tasks, I have gained more understanding with Ant, JUnit, PMD, FindBugs, Checkstyle, SCLC, and Emma. I also realized why I need these tools. These tools provide programmers with a clear error report, then programmers can easily follow and fix the error.
  • What is the difference between SCLC and JavaNCSS, and which counting tool do u prefer?
    • After I ran both "ant -f javancss.build.xml" and "ant -f sclc.build.xml", I found out that the javancss generated a "JavaNCSS Analysis" html page and the sclc only showed the report on the console. While JavaNCSS is focusing more on packages, objects, functions, and Javadoc, sclc focuses on lines, blank lines, comments, NCSL, and TPtoks. It seems to me that the format of the JavaNCSS analysis report is more user friendly. Since JavaNCSS focuses more on packages, objects, functions, and Javadoc, therefore I believe these are what I need to know as a programmer. I will prefer JavaNCSS to be my counting tool.