Introduction
Maintaining software can become very expensive and time-consuming if the design is poor. Good design helps avoid many problems that cause extra work later, saving time and money.
Imagine building a house with a clear blueprint, using standard parts, and labeling everything well. When something needs fixing, the plumber or electrician can quickly find the right spot and fix it without breaking other things.
┌─────────────────────────────┐
│ Good Design │
├─────────────┬───────────────┤
│ Clear │ Reusability │
│ Structure │ │
├─────────────┼───────────────┤
│ Flexibility │ Documentation │
│ │ and Standards │
└─────────────┴───────────────┘
↓ ↓
Easier Lower
Maintenance Maintenance Costdef add_numbers(a, b):
return a + b
result = add_numbers(3, 4)
print(result)add_numbers that does one job.def calc(x, y):
return x * y + x / y
print(calc(10, 2))Pass the test and this pattern moves unknown