Skip to main content
  1. Resources/
  2. Study Materials/
  3. Information & Communication Technology Engineering/
  4. ICT Semester 5/
  5. Software Engineering (4353202)/

4 mins· ·
Milav Dabgar
Author
Milav Dabgar
Experienced lecturer in the electrical and electronic manufacturing industry. Skilled in Embedded Systems, Image Processing, Data Science, MATLAB, Python, STM32. Strong education professional with a Master’s degree in Communication Systems Engineering from L.D. College of Engineering - Ahmedabad.
Lecture 26: Metrics for Size Estimation (LOC & Function Points)

Lecture 26: Metrics for Size Estimation (LOC & Function Points)

Unit 4: Software Project Management (4353202)

Lecture Agenda

  • Recap of Project Manager Responsibilities
  • What is Project Size Estimation?
  • Importance of Size Estimation
  • Metric 1: Lines of Code (LOC)
  • Metric 2: Function Points (FP)
  • Components of Function Points
  • Advantages and Disadvantages of LOC vs. FP
  • Key Takeaways

Recap of Project Manager Responsibilities

Software Project Managers are responsible for planning, organizing, leading, controlling, communicating, and managing risks to ensure successful project delivery.

What is Project Size Estimation?

Project size estimation is the process of predicting the amount of effort, time, and resources required to develop a software system. It is a crucial step in project planning.

Accurate size estimation is fundamental for effective project management, including scheduling, budgeting, and resource allocation.

Importance of Size Estimation

  • Accurate Planning: Provides a basis for realistic schedules and budgets.
  • Resource Allocation: Helps in determining the number of people and other resources needed.
  • Risk Management: Early identification of potential project risks related to size and complexity.
  • Performance Measurement: Allows for tracking project progress and productivity.
  • Decision Making: Supports go/no-go decisions for projects.

Metric 1: Lines of Code (LOC)

Lines of Code (LOC) is one of the oldest and most intuitive metrics for software size estimation. It measures the size of a software program by counting the number of lines in the source code.

  • Physical LOC: Counts every line of text in the program, including comments and blank lines.
  • Logical LOC: Counts executable statements, excluding comments and blank lines.

Advantages of LOC

  • Easy to Measure: Once the code is written, it's straightforward to count.
  • Intuitive: Easy for non-technical stakeholders to understand.
  • Historical Data: Many organizations have historical data based on LOC, which can be used for future estimations.

Disadvantages of LOC

  • Language Dependent: A function implemented in C++ might take fewer lines than in Java or Python.
  • No Direct Relation to Effort: A complex line of code might take more effort than several simple lines.
  • Difficulty in Early Estimation: Cannot be accurately measured until coding is well underway.
  • Does Not Account for Quality: More lines of code do not necessarily mean better quality or more functionality.
  • Counting Conventions Vary: Different organizations may have different rules for counting LOC.

Metric 2: Function Points (FP)

Function Points (FP) is a software size estimation metric that measures the functionality provided to the user, based on the system's external interfaces and logical design.

It is independent of the programming language, development technology, or project methodology.

Components of Function Points

Function Points are calculated by counting five types of user functions and adjusting them for complexity:

  • External Inputs (EI): Data or control information entering the system from outside. (e.g., user login screen, data entry form)
  • External Outputs (EO): Data or control information leaving the system. (e.g., reports, error messages)
  • External Inquiries (EQ): A request that retrieves data from the system. (e.g., search query, help screen)
  • Internal Logical Files (ILF): Logical files or data groups maintained within the system. (e.g., customer database, product catalog)
  • External Interface Files (EIF): Logical files or data groups referenced by the system but maintained by another system. (e.g., external payment gateway data)

Function Point Calculation (Simplified)

1. Count the number of occurrences for each of the five components.

2. Assign a complexity weight (simple, average, complex) to each count.

3. Sum the weighted counts to get the Unadjusted Function Points (UFP).

4. Apply a Value Adjustment Factor (VAF) based on 14 general system characteristics (e.g., data communication, distributed processing, performance). This results in the final Function Points (FP).

FP = UFP * VAF

Advantages of Function Points

  • Language Independent: Can be estimated early in the SDLC, even before coding begins.
  • Business-Oriented: Focuses on the functionality delivered to the user, making it easier for business stakeholders to understand.
  • Consistent: Provides a more consistent measure of size across different projects and technologies.
  • Better for Comparison: Allows for benchmarking and comparison of productivity across different teams or projects.

Disadvantages of Function Points

  • Subjectivity: Counting and complexity assignment can be subjective and require trained personnel.
  • Time-Consuming: Can be more complex and time-consuming to calculate than LOC.
  • Not Widely Understood: Less intuitive for non-technical people compared to LOC.
  • No Standard Tool: Lack of widely accepted automated tools for FP counting.

Key Takeaways

  • **Project size estimation** is vital for effective project management.
  • **LOC** is simple but language-dependent and hard to estimate early.
  • **Function Points** measure functionality delivered, are language-independent, and can be estimated earlier.
  • Choosing the right metric depends on the project context and available data.

Next Lecture

Topic: Project Estimation Techniques - Empirical (COCOMO)

Q & A

Questions & Discussion