Changes

Jump to navigation Jump to search

Source code

2,948 bytes added, 20:46, 6 May 2023
m
no edit summary
[[Image:CodeCmmt002.svg|thumb|right|300px|An illustration '''Source code''' is a collection of [[Java text files containing instructions that a computer either runs as-is (programming languageinterpretation) or translates into an executable file beforehand (compilation / assembly)|Java]] source . Source code with prologue comments indicated in redis written using a human-readable computer language so that it can be translated by a compiler or an interpreter. It's also possible to decompile an executable file, inline comments indicated in green, and program statements indicated in blue]]though decompilers aren't as common.
In [[computing]], '''The language used changes how the source code''' is any collection of [[Computer program|computer instructions]] (possibly with [[Comment (computer programming)|comments]]) written using some [[humanread, and just like emulation it too has its own high and low-readable]] [[computer language]], usually as [[plain text|text]]level types. The source code of If a program is specially designed to facilitate the work were written in an assembly language (which often involves taking advantage of computer [[programmer]]ssystem-specific attributes), who specify an assembler would write the actions to be performed by a computer mostly by writing source machine code"word for word," reflecting how the machine takes instructions. The source code is often transformed by If a [[compiler]] program into were written in a low-level [[machine language, a compiler would read the code]] understood by and translate the computer. The equivalent in machine code might then be stored for [[Execution (computing)|execution]] at . If a program were written in a high-level language, it would often work without requiring a later timecompiler. Alternatively, an [[interpreter (computing)|interpreter]] can be used Some compilers and interpreters also do error checking to analyze and perform make sure the outcomes of programmer's code is either properly written or formatted. Many languages also check that the source code program directly on the flywon't inherently cause bugs, such as Rust.
Most [[computer application]]s are distributed in a form that includes [[executable file]]sSoftware can be ported to other types of computers but, but not their source code. If without the source code were included, it would be useful 's often prohibitively difficult to a [[user (computing)|user]], programmer, or [[system administrator]], who may wish do. Other ways to modify the program or understand how it worksport software include binary translation and platform emulation.
Aside from its [[Machine-readable data|machine-readable]] forms, source code also appears ==Language levels==Software can be programmed in books and other media; often many different languages (even multiple in the form of small [[code snippets]]one program), but occasionally complete and just like [[codebaseHigh/Low level emulation|code baseshigh and low level emulation]]; a well-known case is , they have different levels of abstraction. Here are the source code of [[Pretty Good Privacy|PGP]]different ones, from lowest to highest.
== Definitions =Assembly===The notion Assembly is the closest representation of source machine code may also be taken more broadlywithout being machine code. There are basically no abstractions from the architecture, meaning everything is close to include what the machine code processes. This used to be ideal for platforms at a time when compilers weren't optimized enough to give equivalent performance to assembly, and notations as a result you'd find that early console games were programmed in graphical assembly more often than higher level languages, neither of which are textual . Assembly is commonplace in nature. An example from [[dynamic recompilation]] as well because it allows developers to optimize code closer for an article presented on the annual IEEE conference and on Source Code Analysis and Manipulation:<ref>[http://www.ieeearchitecture than even a low-scam.org/ SCAM Working Conference], 2001–2010level language like C or C++.</ref>
<blockquote>For ===Low===A low-level language allows programmers to get closer to the purpose system they work on, taking advantage of clarity ‘'''source code'''’ is taken architecture or platform-specific quirks without having to mean any fully executable description of a software systemlearn the architecture like assembly. It is therefore so construed as to include machine code, very high Low-level languages and executable graphical representations have the advantage that they're easier to port to other platforms by nature of systems.<ref>[http://www.cs.ucl.ac.uk/staff/M.Harman/scam10.pdf Why Source Code Analysis and Manipulation Will Always Be Important] by [[Mark Harman (computer scientist)|Mark Harman]], 10th IEEE International Working Conference on Source Code Analysis and Manipulation (SCAM 2010).Timişoara, Romania, 12–13 September 2010being more abstract from the hardware.</ref></blockquote>
[[Porting]] software to other [[computer platform]]s is usually prohibitively difficult without source code. Without the source code for a particular piece Examples of software, portability is generally computationally expensive.{{Citation needed|date=October 2008}} Possible porting options low-level languages include [[binary translation]] (but are in no way limited to) C and emulation of the original platformC++.
== Licensing =Medium===Software, Medium-level languages have attributes of both low and its accompanying source code, typically falls within one of two licensing high-level paradigms: [[open source]] like Rust (which is designed to be performant and [[proprietary software]]system-focused but also memory safe). Some high-level languages can also be lower than others.
Generally speaking, software is ''open source'' if the source code is free ===High===High-level languages push away most system specific quirks in favor of instructions intended to use, distribute, modify and study, and ''proprietary'' if the source code is kept secret, or is privately owned and restrictedwork on any platform. The first software license to be published and to explicitly grant these freedoms This was the [[GNU General Public License]] in 1989. The GNU GPL pioneered by Java, whose goal was originally intended for developers to be used with the [[GNU operating system]]"write once, run anywhere".
For proprietary softwareIn high-level languages, the provisions many of the various copyright laws, [[trade secret|trade secrecy]] same instructions can be run across different architectures and [[patent]]s are used to keep the source code closedplatforms. AdditionallyThey may have a compiler, many pieces of [[retail software]] come with an [[Software license agreement|end-user license agreement]] (EULA) which typically prohibits [[decompilation]], [[reverse engineering]], analysis, modificationa compiler cache, or circumventing of [[copy protection]]. Types of source code protection – beyond traditional a [[compilerdynamic recompilation|compilation]] to [[object codedynamic recompiler]] – include code encryption, [[code obfuscation]] and/or [[code morphing]]an interpreter.
===Esoteric===[[wikipedia:Esoteric programming language|Esoteric languages]] are built around a specific idea or a joke, as part of a challenge. These languages are intended to be comedic, confusing, and/or thought-provoking. One example includes [[wikipedia:Brainfuck|Brainfuck]], a <abbr title="Meaning it can solve any problem a Turing machine can.">Turing-complete</abbr> programming language with only eight one-character commands (as opposed to the thousands of standard languages and architectures) and one instruction pointer. Another is [[wikipedia:Shakespeare Programming Language|Shakespeare]], a programming language designed to resemble a Shakespearean play. There's also [https://github.com/dylanbeattie/rockstar Rockstar], a language designed around "the lyrical conventions of 1980s hard rock and power ballads", meant to lampoon the software industry's use of "rockstar developers" in recruiting. ==Version control==Version control refers to the management of data as it changes. A version control system is a program that tracks changes in data. Its most common use is to allow programmers to collaborate on a source code repository without accidentally ruining any components. There are several version control systems, but the most ubiquitous by virtue of ties to the Linux kernel is Git, so much so that a ton of services are built around Git, like GitHub and GitLab. Other systems include CVS (the very first of its kind), Subversion, and another developed alongside Git called Mercurial. ==Licensing=={{Main|Licensing}}Software is copyrightable, but the source code can be made available to users however the author chooses. A copyright license is a legal document that tells people how the software can be used and what limitations come with using it. ;Public domain:There is no copyright (i.e. No Rights Reserved). Works enter the public domain when they::# were released before the current copyright expiry date. This is why old paintings, plays, and books are so commonly quoted and used in modern works, because they'd have to negotiate the rights with the author otherwise. Most software is not released this way because it is still covered by the current American copyright term.:# are dedicated through a license like Creative Commons Zero or the Unlicense. This is the only option for modern works to be released into the public domain because, per the Berne Convention, copyright is seen as opt-out, not opt-in. If a public domain dedication can't be made (probably because the jurisdiction doesn't recognize the public domain), then the license grants users the equivalent freedoms.;Open-source:The program is released under a copyright license that permits four freedoms: that it can be run at any time, studied and modified for the user's own purposes, distributed to anyone, and improved for everyone else. This bypasses most of the issues encountered with public domain works. For anything else copyrightable, the term "open content" often applies.:It's worth noting that open-source does not replace copyright. And likewise, the license cannot be removed after the work has been released under it. To see the various open-source licenses available, see [https://choosealicense.com/ choosealicense.com]. Also see [https://choosealicense.com/appendix/ the appendix] at the same website.;Source-available:The program is released under a copyright license more restrictive than an open-source license, but the source code is still publically available. The biggest example is [[Snes9x]], which is released under a non-commercial license. This license makes it not open-source, as it restricts the users' commercial use.;Closed source / Proprietary:The program's source code isn't available. Often because the ecosystem behind the platform is closed, sometimes by nature (like Windows and Android), or sometimes by force (like every modern console).:;Freeware:The source code isn't available but the program is still free.:;Shareware / Trialware:A limited demo version of the program is free. This was common for [[POS_(Pong_Consoles)_CPUs_and_Other_Chips#Intel_CPU.27s|DOS]] games. The more successful emulation projects are often open source (though you definitely will find exceptions). ==See also==* [[Dynamic recompilation]]* [[ROM Hacking Resources]]<!--== References ==
{{reflist}}
* (VEW04) "Using a Decompiler for Real-World Source Recovery", M. Van Emmerik and T. Waddington, the ''Working Conference on Reverse Engineering'', [[Delft]], [->[Netherlands]], 9–12 November 2004. [httpCategory://www.itee.uq.edu.au/~emmerik/experience_long.pdf Extended version of the paperFAQs]. == External links ==* {{cite web| title=Obligatory accreditation system for IT security products (2008-09-22), may start from May 2009, reported by Yomiuri on 2009-04-24.|url=http://www.metafilter.com/75061/Obligatory-accreditation-system-for-IT-security-products|publisher=MetaFilter.com|accessdate=2009-04-24}}* [http://rosettacode.org/wiki/Main_Page Same program written in multiple languages]
6,737
edits

Navigation menu