SUPPORT THE WORK

GetWiki

Source code

ARTICLE SUBJECTS
aesthetics  →
being  →
complexity  →
database  →
enterprise  →
ethics  →
fiction  →
history  →
internet  →
knowledge  →
language  →
licensing  →
linux  →
logic  →
method  →
news  →
perception  →
philosophy  →
policy  →
purpose  →
religion  →
science  →
sociology  →
software  →
truth  →
unix  →
wiki  →
ARTICLE TYPES
essay  →
feed  →
help  →
system  →
wiki  →
ARTICLE ORIGINS
critical  →
discussion  →
forked  →
imported  →
original  →
Source code
[ temporary import ]
please note:
- the content below is remote from Wikipedia
- it has been imported raw for GetWiki
{{Short description|Well-structured, human-readable text that encodes behavior of a computer}}{{About|the software concept|the film|Source Code}}{{Use dmy dates|date=January 2016}}File:Hello world c.svg|thumb|Simple C-language source code example, a procedural programming language. The resulting program prints “hello, world” on the computer screen. This first known “Hello worldsnippet from the seminal book The C Programming Language originates from Brian Kernighan in the (Bell Labs|Bell Laboratories]] in 1974.WEB,cm.bell-labs.com/cm/cs/who/dmr/ctut.pdf, Programming in C: A Tutorial, Brian W., Kernighan, Bell Laboratories, Murray Hill, N. J.,cm.bell-labs.com/cm/cs/who/dmr/ctut.pdf," title="web.archive.org/web/20150223025837cm.bell-labs.com/cm/cs/who/dmr/ctut.pdf,">web.archive.org/web/20150223025837cm.bell-labs.com/cm/cs/who/dmr/ctut.pdf, 23 February 2015, dead, ){{Program execution}}In computing, source code, or simply code or source, is text (usually plain text) that conforms to a human-readable programming language and specifies the behavior of a computer. A programmer writes code to produce a program that runs on a computer.Since a computer, at base, only understands machine code, source must be translated in order to be used by the computer and this can be implemented in a variety of ways depending on available technology. Source code can be converted by a compiler or an assembler into machine code that can be directly executed. Alternatively, source code can be processed without conversion to machine code via an interpreter that performs the actions prescribed by the source code via the interpreter’s machine code. Other technology (i.e. bytecode) incorporates both mechanisms by converting the source code to an intermediate form that is often not human-readable but also not machine code and an interpreter executes the intermediate form.Most languages allow for comments. The programmer can add comments to document the source code for themself and for other programmers reading the code. Comments cannot be represented in machine code, and therefore, are ignored by compilers, interpreters and the like.Often, the source code of application software is not distributed or publicly available since the producer wants to protect their Intellectual property (IP). But, if the source code is available (open source), it can be useful to a user, programmer or a system administrator, any of whom might wish to study or modify the program.

Definitions

