|
kyrathaba
|
 |
« 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. | Application Name | Kyrathaba's Source Code Line Counter | | Version | 1.0.1.0 | | Short Description | counts 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 Requirements | requires .NET Framework 4.0; the setup program detects the absence of .NET Framework 4.0 and installs if necessary | | Author Info | kyrathaba, author of Kyrathaba's Hangman. My past NANY entries include: Crocus Contacts, Blackjack, and NANY Excuse Manager. | | Description | Option 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 | 
| | Installation | use the Setup file created by Inno Setup | | Using the application | Should be highly intuitive; I await feedback (kyrathasoft@gmail.com) | | Uninstalling | use the uninstaller
| | Known Issues | none
|
|
|
|
|
« 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 20.0 _________________________________________________________________________________________ I'm fighting against patent trolls. Join me and tell your representative to support the #SHIELDAct: https://eff.org/r.b6JJ /via @EFF http://kyrathaba.dcmembers.com/donate.htm
|
|
|
|
skwire
|
 |
« Reply #1 on: July 03, 2011, 01:16:47 AM » |
|
|
|
|
|
|
Logged
|
|
|
|
|
kyrathaba
|
 |
« 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" 
|
|
|
|
|
Logged
|
Win 7 Home Premium 64bit-SP1 AMD Athlon II X2 220 Socket AM3 (938) @ 2.1GHz 6GB RAM Firefox 20.0 _________________________________________________________________________________________ I'm fighting against patent trolls. Join me and tell your representative to support the #SHIELDAct: https://eff.org/r.b6JJ /via @EFF http://kyrathaba.dcmembers.com/donate.htm
|
|
|
|
|
kyrathaba
|
 |
« 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 20.0 _________________________________________________________________________________________ I'm fighting against patent trolls. Join me and tell your representative to support the #SHIELDAct: https://eff.org/r.b6JJ /via @EFF http://kyrathaba.dcmembers.com/donate.htm
|
|
|
|
kyrathaba
|
 |
« 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 20.0 _________________________________________________________________________________________ I'm fighting against patent trolls. Join me and tell your representative to support the #SHIELDAct: https://eff.org/r.b6JJ /via @EFF http://kyrathaba.dcmembers.com/donate.htm
|
|
|
|
Ath
|
 |
« 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  ). 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 
|
|
|
|
|
Logged
|
|
|
|
|
kyrathaba
|
 |
« Reply #6 on: July 05, 2011, 05:37:52 PM » |
|
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 20.0 _________________________________________________________________________________________ I'm fighting against patent trolls. Join me and tell your representative to support the #SHIELDAct: https://eff.org/r.b6JJ /via @EFF http://kyrathaba.dcmembers.com/donate.htm
|
|
|
|
kyrathaba
|
 |
« 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 20.0 _________________________________________________________________________________________ I'm fighting against patent trolls. Join me and tell your representative to support the #SHIELDAct: https://eff.org/r.b6JJ /via @EFF http://kyrathaba.dcmembers.com/donate.htm
|
|
|
|
kyrathaba
|
 |
« 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 20.0 _________________________________________________________________________________________ I'm fighting against patent trolls. Join me and tell your representative to support the #SHIELDAct: https://eff.org/r.b6JJ /via @EFF http://kyrathaba.dcmembers.com/donate.htm
|
|
|
|
Stephen66515
|
 |
« 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? 
|
|
|
|
|
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
|
 |
« 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 20.0 _________________________________________________________________________________________ I'm fighting against patent trolls. Join me and tell your representative to support the #SHIELDAct: https://eff.org/r.b6JJ /via @EFF http://kyrathaba.dcmembers.com/donate.htm
|
|
|
|
kyrathaba
|
 |
« Reply #11 on: September 15, 2011, 05:29:17 PM » |
|
Glad the program worked well for you! Always good to hear positive feedback! 
|
|
|
|
|
Logged
|
Win 7 Home Premium 64bit-SP1 AMD Athlon II X2 220 Socket AM3 (938) @ 2.1GHz 6GB RAM Firefox 20.0 _________________________________________________________________________________________ I'm fighting against patent trolls. Join me and tell your representative to support the #SHIELDAct: https://eff.org/r.b6JJ /via @EFF http://kyrathaba.dcmembers.com/donate.htm
|
|
|
|
timns
|
 |
« Reply #12 on: November 22, 2011, 09:31:20 PM » |
|
Can this be extended to handle Java and/or Delphi sources?
|
|
|
|
|
Logged
|
|
|
|
|
kyrathaba
|
 |
« 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 20.0 _________________________________________________________________________________________ I'm fighting against patent trolls. Join me and tell your representative to support the #SHIELDAct: https://eff.org/r.b6JJ /via @EFF http://kyrathaba.dcmembers.com/donate.htm
|
|
|
|
timns
|
 |
« 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
|
 |
« Reply #15 on: November 24, 2011, 01:30:04 AM » |
|
+1 
|
|
|
|
|
Logged
|
|
|
|
|
kyrathaba
|
 |
« 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 20.0 _________________________________________________________________________________________ I'm fighting against patent trolls. Join me and tell your representative to support the #SHIELDAct: https://eff.org/r.b6JJ /via @EFF http://kyrathaba.dcmembers.com/donate.htm
|
|
|
|
Ath
|
 |
« 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
|
 |
« Reply #18 on: November 24, 2011, 09:27:14 AM » |
|
*.sh -> bash source (comments with '#') *.ahk -> ahk source  (comments with ';')
|
|
|
|
|
Logged
|
|
|
|
|
kyrathaba
|
 |
« 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 20.0 _________________________________________________________________________________________ I'm fighting against patent trolls. Join me and tell your representative to support the #SHIELDAct: https://eff.org/r.b6JJ /via @EFF http://kyrathaba.dcmembers.com/donate.htm
|
|
|
|
timns
|
 |
« Reply #20 on: November 24, 2011, 12:02:27 PM » |
|
It works!  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
|
 |
« Reply #21 on: November 24, 2011, 02:30:56 PM » |
|
+1 on all timns just said (except for the lines/speed counted  )
|
|
|
|
|
Logged
|
|
|
|
|
kyrathaba
|
 |
« 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 20.0 _________________________________________________________________________________________ I'm fighting against patent trolls. Join me and tell your representative to support the #SHIELDAct: https://eff.org/r.b6JJ /via @EFF http://kyrathaba.dcmembers.com/donate.htm
|
|
|
|
Ath
|
 |
« Reply #23 on: November 24, 2011, 03:06:12 PM » |
|
Hey, that's fast! 
|
|
|
|
|
Logged
|
|
|
|
|
Ath
|
 |
« 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
|
|
|
|
|