Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Copy-and-paste programming
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Branching code === [[Branching (software)|Branching code]] is a normal part of large-team software development, allowing parallel development on both branches and hence, shorter development cycles. Classical branching has the following qualities: * Is managed by a [[revision control|version control]] system that supports branching * Branches are re-merged once parallel development is completed. Copy and paste is a less formal alternative to classical branching, often used when it is foreseen that the branches will diverge more and more over time, as when a new product is being spun off from an existing product. As a way of spinning-off a new product, copy-and-paste programming has some advantages. Because the new development initiative does not touch the code of the existing product: * There is no need to [[Regression testing|regression test]] the existing product, saving on QA time associated with the new product launch, and reducing [[time to market]]. * There is no risk of introduced bugs in the existing product, which might upset the installed user base. The downsides are: * If the new product does not diverge as much as anticipated from the existing product, two code bases might need to be supported (at twice the cost) where one would have done. This can lead to expensive [[refactoring]] and manual merging down the line. * The [[duplicate code]] base doubles the time required to implement changes which may be desired across both products; this ''increases'' time-to-market for such changes, and may, in fact, wipe out any time gains achieved by branching the code in the first place. Similar to above, the alternative to a copy-and-paste approach would be a modularized approach: * Start by factoring out code to be shared by both products into libraries. * Use those libraries (rather than a second copy of the code base) as the foundation for the development of the new product. * If an additional third, fourth, or fifth version of the product is envisaged down the line, this approach is far stronger, because the ready-made code libraries dramatically shorten the development life cycle for any additional products after the second.<ref>{{cite web|url=http://www.idi.ntnu.no/grupper/su/fordypningsprosjekt-2004/Eriksen2004.pdf|title=Code Reuse In Object-Oriented Software Development|publisher=Norwegian University of Science and Technology, Department of Computer and Information Science|accessdate=2008-05-29|first=Lisa|last=Eriksen}}</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)