Hi John,
Findbugs is a good tool (as is PMD). You have some excellent
suggestions from the group. I would just add a few ideas:
If your project(s) fall into functional areas (e.g., I/O, database, et
al), establish 'owners' for each area have them review code relevant
to their particular area. More far-reaching code should be reviewed
by a rotating team of 2 to 3 people. Small changes can be reviewed
via the email system, or better yet, through the bug tracking system
(if you track all changes to the code via that mechanism). This is
very effective for distributed projects like Mozilla, but has been
very effective with internal projects I have been involved with. In-
person reviews should be limited to significant or fundamental changes
in the code. While they are excellent, people get burned out if they
are attending a lot of formal reviews on a daily basis.
As for coding standards, don't get me started. Just suffice it to say
that (IMHO) they should not read like Miss Manners' Guide to
Formatting ("don't use tabs, put braces here, indent like so") and
should actually be coding guides. Like when to use singletons or
factories. How (or if) DI should be used. Guidelines for using
external resources such as databases, email systems, etc. Guidelines
for how the team or company uses frameworks such as Spring, Struts,
Hibernate, et al. In other words, any engineer should be able to look
at these 'standards' and figure out how things work. Using a Wiki is
a great approach. Code review information and the use of the bug
tracking system is also useful. Just trying to make the point that so
many coding standards docs are no more than guides to coding grammar
and completely useless - they should get everyone on the same page (if
you pardon the pun).
On May 7, 6:20 pm, "John Stager" <
john.sta...@gmail.com> wrote:
> Thank you everyone, that is a amazing amount of information that I need to
> digest.
>
> I knew of the FindBugs but was unaware of the rest. I will definitely look
> into the other mentioned including PMD.
>
> On Wed, May 7, 2008 at 6:58 PM, Peter Becker <
peter.becker...@gmail.com>
> > On Wed, May 7, 2008 at 11:47 PM, Amarjeet Singh <
amarjeet.aur...@gmail.com>
> > > On Wed, May 7, 2008 at 9:18 AM, Luc Trudeau <
luc.trud...@gmail.com>
> > > wrote:
>
> > > > One way to get people involved is to make it part of the process.
>
> > > > If you are working with Iteration or sprints a good idea would be to
> > > > enforce a certain number of work hours per iteration to improving the code
> > > > base (peer reviews, refactoring...). We usually have a task in our sprint
> > > > planning that's called code review.
>
> > > > Note that you also need to plan time for the rework or fixes that will
> > > > need to be applied to the code.
>
> > > > On Wed, May 7, 2008 at 8:58 AM, John Stager <
john.sta...@gmail.com>
> > > > wrote:
>
> > > > > Excellent point, coding is an art form. I think that your
> > > > > suggestion about the developer explaining their code is an excellent idea
> > > > > and one that would be helpful.
>
> > > > > I think that for now we are looking at a way of enforcing company
> > > > > standards. We are not looking at being the "bad" guys, but to create an
> > > > > openess in the team for everyone to express there input and to improve the
> > > > > overall quality of the code we deliver.
>
> > > > > Thanks.
>
> > > > > On 5/7/08, Viktor Klang <
viktor.kl...@gmail.com> wrote:
>
> > > > > > On Wed, May 7, 2008 at 1:43 PM, John Stager <
john.sta...@gmail.com>
> > > > > > wrote:
>
> > > > > > > Hello Viktor,
>
> > > > > > > That is true, we are attempting to implement standards and are
> > > > > > > using "The Elements of Java Style" book as a starting point. Once we have
> > > > > > > company wide standards I want an easy review process for each project to
> > > > > > > review code so that we can find poor implementations.
>
> > > > > > > How do you define "quality" code or are you saying that it is
> > > > > > > extremely difficult to do so.
>
> > > > > > Hi John!
>
> > > > > > I'm saying that it's difficult to define.
> > > > > > Programming languages are not about function, they are about
> > > > > > elegance, and we all have different ways of expressing us in.
> > > > > > And I think it's hard to have a really tight definition of code
> > > > > > quality.
>
> > > > > > One approach that I have found useful is not to review someone
> > > > > > elses code, but for someone else to explain their code to you.
> > > > > > Why they have chosen to write as they have, and what are the pros
> > > > > > and cons of the code.
>
> > > > > > It's important to be able to criticise yourself _before_ you
> > > > > > criticise others.
>
> > > > > > What did you plan to do?
>
> > > > > > Cheers,
> > > > > > -V
>
> > > > > > > Thanks.
>