Tuesday, September 29, 2009

Build System: Ant

As we progress and improve our robots for the improved robot Robocode rumble, we were introduced to a very useful build tool called Ant and its dependency manager called Ivy. We also got a first hand experience with the Ant code which was provided by our professor. We are to adapt this Ant code with our code and invoke 3 quality assurance tools.
  • ant -f checkstyle.build.xml
  • ant -f pmd.build.xml
  • ant -f findbugs.build.xml

The only problems I had after running checkstyle were with the javadoc and missing package info. The first one was really easy to fix. All I had to do was add the necessary @param that was left out. It is interesting to see how after revising my code to follow our class' java coding standards and having it reviewed by a classmate, that this necessary javadoc information was overlooked. This is where the quality assurances come in handy. The automation of tasks such as looking for coding standard errors helps achieve the 3rd prime directive, which informs an external user by providing a correct java documentation.

The other problem was not as easy to fix like adding the missing javadoc information. After looking at the results of running checkstlye, which I thought didn't help because it displays the same error message, I checked the original system to see what was missing and it turns out that within DaCruzer's directory is an html file that describes the package. So I did created the same file which describes my package.

After running checkstyle, I tried running the other quality assurance, pmd and findbugs, and did not get any errors.

These quality assurance tools are very helpful in producing robust system that corrects coding standards, improve code efficiency and packages easily. I had a hard time understanding what the Ant code does at first but now that we had hands on experience and understanding each line during a class discussion, I feel like this is something I can use in the future to be better programmer.

Updated WallEE can be downloaded here.

0 comments:

Post a Comment