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: 19 October 2019
  • Copyright Protected:
    Conjecture Corporation
  • Print this Article
Free Widgets for your Site/Blog
U.S. companies first sold energy drinks in the early 1900s; they contained radium, which causes radiation sickness.  more...

October 19 ,  1987 :  The Dow Jones experienced its second-largest percentage drop in history.  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.


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.


You might also Like


Discuss this Article

Post your comments

Post Anonymously


forgot password?