Welcome Guest.   Make a donation to an author on the site April 24, 2014, 10:02:35 PM  *

Please login or register.
Or did you miss your validation email?


Login with username and password (forgot your password?)
Why not become a lifetime supporting member of the site with a one-time donation of any amount? Your donation entitles you to a ton of additional benefits, including access to exclusive discounts and downloads, the ability to enter monthly free software drawings, and a single non-expiring license key for all of our programs.


You must sign up here before you can post and access some areas of the site. Registration is totally free and confidential.
 
The N.A.N.Y. Challenge 2011! Download 30+ custom programs!
   
   Forum Home   Thread Marks Chat! Downloads Search Login Register  
Pages: [1] 2 Next   Go Down
  Reply  |  New Topic  |  Print  
Author Topic: NANY 2012 Release: Kyrathaba's Source Code Line Counter  (Read 11121 times)
kyrathaba
N.A.N.Y. Organizer
Moderator
*****
Posts: 2,975



while(! dead_horse){beat}

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« on: July 02, 2011, 09:43:34 AM »

Introducing Kyrathaba's Source Code Line Counter, a donationware program that, given a project directory, will tally the lines of source code across all source code files within the project (or multiple projects).  Has the option to exclude blank lines and comments.

NANY 2012 Entry Information

Application Name Kyrathaba's Source Code Line Counter
Version 1.0.1.0
Short Descriptioncounts lines of source code across all files in a project (or even across multiple projects) using physical SLOC
Supported OSes Windows XP forward
Setup File KyrSrcLineCounterSetup.zip (~330 Kb)
System Requirementsrequires .NET Framework 4.0; the setup program detects the absence of .NET Framework 4.0 and installs if necessary
Author Infokyrathaba, author of Kyrathaba's Hangman. My past NANY entries include: Crocus Contacts, Blackjack, and NANY Excuse Manager.
DescriptionOption to count or not-count comments and blank lines.
Use standard folder-selection dialog, or drop folder on the listview
Automatically recounts when file extension is changed in the dropdown combo box
Automatically recounts when a folder is dropped on listview
Ability to count files/lines across multiple top-level directories
Supports C, C#, C++, VB, Delphi/Pascal, Bash, Java, AHK, Auto-It
Screenshots
Installationuse the Setup file created by Inno Setup
Using the applicationShould be highly intuitive; I await feedback (kyrathasoft@gmail.com)
Uninstallinguse the uninstaller
Known Issuesnone


« Last Edit: December 30, 2011, 08:00:42 PM by kyrathaba; Reason: updated version to 1.0.0.9 » Logged

Win 7 Home Premium 64bit-SP1 AMD Athlon II X2 220 Socket AM3 (938) @ 2.1GHz 6GB RAM Firefox 26.0
_________________________________________________________________________________________

I'm fighting against patent trolls. Join me and tell your representative to support the #SHIELDAct: https://eff.org/r.b6JJ /via @EFF

My DC page: http://kyrathaba.dcmembers.com | My blog: http://williambryanmiller.com/ | Proofreading Service: http://bit.ly/1fQSqQP

skwire
Charter Member
***
Posts: 3,912



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #1 on: July 03, 2011, 01:16:47 AM »

Make sure to give this a read: http://en.wikipedia.org/wiki/Source_lines_of_code
Logged

kyrathaba
N.A.N.Y. Organizer
Moderator
*****
Posts: 2,975



while(! dead_horse){beat}

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #2 on: July 03, 2011, 07:31:01 AM »

Thanks for that link, skwire.  Based on the article, my program is of the type "Physical SLOC" rather than "Logical SLOC" smiley
Logged

Win 7 Home Premium 64bit-SP1 AMD Athlon II X2 220 Socket AM3 (938) @ 2.1GHz 6GB RAM Firefox 26.0
_________________________________________________________________________________________

I'm fighting against patent trolls. Join me and tell your representative to support the #SHIELDAct: https://eff.org/r.b6JJ /via @EFF

My DC page: http://kyrathaba.dcmembers.com | My blog: http://williambryanmiller.com/ | Proofreading Service: http://bit.ly/1fQSqQP

kyrathaba
N.A.N.Y. Organizer
Moderator
*****
Posts: 2,975



while(! dead_horse){beat}

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #3 on: July 03, 2011, 09:58:10 PM »

Version 1.0.0.1 is now available.  It adds "Help"->"About" menu/submenu:


Logged

