Wednesday, November 2, 2005, 4:26:06 PM, Chuck wrote:

CN> Wouldn't bragging be how few you wrote to do the same job. ;)

Indeed!

Or perhaps you'd like to brag about your code-to-comment ratio, or how many A4 
pages your code would cover! I posted this to Dirgames-L and Direct-L recently, 
but forgot to post here. The movie below works as a nice MIAW - stick it in 
your xtras folder, restart Director, then call it from your xtras menu with one 
of your own projects loaded. It counts comments and code lines separately, and 
also counts total functions, characters, blank lines and gives a summary of 
your top 10 largest scripts.

www.robotduck.com/content/misc/utilities/codeCounter/


Sample output:
________________________________________________________________

Code Count Totals:

    Total Functions: 429
    Total Code Lines: 9465   (271698 chars)
    Total Comment Lines: 1213   (52767 chars)
    Total Blank Lines: 4815
    Code to comment ratio: 8:1
--------------------------------------------------
12pt Times New Roman A4 pages (blank lines omitted)

    As written: 213 pages
    Line breaks removed: 95 pages
--------------------------------------------------
Top 10 Largest scripts (% by character count):

    22% : "rd tools" (2389 lines, 81 functions)
    5% : "External Asset Loader" (602 lines, 6 functions)
    5% : "generate level" (479 lines, 3 functions)
    4% : "system test bhv" (577 lines, 8 functions)
    4% : "player script" (485 lines, 6 functions)
    4% : "Overlay / Backdrop Manager Behaviour" (372 lines, 15 functions)
    3% : "game world" (355 lines, 10 functions)
    3% : "dropdowns" (377 lines, 16 functions)
    3% : "keys" (334 lines, 11 functions)
    3% : "camera script" (294 lines, 4 functions)
--------------------------------------

Finished. (took 5824 ms)


- Ben

_______________________
 duck_at_robotduck.com 
   www.robotduck.com   

[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
[email protected]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]

Reply via email to