Richard Stallman’s definition, formulated in his 1989 seminal license, proposed source code as whatever form in which software is modified:
The “source code” for a work means the preferred form of the work for making modifications to it.WEB, 29 June 2007, The GNU General Public License v3.0,www.gnu.org/licenses/gpl-3.0.html, live,www.gnu.org/licenses/gpl-3.0.html," title="web.archive.org/web/20240115022708www.gnu.org/licenses/gpl-3.0.html,">web.archive.org/web/20240115022708www.gnu.org/licenses/gpl-3.0.html, Jan 15, 2024, GNU Project, Free Software Foundation,
Some classical sources define source code as the text form of programming languages, for example:Source code (also referred to as source or code) is the version of software as it is originally written (i.e., typed into a computer) by a human in plain text (i.e., human readable alphanumeric characters).WEB, live, The Linux Information Project,www.linfo.org/source_code.html, Source Code Definition,www.linfo.org/source_code.html," title="web.archive.org/web/20171003223931www.linfo.org/source_code.html,">web.archive.org/web/20171003223931www.linfo.org/source_code.html, 3 October 2017, May 23, 2004, February 14, 2006,
This responds to the fact that, when program translation first appeared, the contemporary form of software production were textual programming languages, thus source code was text code while machine code was target code. However, as programming pipelines started to incorporate more intermediate forms, some in languages like JavaScript that could be either source or target, text code stopped being synonymous with source code. Stallman’s definition thus contemplates JavaScript and HTML’s source-target ambivalence, as well as contemplating possible future forms of software production, like visual programming languages, or datasets in Machine Learning.WEB,www.gnu.org/philosophy/free-sw.en.html, What is Free Software?, GNU, 12 December 2015, 3 July 2017,www.gnu.org/philosophy/free-sw.en.html," title="web.archive.org/web/20170703140224www.gnu.org/philosophy/free-sw.en.html,">web.archive.org/web/20170703140224www.gnu.org/philosophy/free-sw.en.html, live, WEB, Stallman, Richard,www.gnu.org/philosophy/javascript-trap.html, The JavaScript Trap, GNU Project, 2017-11-15, 2022-07-20, Other broader interpretations, however, consider source code to include the machine code along with all the high level languages that produce it, this definition undoes the original machine/text distinction by considering each step in the program translation to be source code.For the purpose of clarity “source code” is taken to mean any fully executable description of a software system. It is therefore so construed as to include machine code, very high level languages and executable graphical representations of systems.“Why Source Code Analysis and Manipulation Will Always Be Important” by Mark Harman, 10th IEEE International Working Conference on Source Code Analysis and Manipulation (SCAM 2010). TimiÈ™oara, Romania, 12–13 September 2010.“SCAM Working Conference”. {{Webarchive|url=https://web.archive.org/web/20170929020604www.ieee-scam.org/ |date=29 September 2017 }}. This approach allows for a much more flexible approach to system analysis, dispensing with the requirement for designer to collaborate by publishing a convenient form for understanding and modification. It can also be applied to scenarios where a designer is not needed, like DNA.However, this form of analysis does not contemplate a costlier machine-to-machine code analysis than human-to-machine code analysis.The earliest programs for stored-program computers were entered in binary through the front panel switches of the computer. This first-generation programming language had no distinction between source code and machine code.When IBM first offered software to work with its machine, the source code was provided at no additional charge. At that time, the cost of developing and supporting software was included in the price of the hardware. For decades, IBM distributed source code with its software product licenses, until 1983.MAGAZINE, Computerworld, 22, 6, February 8, 1988, Martin Goetz, 59, Object-code only: Is IBM playing fair?, It was in 1983 that IBM reversed its 20-year-old policy of distributing source code with its software product licenses.,books.google.com/books?id=hSBrPSYgjI4C, Most early computer magazines published source code as type-in programs.Occasionally the entire source code to a large program is published as a hardback book, such as Computers and Typesetting, vol. B: TeX, The Program by Donald Knuth, PGP Source Code and Internals by Philip Zimmermann, PC SpeedScript by Randy Thompson, and µC/OS, The Real-Time Kernel by Jean Labrosse.

Organization

The source code which constitutes a program is usually in one or more text files stored on a computer file system. A larger codebase may be organized in 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.Image:CodeCmmt002.svg|thumb|right|A more complex Java source code example. Written in object-oriented programming style, it demonstrates boilerplate codeboilerplate codeA program’s source code can be written in multiple programming languages.WEB, Extending and Embedding the Python Interpreter,docs.python.org/extending/, Python documentation, 17 August 2014, 3 October 2012,docs.python.org/extending/," title="web.archive.org/web/20121003050336docs.python.org/extending/,">web.archive.org/web/20121003050336docs.python.org/extending/, live, For example, it is not uncommon for a program written primarily in C to have portions written in assembly language for optimization purposes. Some languages allow multiple languages in the same file. For example, a block of assembly embedded in a C file.Library linking allows for components to be written and compiled separately, sometimes in multiple languages, and later integrated into a program. For example, with Java, classes are compiled into separate files that are linked together by the interpreter at runtime. Microsoft Windows supports programs built from DLLs; each of which can be written in any language that can be compiled to a DLL. Similarly, Microsoft .NET supports programs built from .NET assemblies; each of which can be written in any .NET language.A program’s entry point can be an interpreter. The interpreter could be designed for an application-specific, custom language or for a general-purpose language so that the interpreter is can be used for multiple applications.WEB, Interpreter Method,www.techopedia.com/definition/7793/interpreter, 2022-08-04, Techopedia, 12 August 2020, Margaret, Rouse, en, Typically, source code is stored in a version control system. To produce runnable software, a complex codebase often requires building (compiling, assembling, ...) many source code files hundreds, thousands or more. Instructions for building, such as a Makefile, are often controlled with the source code in the same version control repository. These build instruction files describe the relationships among the source code files and contain information about how they are to be built separately and then combined together.

