• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Need right tool for java coding standards & code review

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

for my current j2ee project we are in the process of selecting right tool to define coding standards and to review existing java code.

Kindly help any one to get into right path regarding this.

thanx

Kather Basha.
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Besides a good code formatter (there are several out there, and most IDEs come with one), you don't really need a tool, in my not so humble opinion. What you need is a very basic, informal coding standard that is *in the heads* of your team, and which gets refined while your team closely collaborates on the project (assuming that they are colocated). Pair Programming, for example, is a very good "tool" for propagating a team wide coding standard.
 
Ranch Hand
Posts: 531
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There's no substitute for a battle-tested and informed software engineer with an interest in keeping up-to-date on best practices but there are plenty of books out there that will help. First carve your requirements in to coding standards (easily automated with tools like Jalopy from Triemax) and code structure (you will need skilled developers and highly regarded books on the subject) and finally development process: Evo or UP or XP.

Those are three separate areas where the code beautifier (formatter) is the least important because it can be automated.
 
(instanceof Sidekick)
Posts: 8791
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Some of the static code review tools do a pretty cool job of spotting potential bugs, but most of them primarily critique your indenting and commenting. A good code formatter will take care of indenting, and the "standard" level of commenting they suggest is redundant at best and counter-productive or dangerous at worst. Go with human reviews.
 
Ranch Hand
Posts: 171
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Take a look at CheckStyle
 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I agree partially with Ilja, you need to 'live' these values and try not to patch it after the fact.

However in our case we use Eclipse wilth a standard set of formatting rules used by everyone (and enforced) and JCSC to check code quality, although code reviews does most of this for us.
 
Ranch Hand
Posts: 410
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you are into static analysis tools, FindBugs and PMD are fairly good.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
With PMD it's easy to add your own rules, something you will want to do sooner or later.
When selecting a tool I find it important that it integrates seemlessly into the build environment, whether that is Ant, Eclipse, NetBeans or IntelliJ. Otherwise it just won't get used as much as it should be.
Other options you might look into are JCSC, Hammurapi, lint4j and jlint. My favorites are PMD and Hammurapi (which produces very nice reports that are cross-referenced with the source code).
 
Stan James
(instanceof Sidekick)
Posts: 8791
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have to admit my comments on tools were based on research a couple years old. A third party is applying Hammurapi to some of our code. I'll keep an open mind until I see what they come back with.
 
Try 100 things. 2 will work out, but you will never know in advance which 2. This tiny ad might be one:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic