From: Phlip on
On Jan 21, 9:00 pm, Michele Simionato <michele.simion...(a)gmail.com>
wrote:

> Just for fun I have run cloc on our trunk:
>
> SUM:                8743    272238    215871   1470139 x   1.84 =
> 2708354.95

Nice!

My favorite version of a cloc system can distinguish test from
production code. That's why I always use executable cloc to measure
the ratio of test to production code (where 1.2:1 is almost
comfortable an 2:1 is sacred).

Just so long as nobody confuses "more lines of code!" with progress...

--
Phlip
From: Steve Holden on
Robert Kern wrote:
> On 2010-01-21 15:31 , Phlip wrote:
>> Aahz wrote:
>>> In article
>>> <7e09df6a-cda1-480e-a971-8f8a70ac4118(a)b9g2000yqd.googlegroups.com>,
>>> Phlip <phlip2005(a)gmail.com> wrote:
>>>> On Jan 20, 11:20=A0pm, Michele Simionato <michele.simion...(a)gmail.com>
>>>> wrote:
>>>>> pylint does too many things, I want something fast that just counts
>>>>> the lines and can be run on thousands of files at once.
>>>>> cloc seems fine, I have just tried on 2,000 files and it gives me a
>>>>> report in just a few seconds.
>>>> In my experience with Python codebases that big...
>>>>
>>>> ...how many of those lines are duplicated, and might merge together
>>>> into a better design?
>>>
>>> Um... do you have any clue who you followed up to? If you don't, Google
>>> is your friend.
>>
>> Oh, sorry, did I have the wrong opinion?
>
> You had a condescending attitude.
>
Towards someone who is fairly obviously not a Python neophyte.

Please don't think we are telling you you can't have any opinion you
like. Just don't expect to get away with it when you are wrong ;-)

Welcome to c.l.py.

regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
PyCon is coming! Atlanta, Feb 2010 http://us.pycon.org/
Holden Web LLC http://www.holdenweb.com/
UPCOMING EVENTS: http://holdenweb.eventbrite.com/

From: Wilbert Berendsen on
Op donderdag 21 januari 2010 schreef Michele:

> I need a small utility to count the lines of Python code in a
> directory, traversing subdirectories and ignoring comments and
> docstrings.

sloccount can do this.

http://www.dwheeler.com/sloccount/

Met vriendelijke groet,
Wilbert Berendsen

--
http://www.wilbertberendsen.nl/
"You must be the change you wish to see in the world."
-- Mahatma Gandhi
From: Michele Simionato on
On Jan 22, 7:51 pm, Phlip <phlip2...(a)gmail.com> wrote:
> On Jan 21, 9:00 pm, Michele Simionato <michele.simion...(a)gmail.com>
> wrote:
>
> > Just for fun I have run cloc on our trunk:
>
> > SUM:                8743    272238    215871   1470139 x   1.84 =
> > 2708354.95
>
> Nice!
>
> My favorite version of a cloc system can distinguish test from
> production code. That's why I always use executable cloc to measure
> the ratio of test to production code (where 1.2:1 is almost
> comfortable an 2:1 is sacred).

Most of this code base is old, before we started using automatic
tests, so tests are not a significant fraction of the code. And in any
case I consider tests as code, since you have to maintain them,
refactor them, etc.
From: Michele Simionato on
On Jan 22, 10:30 pm, Steve Holden <st...(a)holdenweb.com> wrote:
> >> Oh, sorry, did I have the wrong opinion?
>
> > You had a condescending attitude.
>
> Towards someone who is fairly obviously not a Python neophyte.
>
> Please don't think we are telling you you can't have any opinion you
> like. Just don't expect to get away with it when you are wrong ;-)

Come on, we are all friends here! The guy just said

> In my experience with Python codebases that big...
>
> ...how many of those lines are duplicated, and might merge together
> into a better design?
>
> The LOC would go down, too.

and it was even partially right. It is certainly right for the part I
was working on.
If it was good code from the beginning we would not have started this
refactoring project,
right? Peace,

Michele