Tuesday, September 23, 2008

Stack

This assignment is intended to introduce us to the use of automated Quality Assurance (Q.A.) coding analysis tools. Some of the tools we will be using are pmd, checkstyle, findbugs, and junit. These will help show us potential development problems and solutions when implementing a program. All the Q.A. tools will be used by another tool called Ant, to initialize the checks. Ant is a java based open source tool that helps programmers build and create packages for distribution of the program. We were given the objective to use these tools on a prewritten program, Stack, by our professor.

Task 1

The first task was to install these tools into my computer and setting system environments to make them accessible for other programs to use. Then to use Ant command lines initialize the Q.A. tools on the Stack program.

Downloading the Q.A. tools and installing them into a subfolder in the C drive was no problem. A dilemma I had was setting the environment variables. When browsing through a few of the manuals I got rather confused, setting the variables in the XML files or setting them in the computers system environment variables. This setback was clarified by Clayton, a classmate, during our class’s Ant Lab. He showed me what I did wrong and a temporary solution to a problem with running the Ant command lines in my computer’s command prompt. Later Ronn, another classmate of mine, saw and explained that I set the environment variables to only being of local use to my account alone and not making them used by the whole computer itself. Once that problem was solved I was able to use the command lines and see all the problems that the Q.A. tools found in the Stack program.

Task 2 and 3

For this task we have to duplicate the Stack program, but with some changes to the build.xml file and to rename the top level folder. Also for this task we had run Ant with the Q.A. tools to find the problems within the code and this time to solve those problems. Running the command lines to initiate the checks for errors was easy, since it was done in the previous task. Some of the solutions to the errors were given by the Q.A. tools, such as making a variable final and using method within a class. The other solutions were not as clear as others, such as use of the fail tag, this was because I was not familiar in using that tag. For errors such as those, I searched through Google on solutions, which were very helpful.

Once all those errors were fixed I ran the verify command line, which stopped once it came to checking for errors using EMMA and prevented the program from being built. I saw that I have not installed the Q.A. tool EMMA, but once I did the verify command ran smoothly with no fails. I could have avoided this error by editing the verify.build.xml file by erasing the importing EMMA and altering the task of compiling with EMMA. The dist.build.xml was the last file to run with Ant, which packaged the entire project into a zip file and named it according to how it was designated in the build file.

Impression of Ant

Using Ant was not new to me, in a previous class we had the chance of using something similar, Make. The difference I saw between the two was that Ant, along with the Q.A. tools, picked up on errors and gave possible solutions. Ant is a very useful tool and can see that why it is best used for big projects and also using it for open source programs.


My distribution results of Stack

No comments: