Source code
Program execution |
---|
General concepts |
Types of code |
Compilation strategies |
|
Notable runtimes |
|
Notable compilers & toolchains |
|
In
Since a computer, at base, only understands
Background
The first programmable computers, which appeared at the end of the 1940s,
Source code is the form of code that is modified directly by humans, typically in a high-level programming language. Object code can be directly executed by the machine and is generated automatically from the source code, often via an intermediate step, assembly language. While object code will only work on a specific platform, source code can be ported to a different machine and recompiled there. For the same source code, object code can vary significantly—not only based on the machine for which it is compiled, but also based on performance optimization from the compiler.[8][9]
Organization
Most programs do not contain all the resources needed to run them and rely on external

Software developers often use configuration management to track changes to source code files (version control). The configuration management system also keeps track of which object code file corresponds to which version of the source code file.[11]
Purposes
Estimation
The number of lines of source code is often used as a metric when evaluating the productivity of computer programmers, the economic value of a code base, effort estimation for projects in development, and the ongoing cost of software maintenance after release.[12]
Communication
Source code is also used to communicate
Source code often contains
Companies often keep the source code confidential in order to hide algorithms considered a trade secret. Proprietary, secret source code and algorithms are widely used for sensitive government applications such as criminal justice, which results in black box behavior with a lack of transparency into the algorithm's methodology. The result is avoidance of public scrutiny of issues such as bias.[16]
Modification
Access to the source code (not just the object code) is essential to modifying it.[17] Understanding existing code is necessary to understand how it works[17] and before modifying it.[18] The rate of understanding depends both on the code base as well as the skill of the programmer.[19] Experienced programmers have an easier time understanding what the code does at a high level.[20] Software visualization is sometimes used to speed up this process.[21]
Many software programmers use an integrated development environment (IDE) to improve their productivity. IDEs typically have several features built in, including a source-code editor that can alert the programmer to common errors.[22] Modification often includes code refactoring (improving the structure without changing functionality) and restructuring (improving structure and functionality at the same time). [23] Nearly every change to code will introduce new bugs or unexpected ripple effects, which require another round of fixes.[18]
Compilation and execution
Source code files in a high-level programming language must go through a stage of preprocessing into machine code before the instructions can be carried out.[7] After being compiled, the program can be saved as an object file and the loader (part of the operating system) can take this saved file and execute it as a process on the computer hardware.[10] Some programming languages use an interpreter instead of a compiler. An interpreter converts the program into machine code at run time, which makes them 10 to 100 times slower than compiled programming languages.[22][28]
Quality
Software quality is an overarching term that can refer to a code's correct and efficient behavior, its reusability and portability, or the ease of modification.[29] It is usually more cost-effective to build quality into the product from the beginning rather than try to add it later in the development process.[30] Higher quality code will reduce lifetime cost to both suppliers and customers as it is more reliable and easier to maintain.[31][32]
Maintainability is the quality of software enabling it to be easily modified without breaking existing functionality.[33] Following coding conventions such as using clear function and variable names that correspond to their purpose makes maintenance easier.[34] Use of conditional loop statements only if the code could execute more than once, and eliminating code that will never execute can also increase understandability.[35] Many software development organizations neglect maintainability during the development phase, even though it will increase long-term costs.[32] Technical debt is incurred when programmers, often out of laziness or urgency to meet a deadline, choose quick and dirty solutions rather than build maintainability into their code.[36] A common cause is underestimates in software development effort estimation, leading to insufficient resources allocated to development.[37] A challenge with maintainability is that many software engineering courses do not emphasize it.[38] Development engineers who know that they will not be responsible for maintaining the software do not have an incentive to build in maintainability.[18]
Copyright and licensing
The situation varies worldwide, but in the United States before 1974, software and its source code was not
See also
- Bytecode
- Code as data
- Coding conventions
- Free software
- Legacy code
- Machine code
- Markup language
- Obfuscated code
- Object code
- Open-source software
- Package (package management system)
- Programming language
- Source code repository
- Syntax highlighting
- Visual programming language
References
- ^ Kernighan, Brian W. "Programming in C: A Tutorial" (PDF). Bell Laboratories, Murray Hill, N. J. Archived from the original (PDF) on 23 February 2015.
- ^ Gabbrielli & Martini 2023, p. 519.
- ^ Gabbrielli & Martini 2023, pp. 520–521.
- ^ Gabbrielli & Martini 2023, p. 522.
- ^ Gabbrielli & Martini 2023, p. 521.
- ^ a b Tracy 2021, p. 1.
- ^ a b Tracy 2021, p. 121.
- ^ Lin et al. 2001, pp. 238–239.
- ^ Katyal 2019, p. 1194.
- ^ a b Tracy 2021, pp. 122–123.
- ^ O'Regan 2022, pp. 230–231, 233, 377.
- ^ Foster 2014, pp. 249, 274, 280, 305.
- ^ ISBN 0-201-79940-5
- ^ "Art and Computer Programming" ONLamp.com Archived 20 February 2018 at the Wayback Machine, (2005)
- ^ Kaczmarek et al. 2018, p. 68.
- ^ Katyal 2019, pp. 1186–1187.
- ^ a b Katyal 2019, p. 1195.
- ^ a b c Offutt, Jeff (January 2018). "Overview of Software Maintenance and Evolution". George Mason University Department of Computer Science. Retrieved 5 May 2024.
- ^ Tripathy & Naik 2014, p. 296.
- ^ Tripathy & Naik 2014, p. 297.
- ^ Tripathy & Naik 2014, pp. 318–319.
- ^ a b O'Regan 2022, p. 375.
- ^ Tripathy & Naik 2014, p. 94.
- ^ a b Dooley 2017, p. 272.
- ^ O'Regan 2022, pp. 18, 21.
- ^ O'Regan 2022, p. 133.
- ^ Kaczmarek et al. 2018, pp. 348–349.
- ^ Sebesta 2012, p. 28.
- ^ Galin 2018, p. 26.
- ^ O'Regan 2022, pp. 68, 117.
- ^ O'Regan 2022, pp. 3, 268.
- ^ a b Varga 2018, p. 12.
- ^ Varga 2018, p. 5.
- ^ Tripathy & Naik 2014, pp. 296–297.
- ^ Tripathy & Naik 2014, p. 309.
- ^ Varga 2018, pp. 6–7.
- ^ Varga 2018, p. 7.
- ^ Varga 2018, pp. 7–8.
- ^ Liu, Joseph P.; Dogan, Stacey L. (2005). "Copyright Law and Subject Matter Specificity: The Case of Computer Software". New York University Annual Survey of American Law. 61 (2). Archived from the original on 25 June 2021.
- ^ Apple Computer, Inc. v. Franklin Computer Corporation Puts the Byte Back into Copyright Protection for Computer Programs Archived 7 May 2017 at the Wayback Machine in Golden Gate University Law Review Volume 14, Issue 2, Article 3 by Jan L. Nussbaum (January 1984)
- ^ Lemley, Menell, Merges and Samuelson. Software and Internet Law, p. 34.
- ^ Boyle 2003, p. 45.
- ^ Morin et al. 2012, Open Source versus Closed Source.
- ^ Sen et al. 2008, p. 209.
- ^ Morin et al. 2012, Free and Open Source Software (FOSS) Licensing.
- ^ O'Regan 2022, p. 106.
Sources
- Ablon, Lillian; Bogart, Andy (2017). Zero Days, Thousands of Nights: The Life and Times of Zero-Day Vulnerabilities and Their Exploits (PDF). Rand Corporation. ISBN 978-0-8330-9761-3.
- Campbell-Kelly, Martin; Garcia-Swartz, Daniel D. (2015). From Mainframes to Smartphones: A History of the International Computer Industry. Harvard University Press. ISBN 978-0-674-28655-9.
- ISBN 978-1-4842-6654-0.
- Dooley, John F. (2017). Software Development, Design and Coding: With Patterns, Debugging, Unit Testing, and Refactoring. Apress. ISBN 978-1-4842-3153-1.
- Foster, Elvis C. (2014). Software Engineering: A Methodical Approach. Apress. ISBN 978-1-4842-0847-2.
- Galin, Daniel (2018). Software Quality: Concepts and Practice. John Wiley & Sons. ISBN 978-1-119-13449-7.
- Haber, Morey J.; Hibbert, Brad (2018). Asset Attack Vectors: Building Effective Vulnerability Management Strategies to Protect Organizations. Apress. ISBN 978-1-4842-3627-7.
- Kaczmarek, Stefan; Lees, Brad; Bennett, Gary; Fisher, Mitch (2018). Objective-C for Absolute Beginners: iPhone, iPad and Mac Programming Made Easy. Apress. ISBN 978-1-4842-3428-0.
- Katyal, Sonia K. (2019). "The Paradox of Source Code Secrecy". Cornell Law Review. 104: 1183.
- Kitchin, Rob; Dodge, Martin (2011). Code/space: Software and Everyday Life. MIT Press. ISBN 978-0-262-04248-2.
- Lin, Daniel; Sag, Matthew; Laurie, Ronald S. (2001). "Source Code versus Object Code: Patent Implications for the Open Source Community". Santa Clara Computer and High Technology Law Journal. 18: 235.
- Morin, Andrew; Urban, Jennifer; Sliz, Piotr (2012). "A Quick Guide to Software Licensing for the Scientist-Programmer". PLOS Computational Biology. 8 (7): e1002598. PMID 22844236.
- O'Regan, Gerard (2022). Concise Guide to Software Engineering: From Fundamentals to Application Methods. Springer Nature. ISBN 978-3-031-07816-3.
- Sen, Ravi; Subramaniam, Chandrasekar; Nelson, Matthew L. (2008). "Determinants of the Choice of Open Source Software License". Journal of Management Information Systems. 25 (3). Informa UK Limited: 207–240. ISSN 0742-1222.
- Sebesta, Robert W. (2012). Concepts of Programming Languages (10 ed.). Addison-Wesley. ISBN 978-0-13-139531-2.
- Tracy, Kim W. (2021). Software: A Technical History. Morgan & Claypool Publishers. ISBN 978-1-4503-8724-8.
- Tripathy, Priyadarshi; Naik, Kshirasagar (2014). Software Evolution and Maintenance: A Practitioner's Approach. John Wiley & Sons. ISBN 978-0-470-60341-3.
- Varga, Ervin (2018). Unraveling Software Maintenance and Evolution: Thinking Outside the Box. Springer. ISBN 978-3-319-71303-8.