IT242 Software Design and Development

Software Design and DevelopmentUnit 111 min read

Software Engineering: Definitions, Challenges & Principles

Unit 1 of Software Design and Development introduces the core concepts of software engineering, distinguishing it from programming, exploring its challenges, and explaining key principles like abstraction, modularity, and maintainability. This note covers definitions, the software crisis, the evolution of software engi

TAKEAWAYS:

  • Software engineering is a disciplined approach to building software systems, combining engineering principles with computer science to manage complexity and quality.
  • The software crisis (high failure rates, late deliveries, and cost overruns) led to the formalization of software engineering as a structured field.
  • Abstraction, modularity, and reusability are core principles that help manage complexity in large-scale software systems.
  • Software engineering processes (requirements, design, implementation, testing, and maintenance) follow structured models like the Waterfall, V-Shaped, and Agile to ensure systematic development.
  • Real-world applications of these principles are visible in apps like eSewa (modular payment processing) and Khalti (secure transaction abstraction).
  • Exam questions often test definitions, comparisons (e.g., programming vs. software engineering), and real-world applications of these concepts.

1. What is Software Engineering?

Software engineering is the application of systematic, disciplined, and quantifiable approaches to the development, operation, and maintenance of software systems. Unlike traditional programming, it focuses on scalability, reliability, and maintainability while managing complexity.

Key Differences: Programming vs. Software Engineering

Aspect Programming Software Engineering
Focus Writing code for specific tasks Building entire systems with structured processes
Scale Small scripts or single applications Large-scale systems (e.g., banking software)
Approach Ad-hoc, creative coding Systematic, documented, and repeatable processes
Maintenance Often ignored Critical (up to 70% of software lifecycle)
Tools & Methods Editors, compilers UML, Agile, DevOps, version control (Git)

2. The Software Crisis: Why Do We Need Software Engineering?

Before the 1960s, software development was chaotic, leading to:

  • Late deliveries (e.g., IBM’s OS/360 project was delayed by years).
  • High failure rates (e.g., Ariane 5 rocket explosion due to a software bug).
  • Unmaintainable code (e.g., legacy systems with no documentation).

The NATO Software Engineering Conference (1968) formally defined software engineering to address these issues.

Real-World Example: eSewa’s Payment System

eSewa, Nepal’s leading digital payment platform, uses modular software engineering to handle:

  • Abstraction: Users interact with a simple UI while complex backend processes (banking, security) run invisibly.
  • Modularity: Payment processing, user authentication, and fraud detection are separate modules, making updates easier.
  • Maintainability: Well-documented code allows quick bug fixes (e.g., during Diwali sales spikes).

3. Principles of Software Engineering

Software engineering relies on four fundamental principles to manage complexity:

1. Abstraction

Hides complex details behind simple interfaces. Example:

  • In WhatsApp, users send messages without knowing how encryption (E2E) or server routing works.
  • In Ncell’s billing system, customers see a simple bill, but the backend handles tariffs, taxes, and discounts.

2. Modularity

Breaks software into independent modules (components) that can be developed, tested, and reused. Example:

  • Daraz’s order processing system has modules for:
    • User authentication
    • Inventory management
    • Payment gateway
    • Shipping logistics Each module can be updated without breaking others.

3. Reusability

Uses existing components to reduce development time. Example:

  • Google’s Android OS reuses libraries (e.g., for GPS, camera) across millions of apps.
  • Nepal Rastra Bank’s core banking software is reused by multiple commercial banks.

4. Maintainability

Ensures software can be updated, fixed, and improved easily. Example:

  • Pathao’s ride-hailing app undergoes frequent updates (new payment methods, safety features). Poor maintainability would make this impossible.

4. Software Engineering vs. Programming: A Worked Example

Let’s compare how a bank loan interest calculator is built in both approaches.

Programming Approach (Ad-hoc)

# Simple Python script (no structure)
def calculate_interest(principal, rate, time):
    return principal * rate * time / 100

amount = calculate_interest(10000, 5, 2)
print("Interest:", amount)

Problems:

  • No documentation → hard to modify later.
  • No error handling (e.g., negative rates).
  • Tied to a single bank’s logic.

Software Engineering Approach (Structured)

  1. Requirements: Define inputs (principal, rate, time), outputs (interest), and edge cases (late payments).
  2. Design:
    • Module 1: Input validation (checks for negative values).
    • Module 2: Interest calculation (supports simple/compound interest).
    • Module 3: Reporting (generates PDF statements).
  3. Implementation:
    class LoanCalculator:
        def __init__(self, principal, rate, time):
            self.principal = principal
            self.rate = rate
            self.time = time
    
        def validate(self):
            if self.principal <= 0 or self.rate < 0:
                raise ValueError("Invalid input")
    
        def calculate_simple_interest(self):
            self.validate()
            return self.principal * self.rate * self.time / 100
    
        def generate_report(self):
            return f"Loan: {self.principal}, Interest: {self.calculate_simple_interest()}"
    

Advantages:

  • Reusable: Can be extended for mortgages, car loans.
  • Maintainable: Easy to add new features (e.g., tax calculations).
  • Scalable: Works for a single bank or a fintech like Nepal Investment Bank’s digital platform.

