Source code and line count in netbeans 7.x?

I am studying computer science and working on a project in java through netbeans 7.0.1, which will be submitted to college. Today, my teacher asked me how your project was completed, and I confidently answered that yes, sir, about 50% has already been completed, he said how many lines the code has, and I just go, “Ummmm I don’t know exactly sir,” he replied: “Do you really work or just buy it from somewhere!”, My mind is empty !!!: D
I searched for this google and found the WordCount Plugin for netbeans, but it doesn’t work in NetBeans 7, or maybe I don’t know how it works ..

Any replacement for this WordCount available for NetBeans 7.x?

Or in any other way than manually counting the string in the whole application?

+4
source share
4 answers

This is not part of Netbeans, but I use CLOC for this and I think that it does a good job - it defines languages ​​well, reports on how many lines there are comments, how much code, etc.

+6
source

Since the answer was based on nix, on Windows you can do something similar with Powershell:

get-content *.java | measure-object -line 
+5
source

If you are on a unix system this will work:

 $ find . -name *.java | xargs cat | wc 1262 2862 37780 

This will merge all the files together into a stream and pass it to wc , which will perform various calculations. The first number is the number of lines.

In the above example, my code base (from the directory in which I run it) has 1262 lines.

+2
source

I would like to offer an answer to another question:

How can I quantify progress in a programming project?

I prefer flexible methodologies, so I would introduce a burning schedule that takes into account the total number of user stories / maps / tasks, complexity / estimated time and displays it against the rest.

I think you need to do something simpler, but I expect simpler:

  • Start by breaking the entire project into units - tasks / errors / areas of functionality
  • Evaluate the amount of effort required for each and consider risk + complexity
  • For each unit, evaluate the amount it has completed - units must be small enough to be completed within a day or two maximum.
  • From this you can build statistics

I expect that just a project planning plan will be enough to improve your position with your teacher, as it shows maturity in understanding that a project is more than just code.

+2
source

Source: https://habr.com/ru/post/1389655/


All Articles