You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Vadim Gritsenko <va...@reverycodes.com> on 2004/02/29 17:28:43 UTC

Re: cvs commit: cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/binding Binding.java JXPathBindingBase.java JXPathBindingBuilderBase.java AggregateJXPathBinding.java JXPathBindingManager.java

antonio@apache.org wrote:

>  --- JXPathBindingManager.java	6 Feb 2004 14:33:05 -0000	1.19
>  +++ JXPathBindingManager.java	29 Feb 2004 09:20:56 -0000	1.20
>  @@ -1,7 +1,7 @@
>   /*
>   
>    ============================================================================
>  -                   The Apache Software License, Version 1.1
>  + The Apache Software License, Version 1.1
>    ============================================================================
>   
>    Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
>  @@ -10,26 +10,26 @@
>    tion, are permitted provided that the following conditions are met:
>   
>    1. Redistributions of  source code must  retain the above copyright  notice,
>  -    this list of conditions and the following disclaimer.
>  + this list of conditions and the following disclaimer.
>   
>    2. Redistributions in binary form must reproduce the above copyright notice,
>  -    this list of conditions and the following disclaimer in the documentation
>  -    and/or other materials provided with the distribution.
>  + this list of conditions and the following disclaimer in the documentation
>  + and/or other materials provided with the distribution.
>   
>    3. The end-user documentation included with the redistribution, if any, must
>  -    include  the following  acknowledgment:  "This product includes  software
>  -    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
>  -    Alternately, this  acknowledgment may  appear in the software itself,  if
>  -    and wherever such third-party acknowledgments normally appear.
>  + include  the following  acknowledgment:  "This product includes  software
>  + developed  by the  Apache Software Foundation  (http://www.apache.org/)."
>  + Alternately, this  acknowledgment may  appear in the software itself,  if
>  + and wherever such third-party acknowledgments normally appear.
>   
>    4. The names "Apache Cocoon" and  "Apache Software Foundation" must  not  be
>  -    used to  endorse or promote  products derived from  this software without
>  -    prior written permission. For written permission, please contact
>  -    apache@apache.org.
>  + used to  endorse or promote  products derived from  this software without
>  + prior written permission. For written permission, please contact
>  + apache@apache.org.
>   
>    5. Products  derived from this software may not  be called "Apache", nor may
>  -    "Apache" appear  in their name,  without prior written permission  of the
>  -    Apache Software Foundation.
>  + "Apache" appear  in their name,  without prior written permission  of the
>  + Apache Software Foundation.
>   
>    THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
>    INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
>  @@ -47,7 +47,7 @@
>    Stefano Mazzocchi  <st...@apache.org>. For more  information on the Apache
>    Software Foundation, please see <http://www.apache.org/>.
>   
>  -*/
>  + */
>   package org.apache.cocoon.woody.binding;
>   
>   import org.apache.avalon.framework.activity.Disposable;
>  @@ -70,41 +70,51 @@
>   import org.xml.sax.InputSource;
>   
>   /**
>  - * JXPathBindingManager provides an implementation of {@link BindingManager}
>  - * by usage of the <a href="http://jakarta.apache.org/commons/jxpath/index.html">
>  - * JXPath package</a>.
>  - *
>  - * @version CVS $Id$
>  + * JXPathBindingManager provides an implementation of {@link BindingManager}by
>  + * usage of the <a href="http://jakarta.apache.org/commons/jxpath/index.html">
>  + * JXPath package </a>.
>  + * 
>  + * @version CVS $Id: JXPathBindingManager.java,v 1.19 2004/02/06 14:33:05 joerg
>  + *               Exp $
>    */
>  
>

I think you are "overformatting" a bit - note changes in license and 
broken CVS $Id$

And please keep function arguments aligned after '('.

Vadim


Re: Change from 80 cpl to 100 cpl standard

Posted by Vadim Gritsenko <va...@reverycodes.com>.
Antonio Gallardo wrote:

