You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by Trustin Lee <tr...@gmail.com> on 2007/09/14 12:07:17 UTC

Coding style problem

Hi committers,

It seems like old coding style has sneaked into our source code
repository.  I didn't run automatic formatter, but please fix them as
soon as you find any of them.

Thanks,
Trustin
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP Key ID: 0x0255ECA6

Re: Coding style problem

Posted by Rodrigo Madera <ro...@gmail.com>.
Trustin,

I would recommend you to set up a Subversion commit hook that verifies that
every source file is compatible to the formatting rules specified.

I saw a couple of examples of how to do this a couple of years ago. I
haven't yet implemented it here because we recently switched to mostly Java
code, but we will shortly.

This will prevent any code that is not meeting your expectations.

Yours,
Rodrigo Madera

On 9/14/07, Trustin Lee <tr...@gmail.com> wrote:
>
> On 9/15/07, Mark <el...@gmail.com> wrote:
> > I just updated filter-codec-http and protocol-http-client to meet the
> MINA
> > guidelines.
>
> Thanks, Mark! :)
>
> Cheers,
> Trustin
> --
> what we call human nature is actually human habit
> --
> http://gleamynode.net/
> --
> PGP Key ID: 0x0255ECA6
>



-- 
If Jack Bauer had been a Spartan, the movie would have been called "1".

Re: Coding style problem

Posted by Trustin Lee <tr...@gmail.com>.
On 9/15/07, Mark <el...@gmail.com> wrote:
> I just updated filter-codec-http and protocol-http-client to meet the MINA
> guidelines.

Thanks, Mark! :)

Cheers,
Trustin
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP Key ID: 0x0255ECA6

Re: Coding style problem

Posted by Mark <el...@gmail.com>.
I just updated filter-codec-http and protocol-http-client to meet the MINA
guidelines.

-- 
..Cheers
Mark

On 9/14/07, Trustin Lee <tr...@gmail.com> wrote:
>
> Yes, it's up to date.
>
> Trustin
>
> On 9/14/07, Mark <el...@gmail.com> wrote:
> > Is the latest coding convention guidlines up to date ?
> >
> >
> http://mina.apache.org/developer-guide.html#DeveloperGuide-CodingConvention
> >
> >
> > --
> > ..Cheers
> > Mark
> >
> > On 9/14/07, Maarten Bosteels <mb...@gmail.com> wrote:
> > >
> > > Hi,
> > >
> > > Does anyone have a MINA-code-style config for IDEA ?
> > > Or am I the only IDEA addict ?
> > >
> > > Maybe the default style corresponds to the MINA style, I'd have to
> check
> > > that.
> > >
> > > Maarten
> > >
> > > On 9/14/07, Trustin Lee <tr...@gmail.com> wrote:
> > > >
> > > > Hi committers,
> > > >
> > > > It seems like old coding style has sneaked into our source code
> > > > repository.  I didn't run automatic formatter, but please fix them
> as
> > > > soon as you find any of them.
> > > >
> > > > Thanks,
> > > > Trustin
> > > > --
> > > > what we call human nature is actually human habit
> > > > --
> > > > http://gleamynode.net/
> > > > --
> > > > PGP Key ID: 0x0255ECA6
> > > >
> > >
> >
>
>
> --
> what we call human nature is actually human habit
> --
> http://gleamynode.net/
> --
> PGP Key ID: 0x0255ECA6
>

Re: Coding style problem

Posted by Trustin Lee <tr...@gmail.com>.
Yes, it's up to date.

Trustin

