Tuesday, September 23, 2008

Ant - Stack

Objective

  • The Ant build system
  • Open source Java automated quality assurance tools (FindBugs, Checkstyle, PMD)
  • The course standards for build system structure and packaging.
I was first exposed to Ant through my internship last year. Initially, I was confused; there was too much unknown functionality and processes that took place during an Ant run-time. I was told that Ant is like a Make in C, simple enough right? I took a look at the .xml files and tried to trace through them; I was completely boggled by the syntax and functionality. After visiting the .xml files in class and tracing them step-by-step, the ambiguity has slightly cleared up. Ant was made to speed up the production, implementation, testing, and development of software. Another benefit of Ant is that it helps with the migration of software from one platform to another. The evidence is relevant, I'm assured that this tool is a powerful tool and will be implemented in my future Java software productions.

Installation

If I could sum it up in one word: Easy. I decided to tackle this class on my Macbook Pro; this is the first time I'm using OS X as the operating system of choice in a Java Development Environment. Class variables are very easy to setup through terminal. I felt that the entire installation process was drag and drop, defining paths, then command line tests.

Stack


Now the stack project that was easy to setup and install. I used Terminal to utilize and execute the tools: checkstyle, findbugs, javadoc, junit, and pmd. I found all of the tool extremely easy to use and fixing errors were as clear as black and white. I was surprised how everything was visually easy to naviagate through with the help of self-producing .html files with links to warnings, erorrs, and solutions.

Components

  • Checkstyle has a huge impact on the aesthetics of your code, this will dramatically prepare your code on a visual level. This really takes eclipse's built in "formater" to the next level.
  • Hands down, my experience with Findbugs has been incredible. Throughout my college career, I was bombarded with typical error lines like "syntax error on like 144 near ' ". I was blown away by the descriptions and recommended fixes that Findbugs produces. It really takes the strain away from formulating error fixes.
  • PMD is a very cool tool that handles error and messages with priority levels. This tool finds possible bugs through empty statements, dead code, suboptimal code, overcomplicated expressions, and duplicate code.
Review Process

After invoking the ant targets, and having them produce the corresponding html files, it was just a matter of command-tabbing between eclipse, terminal, and Firefox. I found myself just fixing errors and cycling through the three. It was elegant, yet troublesome. if the entire process could be done in 1 window or application, I feel that this would have been much more efficient. The actual error correcting was a peice of cake though, mainly becuase the tools tell you what to do. "Use this instead of this, line x." "Needs a white space after '{' " As far as this assignment goes, it really easy to use Ant, and adapt to the process of fixing errors.

stack-erinjuneilkim-6.0.923.zip

No comments: