Skip to main content

Lines of Code (LOC) Review Questions

My team was asked to do a source code review of a large application. This is actually the third (or probably mode) time we are doing a source code analysis. Our past experience was with smaller code. This time the code is around 2.5 million lines. Now, time for some questions.

How many lines can a good programmer/source code reviewer read in a day?
Is there a rule of thumb / best practice on this?

What is usually the portion of actual code compared to comments (and other non-executing component)? We were joking predicted that the number of actual codes that we have to review is probably only 5oo thousands lines. The 2 million lines were mostly comments and documentation. :D That would be nice.

To be frankly I don't like the LOC approach, but that's the only measure we can use. Is there other measurements? We had a discussion before and came up with some ideas, such as as the number of modules or functions. But they still depend on the size of the modules which could vary.

Now let's talk about the use of tools to generate code automatically. In our case, all of the codes were generated by hand, but there will be cases where the codes were actually generated from (GUI-based) tools. For this case, LOC approach does not make sense, or does it? What measurement can we use for this case? Number of blocks or elements in the diagram?

What's your opinion on this? Pointers to other resources are appriciated.


Priyadi said…
i think sloccount ( automatically discounts comments and documentation when counting LOC
budi said…
Ok. That tool is useful, but it still supports the notion that Lines of Code (LOC) is a good measurement.
monn said…
google "code metric"
yohanes said…
May be my comment is a bit late

I think it depends on the person, a very good person (like Bu I*** from Informatics Department) could check about 150.000 lines of moderately commented code in just a month. And this is a real world enterprise Java application used by a large company, (and she does a line by line checking for checking bugs and program inconsistencies).

From my experience, i think i could do more than 5000 lines of code in a day.

Popular posts from this blog

Himbauan Kepada Hacker & Cracker Indonesia & Malaysia

Kepada Hacker & Cracker Indonesia & Malaysia,

Saya mengharapkan anda tidak melakukan penyerangan atau/dan pengrusakan situs-situs Indonesia dan Malaysia.

Saya mengerti bahwa akhir-akhir ini beberapa masalah di dunia nyata membuat kita kesal dan marah. Namun kekesalan tersebut sebaiknya tidak dilimpahkan ke dunia maya (cyberspace). Semestinya sebelum melakukan aksi yang berdampak negatif, kita bisa melakukan langkah-langkah positif seperti melakukan dialog (melalui email, mailing list, bulletin board, blog, dan media elektronik lainnya).

Kita harus ingat bahwa kita hidup bertetangga dan bersaudara. Yang namanya hidup bertetangga pasti mengalami perbedaan pendapat. Mari kita belajar bertetangga dengan baik.

Saya berharap agar kita yang hidup di dunia maya mencontohkan bagaimana kita menyelesaikan permasalahan dengan kepala dingin dan hati yang lapang, sehingga para pemimpin kita di dunia nyata dapat mencontoh penyelesaian damai. Mudah-mudahan mereka dapat lebih arif dan bijaksana da…

Yummy ...

[seafood lamien @ banquet, singapore]

Books, books, books

A snapshot of stacks and shelves of books that I have to read. The stack on the right side is actually on a chair. You can't see the bottom of it. It's a mess. Actually, it shows that I read them.