Introduction to Programming Languages : Programming Tutorials - Maccablo/Programming-Tutorials GitHub Wiki

Welcome to the Programming-Tutorials of Maccablo ! For being a perfectionist in any of the programming languages once should dive down into the basics of Computer programming. In this article, we will cover basic introduction of all kind of programming languages used in the software industry. If one wants to be a good developer, his/her programming basics should be rock solid.

Let start… Contents [hide]

1 Introduction to Programming Languages 1.1 Types of Programming Languages 1.1.1 1. Machine And Assembly Languages 1.1.1.1 Machine Language 1.1.1.2 Assembly Language 1.1.2 2. Business Oriented Languages 1.1.3 3. Declarative Languages / Non Procedural Languages 1.1.3.1 Logic languages 1.1.3.2 Functional languages 1.1.3.3 Structured Query Language (SQL) 1.1.3.3.1 Data Definition Language (DDL) 1.1.3.3.2 Data Query Language (DQL) 1.1.3.3.3 Data Manipulation Language (DML) 1.1.3.3.4 Data Control Language (DCL) 1.1.4 4.Object Oriented Languages ( OOP ) 1.1.5 5.Scripting Languages 1.1.6 6. HIGH LEVEL LANGUAGE 1.1.6.1 COMPILER 1.1.6.2 ASSEMBLER 1.1.6.3 INTERPRETER 1.1.7 7. Algorithmic Language 1.1.8 8. World Wide Web Display Languages

Introduction to Programming Languages

First let’s get introduced to programming languages by understanding what is a computer program .

A computer program is basically the set or the sequence of instructions written using certain Computer Programming Languages (Java, .net, python etc.) to perform some predefined tasks by the computer. A computer program (also called a computer software) is nothing but a set of rules given to the machine to perform specific tasks.

Computer programming instructions are also considered as program source code and computer programming is also called program development or coding. There are many programming languages, few are listed below:

Java Python C C++ .Net PHP Perl Ruby

Types of Programming Languages To understand programming languages further, we can logically divide these into below parts . These explains the types of programming languages . In many places you can find 5 or 6 types of programming language so we thought to give you in depth by covering all the types of programming languages .

  1. Machine And Assembly Languages So let’s understand the key differences between a machine language and Assembly Language . Here we will cross compare Machine Language Vs Assembly Language.

Machine Language As the name suggest, machine language is the set of instruction a computer can understand. Generally we call it machine code that CPU understands (it understands very limited set of instructions). Each instruction is readable and understandable as numbers , binary digits (0 and 1).

These binary numbers are generally called bits which is a short form for binary digit. Generated binary digits are translated into an instruction by the CPU that tells it to do a very specific job e.g. sorting, multiplying or dividing numbers etc. Machine code (or machine language) is difficult to read and write by humans as it is different from conventional mathematical notation or human language. Also its codes vary from computer to computer.

Assembly Language Assembly Language came into picture as machine language was so hard to develop and understand by developers. Assembly language is one level above machine language. Programmer can introduce names for blocks of memory that hold data. Instead of bits, each instruction is identified by a short name and variables can be identified by names rather than numbers (0 and 1). This makes them much easier to read and write.

The CPU is not capable to understand assembly language , So we have to convert it to machine language which is readable for it with help of an assembler .Assembly language is completely based on the computer in which it runs against the most high level programming languages, which are generally portable across multiple systems. Utility program is used to convert assembly language into executable machine code. These utility programs are MASM, NASM etc.

  1. Business Oriented Languages Business oriented languages were introduced to satisfy business level needs. Business analysts can directly write the rules to instruct computer to create set of result(s).

Common business oriented language also known as COBOL is one of the oldest programming language. A committee of users and U.S. government organizations established CODASYL to develop and oversee its standard across systems in order to ensure its portability. The basic use of COBOL language is for development of business features. COBOL is not suitable for writing programs which are complex in nature.

