CLOSE
Updated on 19 Jun, 202625 mins read 30 views

Most people begin learning software development by learning a programming language:

#include <iostream>

int main() {
	std::cout << "Hi universe";
}

They they learn:

Variables
Functions
Loops
Classes
Data Structures
Algorithms

Eventually they can write programs.

However, a surprising realization occurs when they join a real software company:

The ability to write code is not the same as the ability to design software.

Many developers can write code.

Far fewer can design systems that:

  • survive for years,
  • evolve with changing requirements,
  • remain understandable,
  • remain maintainable,
  • scale with complexity,
  • support multiple developers.

Everything else in Low-Level Design (LLD) builds on top of this idea.

Before learning SOLID, UML, Design Patterns, Domain modeling, or Architecture, you must understand:

Why software design exists in the first place.

A Historical Perspective

To understand software design, we must first understand the problem it was created to sovle.

The Early Days of Programming

In the early days of computing, software was relatively small.

A typical program might contain:

100 lines
500 lines
1000 lines

Often written by a single person.

Example:

Input
 тЖУ
Processing
 тЖУ
Output

Simple.

The entire program could fit inside one file.

Developers could understand the entire system in their heads.

Design was less important.

Software Grew

Over time software became larger.

Instead of:

1 file

we had:

100 files

Then:

10000 files

Now consider systems like:

  • Operating Systems
  • Databases
  • Browsers
  • Cloud Platforms
  • Banking Systems

These contain:

Millions of lines of code

No single human understands everything.

A new problem emerged: Complexity

The Real Enemy: Complexity

Many beginners think the hardest part of software engineering is:

Algorithms

or

Programming Languages

In reality, the biggest challenge is: Managing Complexity

Example: A Small Program

int add(int a, int b)
{
	return a + b;
}

Easy.

No design needed.

Example: An E-Commerce Platform

Now imagine:

Users
Products
Inventory
Orders
Payments
Coupons
Notifications
Shipping
Returns
Taxes
Reviews
Analytics
Recommendations

Suddenly:

Everything interacts with everything.

Complexity explodes.

Complexity Growth

Complexity does not grow linearly.

Imagine:

1 component
Interactions 0

2 components
Interactions 1

5 components
Interactions 10

100 components
Interactions 4950

The challenge is no longer writing code.

The challenge becomes:

Managing relationships

What is Software Design?

Definition 1

Software design is:

The process of organizing software components and their interactions.

This is correct but incomplete.

Definition 2

Software design is:

The process of transforming requirements into a maintainable software structure.

Better.

Professional Definition

Software design is:

The deliberate creation of structures, abstractions, responsibilities, interfaces, and interactions that allow software to solve problems while remaining maintainable, extensible, understandable, and reliable.

Notice something important.

The definition says:

Structure
Responsibilities
Interactions
Maintainability

Not:

Syntax
Language Features
Code Tricks

Design is about decisions.

Not typing.

Programming vs Software Design

One of the biggest misconception among developers:

Programming and software design are the same thing.

They are not.

Programming asks:

How do I implement this?

Example:

std::sort(v.begin(), v.end());

Implementation concern.

Software design asks:

Should sorting happen here?
Who owns this data?
Which object is responsible?
How should modules communicate?
How will this evolve in 3 years?

Design concern.

Analogy: Construction Industry

Imagine building a skyscraper.

Construction Worker

Responsible for:

Pouring concrete
Installing pipes
Wiring electricity

Equivalent to programming.

Architect

Responsible for:

Building structure
Room layout
Load distribution
Future expansion

Without architects:

Construction becomes chaos.

Without software design:

Code becomes chaos.

The Core Goals of Software Design

Good design exists to achieve specific goals.

Goal 1: Maintainability

Definition

Maintainability is:

How easily software can be understood, modified, fixed, and extended.

Example

Bad code:

if(type == 1)
{
}
else if(type == 2)
{
}
else if(type == 3)
{
}
else if(type == 4)
{
}
else if(type == 5)
{
}

Every new feature requires modification.

Maintenance becomes painful.

Good design:

PaymentProcessor
    |
    +---- CreditCardProcessor
    +---- UPIProcessor
    +---- WalletProcessor

Adding new behavior becomes easier.

Maintainability is often the most important goal of software design.

Goal 2: Understandability

Software is read far more often than it is written.

A common estimate:

Read : Write
10 : 1

or higher.

Therefore software should communicate intent.

Bad:

x();
y();
z();

Good:

validateUser();
calculateInvoice();
sendNotification();

Design influences readability.

Goal 3: Extensibility

Requirements change constantly.

Imagine:

Today:
Credit Card Payment

Tomorrow:

UPI
Wallet
Net Banking
Crypto

Good design allows growth.

Bad design resist change.

Goal 4: Reusability

Good software avoids duplication.

Instead of:

Same logic repeated
20 times

we create reusable abstractions.

Example:

class Logger {
};

Used everywhere.

Goal 5: Reliability

Good design reduces bugs.

Poor design creates:

Unexpected Side Effects

Good boundaries improves correctness.

Goal 6: Testability

Can the software be tested easily?

Bad design:

Everything connected

Hard to test.

Good design:

Independent components

The Cost of Change

One of the most important ideas in software engineering.

Imagine changing software.

Day 1

Easy.

1 file

Year 1

Harder.

50 files

Year 5

Very expensive.

5000 files

Without good design:

Every change becomes dangerous.

Technical Debt

Definition

Technical Debt is:

The future cost created by choosing an easier design today.

Example

Fast solution:

 if(type == "credit")
{
}
else if(type == "upi")
{
}

Works today.

But after:

20 payment methods

it becomes a nightmare.

The shortcut accumulates debt.

Like financial debt:

Borrow Today
Pay Later

Technical debt means:

Move Faster Today
Pay More Tomorrow

Design is About Decisions

Many developers think design means diagrams.

Not necessarily.

Design is fundamentally:

A series of decisions.

Examples:

Where should this logic live?

Which object owns this data?

Should inheritance be used?

Should composition be used?

What responsibilities belong here?

How should modules communicate?

The Three Levels of Design

Software design exists at multiple levels.

High-Level Design (HLD)

Focus:

Entire System

Question:

Services?

Databases?

Caches?

Message Queues?

Low-Level Design (LLD)

Focus:

Classes
Objects
Interfaces
Modules

Questions:

Responsibilities?

Relationships?

Abstractions?

Code Level

Focus:

Implementation

Questions:

Algorithms?

Syntax?

Data Structures?

Mental Model: Software as a City

Imagine software as a city.

High-Level Design

Roads
Districts
Bridges
Infrastructure

Low-Level Design

Buildings
Rooms
Doors
Connections

Code

Bricks
Concrete
Wires

Most developers focus on bricks.

Architects focus on structure.

Industry Perspective

In professional software engineering:

Coding is necessary
Design is leverage

A well-designed system allows:

10 developers

to work effectively.

 

Buy Me A Coffee

Leave a comment

Your email address will not be published. Required fields are marked *

Your experience on this site will be improved by allowing cookies Cookie Policy