Purposes

Source code is primarily input to an computer process that ultimately results in controlling computer behavior. In other words, it is input to a compiler, interpreter or the like. It is also used to communicate algorithms between people e.g., code snippets online or in books.Spinellis, D: Code Reading: The Open Source Perspective. Addison-Wesley Professional, 2003. {{ISBN|0-201-79940-5}}Computer programmers may find it helpful to review existing source code to learn about programming techniques. The sharing of source code between developers is frequently cited as a contributing factor to the maturation of their programming skills. Some people consider source code an expressive artistic medium.”Art and Computer ProgrammingONLamp.com {{Webarchive|url=https://web.archive.org/web/20180220045508www.onlamp.com/pub/a/onlamp/2005/06/30/artofprog.html |date=20 February 2018 }}, (2005)Porting software to another computer platform is usually prohibitively difficult and expensive without source code. One possible porting option without source code is binary translation. An other is emulation of the original platform although this is often too computationally expensive; runs slowly.WEB, Software Portability – CodeProject,www.codeproject.com/Answers/803159/What-is-Portability, 2022-08-04, codeproject.com, Decompilation is the process of converting machine code to a more usable form often to assembly code or high-level language source code.Software reusability describes the practice of using existing software in another software system via a software library. Some may consider reuse to include adapting source code from one piece of software to another.

Legal aspects

{{see also|History of free and open-source software}}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.JOURNAL, Liu, Joseph P., Dogan, Stacey L., 2005, Copyright Law and Subject Matter Specificity: The Case of Computer Software,lawdigitalcommons.bc.edu/lsfp/536/, New York University Annual Survey of American Law, en, 61, 2, dead,web.archive.org/web/20210625073240/https://lawdigitalcommons.bc.edu/lsfp/536/, Jun 25, 2021, 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”.Apple Computer, Inc. v. Franklin Computer Corporation Puts the Byte Back into Copyright Protection for Computer Programs {{Webarchive|url=https://web.archive.org/web/20170507231059digitalcommons.law.ggu.edu/cgi/viewcontent.cgi?article=1344&context=ggulrev |date=7 May 2017 }} 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.In 1983 in the United States court case Apple v. Franklin it was ruled that the same applied to object code; and that the Copyright Act gave computer programs the copyright status of literary works.In 1999, in the United States court case Bernstein v. United States it was further ruled that source code could be considered a constitutionally protected form of free speech. Proponents of free speech argued that because source code conveys information to programmers, is written in a language, and can be used to share humor and other artistic pursuits, it is a protected form of communication.WEB,cr.yp.to/export/2002/08.02-bernstein-subst.pdf, Info, cr.yp.to, 2019-12-27, 7 June 2011,cr.yp.to/export/2002/08.02-bernstein-subst.pdf," title="web.archive.org/web/20110607045922cr.yp.to/export/2002/08.02-bernstein-subst.pdf,">web.archive.org/web/20110607045922cr.yp.to/export/2002/08.02-bernstein-subst.pdf, live, Bernstein v. US Department of Justice {{Webarchive|url=https://web.archive.org/web/20180404070256www.eff.org/cases/bernstein-v-us-dept-justice |date=4 April 2018 }} on eff.orgEFF at 25: Remembering the Case that established Code as Speech {{Webarchive|url=https://web.archive.org/web/20180105193250www.eff.org/deeplinks/2015/04/remembering-case-established-code-speech |date=5 January 2018 }} on EFF.org by Alison Dame-Boyle (16 April 2015)

Licensing

|Copyright [yyyy] [name of copyright owner]Licensed under the Apache License, Version 2.0 (the “License“);you may not use this file except in compliance with the License.You may obtain a copy of the License at Unless required by applicable law or agreed to in writing, softwaredistributed under the License is distributed on an “AS IS” BASIS,WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.See the License for the specific language governing permissions andlimitations under the License.|width=300px}}An author of a non-trivial work like software, has several exclusive rights, among them the copyright for the source code and object code.WEB,www.freesoftwaremagazine.com/articles/what_if_copyright_didnt_apply_binary_executables, What if copyright didn’t apply to binary executables?, 2008-08-29, Terry, Hancock, Free Software Magazine, 2016-01-25, 25 January 2016,www.freesoftwaremagazine.com/articles/what_if_copyright_didnt_apply_binary_executables," title="web.archive.org/web/20160125013542www.freesoftwaremagazine.com/articles/what_if_copyright_didnt_apply_binary_executables,">web.archive.org/web/20160125013542www.freesoftwaremagazine.com/articles/what_if_copyright_didnt_apply_binary_executables, dead, The author has the right and possibility to grant customers and users of his software some of his exclusive rights in form of software licensing. Software, and its accompanying source code, can be associated with several licensing paradigms; the most important distinction is free software vs proprietary software. This is done by including a copyright notice that declares licensing terms. If no notice is found, then the default of All rights reserved is implied.Generally speaking, a software is free software if its users are free to use it for any purpose, study and change its source code, give or sell its exact copies, and give or sell its modified copies. Software is proprietary if it is distributed while the source code is kept secret, or is privately owned and restricted. One of the first software licenses to be published and to explicitly grant these freedoms was the GNU General Public License in 1989; the BSD license is another early example from 1990.For proprietary software, the provisions of the various copyright laws, trade secrecy and patents are used to keep the source code closed. Additionally, many pieces of retail software come with an end-user license agreement (EULA) which typically prohibits decompilation, reverse engineering, analysis, modification, or circumventing of copy protection. Types of source code protection—beyond traditional compilation to object code—include code encryption, code obfuscation or code morphing.

