SLOC is "Software lines of code" and is an old measure of productivity when taken as lines of code written per day. There is lots of debate about its use, whether its good etc. But when comparing like for like, it should give valid results.
I once worked out that there were something like 20 lines of code a day developed in EAI at my last client (with say 300,000 lines of code in total). We said it wasn’t too bad, compared to the old days of OS development quoted as around 5 LOC per day…
I’m reviewing a project here with around 160,000 LOC (thats an assumption that the GUI is the same as the back end, which is around 82,000 LOC). It was developed in 5 months over 820 man days. That makes around 200 LOC a day, so ten times more quickly developed than on the EAI project. It includes generated code, but probably as much as the EAI tool gives you, showing that if you want to build an SOA, that old EAI tool is slow to develop with.
I then took a look at the maxant demo I did. It has around 36,000 LOC (again an assumption that the GUI has the same amount of code as the back end which is around 18,000 lines), and I did that in around 70 man days. So that’s around 500 LOC a day.
Both the project I’m now reviewing and the maxant demo have 150 lines per class helping to show that they are comparible (as well as them both being SOA, J2EE and three tiered).
What is also noteworthy here is that the EAI project did not have much budget for testing, but did have a large budget (forced on the customer!) due to bug fixes, changes and production support (due to poor error handling that was never fixed). The other two projects had large amounts of testing before release, and hence little production support and few changes or bug fixes. To me, this indicates that doing lots of testing certainly increases the productivity when measured as LOC per day, compared to a little amount of testing which is known to cause more effort at the end for bug fixes and unplanned changes.
Finally, the reason for maxant Demo being more productive has less to do with me being clever, than it being developed using a single developer. It is well known that the fewer lines of communication there are, the more efficient projects run, and it cant get more efficient than with one developer who is the architect, project manager and customer as well! So the lesson here is to design your systems as components which are as independant as possible. This is exactly the reason OO was invented and "design by contract" became popular.
Leave a Reply