On 9/14/07, Mark <el...@gmail.com> wrote:
> Is the latest coding convention guidlines up to date ?
>
> http://mina.apache.org/developer-guide.html#DeveloperGuide-CodingConvention
>
>
> --
> ..Cheers
> Mark
>
> On 9/14/07, Maarten Bosteels <mb...@gmail.com> wrote:
> >
> > Hi,
> >
> > Does anyone have a MINA-code-style config for IDEA ?
> > Or am I the only IDEA addict ?
> >
> > Maybe the default style corresponds to the MINA style, I'd have to check
> > that.
> >
> > Maarten
> >
> > On 9/14/07, Trustin Lee <tr...@gmail.com> wrote:
> > >
> > > Hi committers,
> > >
> > > It seems like old coding style has sneaked into our source code
> > > repository.  I didn't run automatic formatter, but please fix them as
> > > soon as you find any of them.
> > >
> > > Thanks,
> > > Trustin
> > > --
> > > what we call human nature is actually human habit
> > > --
> > > http://gleamynode.net/
> > > --
> > > PGP Key ID: 0x0255ECA6
> > >
> >
>


-- 
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP Key ID: 0x0255ECA6

Re: Coding style problem

Posted by Mark <el...@gmail.com>.
Is the latest coding convention guidlines up to date ?

http://mina.apache.org/developer-guide.html#DeveloperGuide-CodingConvention


-- 
..Cheers
Mark

On 9/14/07, Maarten Bosteels <mb...@gmail.com> wrote:
>
> Hi,
>
> Does anyone have a MINA-code-style config for IDEA ?
> Or am I the only IDEA addict ?
>
> Maybe the default style corresponds to the MINA style, I'd have to check
> that.
>
> Maarten
>
> On 9/14/07, Trustin Lee <tr...@gmail.com> wrote:
> >
> > Hi committers,
> >
> > It seems like old coding style has sneaked into our source code
> > repository.  I didn't run automatic formatter, but please fix them as
> > soon as you find any of them.
> >
> > Thanks,
> > Trustin
> > --
> > what we call human nature is actually human habit
> > --
> > http://gleamynode.net/
> > --
> > PGP Key ID: 0x0255ECA6
> >
>

Re: Coding style problem

Posted by Emmanuel Lecharny <el...@gmail.com>.
Yes, you may be right, Rich.


On 9/16/07, Richard Wallace <rw...@thewallacepack.net> wrote:
> Doesn't that imply that all the Io* classes and interfaces (IoAcceptor,
> IoConnector, IoEvent, etc.), should all be renamed to IO* for
> consistency?  I think that's what Hezjing was pointing to in terms of
> inconsistencies.
>
> Rich
>
> Emmanuel Lecharny wrote:
> > Classes using SSL, IO, NIO, make sense to me. It's much more easier to
> > know what they are doing than by using Ssl, Io or NIO.
> >
> > The Java standard rules say that the first letter of a noun shiuld be
> > upcased, but SSL is not a noun, just the 3 first letters of Secure
> > Socket Layer.
> >
> > My 2cts.
> >
> > On 9/16/07, hezjing <he...@gmail.com> wrote:
> >
> >> Hi!
> >>
> >> I notice that there are inconsistencies in the class names.
> >>
> >> Some classes capitalized the abbreviation, but some do not.
> >>
> >> For example, I see that there is RuntimeIOException, SSLFilter and NIOSession,
> >> should these be written as RuntimeIoException, SslFilter and NioSession instead?
> >>
> >>
> >> On 9/15/07, peter royal <pr...@apache.org> wrote:
> >>
> >>> On Sep 14, 2007, at 5:08 AM, Maarten Bosteels wrote:
> >>>
> >>>> Does anyone have a MINA-code-style config for IDEA ?
> >>>> Or am I the only IDEA addict ?
> >>>>
> >>>> Maybe the default style corresponds to the MINA style, I'd have to
> >>>> check
> >>>> that.
> >>>>
> >>> You're not alone!
> >>>
> >>> Its very close to the default, with a few tweaks. I'll export mine
> >>> soon and share it :)
> >>>
> >>> -pete
> >>>
> >>>
> >>> --
> >>> proyal@apache.org - http://fotap.org/~osi
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >> --
> >>
> >> Hez
> >>
> >>
> >
> >
> >
>
>


