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.

Comments

Priyadi said…
i think sloccount (http://www.dwheeler.com/sloccount/) automatically discounts comments and documentation when counting LOC
Budi Rahardjo 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

More bad news with Malaysia - Indonesia

I've got more emails and news about bad news between Indonesia and Malaysia. To be exact, there was a news about RELA (not sure what that is) that goes out after Indonesians in Malaysia. There were incidents where they hit Indonesians, rob, and do horrible things. I cannot even write this is my blog. I am so sad and frustrated. What's going on with Malaysia (and Malaysians)? What did we - Indonesian(s) - do to deserve this? I thought there should be less boundary between Indonesia and Malaysia. But ... What's going on there, bro & sis? You know, more Indonesians now feel that they are offended by Malaysians. I can tell you that this bad feeling is increasing. This is a bad publicity towards Malaysia. People are now creating various calling names, such as "Malingsia" (it's a short of "maling" [thief] "siah" [you, Sundanese]), and worse.

Say NO to APJII!

Prolog At the end of 1997, I went back to Indonesia from my studies and work in Canada. The .ID domain management in Indonesia at that time was in a confusing state. Nobody wanted to manage it. Universitas Indonesia (UI) - the original maintainer - was in a fight with APJII (the Association of Indonesian ISP). In the end, IANA gave me a mandate to manage the .ID domain. Since then, I manage the .ID domain with open management. There are problems, but mostly minors. Until recently, when APJII (again) is trying to take over the .ID domain management from my team. Here's a short info to give you a head start. Short summary APJII (the association of ISP in Indonesia) is trying to takeover the .ID domain management in Indonesia. They have tried and will try everything to take over. Long description I've been managing the .ID domain since the end of 1997. At that time, nobody wanted to run the domain management. First of all, a brief description of how we run things. To run the .ID d