Programming
From IT Jalakam - Unofficial IT syllabus for grade 10 students
A programming language is a machine-readable artificial language which has been designed in order to express the instructions that can be performed by a machine, particularly a computer. Programming languages can be used to create programs that specify the behavior of a machine, to express algorithms precisely, or as a mode of human communication.
Most programming languages have some kind of written specification or semantics, since computers unlike humans require precise instructions. For instance, to a person you can say "Go there" and "Do this", for the computer however the instructions have to be accurate and to the point.
Different Programming languages exist each created at some time and due to reason and for a particular purpose, while few of them have died, quite a few of them gained worldwide acceptance and are widely used today.
Contents |
Learn Programming Now
A Short Note On History of Programming Languages
It was not that Adam came to earth and created the One Programming Language to save humanity. The Popular programming languages and even the obscure ones were inspired in some form or the other from their predecessors and working on their shortfalls and enhancing their strengths.
Initially when the first electrically powered computers were created, programmers used the Machine Language that is the "First Generation Language" which was kinda combination of zeros and ones. It however proved cumbersome for programmers and was subsequently replaced by "Second Generation Languages" or Assembly Languages by which they are popularly known as which involved mnemonics and macro instructions. Later as the assembly language evolved, they were followed by the development of more abstract and portable "Third Generation Programming Languages" such as Lisp, Fortran, Cobol, ALGOL, etc. Updated versions of these languages are still in use and provided the basis of the modern programming languages.
Keep note that as the programming languages evolved, so did the abstractions from the real machine language increased as focus shifted to programmer productivity. Hence they were termed as High Level Programming Languages. Kindly note that the term "High Level Language" does NOT imply that the language is superior but it means that it features High level of abstraction that is, hiding of unnecessary details from the programmer. It has also to be known that the level of abstraction involves a certain degree of performance penalty as well, the cost-benefit analysis of the program however is largely determined for the nature of the program too, and sometimes it is better to sacrifice the "extra" performance, because of the higher productivity achieved.
Programming Paradigm
Paradigm means organizing principle of a program. It simply means thinking of programming in different ways.
Different Programming Paradigms
Procedural Programming
A procedural programming language provides a programmer a means to define precisely each step in the performance of a task. The programmer knows what is to be accomplished and provides through the language step-by-step instructions on how the task is to be done. Using a procedural language, the programmer specifies language statements to perform a sequence of algorithmic steps. Procedural programming is often a better choice than simple sequential or unstructured programming in many situations which involve moderate complexity or which require significant ease of maintainability. Possible benefits:
- The ability to re-use the same code at different places in the program without copying it.
- An easier way to keep track of program flow than a collection of "GOTO" or "JUMP" statements (which can turn a large, complicated program into spaghetti code).
- The ability to be strongly modular or structured.
Modular Programming
With the increase in program size, a single list of program is difficult to maintain. Thus the large program is broken down into smaller units i.e. functions. The idea of breaking of a program into functions and then grouping them together resulting in increase of reliability of the program ia called Modular programming. Modular programming is a software design technique that increases the extent to which software is composed from separate parts, called modules. Conceptually, modules represent a separation of concerns, and improve maintainability by enforcing logical boundaries between components. Modules are typically incorporated into the program through interfaces. A module interface expresses the elements that are provided and required by the module. The elements defined in the interface are detectable by other modules. The implementation contains the working code that corresponds to the elements declared in the interface.
Languages that formally support the module concept include IBM/360 Assembler, COBOL, RPG and PL/1, Ada, D, F, Fortran, Haskell, OCaml, Pascal (most derivatives), ML, Modula-2, Erlang, Perl, Python and Ruby. The IBM System i (aka AS/400 and iSeries) also uses Modules in RPG, COBOL and CL, when programming in the ILE environment. Modular programming can be performed even where the programming language lacks explicit syntactic features to support named modules.
Software tools can create modular code units from groups of components. Libraries of components built from separately compiled modules can be combined into a whole by using a linker.
Object Oriented Programming
Object-oriented programming (OOP) is a programming paradigm that uses "objects" — data structures consisting of datafields and methods — and their interactions to design applications and computer programs. It was not commonly used in mainstream software application development until the early 1990s. Many modern programming languages now support OOP. Object-oriented programming has roots that can be traced to the 1960s. As hardware and software became increasingly complex, quality was often compromised. Researchers studied ways to maintain software quality and developed object-oriented programming in part to address common problems by strongly emphasizing discrete, reusable units of programming logic. The methodology focuses on data rather than processes, with programs composed of self-sufficient modules (objects) each containing all the information needed to manipulate its own data structure. This is in contrast to the existing modular programming which had been dominant for many years that focused on the function of a module, rather than specifically the data, but equally provided for code reuse, and self-sufficient reusable units of programming logic, enabling collaboration through the use of linked modules (subroutines). This more conventional approach, which still persists, tends to consider data and behavior separately.
Few Popular Programming Languages
A programming language is just one tool in a developer’s collection of software and hardware. However there are quite a number of "Popular" programming languages which have been mentioned below. The list is by no means exhaustive and not in any particular order or arrangement unless you count the bias of the author.
Python
Python is a dynamic object-oriented programming language that can be used for many kinds of software development. It offers strong support for integration with other languages and tools, comes with extensive standard libraries, and can be learned in a few days. Many Python programmers report substantial productivity gains and feel the language encourages the development of higher quality, more maintainable code. Python runs on Windows, Linux/Unix, Mac OS X, OS/2, Amiga, Palm Handhelds, and Nokia mobile phones. Python has also been ported to the Java and .NET virtual machines. Python is distributed under an OSI-approved open source license that makes it free to use, even for commercial products. The Python Software Foundation (PSF) holds and protects the intellectual property rights behind Python, underwrites the PyCon conference, and funds grants and other projects in the Python community.
C
The C Programming Language is a general-purpose "high-level" programming language developed by Dennis Ritchie in order to implement the Unix Operating system for portability. C is one of the world's most popular programming language owing to its power, speed, and wide spread support community. C is an imperative (procedural) systems implementation language. It was designed to be compiled using a relatively straightforward compiler, to provide low-level access to memory, to provide language constructs that map efficiently to machine instructions, and to require minimal run-time support. C was therefore useful for many applications that had formerly been coded in assembly language. Despite its low-level capabilities, the language was designed to encourage machine-independent programming. A standards-compliant and portably written C program can be compiled for a very wide variety of computer platforms and operating systems with little or no change to its source code. The language has become available on a very wide range of platforms, from embedded microcontrollers to supercomputers.
C++
C++ (read as "C Plus Plus") is a general-purpose programming language. It is regarded as a middle-level language, as it comprises a combination of both high-level and low-level language features. It was developed by Bjarne Stroustrup starting in 1979 at Bell Labs as an enhancement to the C programming language and originally named "C with Classes". It was renamed to C++ in 1983. C++ is a very popular programming language due to the fact that it combines the flexibility and abstraction of Object Oriented Programming with the efficiency and power of C.
Java
Java is a programming language originally developed by James Gosling at Sun Microsystems and released in 1995 as a core component of Sun Microsystems' Java platform. The language derives much of its syntax from C and C++ but has a simpler object model and fewer low-level facilities. Java applications are typically compiled to bytecode (class file) that can run on any Java virtual machine (JVM) regardless of computer architecture. Java gained rapid popularly from the time it was created mainly due to the fact that it is cross-platform and based on C/C++ syntax it reduced the learning strain for new programmers.
C#
C# (pronounced "C Sharp") is a multi-paradigm programming language encompassing functional, imperative, generic, object-oriented (class-based), and component-oriented programming disciplines. It was developed by Microsoft within the .NET initiative and later approved as a standard by ECMA. C# is intended to be a simple, modern, general-purpose, object-oriented programming language and its syntax is based on C/C++ and has largely been inspired by Java.
References
Wikipedia