Win 7 Home Premium 64bit-SP1 AMD Athlon II X2 220 Socket AM3 (938) @ 2.1GHz 6GB RAM Firefox 26.0
_________________________________________________________________________________________

I'm fighting against patent trolls. Join me and tell your representative to support the #SHIELDAct: https://eff.org/r.b6JJ /via @EFF

My DC page: http://kyrathaba.dcmembers.com | My blog: http://williambryanmiller.com/ | Proofreading Service: http://bit.ly/1fQSqQP

kyrathaba
N.A.N.Y. Organizer
Moderator
*****
Posts: 2,975



while(! dead_horse){beat}

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #4 on: July 04, 2011, 04:41:15 PM »

I've updated the program to include the ability to check for (and, if available, download) an updated version.  In the process, I've incremented the program's version a few times (during dev-testing), so that's it's up to 1.0.0.5.

Anyone who has installed the program should uninstall, then download v1.0.0.5 and do a fresh install.
Logged

Win 7 Home Premium 64bit-SP1 AMD Athlon II X2 220 Socket AM3 (938) @ 2.1GHz 6GB RAM Firefox 26.0
_________________________________________________________________________________________

I'm fighting against patent trolls. Join me and tell your representative to support the #SHIELDAct: https://eff.org/r.b6JJ /via @EFF

My DC page: http://kyrathaba.dcmembers.com | My blog: http://williambryanmiller.com/ | Proofreading Service: http://bit.ly/1fQSqQP

Ath
Supporting Member
**
Posts: 2,134



see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #5 on: July 05, 2011, 03:22:08 PM »

There's a lot of theory behind SLOC.

I once had a work-assignment to roughly compare the value/weight of the several software packages we have, written in several languages (C, C++, C#, Cobol, Delphi, Java, Modula2, VB is in alphabetic order what I can remember now).
I searched for tools then that could generate some useful statistics based on SLOC, and ended up testing a few and finally settling on CodeCount from USC, in the 2006.05 version back then (Gee was it that long ago ohmy).

The major reason for selecting CodeCount was that it then gave reasonable and somewhat comparable counts for most of the languages I had to report on (Delphi and Modula2 aren't supported but I think I used another counter that supports Delphi and would eat Modula2, but I can't recall which one) , and all are based on the same measurement types, and from one development team.

I not sure you have the ambition to reach that kind of level or approach, and I'm not really interested in re-doing my tests from back then, but in addition to the Wikipedia article skwire referred to, it could be an interesting article/site for you to read.

Don't have the results of that report at hand, but it must be somewhere in my mail archive. I do recall there was quite a difference between the languages on P-Sloc and L-Sloc ratings (they're both calculated), but I can't even recall any figures just now.

I'll give this one a swing on some of my current projects Cool
Logged

kyrathaba
N.A.N.Y. Organizer
Moderator
*****
Posts: 2,975



while(! dead_horse){beat}

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #6 on: July 05, 2011, 05:37:52 PM »

Quote
I'll give this one a swing on some of my current projects Cool

Cool.  Thanks, Ath!
Logged

Win 7 Home Premium 64bit-SP1 AMD Athlon II X2 220 Socket AM3 (938) @ 2.1GHz 6GB RAM Firefox 26.0
_________________________________________________________________________________________

I'm fighting against patent trolls. Join me and tell your representative to support the #SHIELDAct: https://eff.org/r.b6JJ /via @EFF

My DC page: http://kyrathaba.dcmembers.com | My blog: http://williambryanmiller.com/ | Proofreading Service: http://bit.ly/1fQSqQP

kyrathaba
N.A.N.Y. Organizer
Moderator
*****
Posts: 2,975



while(! dead_horse){beat}

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #7 on: July 07, 2011, 10:28:53 PM »

Version 1.0.0.6 updates the form TitleBar's title to fix a teensy error.  Use "About"->"Update".
Logged

Win 7 Home Premium 64bit-SP1 AMD Athlon II X2 220 Socket AM3 (938) @ 2.1GHz 6GB RAM Firefox 26.0
_________________________________________________________________________________________

I'm fighting against patent trolls. Join me and tell your representative to support the #SHIELDAct: https://eff.org/r.b6JJ /via @EFF

My DC page: http://kyrathaba.dcmembers.com | My blog: http://williambryanmiller.com/ | Proofreading Service: http://bit.ly/1fQSqQP

kyrathaba
N.A.N.Y. Organizer
Moderator
*****
Posts: 2,975



while(! dead_horse){beat}

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #8 on: August 09, 2011, 07:46:42 PM »

