Build systems are tools that can be used to automatically build your programs and perform automated quality assurance. They can be customized to perform many automated checks such as ensuring correct versions of software and necessary packages are installed. They are very flexible and users can customize them to meet the requirements of their project.
Ant and Ivy are good because they ensure that all users' and developers' systems are setup correctly before a program is executed. They can automatically download and install necessary software if they are missing. Also, build systems can inform users of problems such as incorrect software versions which may pose potential problems. They allow for cross-platform usage. Tedious tasks such as ensuring correct syntax is used when specifying paths are automatically handled by the build system.
Tools used for automated quality assurance such as Checkstyle, PMD, FindBugs, and JUnit can be applied to projects. Manually checking coding standards and best practices can be a very tedious and time-consuming task. Thankfully, these tools can automate the process and allow developers to concentrate on more important tasks. Although they cannot replace code reviews, they can ensure that formatting issues and coding standards are followed.
Checkstyle can help ensure that coding standards and best practices are followed. It checks the Java source code for things such as comments, naming conventions, and indentions.
PMD also provides assurance that best practices are followed. It can also find sub-optimal code and potential bugs. Like Checkstyle, it analyzes the Java source code.
FindBugs is a tool that differs from Checkstyle and PMD in that it analyzes Java bytecode. It searches for potential bugs that can break your program. This program searches for strings of bytecode that are known to potentially cause serious problems.
These tools can be incorporated into an IDE such as Eclipse to allow for feedback as the program is being developed. They will also create a HTML report containing descriptions of each problem found and their location.
JUnit allows developers to create simple tests to ensure that software is working correctly. Automated testing such as that provided by JUnit can save time and effort. It provides the developer some assurance that the program is functional without manually entering different test cases.
I found these tools to be very useful. They were able to find problems with my code much quicker than I would have been able to. They found two problems with my code. Checkstyle reported a problem with a condition in an IF statement I had declared. It reported that the expression (move == true) could be simplified. PMD reported a best practices violation in which I had variables that could be declared as local variables. After fixing these problems, I was able to successfully build my project.
I made some improvements to my Robocode robot based on observations made during the first robot battle. I restricted the range that my robot fires in order to save energy. I also attempted to adjust my firing to account for the many Walls style robots that were in the first tournament.
A developer distribution of my system can be found here.
Tuesday, September 29, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment