HOME

TheInfoList



OR:

A rewrite in
computer programming Computer programming is the process of performing a particular computation (or more generally, accomplishing a specific computing result), usually by designing and building an executable computer program. Programming involves tasks such as ana ...
is the act or result of re-implementing a large portion of existing functionality without re-use of its
source code In computing, source code, or simply code, is any collection of code, with or without comments, written using a human-readable programming language, usually as plain text. The source code of a program is specially designed to facilitate the wo ...
. When the rewrite is not using existing code at all, it is common to speak of a rewrite from scratch.


Motivations

A piece of software is typically rewritten when one or more of the following apply: *its source code is not available or is only available under an incompatible
license A license (or licence) is an official permission or permit to do, use, or own something (as well as the document of that permission or permit). A license is granted by a party (licensor) to another party (licensee) as an element of an agreeme ...
*its code cannot be adapted to a new target platform *its existing code has become too difficult to handle and extend *the task of
debugging In computer programming and software development, debugging is the process of finding and resolving '' bugs'' (defects or problems that prevent correct operation) within computer programs, software, or systems. Debugging tactics can involve in ...
it seems too complicated *the programmer finds it difficult to understand its source code *developers learn new techniques or wish to do a big feature overhaul which requires much change *developers learn that new codes written may extend content options that can fix or overwrite previous problems *the
programming language A programming language is a system of notation for writing computer programs. Most programming languages are text-based formal languages, but they may also be graphical. They are a kind of computer language. The description of a programming ...
of the source code has to be changed


Risks

Several software engineers, such as
Joel Spolsky Avram Joel Spolsky (born 1965) is a software engineer and writer. He is the author of ''Joel on Software'', a blog on software development, and the creator of the project management software Trello. He was a Program Manager on the Microsoft Exce ...
have warned against total rewrites, 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 The cleanroom software engineering process is a software development process intended to produce software with a certifiable level of reliability. The cleanroom process was originally developed by Harlan Mills and several of his colleagues i ...
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 Netscape Communications Corporation (originally Mosaic Communications Corporation) was an American independent computer services company with headquarters in Mountain View, California and then Dulles, Virginia. Its Netscape web browser was onc ...
's project to improve HTML layout in
Navigator A navigator is the person on board a ship or aircraft responsible for its navigation.Grierson, MikeAviation History—Demise of the Flight Navigator FrancoFlyers.org website, October 14, 2008. Retrieved August 31, 2014. The navigator's primar ...
4 has been cited as an example of a failed rewrite. The new layout engine (
Gecko Geckos are small, mostly carnivorous lizards that have a wide distribution, found on every continent except Antarctica. Belonging to the infraorder Gekkota, geckos are found in warm climates throughout the world. They range from . Geckos ar ...
) had developed independently from 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 Microsoft Corporation is an American multinational technology corporation producing computer software, consumer electronics, personal computers, and related services headquartered at the Microsoft Redmond campus located in Redmond, Washing ...
focused on incremental improvements to
Internet Explorer Internet Explorer (formerly Microsoft Internet Explorer and Windows Internet Explorer, commonly abbreviated IE or MSIE) is a series of graphical user interface, graphical web browsers developed by Microsoft which was used in the Microsoft Wind ...
and did not face the same obstacles. Ironically, Navigator itself was a successful cleanroom rewrite of NCSA Mosaic overseen by that program's developers. See
Browser wars A browser war is competition for dominance in the usage share of web browsers. The "first browser war," (1995-2001) pitted Microsoft's Internet Explorer against Netscape's Navigator. Browser wars continued with the decline of Internet Explorer ...
.


See also

