473,405 Members | 2,167 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Beyond LOC

Is there a program/script for meaningful comparison of C/C++ code
sizes? I guess what I would consider meaningful is the number of tokens
(excluding comments but before preprocessing) except brackets, braces
and commas in function calls and macro applications, or something along
these lines.

I googled a bit, but found nothing.

Jan 15 '07 #1
5 1399
On Jan 16, 12:26 am, n.torrey.pi...@gmail.com wrote:
Is there a program/script for meaningful comparison of C/C++ code
sizes? I guess what I would consider meaningful is the number of tokens
(excluding comments but before preprocessing) except brackets, braces
and commas in function calls and macro applications, or something along
these lines.

I googled a bit, but found nothing.
This is quite off-topic here, but try googling again for "code metric
c++" and you might find something. There are many ways to measure code
and LOC is perhaps one of the least informative, there's something
called Logical LOC which is more useful if you are interested in
code-size.

--
Erik Wikström

Jan 16 '07 #2
n.************@gmail.com wrote:
Is there a program/script for meaningful comparison of C/C++ code
sizes? I guess what I would consider meaningful is the number of tokens
(excluding comments but before preprocessing) except brackets, braces
and commas in function calls and macro applications, or something along
these lines.
How would that be meaningful and to whom?

--
Ian Collins.
Jan 16 '07 #3

Ian Collins skrev:
n.************@gmail.com wrote:
Is there a program/script for meaningful comparison of C/C++ code
sizes? I guess what I would consider meaningful is the number of tokens
(excluding comments but before preprocessing) except brackets, braces
and commas in function calls and macro applications, or something along
these lines.
How would that be meaningful and to whom?
It could be meaningful e.g. as part of a code review as it gives you a
hint as to what functions are complex and thus potential candidates for
refactoring.

/Peter

Jan 16 '07 #4
On Jan 16, 10:46 am, "peter koch" <peter.koch.lar...@gmail.comwrote:
Ian Collins skrev:
n.torrey.pi...@gmail.com wrote:
Is there a program/script for meaningful comparison of C/C++ code
sizes? I guess what I would consider meaningful is the number of tokens
(excluding comments but before preprocessing) except brackets, braces
and commas in function calls and macro applications, or something along
these lines.
How would that be meaningful and to whom?It could be meaningful e.g. aspart of a code review as it gives you a
hint as to what functions are complex and thus potential candidates for
refactoring.
Google for McCabe, or cyclomatic index or just code metrics in general
and you'll find that there are quite a number of metrics out there, but
I don't think yours is one of them.

--
Erik Wikström

Jan 16 '07 #5
peter koch wrote:
Ian Collins skrev:
>>n.************@gmail.com wrote:
>>>Is there a program/script for meaningful comparison of C/C++ code
sizes? I guess what I would consider meaningful is the number of tokens
(excluding comments but before preprocessing) except brackets, braces
and commas in function calls and macro applications, or something along
these lines.

How would that be meaningful and to whom?


It could be meaningful e.g. as part of a code review as it gives you a
hint as to what functions are complex and thus potential candidates for
refactoring.
I have a tool for that, the MK1 eyeball!

--
Ian Collins.
Jan 16 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: revjjjames | last post by:
Hello - What is the correct expression to remove any extra line breaks beyond two in a string? Sincerely, Jim
0
by: Christina | last post by:
For Immediate Release July 16, 2003 TOUCH TECHNOLOGIES, INC. RELEASES SHEERPOWER 4GL -- BEYOND BASIC AND IS AVAILABLE TO DOWNLOAD FOR FREE SAN DIEGO -- SheerPower 4GL -- Beyond BASIC is a...
9
by: Jenta | last post by:
A World Beyond Capitalism 2005, An Annual International Multiracial Alliance Building Peace Conference Is Accepting Proposals... ...and Online Registration is now available if you plan to table...
0
by: melledge | last post by:
Full Programme for XTech 2005 Announced Premier European XML Industry Event Expands Focus to "XML, the Web and Beyond"; Co-hosted by the Mozilla Foundation,W3C, and OASIS, Presenters Include...
0
by: John Dalberg | last post by:
I have a report that has over 10 pages. I can't go beyond page #2 when clicking on next page button. However I can go to any page if I enter the page number in the 'go to' field. Last page does...
1
by: Jacek Dziedzic | last post by:
Hi! A) Why isn't it possible to set a member of the BASE class in an initialization list of a DERIVED class constructor (except for 'calling' the base constructor from there, of course)? I even...
6
by: Douglas | last post by:
Hi, What is the need for the inaccessible pointer address beyond the end of an array? Eg. could for(ip = &array; ip < &array; ip++).... not be rewritten as
6
by: Frankie | last post by:
Okay, I know ASP.NET 2.0 isn't out yet. But I'm still wondering if there is any known timetable - rough as it may be - for the next major upgrade to ASP.NET beyond 2.0. I'm not talking service pack...
6
by: Neelesh Bodas | last post by:
C++ guarantees that there exists a valid iterator beyond the last element of a container. However, such iterator might not be written or dereferenced. This is also true for arrays - C++ gurantees...
3
by: Juan R. | last post by:
In http://canonicalscience.blogspot.com/2006/04/scientific-language-canonml-is.html] I presented some generic requirements for a markup language for science and mathematics. Basic features of...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.