Category: 

What Are the Different Types of Source Code?

Article Details
  • Written By: Gregory Hanson
  • Edited By: Susan Barwick
  • Images By: Photo_Ma, ビッグアップジャパン
  • Last Modified Date: 16 November 2016
  • Copyright Protected:
    2003-2016
    Conjecture Corporation
  • Print this Article
Free Widgets for your Site/Blog
NASA scientists have discovered a class of stars with atmospheric temperatures cooler than the human body.  more...

December 2 ,  1982 :  The first permanent artificial heart was implanted in a human.  more...

Every programming and markup language has its own particular form of source code, sometimes referred to simply as "source." This code consists of a description of tasks that a computer is to perform and is written and stored in a text format that a human can easily read. Some code is compiled before use, a process that transforms the source into a set of instructions in machine language. Text in a markup language such as HTML is not technically source code in the pure sense of the term but is often referred to as such. There are also different legal categories of source code with the most important division being between open and closed-source.

Each programming language uses a different syntax to represent an underlying algorithm. These differences mean that source code varies from language to language. Some languages, such as C and C++, are related and share certain elements of style and syntax.

Some conventions of programming style occur across most languages. For instance, nearly every language includes some system to denote comments, or parts of the code that are intended for human viewers rather than for processing by a compiler. This is such a common feature of source code that several styles of comment notation appear in more than one programming language.

Ad

All true source code must be run through a compiler and turned into machine language before it can be executed by a computer. In some cases, such as Python in interactive mode, this task is performed dynamically. In other cases, the compiler produces an executable file which stores the instructions in machine language for later use.

The marked-up text that makes up a large portion of the content of the Web is not technically source code. A certain similarity exists, however, as HTML and other related markup languages convey meaning and describe tasks to be performed by a computer, specifically the ways in which text and other information are to be formatted and displayed. Thus, text that has been marked up in HTML is often referred to as source code.

Legally speaking, there are two models for source ownership and distribution. Open source software is software whose code is provided, sometimes with no strings attached and sometimes under an open source license agreement that preserves some basic rights for the author. Some such agreements limit the sorts of modifications that can be performed to the source code, but some simply stipulate that credit must be given to the original author.

Closed source is the other major legal variety of source code. In this model, only an executable file is provided to a license-holder. Users are banned from attempting to decompile the executable files to reveal the underlying code. This legal model dominates the commercial software field, although some open source business models have proven to be viable as well.

Ad

You might also Like

Recommended

Discuss this Article

Post your comments

Post Anonymously

Login

username
password
forgot password?

Register

username
password
confirm
email