Glossary Updates12 new terms added to the glossaries · October 2, 2026, 22:44 CEST
AI TechDocKnowledge

Glossary · Automation software engineering and architecture

Refactoring

Also known as: Code refactoring

German: Refactoring

In software engineering, refactoring is restructuring existing code to improve its internal quality, such as readability, structure or testability, without changing its externally observable behavior.

  • Software engineering

In one sentence

Refactoring restructures existing code to improve its internal quality without changing its externally observable behavior.

Example

The team splits a 3,000-line PLC program into function blocks per station and runs the full regression test suite to confirm that the machine behaves exactly as before.

How it applies

  • Engineering: Refactoring is done in small steps, each verified by tests. Without an automated Regression test suite, refactoring becomes risky rewriting.
  • Change control: Even without intended behavior change, refactoring changes code. For safety-related or validated software it goes through Change control and Impact analysis like any modification.
  • Documentation: User documentation should not change after pure refactoring; if it must, the behavior changed. Internal design documentation, however, needs updating to reflect the new structure.

Refactoring vs. rewrite

Refactoring preserves behavior and proceeds incrementally. A rewrite replaces code wholesale and typically changes behavior, with higher risk. Refactoring is the usual way to repay Technical debt.

By knowledge.aitechdoc.world · Published September 26, 2026 · Last reviewed

Source: AI TechDoc Blog editorial definition, based on software engineering practice (Fowler, Refactoring)

Definitions follow the cited standards and specifications. Where a source is a copyrighted publication, such as an ISO, IEC or EN standard, the definition is a close paraphrase, not a verbatim quotation, so as not to infringe copyright. We recommend reading the original publication. The sections “How it applies” are editorial commentary by AI TechDoc Blog and are not part of any standard.

Seen a mistake? Send us a note!