Actions

Difference between revisions of "Source Code"

 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
'''Source Code''' is the source of a computer program. It contains declarations, instructions, functions, loops and other statements, which act as instructions for the program on how to function. Programs may contain one or more source code text files, which can be stored on a computer's hard disk, in a database, or be printed in books of code snippets.
+
'''Source Code''' is the source of a computer program. It contains declarations, instructions, functions, loops, and other statements, which act as instructions for the program on how to function. Programs may contain one or more source code text files, which can be stored on a computer's hard disk, in a database, or printed in books of code snippets.
  
Programmers can add comments to their source code to help other developers understand it. Short scripts can also be run from source code using a scripting engine such as VBScript or the PHP engine. While large programs frequently reference hundreds or thousands of files, it is not uncommon for small programs to use just one source code. If there are many source files, the program may be organized into different sections. If a single file contains all the program's variables and functions, it can be hard to locate specific sections of the code.<ref>Defining and Explaining Source Code [https://www.techopedia.com/definition/547/source-code Techopedia]</ref>
+
Programmers can add comments to their source code to help other developers understand it. Short scripts can also be run from source code using a scripting engine such as VBScript or the PHP engine. While large programs frequently reference hundreds or thousands of files, it is not uncommon for small programs to use just one source code. If there are many source files, the program may be organized into different sections. If a single file contains all the program's variables and functions, it can be hard to locate specific sections of the code.<ref>[https://www.techopedia.com/definition/547/source-code Defining and Explaining Source Code]</ref>
  
