commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Phil Steitz <stei...@yahoo.com>
Subject Re: [math] coding style
Date Tue, 20 May 2003 19:19:44 GMT

--- Tim O'Brien <tobrien@discursive.com> wrote:
> Jakarta coding style should be followed, and I think that
> avoiding lines 
> with more than 80-characters is a very reasonable goal.  
> 
I agree. Makes sense to just use the Sun standard (I assume
that is what David is referring to.)

> I plead guilty to introducing so many tab characters -
> blame it on me and 
> a misconfigured IDE.  Most (if not all tabs) were removed
> by the previous 
> commit.
> 
> Two Checkstyle rules are of questionable value, but I'm
> not opposed to 
> following them.  the first is spacing between paranthese
> and operators:
> 
> Wrong: if( (n-1) > (y) )   <--- That will cause 5 errors
> Right: if ((n - 1) > (y))  <--- Note the spacing
> differences
> 
> And the second is the placement of operators on a
> multiline expression
> 
> Wrong: String msg = "Pickled onions are " + 
> 	            "disgusting.";
> Right: String msg = "Pickled onions are "
> 		    + "disgusting";
> 
Looks to me like these are two areas where the standard
does not really force the "right" way; but the examples in
the standard all follow it.  Personally, I have no problem
with either of these (especially the first), though I will
have to train myself to avoid the "bad" pickled onions,
since I tend to generate these.  

It may take me a while -- I really want to get the rest of
the initial stuff that I wanted to contribute out there for
discussion and get started on the docs -- but I will bring
all of the stuff that I have submitted into compliance.

If it is acceptable, I will make one final submission this
evening or tomorrow AM before I have maven and CheckStyle
set up (though paying attention to what it has complained
about).  Moving forward, I will submit only clean code.

Phil
> 
> 
> 
> 
> On Tue, 20 May 2003, David Graham wrote:
> 
> > >Is there a Commons or Jakarta standard? If there is,
> we should just use it.
> > 
> > The defacto Jakarta standard is to follow the standard
> Java coding 
> > guidelines.  However, projects are allowed to declare
> their own guidelines.  
> > I think one of the great benefits of Java is that there
> is a standard to 
> > follow so all Java code looks the same.  Then you don't
> have to spend the 
> > mental energy trying to figure out everyone's style.
> > 
> > David
> > 
> >
>
_________________________________________________________________
> > The new MSN 8: advanced junk mail protection and 2
> months FREE*  
> > http://join.msn.com/?page=features/junkmail
> > 
> > 
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> commons-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> commons-dev-help@jakarta.apache.org
> > 
> > 
> > 
> 
> -- 
> ----------------------
> Tim O'Brien
> Evanston, IL
> (847) 863-7045
> tobrien@discursive.com
> 
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> commons-dev-help@jakarta.apache.org
> 


__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message