Java-Gaming.org
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
Featured games (78)
games approved by the League of Dukes
Games in Showcase (416)
games submitted by our members
Games in WIP (306)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  CountLines. Thats what CountLines does.  (Read 833 times)
0 Members and 1 Guest are viewing this topic.
Offline matheus23

JGO Wizard


Medals: 77
Projects: 3


You think about my Avatar right now!


« Posted 2012-06-16 20:20:12 »

I am kind of confused... I really don't know, where to put this thread  Huh
In Showcase ? No, thats not even a game. In SharedCode ? No, I don't even show any code of this project.
So I just put it in "General Discussions", I think that is the best solution...

Riven or anyone else, move this, if this is wrong Smiley

So. Now back to topic:
Count lines with CountLines. Believe me, he is friendly... lol Cheesy
If you start the program, you get some info printed, and the program waits for you to press Enter.
If you do so, it will count the lines, and make some more statistics about your .java files, recursivly under the directory, the .jar is placed in.
Enjoy!
Better download first.

See my:
    My development Blog:     | Or look at my RPG | Or simply my coding
http://matheusdev.tumblr.comRuins of Revenge  |      On Github
Offline pjt33
« Reply #1 - Posted 2012-06-16 22:09:23 »

1  
find . -name \*.java -print0 | xargs -0 wc
?
Offline matheus23

JGO Wizard


Medals: 77
Projects: 3


You think about my Avatar right now!


« Reply #2 - Posted 2012-06-16 22:11:52 »

Its more than that. You could download it, and then look Tongue

See my:
    My development Blog:     | Or look at my RPG | Or simply my coding
http://matheusdev.tumblr.comRuins of Revenge  |      On Github
Games published by our own members! Check 'em out!
Play the free demo of Revenge of the Titans!
Offline Nate

JGO Wizard


Medals: 88
Projects: 3


Esoteric Software


« Reply #3 - Posted 2012-06-19 03:15:31 »

I've used CLOC, but I don't like the output too much. I tried this one, but its output isn't what I'm looking for either. I generally just want to know how many lines a project is. Comments don't count. Lines with just braces don't count. Your statistics are ok, but you don't have the useful number I'm looking for. I could subtract from total lines: empty lines, comment lines, etc but that is too much effort. Also I'm not sure how you are handling lines that aren't empty but aren't very useful (eg only braces).

Offline sproingie
« Reply #4 - Posted 2012-06-19 06:40:04 »

Counting only lines containing semicolons is usually a more meaningful estimate for java code.  It'll count commented-out code and examples, but when you think about it, it's still code you've written, even if it's not executed.

Even then, code density varies.  It's really just a way to gauge the ballpark size of a codebase in the end, and only really good for comparing with code written in the same style (such as modules in the same codebase)
Offline h3ckboy
« Reply #5 - Posted 2012-06-19 10:16:58 »

Hey, I ran it and the format is hardly legible (atleast the very end tally) because it is all offset.

cool program though Smiley
Offline matheus23

JGO Wizard


Medals: 77
Projects: 3


You think about my Avatar right now!


« Reply #6 - Posted 2012-06-19 16:58:44 »

I've used CLOC, but I don't like the output too much. I tried this one, but its output isn't what I'm looking for either. I generally just want to know how many lines a project is. Comments don't count. Lines with just braces don't count. Your statistics are ok, but you don't have the useful number I'm looking for. I could subtract from total lines: empty lines, comment lines, etc but that is too much effort. Also I'm not sure how you are handling lines that aren't empty but aren't very useful (eg only braces).
Braces won't count. They are count as "empty lines".

Counting only lines containing semicolons is usually a more meaningful estimate for java code.  It'll count commented-out code and examples, but when you think about it, it's still code you've written, even if it's not executed.

Even then, code density varies.  It's really just a way to gauge the ballpark size of a codebase in the end, and only really good for comparing with code written in the same style (such as modules in the same codebase)


Good Idea... I'll include it probably...

Hey, I ran it and the format is hardly legible (atleast the very end tally) because it is all offset.

cool program though Smiley

First, thanks, second yes... I simply used a dumb formatter... I haven't got any Idea, how to improve that, (exept for using JNCurses...)

See my:
    My development Blog:     | Or look at my RPG | Or simply my coding
http://matheusdev.tumblr.comRuins of Revenge  |      On Github
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
 
Browse for soundtracks for your game!

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

The invasion has landed! On Mars! And you're there to beat 'em!
HeroesGraveDev (42 views)
2013-06-15 23:35:23

Vermeer (51 views)
2013-06-14 20:08:06

davedes (48 views)
2013-06-14 16:03:55

alaslipknot (44 views)
2013-06-13 07:56:31

Roquen (61 views)
2013-06-12 04:12:32

alaslipknot (50 views)
2013-06-10 19:30:18

HeroesGraveDev (67 views)
2013-06-09 04:36:03

alaslipknot (54 views)
2013-06-09 03:40:19

CodeHead (53 views)
2013-06-09 02:55:41

GabrielBailey74 (66 views)
2013-06-09 00:02:25
Smoothing Algorithm Question
by UprightPath
2013-05-28 02:58:26

Smoothing Algorithm Question
by UprightPath
2013-05-28 02:57:33

Complex number cookbook
by Roquen
2013-04-24 12:47:31

2D Dynamic Lighting
by Oskuro
2013-04-17 16:46:12

2D Dynamic Lighting
by Oskuro
2013-04-17 16:45:57

2D Dynamic Lighting
by Oskuro
2013-04-17 16:23:20

Noise (bandpassed white)
by Roquen
2013-04-05 17:36:01

Noise (bandpassed white)
by Roquen
2013-04-03 16:17:38
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!