5. The Software Development Life Cycle (SDLC)

Software engineering follows a structured lifecycle to ensure quality. The Waterfall Model (linear) and Agile Model (iterative) are two common approaches.

Waterfall Model (Sequential)

flowchart TD
    A["Requirements"] --> B["Design"]
    B --> C["Implementation"]
    C --> D["Testing"]
    D --> E["Deployment"]
    E --> F["Maintenance"]

Problems:

  • No going back (e.g., if testing fails, you must restart from requirements).
  • Rigid for changing requirements (e.g., NTC’s fiber rollout needed flexibility).

Agile Model (Iterative)

flowchart LR
    A["Plan"] --> B["Develop"]
    B --> C["Test"]
    C --> D["Review"]
    D -->|"Feedback"| A

Used by:

  • Khalti: Releases features in sprints (e.g., UPI integration, QR code payments).
  • Daraz: Uses Agile to update inventory systems during sales events.

Comparison Table

Model Flexibility Best For Example in Nepal
Waterfall Low Stable requirements NEPSE’s trading system
Agile High Dynamic projects eSewa’s feature updates

6. Challenges in Software Engineering

Despite structured methods, software projects face challenges:

  1. Complexity: Modern systems (e.g., Ncell’s 4G network) have millions of lines of code.
  2. Changing Requirements: Users may demand new features mid-project (e.g., Pathao adding auto-rickshaw support).
  3. Maintenance Costs: Up to 70% of a software’s lifecycle is spent maintaining it.
  4. Security Risks: Khalti’s 2021 breach highlighted the need for secure coding practices.

Solution: Software engineering provides methods (UML, Agile), tools (Git, JIRA), and standards (ISO/IEC 12207) to mitigate these risks.


7. Real-World Applications of Software Engineering Principles

Example 1: eSewa’s Payment Abstraction

  • Principle: Abstraction
  • How it works:
    • User sees: "Pay Rs. 500 to Merchant X".
    • Behind the scenes:
      • Module 1: Authenticates user via PIN/OTP.
      • Module 2: Deducts from bank/Khalti wallet.
      • Module 3: Credits merchant’s account.
      • Module 4: Sends confirmation SMS.
  • Why it matters: Users don’t need to understand the 3D Secure protocol or bank reconciliation processes.

Example 2: Daraz’s Order Queue (Modularity)

flowchart TD
    A["User Places Order"] --> B["Order Queue"]
    B --> C["Payment Module"]
    C -->|"Success"| D["Inventory Module"]
    D -->|"Stock Available"| E["Shipping Module"]
    E --> F["Order Fulfilled"]
  • Problem: During Dashain sales, Daraz processes 10,000+ orders/hour.
  • Solution:
    • Modular design ensures one module’s failure (e.g., payment gateway) doesn’t crash the entire system.
    • Load balancing distributes orders across servers.

Example 3: NTC’s Fiber Optic Network (Maintainability)

  • Principle: Modularity + Documentation
  • How it works:
    • Layer 1 (Physical): Fiber cables (see below).
    • Layer 2 (Data Link): Ethernet protocols.
    • Layer 3 (Network): IP routing.
    • Layer 4 (Application): Customer portal.
  • Why it matters: When a cable is damaged in Kathmandu, only the physical layer needs repair; other layers remain functional.

*fiber optic cable cross-section*Layers of a fiber optic cable used in NTC’s backbone network. (Image: J.P.Lon at English Wikipedia, CC BY 2.5, via Openverse)


8. Tools and Techniques in Software Engineering

Category Tools/Techniques Example Use Case
Version Control Git, GitHub, GitLab Ncell’s app updates (track changes across 50+ developers).
Project Management JIRA, Trello, Asana Daraz’s sprint planning for Black Friday.
Design UML (Unified Modeling Language) eSewa’s system architecture diagrams.
Testing Selenium, JUnit, Postman Khalti’s API testing for security flaws.
Collaboration Slack, Microsoft Teams Nepal Investment Bank’s remote teams.

Exam Tip

  1. Definitions: Know the difference between programming and software engineering. Expect questions like:

    • "Why is software engineering considered an engineering discipline?"
    • "What was the main cause of the software crisis?"
  2. Real-World Applications: Relate concepts to Nepali apps/companies:

    • eSewa → Abstraction (hiding payment complexity).
    • Daraz → Modularity (order processing system).
    • NTC → Maintainability (fiber network layers).
  3. Diagrams: Be ready to draw:

    • SDLC models (Waterfall, Agile).
    • Module interaction diagrams (e.g., eSewa’s payment flow).
  4. Short Answer Questions:

    • "List four principles of software engineering." → Abstraction, Modularity, Reusability, Maintainability.
    • "What is the role of documentation in software engineering?" → Ensures maintainability and knowledge transfer.
  5. Case Studies: If given a scenario (e.g., "A bank’s loan system is hard to update"), diagnose the issue (likely poor modularity) and suggest solutions (refactor into modules, add documentation).


Final Note: Software engineering is not just coding—it’s about building systems that last. Master these principles, and you’ll excel in exams and real-world projects!

Based on the TU BIM syllabus for Software Design and Development (IT242), unit 1.

Discussion

Loading…