Source code: Difference between revisions
imported>David E. Volk m (removed language language repeat) |
mNo edit summary |
||
(3 intermediate revisions by one other user not shown) | |||
Line 3: | Line 3: | ||
In computer programming, '''source code''' is the code which a [[compiler]] turns into a compiled piece of software or an interpreter runs. Source code is written in a human-redable language that usually takes some aspects of written and mathematical languages, but designed to have as little ambiguity as possible. Source code is different from compiled 'object' code, which is not human readable - these are binary instructions given to either the processor or the [[Virtual Machine]] in order to trigger routines. One particular piece of source code can be interpreted in different ways by different compilers, leading to different results - this is often used so that one can write a routine that works the same way on different architectures (see [[abstraction]]). Some compilers allow you to create source code from the binary object code - this is caleld [[decompilation]]. | In computer programming, '''source code''' is the code which a [[compiler]] turns into a compiled piece of software or an interpreter runs. Source code is written in a human-redable language that usually takes some aspects of written and mathematical languages, but designed to have as little ambiguity as possible. Source code is different from compiled 'object' code, which is not human readable - these are binary instructions given to either the processor or the [[Virtual Machine]] in order to trigger routines. One particular piece of source code can be interpreted in different ways by different compilers, leading to different results - this is often used so that one can write a routine that works the same way on different architectures (see [[abstraction]]). Some compilers allow you to create source code from the binary object code - this is caleld [[decompilation]]. | ||
The management of source code in an effective way is an important concern of [[software engineering]] practice. The use of [[revision control systems]] allows developers to keep a history of changes they have made to source code, and 'branch' and 'merge' different versions of the code. Different programming paradigms tend to encourage (sometimes require) source code to be managed in particular ways. For instance, in the [[Java programming language]], each class is required to be in a different file, with a ".java" extension - that class is then compiled into an accompanying ".class" file. Other languages are not strict about this at all - in the [[Python programming language]], for instance, people will often put a class together with an accompanying [[unit testing|test class]] in the same file. In the [[Ruby programming language]], the process of "monkey patching" often means that code for the same class is split over many different files. | The management of source code in an effective way is an important concern of [[software engineering]] practice. The use of [[revision control systems]] allows developers to keep a history of changes they have made to source code, and 'branch' and 'merge' different versions of the code. Different programming paradigms tend to encourage (sometimes require) source code to be managed in particular ways. For instance, in the [[Java programming language]], each class is required to be in a different file, with a ".java" extension - that class is then compiled into an accompanying ".class" file. Other languages are not strict about this at all - in the [[Python programming language]], for instance, people will often put a class together with an accompanying [[unit testing|test class]] in the same file. In the [[Ruby (programming language)]], the process of "monkey patching" often means that code for the same class is split over many different files. | ||
In [[United States of America|American]] law, there has been some controversy over whether or not source code is covered by the First Amendment. The courts have decided that source code does qualify as expression protected under the First Amendment, which has been vital for hackers and those with an interest in computer security ([[Dan Bernstein]], [[2600 Magazine]] and [[DeCSS]]). | In [[United States of America|American]] law, there has been some controversy over whether or not source code is covered by the First Amendment. The courts have decided that source code does qualify as expression protected under the First Amendment, which has been vital for hackers and those with an interest in computer security ([[Dan Bernstein]], [[2600 Magazine]] and [[DeCSS]]).[[Category:Suggestion Bot Tag]] |
Latest revision as of 11:00, 20 October 2024
In computer programming, source code is the code which a compiler turns into a compiled piece of software or an interpreter runs. Source code is written in a human-redable language that usually takes some aspects of written and mathematical languages, but designed to have as little ambiguity as possible. Source code is different from compiled 'object' code, which is not human readable - these are binary instructions given to either the processor or the Virtual Machine in order to trigger routines. One particular piece of source code can be interpreted in different ways by different compilers, leading to different results - this is often used so that one can write a routine that works the same way on different architectures (see abstraction). Some compilers allow you to create source code from the binary object code - this is caleld decompilation.
The management of source code in an effective way is an important concern of software engineering practice. The use of revision control systems allows developers to keep a history of changes they have made to source code, and 'branch' and 'merge' different versions of the code. Different programming paradigms tend to encourage (sometimes require) source code to be managed in particular ways. For instance, in the Java programming language, each class is required to be in a different file, with a ".java" extension - that class is then compiled into an accompanying ".class" file. Other languages are not strict about this at all - in the Python programming language, for instance, people will often put a class together with an accompanying test class in the same file. In the Ruby (programming language), the process of "monkey patching" often means that code for the same class is split over many different files.
In American law, there has been some controversy over whether or not source code is covered by the First Amendment. The courts have decided that source code does qualify as expression protected under the First Amendment, which has been vital for hackers and those with an interest in computer security (Dan Bernstein, 2600 Magazine and DeCSS).