Added this program to my blog here.
Logged

Win 7 Home Premium 64bit-SP1 AMD Athlon II X2 220 Socket AM3 (938) @ 2.1GHz 6GB RAM Firefox 26.0
_________________________________________________________________________________________

I'm fighting against patent trolls. Join me and tell your representative to support the #SHIELDAct: https://eff.org/r.b6JJ /via @EFF

My DC page: http://kyrathaba.dcmembers.com | My blog: http://williambryanmiller.com/ | Proofreading Service: http://bit.ly/1fQSqQP

Stephen66515
Animated Giffer in Chief
Honorary Member
**
Posts: 2,336



see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #9 on: September 15, 2011, 04:12:22 PM »

Just downloaded and ran this.  Works VERY well indeed.  Was actually shocked at how many lines of code my small utility actually has (Even with all the options like blank lines, and designer unchecked).

Out of curiosity...How many lines does your line counter have? tongue
Logged

No trees were harmed during the creation of this message.  Millions of electrons, however, were terribly inconvenienced

"Think left and think right and think low and think high. Oh, the things you can think up if only you try!" - Dr. Seuss
kyrathaba
N.A.N.Y. Organizer
Moderator
*****
Posts: 2,975



while(! dead_horse){beat}

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #10 on: September 15, 2011, 05:28:50 PM »

LOL!  1,905, counting blank lines, comments, and auto-generated code:

Logged

Win 7 Home Premium 64bit-SP1 AMD Athlon II X2 220 Socket AM3 (938) @ 2.1GHz 6GB RAM Firefox 26.0
_________________________________________________________________________________________

I'm fighting against patent trolls. Join me and tell your representative to support the #SHIELDAct: https://eff.org/r.b6JJ /via @EFF

My DC page: http://kyrathaba.dcmembers.com | My blog: http://williambryanmiller.com/ | Proofreading Service: http://bit.ly/1fQSqQP

kyrathaba
N.A.N.Y. Organizer
Moderator
*****
Posts: 2,975



while(! dead_horse){beat}

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #11 on: September 15, 2011, 05:29:17 PM »

Glad the program worked well for you!  Always good to hear positive feedback!  thumbs up
Logged

Win 7 Home Premium 64bit-SP1 AMD Athlon II X2 220 Socket AM3 (938) @ 2.1GHz 6GB RAM Firefox 26.0
_________________________________________________________________________________________

I'm fighting against patent trolls. Join me and tell your representative to support the #SHIELDAct: https://eff.org/r.b6JJ /via @EFF

My DC page: http://kyrathaba.dcmembers.com | My blog: http://williambryanmiller.com/ | Proofreading Service: http://bit.ly/1fQSqQP

timns
Supporting Member
**
Posts: 1,209



Veni, vidi, debuggi

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #12 on: November 22, 2011, 09:31:20 PM »

Can this be extended to handle Java and/or Delphi sources?
Logged

kyrathaba
N.A.N.Y. Organizer
Moderator
*****
Posts: 2,975



while(! dead_horse){beat}

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #13 on: November 22, 2011, 09:35:18 PM »

That should be fairly simple, timns.  I'd just add some additional extensions to search parameter.  Will try to get to it (right now I'm busy with a paid project).  Or, if you wish, I can release the source code to you.
Logged

Win 7 Home Premium 64bit-SP1 AMD Athlon II X2 220 Socket AM3 (938) @ 2.1GHz 6GB RAM Firefox 26.0
_________________________________________________________________________________________

I'm fighting against patent trolls. Join me and tell your representative to support the #SHIELDAct: https://eff.org/r.b6JJ /via @EFF

My DC page: http://kyrathaba.dcmembers.com | My blog: http://williambryanmiller.com/ | Proofreading Service: http://bit.ly/1fQSqQP

timns
Supporting Member
**
Posts: 1,209



Veni, vidi, debuggi

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #14 on: November 23, 2011, 11:18:38 AM »

No, I can wait - I'd love to see it in the main release if you have time. I'm very sure a lot of other folks would appreciate both Java and Delphi.
Logged

Ath
Supporting Member
**
Posts: 2,134



see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #15 on: November 24, 2011, 01:30:04 AM »

+1 smiley
Logged

kyrathaba
N.A.N.Y. Organizer
Moderator
*****
Posts: 2,975



while(! dead_horse){beat}

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #16 on: November 24, 2011, 07:57:01 AM »

Okay, can you guys give me a list of file extensions I'll need to know?
Logged