-- 
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com

Re: Coding style problem

Posted by Rodrigo Madera <ro...@gmail.com>.
IMHO, IO should never have been Io in the first place.

On 9/16/07, Pat Farrell <pf...@pfarrell.com> wrote:
>
> Trustin Lee wrote:
> > We are seeing too many Io* these days.  Should we just drop it?  It
> > might cause some confusion, but it might be rather fine.
>
> I'd go for removing it, Mina is about IO, its kinda silly to talk about
> the IO parts of an IO package. Just IMHO
>
>
> --
> Pat Farrell
>
>


-- 
If Jack Bauer had been a Spartan, the movie would have been called "1".

Re: Coding style problem

Posted by Pat Farrell <pf...@pfarrell.com>.
Trustin Lee wrote:
> We are seeing too many Io* these days.  Should we just drop it?  It
> might cause some confusion, but it might be rather fine.

I'd go for removing it, Mina is about IO, its kinda silly to talk about 
the IO parts of an IO package. Just IMHO


-- 
Pat Farrell			


Re: Coding style problem

Posted by Trustin Lee <tr...@gmail.com>.
On 9/17/07, Richard Wallace <rw...@thewallacepack.net> wrote:
> Doesn't that imply that all the Io* classes and interfaces (IoAcceptor,
> IoConnector, IoEvent, etc.), should all be renamed to IO* for
> consistency?  I think that's what Hezjing was pointing to in terms of
> inconsistencies.

We are seeing too many Io* these days.  Should we just drop it?  It
might cause some confusion, but it might be rather fine.

Trustin
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP Key ID: 0x0255ECA6

Re: Coding style problem

Posted by hezjing <he...@gmail.com>.
Yes, Rich. That is what I meant, the Io* and IO*, the Http* and HTTP*,
the Ssl and SSL, the Mdc* and MDC* and etc

Should there really a rule that say, capitalize every letter of the
abbreviation?


Well, of course this is very minor finding and we could leave it as it is :-)


On 9/17/07, Richard Wallace <rw...@thewallacepack.net> wrote:
> Doesn't that imply that all the Io* classes and interfaces (IoAcceptor,
> IoConnector, IoEvent, etc.), should all be renamed to IO* for
> consistency?  I think that's what Hezjing was pointing to in terms of
> inconsistencies.
>
> Rich
>
> Emmanuel Lecharny wrote:
> > Classes using SSL, IO, NIO, make sense to me. It's much more easier to
> > know what they are doing than by using Ssl, Io or NIO.
> >
> > The Java standard rules say that the first letter of a noun shiuld be
> > upcased, but SSL is not a noun, just the 3 first letters of Secure
> > Socket Layer.
> >
> > My 2cts.
> >
> > On 9/16/07, hezjing <he...@gmail.com> wrote:
> >
> >> Hi!
> >>
> >> I notice that there are inconsistencies in the class names.
> >>
> >> Some classes capitalized the abbreviation, but some do not.
> >>
> >> For example, I see that there is RuntimeIOException, SSLFilter and NIOSession,
> >> should these be written as RuntimeIoException, SslFilter and NioSession instead?
> >>
> >>
> >> On 9/15/07, peter royal <pr...@apache.org> wrote:
> >>
> >>> On Sep 14, 2007, at 5:08 AM, Maarten Bosteels wrote:
> >>>
> >>>> Does anyone have a MINA-code-style config for IDEA ?
> >>>> Or am I the only IDEA addict ?
> >>>>
> >>>> Maybe the default style corresponds to the MINA style, I'd have to
> >>>> check
> >>>> that.
> >>>>
> >>> You're not alone!
> >>>
> >>> Its very close to the default, with a few tweaks. I'll export mine
> >>> soon and share it :)
> >>>
> >>> -pete
> >>>
> >>>
> >>> --
> >>> proyal@apache.org - http://fotap.org/~osi
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >> --
> >>
> >> Hez
> >>
> >>
> >
> >
> >
>
>