Quality

The way a program is written can have important consequences for its maintainers. Coding conventions, which stress readability and some language-specific conventions, are aimed at the maintenance of the software source code, which involves debugging and updating. Other priorities, such as the speed of the program’s execution, or the ability to compile the program for multiple architectures, often make code readability a less important consideration, since code quality generally depends on its purpose.

See also

References

{{reflist}}

Sources

External links

{{Wiktionary|code|source code}}{{Commons category}}
  • Source Code Definition by The Linux Information Project (LINFO)
  • WEB, Obligatory accreditation system for IT security products, 22 September 2008
    Yomiuri Shimbun said, citing unnamed sources. If a company refuses to disclose information, China would ban it from exporting the product to the Chinese market or producing or selling it in China, the paper said. >url=http://www.metafilter.com/75061/Obligatory-accreditation-system-for-IT-security-products, MetaFilter.com, {{Authority control}}


    - content above as imported from Wikipedia
    - "Source code" does not exist on GetWiki (yet)
    - time: 10:32am EDT - Wed, May 22 2024
[ this remote article is provided by Wikipedia ]
LATEST EDITS [ see all ]
GETWIKI 21 MAY 2024
GETWIKI 09 JUL 2019
Eastern Philosophy
History of Philosophy
GETWIKI 09 MAY 2016
GETWIKI 18 OCT 2015
M.R.M. Parrott
Biographies
GETWIKI 20 AUG 2014
CONNECT