That is really interesting! Here are a few observations I’ve made from looking over all of the data that you’ve kindly produced:
- At about 350k lines of code, the size of the library is pretty substantial. * I don’t really know how project sizes are measured and ranked, but if you believe what’s said here https://softwareengineering.stackexchange.com/a/85248 <https://softwareengineering.stackexchange.com/a/85248> then deal.II falls into the category of a “medium” sized project. * Over the deal.II’s lifetime (~1130 weeks, according to the git log) this equates to about 310 LOC per week added to the core library. If you have a look here https://github.com/dealii/dealii/graphs/code-frequency <https://github.com/dealii/dealii/graphs/code-frequency> then one can see that it sometimes gets pretty busy maintaining all of that code! * One can only imagine how much larger it would have to be if we didn’t leverage so many external libraries to provide the functionality that we do. - In the headers, there’s almost one line of documentation for every line of code. - There is actually more code in header files than source files, but most of this its required due to the the use of templates (and ends up being instantiated and used by the library anyway). - There’s about a 2:3 ratio of documentation and code in the examples, which weigh in at an average of 550 LOC each (of course, in reality the basic tutorials are very small by comparison to the advanced ones). - We’ve got as many lines of code making up tests as there are in the rest of the library. - There is way more CMake than any project should ever have :-D > On 01 Aug 2019, at 18:01, 'Jason Nicholson' via deal.II User Group > <dealii@googlegroups.com> wrote: > > Hopefully, this is a better breakdown. Let me know what you think. > > > > > > > > I analyzed a commit from yesterday, 2019-July-31. The hash is below. > > > > jnicholson@jhnpc001:~/dealii$ git rev-parse HEAD > fa944d20aa6570ce023d3b272bb0bf2016db0512 > > > > Folders in the dealii base directory: > jnicholson@jhnpc001:~/dealii$ ls > CHANGELOG.md CMakeLists.txt CONTRIBUTING.md CTestConfig.cmake Jenkinsfile > LICENSE.md README.md SUPPORT.md VERSION bundled cmake contrib doc > examples include lineCount.sh output.txt source test.sh tests > > > Checking the line count for the "cmake", "doc", "include", "examples", and > "source" folders which make up the library. > > jnicholson@jhnpc001:~/dealii$ cloc cmake doc include examples source > 1964 text files. > 1880 unique files. > 665 files ignored. > > github.com/AlDanial/cloc v 1.74 T=57.26 s (22.7 files/s, 13452.1 lines/s) > ------------------------------------------------------------------------------- > Language files blank comment > code > ------------------------------------------------------------------------------- > C++ 398 43962 56503 > 195017 > C/C++ Header 628 53472 202465 > 185981 > CMake 216 2260 6820 > 9542 > HTML 21 860 5 > 5856 > CUDA 14 668 1019 > 3278 > Perl 8 165 338 > 597 > CSS 2 68 22 > 340 > Bourne Shell 5 64 128 > 268 > XML 1 5 7 > 185 > Markdown 4 33 0 > 73 > TeX 2 34 18 > 60 > Python 2 13 24 > 60 > JavaScript 1 0 1 > 14 > ------------------------------------------------------------------------------- > SUM: 1302 101604 267350 > 401271 > ------------------------------------------------------------------------------- > > > > > > Breaking down the individual contribution of each folder "cmake", "doc", > "include", "examples", and "source" folders which make up the library. > jnicholson@jhnpc001:~/dealii$ cloc cmake > 140 text files. > 140 unique files. > 10 files ignored. > > github.com/AlDanial/cloc v 1.74 T=3.45 s (37.6 files/s, 4126.3 lines/s) > ------------------------------------------------------------------------------- > Language files blank comment > code > ------------------------------------------------------------------------------- > CMake 118 1526 5049 > 6451 > C++ 3 117 155 > 429 > Bourne Shell 3 42 81 > 134 > C/C++ Header 3 16 16 > 61 > Markdown 1 17 0 > 29 > Perl 1 16 69 > 18 > CUDA 1 2 14 > 14 > ------------------------------------------------------------------------------- > SUM: 130 1736 5384 > 7136 > ------------------------------------------------------------------------------- > jnicholson@jhnpc001:~/dealii$ cloc doc > 222 text files. > 222 unique files. > 95 files ignored. > > github.com/AlDanial/cloc v 1.74 T=8.08 s (16.1 files/s, 6090.4 lines/s) > ------------------------------------------------------------------------------- > Language files blank comment > code > ------------------------------------------------------------------------------- > HTML 21 860 5 > 5856 > Perl 6 143 265 > 548 > CMake 6 113 249 > 499 > CSS 2 68 22 > 340 > XML 1 5 7 > 185 > Bourne Shell 1 13 26 > 107 > Markdown 2 15 0 > 40 > C/C++ Header 88 3912 35805 > 30 > Python 1 5 24 > 29 > JavaScript 1 0 1 > 14 > TeX 1 2 18 > 1 > ------------------------------------------------------------------------------- > SUM: 130 5136 36422 > 7649 > ------------------------------------------------------------------------------- > jnicholson@jhnpc001:~/dealii$ cloc include > 540 text files. > 540 unique files. > 2 files ignored. > > github.com/AlDanial/cloc v 1.74 T=14.41 s (37.3 files/s, 27915.2 lines/s) > ------------------------------------------------------------------------------- > Language files blank comment > code > ------------------------------------------------------------------------------- > C/C++ Header 537 49544 166644 > 185890 > CMake 1 5 23 > 25 > ------------------------------------------------------------------------------- > SUM: 538 49549 166667 > 185915 > ------------------------------------------------------------------------------- > jnicholson@jhnpc001:~/dealii$ cloc examples > 503 text files. > 420 unique files. > 365 files ignored. > > github.com/AlDanial/cloc v 1.74 T=14.18 s (9.7 files/s, 5155.8 lines/s) > ------------------------------------------------------------------------------- > Language files blank comment > code > ------------------------------------------------------------------------------- > C++ 66 10192 22562 > 36365 > CMake 66 439 1090 > 1559 > CUDA 1 114 173 > 381 > TeX 1 32 0 > 59 > Python 1 8 0 > 31 > Perl 1 6 4 > 31 > Bourne Shell 1 9 21 > 27 > Markdown 1 1 0 > 4 > ------------------------------------------------------------------------------- > SUM: 138 10801 23850 > 38457 > ------------------------------------------------------------------------------- > jnicholson@jhnpc001:~/dealii$ cloc source > 559 text files. > 559 unique files. > 193 files ignored. > > github.com/AlDanial/cloc v 1.74 T=16.01 s (22.9 files/s, 14463.2 lines/s) > ------------------------------------------------------------------------------- > Language files blank comment > code > ------------------------------------------------------------------------------- > C++ 329 33653 33786 > 158223 > CUDA 12 552 832 > 2883 > CMake 25 177 409 > 1008 > ------------------------------------------------------------------------------- > SUM: 366 34382 35027 > 162114 > ------------------------------------------------------------------------------- > > > > Analysis of the tests folder: > jnicholson@jhnpc001:~/dealii$ cloc tests > 10849 text files. > 9145 unique files. > 5816 files ignored. > > github.com/AlDanial/cloc v 1.74 T=277.92 s (18.1 files/s, 2367.1 lines/s) > ------------------------------------------------------------------------------- > Language files blank comment > code > ------------------------------------------------------------------------------- > C++ 4842 114261 103709 > 399925 > C/C++ Header 84 3254 3014 > 23420 > CUDA 69 1529 1431 > 5671 > CMake 39 205 387 > 884 > MATLAB 2 24 50 > 65 > Python 1 12 17 > 23 > Markdown 1 1 0 > 4 > ------------------------------------------------------------------------------- > SUM: 5038 119286 108608 > 429992 > ------------------------------------------------------------------------------- > > > > > > > On Tuesday, July 30, 2019 at 3:30:40 PM UTC-5, Jean-Paul Pelteret wrote: > Hi Jason, > > Sorry, replying to your message has been on my TODO list for quite some time. > > Thanks for sharing! Those numbers are certainly thought provoking. It would > appear that we (being the collective community) have been putting in a few > minutes here and there to write this FEM library :-D > > The “bundled” folder includes third party libraries, so I think that it would > be disingenuous for one to include those contributions in such an assessment > of the size of the code base. But if you want to get the most representative > figures for the library itself, then the having a line count for the “cmake”, > “doc”, “include”, “examples” and “source” would give the most accurate > representation of the size of the functional part of the library. We already > know that there are on the order of 10000 unit tests, so having an individual > assessment of the “tests” folder would be interesting. If you’re willing to > re-run your analysis while taking my comments into consideration, then I’d > certainly be interested to see the new results! > > Best regards, > Jean-Paul > >> On 06 Jun 2019, at 06:42, 'Jason Nicholson' via deal.II User Group >> <dea...@googlegroups.com <javascript:>> wrote: >> >> I did a quick look at how many lines are in the Deal.ii library using >> "cloc". I thought I would share. >> >> [jnicholson@jhnlt001 dealii-master]$ ls >> bundled CMakeLists.txt CONTRIBUTING.md doc include >> LICENSE.md source VERSION >> cmake contrib CTestConfig.cmake examples Jenkinsfile README.md >> tests >> [jnicholson@jhnlt001 dealii-master]$ cloc . >> 10523 text files. >> 10118 unique files. >> 1045 files ignored. >> >> github.com/AlDanial/cloc <http://github.com/AlDanial/cloc> v 1.74 T=27.75 s >> (341.6 files/s, 81345.2 lines/s) >> --------------------------------------------------------------------------------------- >> Language files blank comment >> code >> --------------------------------------------------------------------------------------- >> C/C++ Header 8467 242546 397541 >> 1194279 >> C++ 633 54291 70135 >> 248811 >> CMake 232 2491 7289 >> 10324 >> HTML 28 888 5 >> 5984 >> CUDA 14 673 1023 >> 3283 >> C 6 366 444 >> 2010 >> Python 16 441 976 >> 1812 >> Assembly 12 173 392 >> 939 >> MATLAB 17 292 716 >> 927 >> Fortran 77 2 338 1309 >> 773 >> Markdown 10 209 0 >> 748 >> Windows Module Definition 1 0 0 >> 718 >> Perl 11 179 379 >> 689 >> make 4 84 69 >> 612 >> Bourne Shell 10 132 355 >> 467 >> XML 4 9 8 >> 437 >> CSS 2 68 22 >> 340 >> Bourne Again Shell 8 74 233 >> 281 >> TeX 2 34 18 >> 60 >> DTD 1 0 6 >> 15 >> JavaScript 1 0 1 >> 14 >> --------------------------------------------------------------------------------------- >> SUM: 9481 303288 480921 >> 1473523 >> --------------------------------------------------------------------------------------- >> >> -- >> The deal.II project is located at http://www.dealii.org/ >> <http://www.dealii.org/> >> For mailing list/forum options, see >> https://groups.google.com/d/forum/dealii?hl=en >> <https://groups.google.com/d/forum/dealii?hl=en> >> --- >> You received this message because you are subscribed to the Google Groups >> "deal.II User Group" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to dea...@googlegroups.com <javascript:>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/dealii/e56fddfc-13ac-4588-bf25-e4e0041ee867%40googlegroups.com >> >> <https://groups.google.com/d/msgid/dealii/e56fddfc-13ac-4588-bf25-e4e0041ee867%40googlegroups.com?utm_medium=email&utm_source=footer>. >> For more options, visit https://groups.google.com/d/optout >> <https://groups.google.com/d/optout>. > > > -- > The deal.II project is located at http://www.dealii.org/ > <http://www.dealii.org/> > For mailing list/forum options, see > https://groups.google.com/d/forum/dealii?hl=en > <https://groups.google.com/d/forum/dealii?hl=en> > --- > You received this message because you are subscribed to the Google Groups > "deal.II User Group" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to dealii+unsubscr...@googlegroups.com > <mailto:dealii+unsubscr...@googlegroups.com>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/dealii/608455ab-b3f9-4dfd-99a3-73f73357fc86%40googlegroups.com > > <https://groups.google.com/d/msgid/dealii/608455ab-b3f9-4dfd-99a3-73f73357fc86%40googlegroups.com?utm_medium=email&utm_source=footer>. -- The deal.II project is located at http://www.dealii.org/ For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en --- You received this message because you are subscribed to the Google Groups "deal.II User Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to dealii+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/B5220A0A-82B8-481A-B9D5-AE3BDA1E38FE%40gmail.com.