-- 

Hez

Re: Coding style problem

Posted by Rodrigo Madera <ro...@gmail.com>.
Good point.

On 9/16/07, Richard Wallace <rw...@thewallacepack.net> wrote:
>
> Doesn't that imply that all the Io* classes and interfaces (IoAcceptor,
> IoConnector, IoEvent, etc.), should all be renamed to IO* for
> consistency?  I think that's what Hezjing was pointing to in terms of
> inconsistencies.
>
> Rich
>
> Emmanuel Lecharny wrote:
> > Classes using SSL, IO, NIO, make sense to me. It's much more easier to
> > know what they are doing than by using Ssl, Io or NIO.
> >
> > The Java standard rules say that the first letter of a noun shiuld be
> > upcased, but SSL is not a noun, just the 3 first letters of Secure
> > Socket Layer.
> >
> > My 2cts.
> >
> > On 9/16/07, hezjing <he...@gmail.com> wrote:
> >
> >> Hi!
> >>
> >> I notice that there are inconsistencies in the class names.
> >>
> >> Some classes capitalized the abbreviation, but some do not.
> >>
> >> For example, I see that there is RuntimeIOException, SSLFilter and
> NIOSession,
> >> should these be written as RuntimeIoException, SslFilter and NioSession
> instead?
> >>
> >>
> >> On 9/15/07, peter royal <pr...@apache.org> wrote:
> >>
> >>> On Sep 14, 2007, at 5:08 AM, Maarten Bosteels wrote:
> >>>
> >>>> Does anyone have a MINA-code-style config for IDEA ?
> >>>> Or am I the only IDEA addict ?
> >>>>
> >>>> Maybe the default style corresponds to the MINA style, I'd have to
> >>>> check
> >>>> that.
> >>>>
> >>> You're not alone!
> >>>
> >>> Its very close to the default, with a few tweaks. I'll export mine
> >>> soon and share it :)
> >>>
> >>> -pete
> >>>
> >>>
> >>> --
> >>> proyal@apache.org - http://fotap.org/~osi
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >> --
> >>
> >> Hez
> >>
> >>
> >
> >
> >
>
>


-- 
If Jack Bauer had been a Spartan, the movie would have been called "1".

Re: Coding style problem

Posted by Richard Wallace <rw...@thewallacepack.net>.
Doesn't that imply that all the Io* classes and interfaces (IoAcceptor, 
IoConnector, IoEvent, etc.), should all be renamed to IO* for 
consistency?  I think that's what Hezjing was pointing to in terms of 
inconsistencies.

Rich

Emmanuel Lecharny wrote:
> Classes using SSL, IO, NIO, make sense to me. It's much more easier to
> know what they are doing than by using Ssl, Io or NIO.
>
> The Java standard rules say that the first letter of a noun shiuld be
> upcased, but SSL is not a noun, just the 3 first letters of Secure
> Socket Layer.
>
> My 2cts.
>
> On 9/16/07, hezjing <he...@gmail.com> wrote:
>   
>> Hi!
>>
>> I notice that there are inconsistencies in the class names.
>>
>> Some classes capitalized the abbreviation, but some do not.
>>
>> For example, I see that there is RuntimeIOException, SSLFilter and NIOSession,
>> should these be written as RuntimeIoException, SslFilter and NioSession instead?
>>
>>
>> On 9/15/07, peter royal <pr...@apache.org> wrote:
>>     
>>> On Sep 14, 2007, at 5:08 AM, Maarten Bosteels wrote:
>>>       
>>>> Does anyone have a MINA-code-style config for IDEA ?
>>>> Or am I the only IDEA addict ?
>>>>
>>>> Maybe the default style corresponds to the MINA style, I'd have to
>>>> check
>>>> that.
>>>>         
>>> You're not alone!
>>>
>>> Its very close to the default, with a few tweaks. I'll export mine
>>> soon and share it :)
>>>
>>> -pete
>>>
>>>
>>> --
>>> proyal@apache.org - http://fotap.org/~osi
>>>
>>>
>>>
>>>
>>>
>>>       
>> --
>>
>> Hez
>>
>>     
>
>
>   


