FazBrowse Wikipedia Viewer | Main Page |
Search Wikipedia:
|
Viewing: https://en.wikipedia.org/wiki/Source_code

Source code

Contents
Purposes
    Estimation
    Communication
    Modification
Copyright and licensing

main( ) { printf(Simple C source code for a "Hello world" program. Taken from the seminal book The C Programming Language, it originates from Brian Kernighan in the Bell Laboratories in 1974.
Program execution
General concepts
Types of code
Compilation strategies
Notable runtimes
Notable compilers & toolchains
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.

Source code is typically stored in source files. Beyond software, the term source file is used across other domains — such as documents, images, hardware design, and typography — to refer to the original, editable file from which a distribution format is derived.

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.

A more complex Java source code example. Written in object-oriented programming style, it demonstrates boilerplate code. With prologue comments indicated in red, inline comments indicated in green, and program statements indicated in blue.

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.

Purposes

edit

Estimation

edit

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.

Communication

edit

Source code is also used to communicate algorithms between parties, e.g., code snippets online or in books.

Computer programmers can find it helpful to review extant source code to learn about programming techniques. The sharing of source code between developers is often cited as a contributing factor to the maturing of their programming skills. Some consider source code an expressive artistic medium.

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.

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.

Modification

edit

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. 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. Higher quality code reduces lifetime cost to both suppliers and customers as via higher reliability and maintainability.

Maintainability is the quality of software enabling it to be easily modified without breaking extant functions. Following coding conventions such as using clear function and variable names that correspond to their purpose makes maintenance easier. 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. Many software development organizations neglect maintainability during the development phase, even though it will increase long-term costs. 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. A common cause is underestimates in software development effort estimation, leading to insufficient resources allocated to development. A challenge with maintainability is that many software engineering courses do not emphasize it. Development engineers who know that they will not be responsible for maintaining the software do not have an incentive to build in maintainability.

Copyright and licensing

edit
  1. Kernighan, Brian W. "Programming in C: A Tutorial" (PDF). Bell Laboratories, Murray Hill, N. J. Archived from the original (PDF) on 23 February 2015.
  2. Gabbrielli & Martini 2023, p. 519.
  3. Gabbrielli & Martini 2023, pp. 520–521.
  4. Gabbrielli & Martini 2023, p. 522.
  5. Gabbrielli & Martini 2023, p. 521.
  6. 1 2 Tracy 2021, p. 1.
  7. 1 2 Tracy 2021, p. 121.
  8. Kaczmarek et al. 2018, p. 68.
  9. Katyal 2019, pp. 1186–1187.
  10. 1 2 Katyal 2019, p. 1195.
  11. 1 2 3 O'Regan 2022, pp. 18, 21.
  12. O'Regan 2022, p. 133.
  13. O'Regan 2022, pp. 3, 268.
  14. 1 2 Varga 2018, p. 12.
  15. Varga 2018, p. 5.
  16. Tripathy & Naik 2014, pp. 296–297.
  17. Tripathy & Naik 2014, p. 309.
  18. Varga 2018, pp. 6–7.
  19. Varga 2018, p. 7.
  20. Varga 2018, pp. 7–8.
  21. Sen et al. 2008, p. 209.
  22. Meredith, Alisdair; Hughes, Lori (19 May 2025). Input Files Are Source Files (PDF) (Report). ISO/IEC JTC1/SC22/WG21.
  23. Artefactual Systems and Digital Preservation Coalition (July 2021). "Preserving Documents". doi:10.7207/twgn21-07.
  24. "The Ultimate Guide to Design Source Files". The Designs Experts. Retrieved 10 August 2026.
  25. Translation Commons (2025). "Font Creation Guidelines" (PDF). Translation Commons. p. 32.
  26. "FAQs about fonts". Adobe. Adobe Inc. Retrieved 9 August 2026.

  27. View original on Wikipedia | Back | FazBrowse Home