Source code

The first programmable computers, which appeared at the end of the 1940s,[2] were programmed in machine language (simple instructions that could be directly executed by the processor).

[5][6] 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.

[10] Software developers often use configuration management to track changes to source code files (version control).

[13] Computer programmers may find it helpful to review existing source code to learn about programming techniques.

[13] The sharing of source code between developers is frequently cited as a contributing factor to the maturation of their programming skills.

[15] Companies often keep the source code confidential in order to hide algorithms considered a trade secret.

IDEs typically have several features built in, including a source-code editor that can alert the programmer to common errors.

[24] 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.

[26] Debuggers are tools that often enable programmers to step through execution while keeping track of which source code corresponds to each change of state.

[22][28] 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.

[30] Higher quality code will reduce lifetime cost to both suppliers and customers as it is more reliable and easier to maintain.

[33] Following coding conventions such as using clear function and variable names that correspond to their purpose makes maintenance easier.

[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.

[42] Although the term open-source software literally refers to public access to the source code,[43] 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.

Simple C-language source code example, a procedural programming language . The resulting program prints "hello, world" on the computer screen. This first known " Hello world " snippet from the seminal book The C Programming Language originates from Brian Kernighan in the Bell Laboratories in 1974. [ 1 ]
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.