From: Josh Cheek Date: 2013-01-05T23:32:59+09:00 Subject: Re: Require a ruby project to automatically include the modules in classes defined in the same .rb file --e89a8f2345b3d41ac004d28b782c Content-Type: text/plain; charset=ISO-8859-1 On Sat, Jan 5, 2013 at 6:09 AM, Robert Klemme wrote: > On Sat, Jan 5, 2013 at 2:05 AM, tamouse mailing lists > wrote: > > On Fri, Jan 4, 2013 at 5:58 AM, Peter Hickman > > wrote: > >> On 4 January 2013 11:07, Robert Klemme > wrote: > >>> > >>> On Fri, Jan 4, 2013 at 6:08 AM, Josh Cheek > wrote: > >>> > >>> > O.o You have 3000 classes? I can't imagine such a project. > >>> > >>> That's not overly large for a reasonable sized project I'd say. > >>> > >> > >> Seriously? > >> > >> Looking over all the projects in our repository the number of classes > (from > >> the rake stats command) most projects have less than 100 classes, a few > make > >> it into the low 100s and two make it into the 1000s all due to the fact > that > >> someone included an external project (soap4r and the like) in the lib > >> folder. > >> > >> Are people routinely creating 1000s of classes in a project? > > > > it begins to smell like Java.... > > Hehe. Actually I had Java projects in mind. I don't really have > numbers how many classes similar projects in Java and Ruby actually > have but I would assume the Ruby project to have less classes. How > much less might depend on the problem domain. Generally the order of > magnitude (i.e. a few thousand classes) does not sound too unrealistic > for a reasonably sized project which has passed through a few > development cycles. > > Cheers > > robert > > Hmm, going to the root directory for my current work project, which has had a team of 5-8 people on it for about a year and a half, $ find . -type file -name *.rb | xargs ruby -E iso-8859-1 -ne 'print if /^[^#]*((\b|\s)class\b\s[A-Z])|Class\.new|Struct\.new/' | sort -u | wc -l 1378 But that is across all our services, gems that we wrote, test code, migrations, etc. --e89a8f2345b3d41ac004d28b782c Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Sat, Jan 5, 2013 at 6:09 AM, Robert Klemme <shortcutter@google= mail.com> wrote:
On Sat, Jan 5, 2013 at 2:05 AM, tam= ouse mailing lists
<tamouse.lists@gmail.com&= gt; wrote:
> On Fri, Jan 4, 2013 at 5:58 AM, Peter Hickman
> <peterhickman386@= googlemail.com> wrote:
>> On 4 January 2013 11:07, Robert Klemme <shortcutter@googlemail.com> wrote:
>>>
>>> On Fri, Jan 4, 2013 at 6:08 AM, Josh Cheek <josh.cheek@gmail.com> wrote:
>>>
>>> > O.o You have 3000 classes? I can't imagine such a pro= ject.
>>>
>>> That's not overly large for a reasonable sized project I&#= 39;d say.
>>>
>>
>> Seriously?
>>
>> Looking over all the projects in our repository the number of clas= ses (from
>> the rake stats command) most projects have less than 100 classes, = a few make
>> it into the low 100s and two make it into the 1000s all due to the= fact that
>> someone included an external project (soap4r and the like) in the = lib
>> folder.
>>
>> Are people routinely creating 1000s of classes in a project?
>
> it begins to smell like Java....

Hehe. =A0Actually I had Java projects in mind. =A0I don't r= eally have
numbers how many classes similar projects in Java and Ruby actually
have but I would assume the Ruby project to have less classes. =A0How
much less might depend on the problem domain. =A0Generally the order of
magnitude (i.e. a few thousand classes) does not sound too unrealistic
for a reasonably sized project which has passed through a few
development cycles.

Cheers

robert



Hmm, going = to the root directory for my current work project, which has had a team of = 5-8 people on it for about a year and a half,

$ find . -type file -name *.rb | xargs ruby -E iso-8859-1 -ne 'pri= nt if /^[^#]*((\b|\s)class\b\s[A-Z])|Class\.new|Struct\.new/' | sort -u= | wc -l
=A0 =A0 1378

But that is = across all our services, gems that we wrote, test code, migrations, etc.
--e89a8f2345b3d41ac004d28b782c--