Source code
Template:Short description Script error: No such module "other uses". Template:DMCA
Lua error in package.lua at line 80: module 'Module:Sidebar/configuration' not found.
In computing, source code, or simply code or source, is human readable plain text that can eventually result in controlling the behavior of a computer. In order to control a computer, it must be processed by a computer program – either executed directly via an interpreter or translated into a more computer-consumable form such as via a compiler. Sometimes, code is compiled directly to machine code so that it can be run in the native language of the computer without further processing. Many modern environments, though, involve compiling to an intermediate representation such as bytecode that can either run via an interpreter or be compiled on-demand to machine code via just-in-time compilation.
Background
The first programmable computers, which appeared at the end of the 1940s,Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found. were programmed in machine language (simple instructions that could be directly executed by the processor). Machine language was difficult to debug and was not portable between different computer systems.Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found. Initially, hardware resources were scarce and expensive, while human resources were cheaper.Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found. As programs grew more complex, programmer productivity became a bottleneck. This led to the introduction of high-level programming languages such as Fortran in the mid-1950s. These languages abstracted away the details of the hardware, and were designed to express algorithms that could be understood more easily by humans.Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found.Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found. As instructions distinct from the underlying computer hardware, software is therefore relatively recent, dating to these early high-level programming languages such as Fortran, Lisp, and Cobol.Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found. The invention of high-level programming languages was simultaneous with the compilers needed to translate the source code automatically into machine code that can be directly executed on the computer hardware.Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found.
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.Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found.Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found.
Organization
Script error: No such module "labelled list hatnote". Most programs do not contain all the resources needed to run them and rely on external libraries. Part of the compiler's function is to link these files in such a way that the program can be executed by the hardware.Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found.
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.Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found.
Purposes
Estimation
The number of source lines of code (SLOC) 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.Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found.
Communication
Source code is also used to communicate algorithms between parties, e.g., code snippets online or in books.[2]
Computer programmers can find it helpful to review extant source code to learn about programming techniques.[2] The sharing of source code between developers is often cited as a contributing factor to the maturing of their programming skills.[2] Some consider source code an expressive artistic medium.[3]
Source code often contains comments—blocks of text marked for the compiler to ignore. This content is not part of the program logic, but is instead intended to help readers understand the program.Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found.
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.Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found.
Modification
Script error: No such module "Labelled list hatnote". Access to the source code (not just the object code) is essential to modifying it.Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found. Understanding extant code is necessary to understand how it worksLua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found. and before modifying it.[4] The rate of understanding depends both on the code base as well as the skill of the programmer.Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found. Experienced programmers have an easier time understanding what the code does at a high level.Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found. Software visualization is sometimes used to speed up this process.Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found.
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.Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found. Modification often includes code refactoring (improving structure without changing function) and restructuring (improving structure and function simultaneously).Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found. Nearly every change to code introduces new bugs or unexpected ripple effects, which require another round of fixes.[4]
Code reviews by other developers are often used to scrutinize new code added to a project.Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found. The purpose of this phase is often to verify that the code meets style and maintainability standards and that it is a correct implementation of the software design.Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found. According to some estimates, code review dramatically reduce the number of bugs persisting after software testing is complete.Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found. Along with software testing that works by executing the code, static program analysis uses automated tools to detect problems with the source code. Many IDEs support code analysis tools, which might provide metrics on the clarity and maintainability of the code.Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found. Debuggers are tools that often enable programmers to step through execution while keeping track of which source code corresponds to each change of state.Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found.
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.Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found. 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.Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found. 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.Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found.Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found.
Portability
Script error: No such module "labelled list hatnote".
Another reason many programs are distributed in source code form, instead of as executable binary files, is that (often) a single source code file can be written once and will run on a variety of different end-user machines (each with their own localized compiler or interpreter), unlike an executable code file which generally only works on nearly-identical machines. Source code was used this way to distribute the Unix operating system early in the history of Unix, and later to allow programs written in scripting languages (in particular the JavaScript client-side scripting language) to run on a wide variety of machines.
For this goal, minified, obfuscated, or decompiled source code files (all of which eliminate the comments in the original code) are generally just as portable as the original source code files (which nearly always include comments), even though they are far less useful for modification, and therefore don't meet the definition of source code in the GNU General Public License, version 2 (GPL2).
Quality
Script error: No such module "labelled list hatnote".
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.Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found. It is usually more cost-effective to build quality into a product from the start rather than try to add it later in a development process.Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found. Higher quality code reduces lifetime cost to both suppliers and customers as via higher reliability and maintainability.Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found.Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found.
Maintainability is the quality of software enabling it to be easily modified without breaking extant functions.Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found. Following coding conventions such as using clear function and variable names that correspond to their purpose makes maintenance easier.Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found. 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.Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found. Many software development organizations neglect maintainability during the development phase, even though it will increase long-term costs.Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found. 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.Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found. A common cause is underestimates in software development effort estimation, leading to insufficient resources allocated to development.Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found. A challenge with maintainability is that many software engineering courses do not emphasize it.Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found. Development engineers who know that they will not be responsible for maintaining the software do not have an incentive to build in maintainability.[4]
Copyright and licensing
Script error: No such module "labelled list hatnote". Script error: No such module "Labelled list hatnote".
The situation varies worldwide, but in the United States before 1974, software and its source code was not copyrightable and therefore always public domain software.[5] In 1974, the US Commission on New Technological Uses of Copyrighted Works (CONTU) decided that "computer programs, to the extent that they embody an author's original creation, are proper subject matter of copyright".[6][7]
Proprietary software is rarely distributed as source code.Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found. Although the term open-source software literally refers to public access to the source code,Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found. open-source software has additional requirements: free redistribution, permission to modify the source code and release derivative works under the same license, and nondiscrimination between different uses—including commercial use.Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found.Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found. The free reusability of open-source software can speed up development.Lua error in package.lua at line 80: module 'Module:Footnotes/anchor_id_list' not found.
See also
- Bytecode
- Code as data
- Coding conventions
- Free software
- Legacy code
- Machine code
- Markup language
- Obfuscated code
- Object code
- Open-source software
- Package manager
- Programming language
- Source code repository
- Syntax highlighting
- Visual programming language
References
Page Template:Reflist/styles.css has no content.
- ^ Page Module:Citation/CS1/styles.css has no content.Kernighan, Brian W. "Programming in C: A Tutorial" (PDF). Bell Laboratories, Murray Hill, N. J. Archived from the original (PDF) on 23 February 2015.
- ^ a b c Spinellis, D: Code Reading: The Open Source Perspective. Addison-Wesley Professional, 2003. Template:ISBN
- ^ "Art and Computer Programming" ONLamp.com Script error: No such module "webarchive"., (2005)
- ^ a b c Page Module:Citation/CS1/styles.css has no content.Offutt, Jeff (January 2018). "Overview of Software Maintenance and Evolution". George Mason University Department of Computer Science. Retrieved 5 May 2024.
- ^ Page Module:Citation/CS1/styles.css has no content.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 Script error: No such module "webarchive". 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.
Sources
Page Template:Refbegin/styles.css has no content.
- Page Module:Citation/CS1/styles.css has no content.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. Archived (PDF) from the original on 8 October 2024. Retrieved 31 May 2024.
- Page Module:Citation/CS1/styles.css has no content.Boyle, James (2003). "The Second Enclosure Movement and the Construction of the Public Domain". Law and Contemporary Problems. 66 (1): 33–74. ISSN 0023-9186. Archived from the original on 24 March 2025. Retrieved 7 April 2025.
- Page Module:Citation/CS1/styles.css has no content.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.
- Page Module:Citation/CS1/styles.css has no content.Daswani, Neil; Elbayadi, Moudy (2021). Big Breaches: Cybersecurity Lessons for Everyone. Apress. ISBN 978-1-4842-6654-0.
- Page Module:Citation/CS1/styles.css has no content.Dooley, John F. (2017). Software Development, Design and Coding: With Patterns, Debugging, Unit Testing, and Refactoring. Apress. ISBN 978-1-4842-3153-1.
- Page Module:Citation/CS1/styles.css has no content.Foster, Elvis C. (2014). Software Engineering: A Methodical Approach. Apress. ISBN 978-1-4842-0847-2.
- Page Module:Citation/CS1/styles.css has no content.Gabbrielli, Maurizio; Martini, Simone (2023). Programming Languages: Principles and Paradigms (2nd ed.). Springer. ISBN 978-3-031-34144-1.
- Page Module:Citation/CS1/styles.css has no content.Galin, Daniel (2018). Software Quality: Concepts and Practice. John Wiley & Sons. ISBN 978-1-119-13449-7.
- Page Module:Citation/CS1/styles.css has no content.Haber, Morey J.; Hibbert, Brad (2018). Asset Attack Vectors: Building Effective Vulnerability Management Strategies to Protect Organizations. Apress. ISBN 978-1-4842-3627-7.
- Page Module:Citation/CS1/styles.css has no content.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.
- Page Module:Citation/CS1/styles.css has no content.Katyal, Sonia K. (2019). "The Paradox of Source Code Secrecy". Cornell Law Review. 104: 1183.
- Page Module:Citation/CS1/styles.css has no content.Kitchin, Rob; Dodge, Martin (2011). Code/space: Software and Everyday Life. MIT Press. ISBN 978-0-262-04248-2.
- Page Module:Citation/CS1/styles.css has no content.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. Archived from the original on 20 May 2024. Retrieved 31 May 2024.
- Page Module:Citation/CS1/styles.css has no content.Morin, Andrew; Urban, Jennifer; Sliz, Piotr (2012). "A Quick Guide to Software Licensing for the Scientist-Programmer". PLOS Computational Biology. 8 (7) e1002598. Bibcode:2012PLSCB...8E2598M. doi:10.1371/journal.pcbi.1002598. ISSN 1553-7358. PMC 3406002. PMID 22844236.
- Page Module:Citation/CS1/styles.css has no content.O'Regan, Gerard (2022). Concise Guide to Software Engineering: From Fundamentals to Application Methods. Springer Nature. ISBN 978-3-031-07816-3.
- Page Module:Citation/CS1/styles.css has no content.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. doi:10.2753/mis0742-1222250306. ISSN 0742-1222.
- Page Module:Citation/CS1/styles.css has no content.Sebesta, Robert W. (2012). Concepts of Programming Languages (10 ed.). Addison-Wesley. ISBN 978-0-13-139531-2.
- Page Module:Citation/CS1/styles.css has no content.Tracy, Kim W. (2021). Software: A Technical History. Morgan & Claypool Publishers. ISBN 978-1-4503-8724-8.
- Page Module:Citation/CS1/styles.css has no content.Tripathy, Priyadarshi; Naik, Kshirasagar (2014). Software Evolution and Maintenance: A Practitioner's Approach. John Wiley & Sons. ISBN 978-0-470-60341-3.
- Page Module:Citation/CS1/styles.css has no content.Varga, Ervin (2018). Unraveling Software Maintenance and Evolution: Thinking Outside the Box. Springer. ISBN 978-3-319-71303-8.
External links
Page Module:Side box/styles.css has no content.Page Template:Sister project/styles.css has no content.
Page Module:Side box/styles.css has no content.Page Template:Sister project/styles.css has no content.
Lua error in package.lua at line 80: module 'Module:Authority control/config' not found.