Re: Coding style problem

Posted by Emmanuel Lecharny <el...@gmail.com>.
Classes using SSL, IO, NIO, make sense to me. It's much more easier to
know what they are doing than by using Ssl, Io or NIO.

The Java standard rules say that the first letter of a noun shiuld be
upcased, but SSL is not a noun, just the 3 first letters of Secure
Socket Layer.

My 2cts.

On 9/16/07, hezjing <he...@gmail.com> wrote:
> Hi!
>
> I notice that there are inconsistencies in the class names.
>
> Some classes capitalized the abbreviation, but some do not.
>
> For example, I see that there is RuntimeIOException, SSLFilter and NIOSession,
> should these be written as RuntimeIoException, SslFilter and NioSession instead?
>
>
> On 9/15/07, peter royal <pr...@apache.org> wrote:
> > On Sep 14, 2007, at 5:08 AM, Maarten Bosteels wrote:
> > > Does anyone have a MINA-code-style config for IDEA ?
> > > Or am I the only IDEA addict ?
> > >
> > > Maybe the default style corresponds to the MINA style, I'd have to
> > > check
> > > that.
> >
> > You're not alone!
> >
> > Its very close to the default, with a few tweaks. I'll export mine
> > soon and share it :)
> >
> > -pete
> >
> >
> > --
> > proyal@apache.org - http://fotap.org/~osi
> >
> >
> >
> >
> >
>
>
> --
>
> Hez
>


-- 
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com

Re: Coding style problem

Posted by hezjing <he...@gmail.com>.
Hi!

I notice that there are inconsistencies in the class names.

Some classes capitalized the abbreviation, but some do not.

For example, I see that there is RuntimeIOException, SSLFilter and NIOSession,
should these be written as RuntimeIoException, SslFilter and NioSession instead?


On 9/15/07, peter royal <pr...@apache.org> wrote:
> On Sep 14, 2007, at 5:08 AM, Maarten Bosteels wrote:
> > Does anyone have a MINA-code-style config for IDEA ?
> > Or am I the only IDEA addict ?
> >
> > Maybe the default style corresponds to the MINA style, I'd have to
> > check
> > that.
>
> You're not alone!
>
> Its very close to the default, with a few tweaks. I'll export mine
> soon and share it :)
>
> -pete
>
>
> --
> proyal@apache.org - http://fotap.org/~osi
>
>
>
>
>


-- 

Hez

Re: Coding style problem

Posted by peter royal <pr...@apache.org>.
On Sep 14, 2007, at 5:08 AM, Maarten Bosteels wrote:
> Does anyone have a MINA-code-style config for IDEA ?
> Or am I the only IDEA addict ?
>
> Maybe the default style corresponds to the MINA style, I'd have to  
> check
> that.

You're not alone!

Its very close to the default, with a few tweaks. I'll export mine  
soon and share it :)

-pete


-- 
proyal@apache.org - http://fotap.org/~osi




Re: Coding style problem

Posted by Maarten Bosteels <mb...@gmail.com>.
Hi,

Does anyone have a MINA-code-style config for IDEA ?
Or am I the only IDEA addict ?

Maybe the default style corresponds to the MINA style, I'd have to check
that.

Maarten

On 9/14/07, Trustin Lee <tr...@gmail.com> wrote:
>
> Hi committers,
>
> It seems like old coding style has sneaked into our source code
> repository.  I didn't run automatic formatter, but please fix them as
> soon as you find any of them.
>
> Thanks,
> Trustin
> --
> what we call human nature is actually human habit
> --
> http://gleamynode.net/
> --
> PGP Key ID: 0x0255ECA6
>