*
Code refactoring In computer programming and software design, code refactoring is the process of restructuring existing computer code—changing the '' factoring''—without changing its external behavior. Refactoring is intended to improve the design, structur ...
* Open source software development *
Technical debt In software development, technical debt (also known as design debt or code debt) is the implied cost of additional rework caused by choosing an easy (limited) solution now instead of using a better approach that would take longer. Analogous with ...
*
Development hell Development hell, development purgatory, and development limbo are media and software industry jargon for a project, concept, or idea that remains in development for an especially long time, often moving between different crews, scripts, game engi ...
*
Porting In software engineering, porting is the process of adapting software for the purpose of achieving some form of execution in a computing environment that is different from the one that a given program (meant for such execution) was originally desi ...
*
Game engine recreation Game engine recreation is a type of video game engine remastering process whereby a new game engine is written from scratch as a clone of the original with the ability to load the original game's data files such as music, textures, scripts, shad ...
Some projects mentioning major rewrites in their history: *
Apache HTTP Server The Apache HTTP Server ( ) is a free and open-source cross-platform web server software, released under the terms of Apache License 2.0. Apache is developed and maintained by an open community of developers under the auspices of the Apache So ...
(1) *
AOL Instant Messenger AIM (AOL Instant Messenger) was an instant messaging and presence computer program created by AOL, which used the proprietary OSCAR instant messaging protocol and the TOC protocol to allow registered users to communicate in real time. AIM w ...
(1) *
BIND BIND () is a suite of software for interacting with the Domain Name System (DNS). Its most prominent component, named (pronounced ''name-dee'': , short for ''name daemon''), performs both of the main DNS server roles, acting as an authoritative ...
(1) *
Freenet Freenet is a peer-to-peer platform for censorship-resistant, anonymous communication. It uses a decentralized distributed data store to keep and deliver information, and has a suite of free software for publishing and communicating on the Web ...
(1) * Fusebox (2) *
GRUB Grub can refer to Grub (larva), of the beetle superfamily Scarabaeoidea, or as a slang term for food. It can also refer to: Places * Grub, Appenzell Ausserrhoden, Switzerland * Grub, St. Gallen, Switzerland * Grub (Amerang), a hamlet in Bavaria, ...
(1) * Majordomo (1) *
MediaWiki MediaWiki is a free and open-source wiki software. It is used on Wikipedia and almost all other Wikimedia websites, including Wiktionary, Wikimedia Commons and Wikidata; these sites define a large part of the requirement set for MediaWiki ...
(1) * Mozilla/Netscape (1) *
Icecast Icecast is a streaming media project released as free software maintained by the Xiph.Org Foundation. It also refers specifically to the server program which is part of the project. Icecast was created in December 1998/January 1999 by Jack Mo ...
(0–1) *
netcat netcat (often abbreviated to nc) is a computer networking utility for reading from and writing to network connections using TCP or UDP. The command is designed to be a dependable back-end that can be used directly or easily driven by other p ...
(1) * OpenRPG (1) *
PHP PHP is a general-purpose scripting language geared toward web development. It was originally created by Danish-Canadian programmer Rasmus Lerdorf in 1993 and released in 1995. The PHP reference implementation is now produced by The PHP Group. ...
(1–2) *
Project Xanadu Project Xanadu ( ) was the first hypertext project, founded in 1960 by Ted Nelson. Administrators of Project Xanadu have declared it superior to the World Wide Web, with the mission statement: "Today's popular software simulates paper. The World ...
(0–1) * Sun Secure Global Desktop (1) *
vBulletin vBulletin is a proprietary Internet forum software package sold by MH Sub I, LLC doing business as vBulletin (formerly Jelsoft Enterprises and vBulletin Solutions). It is written in PHP and uses a MariaDB or MySQL database server. Similar pro ...
(2) *
WebObjects WebObjects was a Java web application server and a server-based web application framework originally developed by NeXT Software, Inc. WebObject's hallmark features are its object-orientation, database connectivity, and prototyping tools. Ap ...
(1) *
Zope Zope is a family of free and open-source web application servers written in Python, and their associated online community. Zope stands for "Z Object Publishing Environment", and was the first system using the now common object publishing methodol ...
(1)


References

{{reflist, 30em


External links


RewriteCodeFromScratch at C2 Wiki
by
Joel Spolsky Avram Joel Spolsky (born 1965) is a software engineer and writer. He is the author of ''Joel on Software'', a blog on software development, and the creator of the project management software Trello. He was a Program Manager on the Microsoft Exce ...
Computer programming