openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Dick <michael.d.d...@gmail.com>
Subject Re: 80-column line width & auto-generated model classes
Date Fri, 05 Jun 2009 14:48:55 GMT
Conventions will never please everyone, especially line length which is
always arbitrary.

The checkstyle manual has the following rationale :
LineLength

Rationale: Long lines are hard to read in printouts or if developers have
limited screen space for the source code, e.g. if the IDE displays
additional information like project tree, class hierarchy, etc.

My two cents :

Code conventions should make the code more readable, ones that make it
tougher to express meaning should be changed. Line length appears to be
falling into the latter category (splitting import statements like I had to
do for some test classes is ugly).

If we want to increase the length we should bring it up for a VOTE in a
separate thread and use this thread to discuss exclusions for generated
classes.

-mike


On Fri, Jun 5, 2009 at 9:33 AM, Rick Curtis <curtisr7@gmail.com> wrote:

>
> +1
>
> I think that we need to enforce some sort of coding standards, but I don't
> think we should be blindly enforcing conventions that are out of date. Take
> a look at the 'official' Sun code conventions [1] and note that they
> haven't
> been updated since April 20, 1999. I particularly like the reason for the
> 80-column line [2]... 'Avoid lines longer than 80 characters, since they're
> not handled well by many terminals and tools.'
>
> [1] http://java.sun.com/docs/codeconv/
> [2] http://java.sun.com/docs/codeconv/html/CodeConventions.doc3.html#313
>
>
> Kevin Sutter wrote:
> >
> > A few interesting points with this discussion...
> >
> > 1)  Under what conditions should we be checking in these generated
> > metamodel
> > classes?  We don't want the metamodel classes generated for all of our
> > Entities, do we?  Seems like a waste of build time.  So, how are we
> > determining which Entities should have generated metamodel classes?
> >
> > 2)  Our processing in this arena can help define a "best practice" for
> our
> > eventual JPA 2.0 users.  That is, how and when to do the metamodel
> > generation.  How to package these generated classes for the application.
> > And, whether these should be checked into SVN or not.
> >
> > 3)  And, why do we continue to have the 80 column limit for our source
> > files?  :-)  It seems so archaic.
> >
> > Kevin
> >
> --
> View this message in context:
> http://n2.nabble.com/80-column-line-width---auto-generated-model-classes-tp3025746p3030641.html
> Sent from the OpenJPA Developers mailing list archive at Nabble.com.
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message