Maintenance and the end of life · lesson 1 of 7
Ideas in this lesson
ACorrective · adaptive · perfective · preventivethe four kinds of maintenance
BLehman’s lawsused software must change, and grows more complex unless worked on

Most of the work comes after launch

Last updated

Launch day felt like the finish line. It was a third of the way. Software that people use gets changed for as long as they use it: bugs are found, the world around it moves, and users ask for more. In this lesson you'll name the four kinds of maintenance, sort Pila's second-year requests into them, look honestly at what the studies say about how much effort maintenance takes, and meet Lehman's laws of how software ages.

By the end of this lesson you can

  • Name and recognise the four kinds of maintenance
  • Say what the evidence on maintenance effort shows, and how sure it is
  • Explain Lehman’s laws of continuing change and increasing complexity, in plain words

Pila’s whole life

Building is what courses, books and news stories are about. But a useful program lives for years after it's built. Here's Pila's life, imagined from start to finish:

  1. Year 0 Plan, design, build Build
1 of 6 Year 0. Eight months from Kap. Ernesto’s first meeting to launch: everything in Stages 3 to 7.

Launch was about a third of the way along the timeline, and most of the work came after it. The rest of this stage is about that long stretch.

Four kinds of maintenance

Maintenance is everything done to software after it's delivered. The international standard for it, ISO/IEC/IEEE 14764, and the SWEBOK Guide describe four main kinds:

The kinds of maintenance
KindWhyPila example
CorrectiveFix a fault that was foundTwo phones got the same number after a cancel
AdaptiveKeep working as the environment changesThe SMS provider’s new API; a new Python version
PerfectiveImprove it or add to it for usersThe vaccination schedule; a faster counter page
PreventiveFix problems before they cause failuresRefactor the queue module; add missing tests

Only the first is “fixing bugs”. Most maintenance is changing software that works, because what's wanted from it has changed.

Sort the second year’s requests

0 of 10 placed right

  1. Two phones got the same number after a cancel

  2. The SMS provider replaces its old API, which stops working in March

  3. Ate Cora asks for a vaccination schedule

  4. Refactor the queue module before adding more rules to it

  5. Python 3.12 reaches its end of life; move to 3.14

  6. The screen shows a wrong number after midnight

  7. Make the counter page faster for the new, slower tablet

  8. Add tests for the priority lane, which never had any

  9. New Data Privacy rules require deleting phone numbers after 90 days

  10. Show the expected waiting time in the reply

How much of the work is maintenance?

You'll often read that maintenance is “60%”, “70%” or “90%” of a system's total cost. Be careful with these.

The best-known early evidence comes from surveys of data-processing managers by Bennet Lientz and Burton Swanson in the late 1970s; the largest, published as a book in 1980, covered nearly 500 organisations. Managers estimated that roughly half of their staff's time went to maintaining existing systems, and that most of that was improvements for users, not bug fixes. It was a survey of estimates, of one kind of software, decades ago.

Later studies give different shares, partly because they count different things: is adding a feature to a live system “maintenance” or “development”? The honest summary:

  • Solid: most systems that get used are changed for years, and the work after launch usually exceeds the work before it.
  • Shaky: any single exact percentage, especially one quoted without a source.

Lehman’s laws

From the 1970s, Meir “Manny” Lehman studied how large programs changed over many releases. His laws, in plain words, include:

  • Continuing change. Software that is used in the real world must keep changing, or it becomes steadily less useful. The world moves; the program has to follow.
  • Increasing complexity. As software changes, its structure gets more complex, unless work is done to reduce it. Every change adds a little tangle; untangling takes deliberate effort.

Together they explain why maintenance never ends, and why preventive work (refactoring, lesson 8.3; paying debt, lesson 5.9) isn't a luxury. Without it, each change costs more than the last.

Spot the trap: nothing budgeted after launch

Spot the trapKap. Ernesto

The barangay budgets Pila as a one-time project: money to build it, and nothing afterwards. “Once it’s built, it’s built,” says the treasurer.

What happens if…

Check what you learned

Pila is changed to work with a new SMS provider. Which kind of maintenance is that?
What can you safely say about maintenance effort?
What does Lehman’s law of increasing complexity say?

Sources

Every claim on this page comes from these sources: the standard, the founding text of a method, a study, or the official record of a project, from the body that publishes it. Industry reports are labelled as such.

All sources for Simple Software Development