encyclopegia.org

Rewrite (programming)

In computer programming, rewrite is the act of authoring new source code to replace an existing codebase from scratch (a total rewrite) or to significantly modify an existing codebase such that the resulting code maintains essential aspects of the original. The essential aspects to be maintained for a rewrite effort may differ but often include behavior, performance and interface. The result of the effort is also called a rewrite.

In computer programming, rewrite is the act of authoring new source code to replace an existing codebase from scratch (a total rewrite) or to significantly modify an existing codebase such that the resulting code maintains essential aspects of the original. The essential aspects to be maintained for a rewrite effort may differ but often include behavior, performance and interface. The result of the effort is also called a rewrite. ==Motivations== Common motivations for rewriting software include: The source code is not available or is protected by an incompatible license. The code cannot be adapted to a new target platform; perhaps a different programming language must be used, since there is no support for the original code on the target platform. The code is too difficult to understand, maintain, extend or debug. There is a desire to use new techniques or technologies, especially when desired enhancements would require significant change. ==Risks== Some warn against a total rewrite, especially under schedule constraints or competitive pressures. While developers may initially welcome the chance to correct historical design mistakes, a rewrite also discards those parts of the design that work as required. A rewrite commits the development team to deliver not just new features, but all those that exist in the previous code, while potentially introducing new bugs or regressions of previously fixed bugs. A rewrite also interferes with the tracking of unfixed bugs in the old version. The incremental rewrite is an alternative approach, in which developers gradually replace the existing code with calls into a new implementation, expanding that implementation until it fully replaces the old one. This approach avoids a broad loss of functionality during the rewrite. Cleanroom software engineering is another approach, which requires the team to work from an exhaustive written specification of the software's functionality, without access to its code. ==Examples== Netscape's project to improve HTML layout in Navigator 4 has been cited as an example of a failed rewrite. The new layout engine (Gecko) had developed independently of Navigator and did not integrate readily with Navigator's code. Hence, Navigator itself was rewritten around the new engine, breaking many existing features and delaying release by several months. Meanwhile, Microsoft focused on incremental improvements to Internet Explorer and did not face the same obstacles. ==See also== ==References== ==External links== RewriteCodeFromScratch at C2 Wiki Things You Should Never Do, Part I by Joel Spolsky

References

No reference rows published for this article.

Cite this article

MLA

"Rewrite (programming)." encyclopegia.org, 2026, https://encyclopegia.org/wiki/rewrite-programming. Accessed 24 November 2026.

Chicago

"Rewrite (programming)." encyclopegia.org. Accessed November 24, 2026. https://encyclopegia.org/wiki/rewrite-programming.

APA

encyclopegia.org. (2026). Rewrite (programming). Retrieved November 24, 2026, from https://encyclopegia.org/wiki/rewrite-programming

Accessed November 24, 2026 · CC BY-SA 4.0 · citation page · JSON

Related articles

The Last and the First

enwiki · references available

Heller Ehrman

enwiki · references available

WIXT (AM)

enwiki · references available

Religion of Humanity

enwiki · references available

Since I Met You Baby (song)

enwiki · references available

Rainbow Girl

enwiki · references available
CC BY-SA 4.0 · share-alike · https://en.wikipedia.org/w/index.php?oldid=1366300055 · 0.5 · snapshot enwiki-001366300055

Cite · JSON · Search

Related services and records

Services

  • Estate — measured countries, lanes and facts
  • Intel — live corroborated events
  • Legal — statutes, cases and citations
  • Encyclopedia — articles with inline sources
  • Space — launches, satellites and orbits
  • Search — federated search and reports
  • Pass — passport account and SSO
  • Corpora — read-only corpus origins
  • e01 — self-hosted corpora and tools

Text and metadata only; each target carries its own sources. Missing data is published as no-data, never estimated.