Unlike other languages like C, C++, COBOL language do not have in-build user defined variables or pointers. Also the scope of the methods used in COBOL is very limited. This language defines a simple and clear programming technique.

COBOL as language has proven to be completely suitable for its targeted problems. All the features of COBOL operate in a the domain in which the difficulty of the program lies only in the business rules not in the algorithms or data structures. The places where the business demands complex algorithms, complex data structures, COBOL language take care the needs with an suitable text such as SORTING or SEARCH.

So as we understood that COBOL is a simple and user friendly language with a quite limited scope of function but the with the beginning of Object Oriented COBOL, its dimension is now changed completely. It include all the benefits of previous versions and at the same time it also provides –

User Defined Functions Object Orientation National Characters – Unicode Multiple Currency Symbols Cultural Adaptability (Locales) Dynamic Memory Allocation (pointers) Data Validation Using New VALIDATE Verb Binary and Floating Point Data Types User Defined Data Types 3. Declarative Languages / Non Procedural Languages Also called non-procedural languages, declarative languages are programming languages in which a program specifies what needs to be done. It does not specify how to do it. Declarative languages have less visible difference between implementation of a program and its specifications. Below are basic kind of declarative languages:

Logic languages Logic Languages works on relationship between different entities sometime calls inter-dependency of the entities. The relationship between entities are searched in a systematic way which will answer the desired queries. The best use case of logic programming is natural language processing and other Artificial Intelligence programs.

Functional languages Functional languages have a mathematical style and these are developed by facilitating different arguments to methods (also called functions). LISP, ML, and Haskel like functional languages generally used as automation of existing scenarios or research tools in language development.

Structured Query Language (SQL) Structured Query Language is basically a medium to interact with the database to give request of desired operation(s). The basic database operations can be inserting, updating and/or deleting data. It also used to manipulate the metadata (Columns, data types etc.) of the table(s). Some database administrators call it non-procedural language because procedural languages needs the details of the action(s) to be specified e.g. dealing with indexes, querying tables, working with file I/O operations etc. All steps needed for SQL execution are taken care by SQL database explicitly. In structured query language, all instructions are given through the statements. Additionally parameters and operands are provided to these statement. SQL standards are being followed by statements and the respective parameters. Generally we group SQL statements into the following categories:

Data Definition Language (DDL) CREATE – creating objects, tables, views etc ALTER – modifying existing database object, table, views. DROP – deleting table, view of a table or other object(s). Data Query Language (DQL) SELECT – Fetch desired data from tables or views with the help of some conditions e.g. sort, order by, group by etc.

Data Manipulation Language (DML) INSERT – Inserting a record into a table UPDATE – updating existing contents of the rows DELETE – deleting desired records Data Control Language (DCL) GRANT – Granting permissions to user(s) REVOKE – removing permissions from user(s) Read Also : Enable / Disable JavaScript : Mozilla Firefox Hacks

4.Object Oriented Languages ( OOP ) OOP is a programming model which encourages the programmer to focus on ‘objects’ and their interactions with each other. These objects can be any of real life objects like school, employees, cities etc.

Objects are generally described as their state and behavior (we call them methods). As a practice, good programmer hides the state within the object and gives access to the object with the help of methods. This process is called encapsulation which is just like an API to the object.

In OOP, class is like a blueprint for an object. The next steps can be creating (or instantiating) the desired objects which also called instances of the class.

Data and the methods are two separate entities which are merged together for the desired result. Object-oriented programming (OOP) enables developers with the ability to create objects that loosely couple both properties and behaviors into a reusable package.

In OOP, developer define data types and the operations that could be applied to the data structure. In addition, developers can create relationships between two objects. With Object-oriented programming (OOP), many useful features comes along e.g. abstraction, inheritance, encapsulation polymorphism. Objects overlays the desired data and their operations in a sense that only the required operations are publicly available and the data structures behind the scenes are not accessible. This hiding of information made large volume programming much easier by enabling a developer to think in depth about each part of the program. Following are the most popular Object oriented Languages: