Skip to main content

PMD static Java code analysis tool

How many times have you, in your developer life, smacked our head and screamed "that was sooo obvious!" upon discovering a bug ? And how many times those were pretty simple bugs that could have been caught just by looking closely at the code and finding a silly mistake ? I'm guessing too many times.... :-) PMD, no real meaning to the acronym (see here), is a pretty handy tool that if used with some frequency can help you at least save your head from the smacking. PMD is a Java code analysis tool that draws from an experience-driven rule set to look into your code and flag possible mistakes. From unused imports to the always error prone braceless if statement, PMD can give you a pretty good coverage of what you can do to improve your code and reduce the probability of making a silly mistake. PMD can be run from within your ant or maven build file should you want to make running it part of your build process. You can find plugins for most of the popular IDEs to make it even simpler to run it and enhance your code. PMD is extensible letting you add your rules should you wish to enforce any kind of rule to your project. Finally, PMD is open sourced, licensed under a BSD-style license and available at sourceforge. All in all a pretty cool and valuable tool to improve your development process and maybe keep your development team a bit saner.

Comments

Popular posts from this blog

A Postcard from Tools of Change

Think back to the summer of 2007. The first iPhones are just hitting the stores. Kindle is still a gleam in Jeff Bezos' eye. And in the words of Publishers Weekly, "a festival of practical geekery" is taking place in San Jose, CA. That festival was the first Tools of Change for Publishing conference. We were there , of course. And while comparatively small, it was the largest gathering we'd found of people who cared as much as we did about the transition from print to digital books. That's still true today, which is why I'm excited to be on the floor of ToC 2010 as I write this. The show's a lot bigger now, and has spread beyond its geeky roots to focus on seismic shifts we're all aware of…the explosion of handheld devices , social software and changes in the ways all of us find and use information. If you're here, come see us. We'll be in booth 114 with our partners Digital Divide Data , and you can ...

Kindle's Cool, but Remember the Web?

If anyone can obsolete the printed book, Amazon can, and they're clearly taking a formidable whack at it with their handheld Kindle reader. We can't help wondering, though, how many consumers will really pay $400 for a single-purpose reading device, when alternatives from a riotously competitive hardware market combine reading with phone, messaging, music and other capabilities. For example, the iPhone pictured here, with a tasty looking page delivered via Tizra's Agile PDF . We wish we could say it's the result of some special technology we came up with for delivering books to mobile devices, but really it's just a byproduct of the fact that Agile PDF makes books work like the web. So as the web finds its way into more mobile devices, so will books published with Agile PDF. Meanwhile, of course, there are already a billion or so eager readers accessing the web through more traditional means. By the way, the sesame crusted tuna's from Montreal's Aix Cui...