In computer science, source code (commonly just source or code) is any sequence of statements or declarations written in some human-readable computer programming language. Computer science (or computing science) is the study and the Science of the theoretical foundations of Information and Computation and their Human-readable refers to a representation of information that can be naturally read by Humans In most contexts the alternative representation is Data A programming language is an Artificial language that can be used to write programs which control the behavior of a machine particularly a Computer.
The source code which constitutes a program is usually held in one or more text files, sometimes stored in databases as stored procedures and may also appear as code snippets printed in books or other media. Computer programs (also software programs, or just programs) are instructions for a Computer. A text file (sometimes spelled "textfile" is a kind of Computer file that is structured as a sequence of lines. A stored procedure is a Subroutine available to applications accessing a relational database system. Snippet is a programming term for a small region of re-usable Source code or text A large collection of source code files may be organized into a directory tree, in which case it may also be known as a source tree. In Computing, a directory, catalog, folder or drawer is an entity in a File system, which contains a group of files and/or other directories
A computer program's source code is the collection of files needed to convert from human-readable form to some kind of computer-executable form. The source code may be converted into an executable file by a compiler, or executed on the fly from the human readable form with the aid of an interpreter. In Computing, an executable (file causes a computer "to perform indicated tasks according to encoded instructions," as opposed to a file that only contains A compiler is a Computer program (or set of programs that translates text written in a computer language (the source language) into another Colloquial usage In colloquial use on the fly means something created when needed In Computer science, an interpreter normally means a Computer program that executes, i
The code base of a programming project is the larger collection of all the source code of all the computer programs which make up the project. Computer programs (also software programs, or just programs) are instructions for a Computer.
Contents |
Source code is primarily used as input to the process that produces an executable program (ie. , it is compiled or interpreted). A compiler is a Computer program (or set of programs that translates text written in a computer language (the source language) into another It is also used as a method of communicating algorithms between people (eg. In Mathematics, Computing, Linguistics and related subjects an algorithm is a sequence of finite instructions often used for Calculation , code snippets in books). Snippet is a programming term for a small region of re-usable Source code or text
Programmers often find it helpful to review existing source code to learn about programming techniques. A programmer is someone who writes Computer software. The term computer programmer can refer to a specialist in one area of computer programming or to a generalist The sharing of source code between developers is frequently cited as a contributing factor to the maturation of their programming skills. Source code can be an expressive artistic medium. In the Arts media (plural of Medium) are the materials and techniques used by an Artist to produce a work
Porting software to other computer platforms is very difficult without source code. See also Software portability In Computer science, porting is the process of adapting software so that an executable program can be created In Computing, a platform describes some sort of Hardware architecture or Software framework (including Application frameworks, that allows Without the source code for a particular piece of software, portability is generally very expensive. Binary translation can sometimes be used to run a program when only the executable form rather than the source code is available.
Decompilation can be used to generate source code, either in assembly code or in a high level language. A decompiler is the name given to a Computer program that performs the reverse operation to that of a Compiler. See the terminology section below for information regarding inconsistent use of the terms assembly and assembler In computing a high-level programming language is a Programming language with strong abstraction from the details of the computer
Programmers frequently adapt source code from one piece of software to use in other projects, a concept known as software reusability. In Computer science and Software engineering, reusability is the likelihood a segment of source code can be used again to add new functionalities with slight or no
The source code for a particular piece of software may be contained in a single file or many files. Though uncommon, a program's source code is not necessarily all written in the same programming language. For example, a program written primarily in the C programming language, might have portions written in Assembly language for optimization purposes. tags please moot on the talk page first! --> In Computing, C is a general-purpose cross-platform block structured See the terminology section below for information regarding inconsistent use of the terms assembly and assembler 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 Computer science, a library is a collection of Subroutines used to develop Software. This is the case in some languages, such as Java: each class is compiled separately into a file and linked by the interpreter at runtime.
Yet another method is to make the main program an interpreter for a programming language, 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. A macro (from the Greek 'μάκρο' for long or far in Computer science is a rule or Pattern that specifies how a certain input sequence (often a sequence Emacs is a class of feature-rich Text editors usually characterized by their extensibility
Moderately complex software customarily requires the compilation or assembly of several, sometimes dozens or even hundreds, of different source code files. In these cases, instructions for compilations, such as a Makefile, are included with the source code. In Software development, make is a utility for automatically building executable programs from Source code. These describe the relationships among the source code files, and contain information about how they are to be compiled.
The revision control system is another tool frequently used by developers for source code maintenance. Revision control (also known as version control (system (VCS, source control or (source code management (SCM) is the management of multiple revisions
Software, and its accompanying source code, typically falls within one of two licensing paradigms: free software and proprietary software. A software license (or software licence in commonwealth usage is a Legal instrument governing the usage or redistribution of copyright protected software Free software or software libre is Software that can be used studied and modified without restriction and which can be copied and redistributed in modified or unmodified Proprietary software is Computer software on which the producer has set restrictions on use private modification copying, or republishing. Generally speaking, software is free if the source code is free to use, distribute, modify and study, and proprietary if the source code is kept secret, or is privately owned and restricted. The provisions of the various copyright laws are often used for this purpose, though trade secrecy and patents are also relied upon. A trade secret is a Formula, practice, Process, Design, instrument, Pattern, or compilation of Information which A patent is a set of Exclusive rights granted by a State to an inventor or his assignee for a fixed period of time in exchange for a disclosure of an Additionally, retail software usually comes with an end-user license agreement (EULA) which typically prohibits decompilation, reverse engineering, analysis, modification, or circumventing a copy protection. Retail software is Computer software sold to End consumers usually under restricted licenses A decompiler is the name given to a Computer program that performs the reverse operation to that of a Compiler. Reverse engineering (RE is the process of discovering the technological principles of a device object or system through analysis of its structure function and operation Copy protection, also known as content protection, copy prevention, or copy restriction, is a technology for preventing the unauthorised reproduction Types of source code protection -- beyond traditional compilation to object code -- include code encryption, code obfuscation or code morphing. A compiler is a Computer program (or set of programs that translates text written in a computer language (the source language) into another In Computer science, object code, or an object file, is the representation of code that a Compiler or Assembler generates by processing Obfuscated code is Source code or Intermediate language that is very hard to read and understand often intentionally Code morphing is one of the approaches to protect Software applications from Reverse engineering, analysis modifications and cracking used in Obfuscating software
As of 2003, court systems are in the process of deciding whether source code should be considered a Constitutionally protected form of free speech in the United States. Year 2003 ( MMIII) was a Common year starting on Wednesday of the Gregorian calendar. Freedom of speech is the freedom to speak freely without Censorship or Limitation. Proponents of the free speech argument claim that because source code conveys information to programmers, is written in a language, and can be used to share humour and other artistic pursuits, it is a protected form of communication. The opposing view is that source code is functional, more than artistic speech, and is thus not protected by First Amendment Rights of the U.S. Constitution. The Constitution of the United States of America is the supreme Law of the United States.
One of the first court cases regarding the nature of source code as free speech involved University of California mathematics professor Dan Bernstein, who had published on the internet the source code for an encryption program that he created. The University of California ( UC) is a Public university system in the state of California. Mathematics is the body of Knowledge and Academic discipline that studies such concepts as Quantity, Structure, Space and Daniel Julius Bernstein (sometimes known simply as djb; born October 29, 1971) is a Professor at the University of Illinois at Chicago At the time, encryption algorithms were classified as munitions by the United States government; exporting encryption to other countries was considered an issue of national security, and had to be approved by the State Department. Ammunition, often referred to as ammo, is a generic term derived from the French language la munition which National security is the entire scope of measures undertaken by the Governments of Nation-states in providing assurance of national Sovereignty The Electronic Frontier Foundation sued the U.S. government on Bernstein's behalf; the court ruled that source code was free speech, protected by the First Amendment. The Electronic Frontier Foundation ( EFF) is an international non-profit advocacy and legal organization based in the United States with the stated purpose of being dedicated The federal government of the United States is the central United States Governmental body established by the United States Constitution.
In 2000, in a related court case, the issue was again brought under some scrutiny when the Motion Picture Association of America (MPAA) sued the 'hacker' magazine 2600 and a number of other websites for distributing the source code to DeCSS, an algorithm capable of decrypting scrambled DVD discs. 2000 ( MM) was a Leap year that started on Saturday of the Common Era, in accordance with the Gregorian calendar. 2600 The Hacker Quarterly is a quarterly American publication that specializes in publishing technical information on a variety of subjects including telephone DeCSS is a Computer program capable of decrypting content on a DVD -Video disc encrypted using the Content-Scrambling System (CSS DVD (also known as " Digital Versatile Disc " or " Digital Video Disc " - see Etymology)is The algorithm was developed to allow people to play legally purchased DVDs on the Linux operating system, which had no DVD software at the time. Linux (commonly pronounced ˈlɪnəks An operating system (commonly abbreviated OS and O/S) is the software component of a Computer system that is responsible for the management and coordination The US District court decision favored the MPAA; 2600 magazine was prohibited from posting or linking to the source code on their website. District courts are a category of Courts which exists in several nations This ruling was widely considered a victory for the supporters of the Digital Millennium Copyright Act, as it established a legal precedent for the notion that source code is not Constitutionally protected free speech. The Digital Millennium Copyright Act (DMCA is a United States Copyright Law which implements two 1996 treaties of the World Intellectual Property In Common law legal systems, a precedent or authority is a Legal case establishing a principle or rule that a Court or other judicial It was affirmed by the Appeals Court and as of late 2003 is being appealed to the US Supreme Court. In Law, an appeal is a process for requesting a formal change to an official decision Year 2003 ( MMIII) was a Common year starting on Wednesday of the Gregorian calendar. The Supreme Court of the United States is the highest judicial body in the United States and leads the federal judiciary.
The way a program is written can have important consequences for its maintainers. In the context of Software engineering, software quality measures how well Software is designed ( quality of design) and how well the software conforms Many source code programming style guides, which stress readability and some language-specific conventions are aimed at the maintenance of the software source code, which involves debugging and updating. Programming style refers to a set of rules or guidelines used when writing the Source code for a Computer program. Other issues also come into considering whether code is well written, such as the logical structuring of the code into manageable sections.
(VEW04) "Using a Decompiler for Real-World Source Recovery", M Van Emmerik and T Waddington, the Working Conference on Reverse Engineering, Delft, Netherlands, 9th-12th November 2004. Extended version of the paper.