Managers like numbers. Source Lines of Code (SLoC) is such a number. Today I counted the number of sourcelines written by me for peach³.
These statistics include the peach3-django, peach3-compare and django-pdfviewer packages.
- Python: 22247 lines
- Javascript: 12146 lines
- html: 4473 lines
- css: 2343 lines
That’s a total of 41209 lines of code, written in just under 3 years.
Tags: SLoC
Hi,
You mention django-pdfviewer in this post. I cannot find the sourcecode in the trac for peach³. Maybe you can point me to where I can find it?
Would be really nice! Thanks.
No it’s not in trac, since it has a seperate mercurial repository, and trac can only be linked to one repository.
The repository is at http://hg.peach3.nl/
I’m planning on making a real release for django-pdfviewer someday. Currently its still a bit rough in some places.
I don’t know exactly what was the intent of the post, but I’ll comment on the metric itself.
The number of SLoC is a flawed metric for any piece of software: it abstracts many of the underlying complexity present in the craft of creating software. Depending on the skills and experience of the developer(s) writing the code, the exact same functionality can be written with a very different SLoC number count.
How do we measure complexity ? Is complexity rather than the raw physical size of the codebase a better metric for the “size” of a piece of software ?
Of course there are algorithms to measure such things as cyclomatic complexity, but that does not evaluate the inherent complexity of the software, but the complexity within the logical paths coded in the application. More often than not, high numbers for such a metric is just a sign that something is wrong with the code : clean code will almost always tend to have a lower score for these analysis.
That’s exactly my point in my latest post (http://peach3.nl/blog/2010/03/largest-open-source-django-project/ )
For a Django project, a metric like the number of apps or models could be a better metric
Hi, Just wondering how you generated the metrics above – using sloccount per directory?
No, these metrics were done real quick with a bit of cat, grep, sed and wc.