Source code: Difference between revisions
Pat Palmer (talk | contribs) m (Text replacement - "United States of America|American" to "American") Tag: Reverted |
Pat Palmer (talk | contribs) Tag: Manual revert |
||
Line 5: | Line 5: | ||
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 | 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]]). |
Revision as of 12:02, 26 July 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).