Win 7 Home Premium 64bit-SP1 AMD Athlon II X2 220 Socket AM3 (938) @ 2.1GHz 6GB RAM Firefox 26.0
_________________________________________________________________________________________

I'm fighting against patent trolls. Join me and tell your representative to support the #SHIELDAct: https://eff.org/r.b6JJ /via @EFF

My DC page: http://kyrathaba.dcmembers.com | My blog: http://williambryanmiller.com/ | Proofreading Service: http://bit.ly/1fQSqQP

Ath
Supporting Member
**
Posts: 2,134



see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #17 on: November 24, 2011, 09:05:22 AM »

*.java -> Java source
*.dpr -> Delphi Project (contains mostly source)
*.pas -> Delphi/Pascal source
Logged

jgpaiva
Global Moderator
*****
Posts: 4,710



Artificial Idiocy

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #18 on: November 24, 2011, 09:27:14 AM »

*.sh -> bash source (comments with '#')
*.ahk -> ahk source smiley (comments with ';')
Logged

kyrathaba
N.A.N.Y. Organizer
Moderator
*****
Posts: 2,975



while(! dead_horse){beat}

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #19 on: November 24, 2011, 11:42:16 AM »

Okay, guys: I've updated the program to be capable of identifying the files with the extensions you've provided.  Please use Help->About->Update to download the newest version for installation, or you can download a copy from the link in my OP.
Logged

Win 7 Home Premium 64bit-SP1 AMD Athlon II X2 220 Socket AM3 (938) @ 2.1GHz 6GB RAM Firefox 26.0
_________________________________________________________________________________________

I'm fighting against patent trolls. Join me and tell your representative to support the #SHIELDAct: https://eff.org/r.b6JJ /via @EFF

My DC page: http://kyrathaba.dcmembers.com | My blog: http://williambryanmiller.com/ | Proofreading Service: http://bit.ly/1fQSqQP

timns
Supporting Member
**
Posts: 1,209



Veni, vidi, debuggi

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #20 on: November 24, 2011, 12:02:27 PM »

It works!  Thmbsup

887,726 lines counted in well under a second.

  • Can it automatically recount after changing the file type please?
  • And count the # of files?
  • And make the window sizeable?
  • Can we get it to save previous folder locations and also groups? Many of my projects are spread across several folders (core files, shared resources)
  • How about being able to drag a folder into the window to be counted?


Logged

Ath
Supporting Member
**
Posts: 2,134



see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #21 on: November 24, 2011, 02:30:56 PM »

+1 on all timns just said (except for the lines/speed counted tongue)
Logged

kyrathaba
N.A.N.Y. Organizer
Moderator
*****
Posts: 2,975



while(! dead_horse){beat}

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #22 on: November 24, 2011, 02:59:22 PM »

    Can it automatically recount after changing the file type please? DONE!
    And count the # of files? DONE!
    And make the window sizeable? DONE!
    Can we get it to save previous folder locations and also groups? Many of my projects are spread across several folders (core files, shared resources) ON TO-DO LIST!
    How about being able to drag a folder into the window to be counted? DONE!


Please use Help->About->Update to download v1.0.0.8, the newest version for installation, or you can download a copy from the link in my OP.
Logged

Win 7 Home Premium 64bit-SP1 AMD Athlon II X2 220 Socket AM3 (938) @ 2.1GHz 6GB RAM Firefox 26.0
_________________________________________________________________________________________

I'm fighting against patent trolls. Join me and tell your representative to support the #SHIELDAct: https://eff.org/r.b6JJ /via @EFF

My DC page: http://kyrathaba.dcmembers.com | My blog: http://williambryanmiller.com/ | Proofreading Service: http://bit.ly/1fQSqQP

Ath
Supporting Member
**
Posts: 2,134



see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #23 on: November 24, 2011, 03:06:12 PM »

Hey, that's fast! Thmbsup
Logged

Ath
Supporting Member
**
Posts: 2,134



see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #24 on: November 24, 2011, 03:11:41 PM »

H'm should have thought of AutoIt3 (.au3) when I saw .ahk on that list, the language is a lot like ahk, so should be easy.
Logged

Pages: [1] 2 Next   Go Up
  Reply  |  New Topic  |  Print  
 
Jump to:  
   Forum Home   Thread Marks Chat! Downloads Search Login Register  

DonationCoder.com | About Us
DonationCoder.com Forum | Powered by SMF
[ Page time: 0.047s | Server load: 0.01 ]