Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How do I Calculate the KLOC (Lines of Code) for a PBL (all objects)???

874 views
Skip to first unread message

Asim Malik

unread,
Aug 24, 2000, 3:00:00 AM8/24/00
to
Hi,

I have to calculate the size of my product built using PB6.5 in terms of
KLOCs. There are about 40 pbls each of about 1MB large. (Lost of
objects...I dont have the exact count with me)...

Is there any easy method or tool available to calculate the LOC. The
long and direct way is to export the objects and count OR count the
lines manually for each event, functions etc....Now this is a very very
tedious method.

Any suggestions on how to go about this...any tools...methods etc....

Appreciate your help folks....
Asim


Asim Malik

unread,
Aug 24, 2000, 3:00:00 AM8/24/00
to

Asim Malik

unread,
Aug 24, 2000, 3:00:00 AM8/24/00
to

Asim Malik

unread,
Aug 24, 2000, 3:00:00 AM8/24/00
to

Asim Malik

unread,
Aug 24, 2000, 3:00:00 AM8/24/00
to

Andrew

unread,
Aug 24, 2000, 3:00:00 AM8/24/00
to
I don't know if a tool is available, but you could write a small program
that does this for you.

Use the LibraryDirectory () function to get a complete list of all objects.
Then loop each object with FindClassDefinition (). And use the
FindMatchingFunction to get the script. Then you can use the 'Source' to
count the lines.

Asim Malik <mali...@geodc.patni.com> wrote in message
news:39A4B102...@geodc.patni.com...

Charlie Crook

unread,
Aug 24, 2000, 3:00:00 AM8/24/00
to
Yet another company whose billing is based on lines of code? More lines <>
better code, but more lines = higher billing charge.

"Asim Malik" <zsa...@pcsbom.patni.com> wrote in message
news:39A4B2B2...@pcsbom.patni.com...

Jerry Siegel

unread,
Aug 24, 2000, 3:00:00 AM8/24/00
to
Or some PHM thinks it's a good metric for how productive his programmers
are - never mind analysis and testing, which are 80% of the effort.

Charlie Crook wrote in message ...

jlon

unread,
Aug 24, 2000, 3:00:00 AM8/24/00
to
Got www.puterwerks.com and look at the tools there. I am pretty sure
there are one or more that will do this.

J. Lon Thompson
Powerdoc Software, Inc.

In article <39A4B102...@geodc.patni.com>,


mali...@geodc.patni.com wrote:
> Hi,
>
> I have to calculate the size of my product built using PB6.5 in terms
of
> KLOCs. There are about 40 pbls each of about 1MB large. (Lost of
> objects...I dont have the exact count with me)...
>
> Is there any easy method or tool available to calculate the LOC. The
> long and direct way is to export the objects and count OR count the
> lines manually for each event, functions etc....Now this is a very
very
> tedious method.
>
> Any suggestions on how to go about this...any tools...methods etc....
>
> Appreciate your help folks....
> Asim
>
>


Sent via Deja.com http://www.deja.com/
Before you buy.

Terry Voth

unread,
Aug 24, 2000, 3:00:00 AM8/24/00
to
PBL Peeper (see below) counts lines of code, both on a object level
and on a script level (Lists / Objects and Lists / Scripts, plus View
/ Show... / Lines). The sum appears on the bottom of the list. The sum
on the scripts page excludes other parts of the object (which aren't
necessarily unimportant), but both counts are based on physical lines,
so it includes blank lines, comments, etc.... I've seen other tools
break out this line count more precisely, but I can't remember who did
it. A good place to start looking is http://www.puterwerks.com.

And I'm likely to agree with other viewpoints on how valuable lines of
code actually is. I've seen CloseQuery scripts copied to all 80
windows in the system, with evolutions (bug fixes) over time that were
never copied back to all the windows. Personally, I'd count this
volume *against* the team, which should have just put in an ancestor
and put the code in there (which is what I ended up having to do).
Programmers shouldn't get extra points for moronic coding. I just
threw it into PBL Peeper because it was about 5 lines of code with PFC
and other stuff I had already written. <g>

Good luck,

Terry [TeamSybase] and Sequel the techno-kitten

On Thu, 24 Aug 2000 10:59:22 +0530, Asim Malik
<zsa...@pcsbom.patni.com> wrote:

>I have to calculate the size of my product built using PB6.5 in terms of
>KLOCs. There are about 40 pbls each of about 1MB large. (Lost of
>objects...I dont have the exact count with me)...
>
>Is there any easy method or tool available to calculate the LOC. The
>long and direct way is to export the objects and count OR count the
>lines manually for each event, functions etc....Now this is a very very
>tedious method.
>
>Any suggestions on how to go about this...any tools...methods etc....

Sequel's Sandbox: http://www.techno-kitten.com
Home of PBL Peeper, a PowerBuilder Developer's Toolkit,
winner of PowerTimes 1999 "Little Helper of the Year"

Asim Malik

unread,
Aug 25, 2000, 3:00:00 AM8/25/00
to
Hi Terry,

Thanks a lot. I really apprciate your help and I agree with you regarding
that duplication of code.....guys have to get smart while coding.....

thanks again. appreciate.

Atul Kane

unread,
Aug 28, 2000, 3:00:00 AM8/28/00
to
Checkout RealPower...

-Atul Kane
CPD & Author of RealPower
http://www.homestead.com/atulkane

Asim Malik wrote:

> Hi,


>
> I have to calculate the size of my product built using PB6.5 in terms of
> KLOCs. There are about 40 pbls each of about 1MB large. (Lost of
> objects...I dont have the exact count with me)...
>
> Is there any easy method or tool available to calculate the LOC. The
> long and direct way is to export the objects and count OR count the
> lines manually for each event, functions etc....Now this is a very very
> tedious method.
>
> Any suggestions on how to go about this...any tools...methods etc....
>

0 new messages