Wednesday, September 30, 2009

It's time to package!

To deploy a software, it is always nice to have all the files packaged together. We don't want to look around for some third party libraries in order to run the code successfully. Organizing the dependency in a software project is quite troublesome unless using Apache Ant build system. Developer can define different tasks in an Ant build system. All those tasks are coding in xml files, which is kind of neat and structured. In addition, it can integrate the Apache Ivy so that it will check and download the missing third party libraries automatically during a build.

Another issue I was working on recently is quality assurance. Quality assurance is a critical part in a software development. However, mostly people can get really bored by working on some tasks like that. Is there any tool that can somewhat automate this procedure? The answer is yes! There are plenty third party tools designed for automated quality assurance. Here are three popular tools: CheckStyle, PMD, FindBugs.

CheckStyle -- will check the coding standard for you. It can be really helpful if you want to make the code clean and readable.
PMD --------- will check the syntax problem of the code. For example an empty block for a catch statement.
FindBugs ---- will check how the code works. It will try to find the part that make no sense and consider it as a potential bug.

All these tools are very user friendly. Every time after checking, they will generate reports in html so that developer can check the result quickly. The first time I run those tools on my robocode project, I got 132 errors for CheckStyle which means my coding standard is poor; and I got 3 warnings for PMD which is about reassigning a value to itself (I think this one is acceptable); and I got no bug for FindBugs. It take me about 10 to 20 minutes to fix those problems. I think it is much faster than checking the code manually.

I adapted Ant to my robocode project. The new robocode build system is available at:

No comments:

Post a Comment