Beyond providing the foundation for software creation, source code has other important purposes, as well. For example, skilled users who have access to source code can more easily customize software installations, if needed. Meanwhile, other developers can use source code to create similar programs for other operating platforms -- a task that would be trickier without the coding instructions. Access to source code also allows programmers to contribute to their community, either through sharing code for learning purposes or by recycling portions of it for other applications.<ref>Purpose of a Source Code [https://searchapparchitecture.techtarget.com/definition/source-code Techtarget]</ref>
+
Beyond providing the foundation for software creation, source code has other important purposes, as well. For example, skilled users who have access to source code can more easily customize software installations, if needed. Meanwhile, other developers can use source code to create similar programs for other operating platforms -- a task that would be trickier without the coding instructions. Access to source code also allows programmers to contribute to their community, either through sharing code for learning purposes or by recycling portions of it for other applications.<ref>[https://searchapparchitecture.techtarget.com/definition/source-code Purpose of a Source Code]</ref>
  
Source code can be either proprietary or open. Many companies closely guard their source code. Users can use the compiled code, but they cannot see or modify it. Microsoft Office is an example of proprietary source code. Other companies post their code on the internet where it is free to anyone to download. Apache OpenOffice is an example of open source software code.<ref>Source Code Licensing [https://www.thoughtco.com/source-code-definition-958200 ThoughtCo]</ref>
+
Source code can be either proprietary or open. Many companies closely guard their source code. Users can use the compiled code, but they cannot see or modify it. Microsoft Office is an example of proprietary source code. Other companies post their code on the internet which is free for anyone to download. Apache OpenOffice is an example of open-source software code.<ref>[https://www.thoughtco.com/source-code-definition-958200 Source Code Licensing]</ref>
  
The source code which constitutes a program is usually held in one or more text files stored on a computer's hard disk; usually these files are carefully arranged into a directory tree, known as a source tree. Source code can also be stored in a database (as is common for stored procedures) or elsewhere. The source code for a particular piece of software may be contained in a single file or many files. Though the practice is uncommon, a program's source code can be written in different programming languages. For example, a program written primarily in the C programming language, might have portions written in assembly language for optimization purposes. It is also possible for some components of a piece of software to be written and compiled separately, in an arbitrary programming language, and later integrated into the software using a technique called library linking. In some languages, such as Java, this can be done at run time (each class is compiled into a separate file that is linked by the interpreter at runtime). Yet another method is to make the main program an interpreter for a programming language,[citation needed] either designed specifically for the application in question or general-purpose, and then write the bulk of the actual user functionality as macros or other forms of add-ins in this language, an approach taken for example by the GNU Emacs text editor. The code base of a computer programming project is the larger collection of all the source code of all the computer programs which make up the project. It has become common practice to maintain code bases in version control systems. Moderately complex software customarily requires the compilation or assembly of several, sometimes dozens or maybe even hundreds, of different source code files. In these cases, instructions for compilations, such as a Makefile, are included with the source code. These describe the programming relationships among the source code files, and contain information about how they are to be compiled.<ref>Organization of Source Code [https://en.wikipedia.org/wiki/Source_code Wikipedia]</ref>
+
The source code which constitutes a program is usually held in one or more text files stored on a computer's hard disk; usually, these files are carefully arranged into a directory tree, known as a source tree. Source code can also be stored in a database (as is common for stored procedures) or elsewhere. The source code for a particular piece of software may be contained in a single file or many files. Though the practice is uncommon, a program's source code can be written in different programming languages. For example, a program written primarily in the C programming language might have portions written in assembly language for optimization purposes. It is also possible for some components of a piece of software to be written and compiled separately, in an arbitrary programming language, and later integrated into the software using a technique called library linking. In some languages, such as Java, this can be done at run time (each class is compiled into a separate file that is linked by the interpreter at runtime). Yet another method is to make the main program an interpreter for a programming language,[citation needed] either designed specifically for the application in question or general purpose and then write the bulk of the actual user functionality as macros or other forms of add-ins in this language, an approach taken for example by the GNU Emacs text editor. The code base of a computer programming project is the larger collection of all the source code of all the computer programs which make up the project. It has become common practice to maintain code bases in version control systems. Moderately complex software customarily requires the compilation or assembly of several, sometimes dozens or maybe even hundreds, of different source code files. In these cases, instructions for compilations, such as a Makefile, are included with the source code. These describe the programming relationships among the source code files and contain information about how they are to be compiled.<ref>[https://en.wikipedia.org/wiki/Source_code Organization of Source Code]</ref>
 +
 
 +
 
 +
== See Also ==
 +
*[[Open Source Software]]
 +
*[[Free and Open-Source Software (FOSS)]]
 +
 
 +
 
 +
== References ==
 +
<references/>

Latest revision as of 14:55, 19 January 2023

Source Code is the source of a computer program. It contains declarations, instructions, functions, loops, and other statements, which act as instructions for the program on how to function. Programs may contain one or more source code text files, which can be stored on a computer's hard disk, in a database, or printed in books of code snippets.

Programmers can add comments to their source code to help other developers understand it. Short scripts can also be run from source code using a scripting engine such as VBScript or the PHP engine. While large programs frequently reference hundreds or thousands of files, it is not uncommon for small programs to use just one source code. If there are many source files, the program may be organized into different sections. If a single file contains all the program's variables and functions, it can be hard to locate specific sections of the code.[1]

Beyond providing the foundation for software creation, source code has other important purposes, as well. For example, skilled users who have access to source code can more easily customize software installations, if needed. Meanwhile, other developers can use source code to create similar programs for other operating platforms -- a task that would be trickier without the coding instructions. Access to source code also allows programmers to contribute to their community, either through sharing code for learning purposes or by recycling portions of it for other applications.[2]

Source code can be either proprietary or open. Many companies closely guard their source code. Users can use the compiled code, but they cannot see or modify it. Microsoft Office is an example of proprietary source code. Other companies post their code on the internet which is free for anyone to download. Apache OpenOffice is an example of open-source software code.[3]

The source code which constitutes a program is usually held in one or more text files stored on a computer's hard disk; usually, these files are carefully arranged into a directory tree, known as a source tree. Source code can also be stored in a database (as is common for stored procedures) or elsewhere. The source code for a particular piece of software may be contained in a single file or many files. Though the practice is uncommon, a program's source code can be written in different programming languages. For example, a program written primarily in the C programming language might have portions written in assembly language for optimization purposes. It is also possible for some components of a piece of software to be written and compiled separately, in an arbitrary programming language, and later integrated into the software using a technique called library linking. In some languages, such as Java, this can be done at run time (each class is compiled into a separate file that is linked by the interpreter at runtime). Yet another method is to make the main program an interpreter for a programming language,[citation needed] either designed specifically for the application in question or general purpose and then write the bulk of the actual user functionality as macros or other forms of add-ins in this language, an approach taken for example by the GNU Emacs text editor. The code base of a computer programming project is the larger collection of all the source code of all the computer programs which make up the project. It has become common practice to maintain code bases in version control systems. Moderately complex software customarily requires the compilation or assembly of several, sometimes dozens or maybe even hundreds, of different source code files. In these cases, instructions for compilations, such as a Makefile, are included with the source code. These describe the programming relationships among the source code files and contain information about how they are to be compiled.[4]


See Also


References