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
Code reuse
(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!
{{Short description|Using existing code in new software}} '''Code reuse''' is the practice of using existing [[source code]] to develop [[software]] instead of writing new code. ''Software reuse'' is a broader term that implies using any existing software asset to develop software instead of developing it again.<ref>{{cite journal |last=Frakes |first=W.B. |author2=Kyo Kang |s2cid=14561810 |date=July 2005 |title=Software Reuse Research: Status and Future |journal=IEEE Transactions on Software Engineering |volume=31 |issue=7 |pages=529β536 |doi=10.1109/TSE.2005.85 |citeseerx=10.1.1.75.635 }}</ref><ref name="Reddy2011" >{{Cite book|last=Reddy|first=Martin|url=https://www.worldcat.org/oclc/704559821|title=API design for C++|date=2011|publisher=Morgan Kaufmann|isbn=978-0-12-385004-1|location=Boston|oclc=704559821}}</ref>{{Rp|page=7}} An asset that is relatively easy to reuse and offers significant value is considered to have high [[reusability]]. Code reuse may be achieved different ways depending on a complexity of a [[programming language]] chosen and range from a lower-level approaches like code [[Cut, copy, and paste|copy-pasting]] (e.g. via [[Snippet (programming)|snippets]]),<ref>{{Cite journal|last1=Selaolo|first1=Karabo|last2=Hlomani|first2=Hlomani|date=2016|title=Towards An Algorithms Ontology Cluster: for Modular Code Reuse and Polyglot Programming|url=https://www.researchgate.net/publication/305144699|journal=Advances in Computer Science|volume=5|pages=63|via=ResearchGate}}</ref> simple functions ([[Procedure (computer science)|procedure]]s or [[subroutine]]s) or a bunch of [[Object (computer science)|objects]] or [[Subroutine|functions]] organized into [[Modular programming|module]]s (e.g. [[Library (computing)|libraries]])<ref>{{Cite web|title=4. Code Reuse: Functions and Modules - Head First Python, 2nd Edition [Book]|url=https://www.oreilly.com/library/view/head-first-python/9781491919521/ch04.html|access-date=2022-01-26|website=www.oreilly.com|language=en}}</ref>{{r|Reddy2011|page=7|}} or custom [[namespace]]s, and [[Package manager|package]]s, [[Framework (computer science)|framework]]s or [[software suite]]s in higher-levels. Code reuse implies dependencies which can make [[Software maintenance|code maintainability]] harder.{{Citation needed|date=February 2023}} At least one study found that code reuse at the class level reduces [[technical debt]].<ref>{{Cite journal|last1=Feitosa|first1=Daniel|last2=Ampatzoglou|first2=Apostolos|last3=Gkortzis|first3=Antonios|last4=Bibi|first4=Stamatia|last5=Chatzigeorgiou|first5=Alexander|date=September 2020|title=CODE reuse in practice: Benefiting or harming technical debt|url=https://pure.rug.nl/ws/files/128142562/1_s2.0_S0164121220300960_main.pdf|journal=Journal of Systems and Software|language=en|volume=167|pages=110618|doi=10.1016/j.jss.2020.110618|s2cid=219502749|url-access=|url-status=|archive-url=|archive-date=}}</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)