>Vadim Gritsenko dijo:
>  
>
>>I, for myself, moved to somewhere around 100 characters per line. With
>>long Java identifiers it's not much you can fit in 80 chars ;-)
>>    
>>
>
>Yep. I agree with you. The 80 cpl (cols per line) is an old "standard" and
>we can change it if everybody agree on the Cocoon community. Need we vote
>for this? I am +1 for change to "100 cpl".
>
>The 80 cols per line was setted also to match printed version of code. But
>I am not sure if still somebody is printing code for storage. I use CD's
>to save the trees.
>
>WDYT?
>  
>

I think "use your best judgement" and I also think "don't use automatic 
code formatting tools, but rather format bad offenders (like > 120 char 
lines) only in the pieces of code you are working on" :-)

Vadim


Change from 80 cpl to 100 cpl standard (was: Re: cvs commit:...)

Posted by Antonio Gallardo <ag...@agssa.net>.
Vadim Gritsenko dijo:
> I, for myself, moved to somewhere around 100 characters per line. With
> long Java identifiers it's not much you can fit in 80 chars ;-)

Yep. I agree with you. The 80 cpl (cols per line) is an old "standard" and
we can change it if everybody agree on the Cocoon community. Need we vote
for this? I am +1 for change to "100 cpl".

The 80 cols per line was setted also to match printed version of code. But
I am not sure if still somebody is printing code for storage. I use CD's
to save the trees.

WDYT?

Best Regards,

Antonio Gallardo

Re: cvs commit: cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/bindingBindin g.java JXPathBindingBase.java JXPathBindingBuilderBase.java AggregateJXPathBinding.javaJXPathBindingManager.java

Posted by Vadim Gritsenko <va...@reverycodes.com>.
Antonio Gallardo wrote:

>Vadim Gritsenko dijo:
>  
>
>>I think you are "overformatting" a bit - note changes in license and
>>broken CVS $Id$
>>    
>>
>
>Thanks for reviewing. It is done on CVS.
>  
>

Thanks :-)


>>And please keep function arguments aligned after '('.
>>    
>>
>
>I am aware of this, what I am trying to do is a "trade off" between showed
>code in a screen vrs. formatting of the sources. I think it is good to see
>a method in just 1 screen (in eclipse we have cca. 32 lines per screen -
>long time ago it was just 25 lines per screen - text consoles). Also there
>is also a requirement of 80 columns per line. I try to stick to 80 cols
>per line and also try to see a method in just one screen.
>

I, for myself, moved to somewhere around 100 characters per line. With 
long Java identifiers it's not much you can fit in 80 chars ;-)


>I had a teacher
>in the university that endless repeated us:
>
>"If a function cannot be seen in just one screen, then the function is
>doing too much work. Review the function and try to break it in smaller
>pieces."
>
>Of course there are some exceptions to the above rule, but are rather
>rare. (Anyway, it is OT) .... I know it is old wisdom and not sure if is
>still valid.
>

I'd say it is valid, with adjustments on size.

Vadim


Re: cvs commit: cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/bindingBindin g.java JXPathBindingBase.java JXPathBindingBuilderBase.java AggregateJXPathBinding.javaJXPathBindingManager.java

Posted by Antonio Gallardo <ag...@agssa.net>.
Vadim Gritsenko dijo:
> I think you are "overformatting" a bit - note changes in license and
> broken CVS $Id$

Thanks for reviewing. It is done on CVS.

> And please keep function arguments aligned after '('.

I am aware of this, what I am trying to do is a "trade off" between showed
code in a screen vrs. formatting of the sources. I think it is good to see
a method in just 1 screen (in eclipse we have cca. 32 lines per screen -
long time ago it was just 25 lines per screen - text consoles). Also there
is also a requirement of 80 columns per line. I try to stick to 80 cols
per line and also try to see a method in just one screen. I had a teacher
in the university that endless repeated us:

"If a function cannot be seen in just one screen, then the function is
doing too much work. Review the function and try to break it in smaller
pieces."

Of course there are some exceptions to the above rule, but are rather
rare. (Anyway, it is OT) .... I know it is old wisdom and not sure if is
still valid. It is a good idea. ie: For code reviewers it allow them to
see all the code at once.

WDYT?

Best Regards,

Antonio Gallardo