On Thu, Jul 18, 2013 at 02:34:36PM -0600, Mike Tutkowski wrote:
> I'm not sure how I feel about an arbitrary number of lines per method
> (although 200 is obviously quite high and I would recommend modularizing
> such a method), but I'm not in favor of limiting the number of methods per
> class (especially not to just 10). Some types of objects simply need many
> discrete operations and 10 is too limiting.

+1 to both thoughts.

Smaller methods is good, but a specific number of lines as policy vs. a rule 
of thumb are two different things.

I completely agree with Daan's underlying concern though...  some of
these class files are horrible to try and comprehend.

My favorite example:

https://git-wip-us.apache.org/repos/asf/cloudstack/?p=cloudstack.git;a=blob_plain;f=plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java;hb=master



> 
> 
> On Tue, Jul 16, 2013 at 6:14 AM, Daan Hoogland <daan.hoogl...@gmail.com>wrote:
> 
> > I am all for re-oping discussions on the ten commandments, but let's stick
> > to method and class level for now.
> >
> >
> >
> >
> > On Tue, Jul 16, 2013 at 12:19 PM, Donal Lafferty
> > <donal.laffe...@citrix.com>wrote:
> >
> > > Hmm.  The original comment was "maximum length of 80 lines per method".
> > >
> > > Did you want to start a new thread covering max characters per line?
> > >
> > > > -----Original Message-----
> > > > From: Isaac Chiang [mailto:isaacchi...@gmail.com]
> > > > Sent: 16 July 2013 11:12 AM
> > > > To: dev@cloudstack.apache.org
> > > > Subject: Re: [DISCUSS] coding convention for method - and class length
> > > >
> > > > +1 for the maximum length per line
> > > >
> > > > I also agree with Wido that around 120 characters will be more fit
> > > current
> > > > needs.
> > > >
> > > >
> > > > Regards
> > > >
> > > > Isaac
> > >
> >
> 
> 
> 
> -- 
> *Mike Tutkowski*
> *Senior CloudStack Developer, SolidFire Inc.*
> e: mike.tutkow...@solidfire.com
> o: 303.746.7302
> Advancing the way the world uses the
> cloud<http://solidfire.com/solution/overview/?video=play>
> *™*

Reply via email to