Jump to content

Rewrite (programming)

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by SymlynX (talk | contribs) at 22:37, 9 October 2007 (almost done). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

A rewrite in computer programming is the act or result of re-implementing a large portion of existing functionality without re-use of its source code. When the rewrite is not using existing code at all, it is common to speak of a rewrite from scratch. When instead only parts are re-engineered, which have otherwise become complicated to handle or extend, then it is more exact to speak of code refactoring.

Motivation

  1. When the source code to be able to extend an existing program isn't available.
  2. When the existing code has become too difficult to handle and extend.
  3. When the task of debugging the existing code seems too complicated.
  4. When the programmer finds it difficult to understand the source code.

Controversy

Many prominent software developers warn that this technique rarely leads to the intended success, claiming that rewriting is more fun than debugging, but the rewrite requires more time and will have new bugs.[1][2]

Advocates of this method instead suggest that with every iteration of the rewrite process an even better version is created, provided the same programmers do the job that already wrote the earlier versions.[3][4] They may be intending code refactoring however.

History

Netscape's rewrite of its browser is popularly considered one of the most dramatic strategic mistakes in the history of the Internet.[5][6]

References