Line of code in software engineering :- MotaBro

What is Line Of Code In Software Engineering

Line Of Code in Software Engineering (LOC) is also Known as Source Line Of Code. Line Of Code(LOC) is a software metric which is used to measure the size of a program of the computer by counting the number of lines.
Line Of Code(LOC) is generally used to envision(prediction) the amount of effort that will be required to develop a program. As well as LOC(Line Of Code) is used to estimate programming productivity or maintainability once the software is produced.

Explanation:- Line Of Code

Line of Code is important I can say most important in Software Size Estimation. By LOC we can easily count the source lines present in the program. So let discuss the Lines Of Code it advantages and disadvantages and many more. So Let’s Start

The LOC (Line Of Code) meaning is as simple as its meaning, Lines Of Code count the total number of lines of source code in a project.
In LOC(Lines of code) the size is estimated by comparing it with the existing systems of the same kind. The programmers use it to envision (predict) the required size of various components of software and then add them to get the total size. LOC is accepted by the whole universe and The LOC is used in many models for example cocomo. Lines of Code is very simple to use. Most of the experts suggest LOC for counting the source of line in the program.

LOC counts the total lines source presents in the the program which is written by us(programmer). By counting the source of lines in a program we can say the size of that program. As much as the codes are present in the program, so that much will be the the size of the program.

What We Count in Program by Using Lines Of Code

In Lines Of Code (LOC) every type of the declarations of the variable is counted. The LOC (Lines of code) count the Actual code which included the logic and the computation. Means if in a program there is an Arithmetic operation or the programmer is applying any logic to implement the software function than that code will be counted as a Lines Of Code. But there is some code present in the source code that is not counted in LOC(Lines of Code). And that lines are Blanks Lines and Comment Lines.

Now Let’s see the examples of LOC(Lines of Code)

Line of Code in software engineering example

In the above given example we have:

  • Four(4) Physical Lines of Code (PLOC)
  • Two (2) Logical Lines of Code (LLOC)
  • One (1) comment line

Now lets the example in another form and count the source line via LOC

Line of Code in software engineering example

In this example we have:

  • (One) 1 Physical Source Line of Code (LOC)
  • (Two) 2 Logical Lines of Code (LLOC) (for statement and printf statement)
  • (One) 1 comment line

Advantages Of Line Of Code

The LOC contains many Advantages they are as follows:-

  • Lines Of Code(LOC) is widely used and universally accepted.
  • The LOC(Line Of Code) permits a comparison of size and productivity metrics between diverse development groups.
  • The end product is directly related to LOC.
  • The LOC(Lines of Code) are easily measured upon project completion.
  • SLOC (Source Line Of Code) measures software from the developer’s point of view- what he actually does
  • In SLOC Continuous improvement activities exist for estimation techniques.

Disadvantages Of Line Of Code

  • In LOC it is difficult to measure the SLOC in the early stages of a new project.
  • In LOC the Source instructions vary with programming languages, designing methods and with the programmer’s ability.
  • In LOC there is no industry standard for measuring.
  • The Lines of code(LOC) can’t be used for normalizing if platforms and languages are different.
  • There is the only way to predict LOC for a new app to be developed is through analogy based on a similar software application.
  • The experts of programming (programmers) are rewarded for writing more Lines Of Code(LOC) which is based upon a misconception of higher management by thinking that more the LOC, means more the productivity of the programmer.

Thanks for reading our article What is Lines Of Code in Software Engineering. If you have any question or suggestion related to this article please comment down I will try to answer it as soon as possible.
If you want to know about Software Size Estimation and Function Point click on the given link.
Project Metrics, Process Metrics, Product Metrics

If you want to read this article in Hindi please visit on the given link chotabro.com

Speak Your Mind

*