Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Lines of code.

 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Can anyone recommend a useful tool to count the lines of code in I've implemented in my assignment?

I'm getting towards the end of implementing the assignment and I'm wondering how many lines of code I and everyone else has in their assignments? The guide to the exam recommends around 2,000 locs. I know this is only a guide and that everyone's assignment will vary in size, but it can serve as a useful indicator as to whether my assignment is too convoluted or not complex enough.

Cheers.
 
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
it's not about the volume of code, it's about the quality.

Sun's website mentions an average of about 3500 lines with an observed minimum of about 2000.
At 20 characters per line on average that would be 50-60 kilobytes of sourcecode as a very rough estimate.
 
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My solution was about 1200 lines (NCSS - Non Commented source statements). I used the tool JavaNCSS for line counting.
 
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I use Java Line Counter to count my LOC. It ignores whitespace and comments. My solution was 2125 LOC.
I've never used JavaNCSS, but what I like about Java Line Counter is that it recursively goes into directories. All I do is drag my src folder onto its desktop shortcut and I get the total LOC of all source files in there.
 
Ranch Hand
Posts: 357
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Java Line Counter says my assignment contains 2962 lines of code.

I tried JavaNCSS first, but it does not work with Java 1.5 code (may save some of you some time to know that!).

Frans.
 
Ranch Hand
Posts: 247
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've finished the URLyBird project with 1460 lines of code.

Impressive hey
 
I AM MIGHTY! Especially when I hold this tiny ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic