× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Cautionary tale about using NLOC (Number of Lines Of Code) measurements

Many years ago, a friend of mine was working on a project developing a low-level microcontroller program in assembler language. Before he joined the project, the team was very proud of the fact that they had produced over 25,000 lines of assembler code, and they wanted to protect this investment. But, they were hopelessly stuck debugging this code, as it was "a mess" (to put it mildly). My friend's proposal was to toss it out and start over, with a "clean slate," from the ground up, using the knowledge gained from that first "prototype". They argued strenuously about the cost of throwing away the many man-hours invested in this 25,000 lines of code.

Then, my friend quickly wrote a little program to scan the source code and count only those lines of code that were not "comments" (in most assembler languages, it is easy to distinguish comment lines from normal lines -- similar to the "*" in column 7 of RPG III). As it turned out, their "pride and joy" contained less than 8,000 actual lines of code -- all the rest were comments.
Once this fact was presented to upper management, the decision was quickly made to throw out the "prototype" and proceed with the new design.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.