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.[ 1] [ 2] : 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 copy-pasting (e.g. via snippets ),[ 3] simple functions (procedures or subroutines ) or a bunch of objects or functions organized into modules (e.g. libraries )[ 4] [ 2] : 7 or custom namespaces , and packages , frameworks or software suites in higher-levels.
Code reuse implies dependencies which can make code maintainability harder.[citation needed ]
At least one study found that code reuse at the class level reduces technical debt .[ 5]
^ Frakes, W.B.; Kyo Kang (July 2005). "Software Reuse Research: Status and Future". IEEE Transactions on Software Engineering . 31 (7): 529– 536. CiteSeerX 10.1.1.75.635 . doi :10.1109/TSE.2005.85 . S2CID 14561810 .
^ a b Reddy, Martin (2011). API design for C++ . Boston: Morgan Kaufmann. ISBN 978-0-12-385004-1 . OCLC 704559821 .
^ Selaolo, Karabo; Hlomani, Hlomani (2016). "Towards An Algorithms Ontology Cluster: for Modular Code Reuse and Polyglot Programming" . Advances in Computer Science . 5 : 63 – via ResearchGate.
^ "4. Code Reuse: Functions and Modules - Head First Python, 2nd Edition [Book]" . www.oreilly.com . Retrieved 2022-01-26 .
^ Feitosa, Daniel; Ampatzoglou, Apostolos; Gkortzis, Antonios; Bibi, Stamatia; Chatzigeorgiou, Alexander (September 2020). "CODE reuse in practice: Benefiting or harming technical debt" (PDF) . Journal of Systems and Software . 167 : 110618. doi :10.1016/j.jss.2020.110618 . S2CID 219502749 .