PROGRAMMING



WHAT IS COMPUTER PROGRAMMING?

Computer programming is the process of writing instructions that get executed by computers. The instructions, also known as code, are written in a programming language which the computer can understand and use to perform a task or solve a problem.
Basic computer programming involves the analysis of a problem and development of a logical sequence of instructions to solve it. There can be numerous paths to a solution and the computer programmer seeks to design and code that which is most efficient. Among the programmer’s tasks are understanding requirements, determining the right programming language to use, designing or architecting the solution, coding, testing, debugging and writing documentation so that the solution can be easily understood by other programmers.
Computer programming is at the heart of computer science. It is the implementation portion of software development, application development and software engineering efforts, transforming ideas and theories into actual, working solutions.

SOURCE : https://www.edx.org/learn/computer-programming




PROGRAMMING LANGUAGE

A programming language is a vocabulary and set of grammatical rules for instructing a computer or computing device to perform specific tasks. The term programming language usually refers to high-level languages, such as BASIC, C, C++, COBOL, Java, FORTRAN, Ada, and Pascal.
Each programming language has a unique set of keywords (words that it understands) and a special syntax for organizing program instructions.

 Programming Language

High-Level Programming Languages

High-level programming languages, while simple compared to human languages, are more complex than the languages the computer actually understands, called machine languages. Each different type of CPU has its own unique machine language.
Lying between machine languages and high-level languages are languages called assembly languages. Assembly languages are similar to machine languages, but they are much easier to program in because they allow a programmer to substitute names for numbers. Machine languages consist of numbers only.
Lying above high-level languages are languages called fourth-generation languages (usually abbreviated 4GL). 4GLs are far removed from machine languages and represent the class of computer languages closest to human languages.

Converting to Machine Language

Regardless of what language you use, you eventually need to convert your program into machine language so that the computer can understand it. There are two ways to do this:
1) Compile the program.
2) Interpret the program.
Recommended Reading: See compile and interpreter for more information about these two methods.
The question of which language is best is one that consumes a lot of time and energy among computer professionals. Every language has its strengths and weaknesses. For example, FORTRAN is a particularly good language for processing numerical data, but it does not lend itself very well to organizing large programs. Pascal is very good for writing well-structured and readable programs, but it is not as flexible as the C programming language. C++ embodies powerful object-oriented features, but it is complex and difficult to learn.

The Top Programming Languages?

According to IEEE Spectrum's interactive ranking, Python is the top programming language of 2017, followed by C, Java and C++. Of course, the choice of which language to use depends on the type of computer the program is to run on, what sort of program it is, and the expertise of the programmer.

Top Programming Languages

SOURCE : https://www.webopedia.com/TERM/P/programming_language.html




TYPE OF PROGRAMMING LANGUAGE 

 Array languages

Array programming (also known as vector or multidimensional) languages generalize operations on scalars to apply transparently to vectors, matrices, and higher-dimensional arrays.

Assembly languages

Assembly languages directly correspond to a machine language (see below) so machine code instructions appear in a form understandable by humans. Assembly languages let programmers use symbolic addresses, which the assembler converts to absolute addresses. Most assemblers also support macros and symbolic constants.


Authoring languages

An authoring language is a programming language used to create tutorials, websites, and other interactive computer programs.

 

Constraint programming languages

A constraint programming language is a declarative programming language where relationships between variables are expressed as constraints. Execution proceeds by attempting to find values for the variables which satisfy all declared constraints.

Command line interface languages

Command-line interface (CLI) languages are also called batch languages or job control languages. Examples:

Compiled languages

These are languages typically processed by compilers, though theoretically any language can be compiled or interpreted[citation needed]. See also compiled language.

Concurrent languages

Message passing languages provide language constructs for concurrency. The predominant paradigm for concurrency in mainstream languages such as Java is shared memory concurrency. Concurrent languages that make use of message passing have generally been inspired by process calculi such as CSP or the π-calculus.

Curly-bracket languages

The curly-bracket or curly-brace programming languages have a syntax that defines statement blocks using the curly bracket or brace characters { and }. This syntax originated with BCPL (1966), and was popularized by C. Many curly-bracket languages descend from or are strongly influenced by C. Examples of curly-bracket languages include:

Dataflow languages

Dataflow programming languages rely on a (usually visual) representation of the flow of data to specify the program. Frequently used for reacting to discrete events or for processing streams of data. Examples of dataflow languages include:

Data-oriented languages

Data-oriented languages provide powerful ways of searching and manipulating the relations that have been described as entity relationship tables which map one set of things into other sets.[citation needed] Examples of data-oriented languages include:

Decision table languages

Decision tables can be used as an aid to clarifying the logic before writing a program in any language, but in the 1960s a number of languages were developed where the main logic is expressed directly in the form of a decision table, including:

Declarative languages

Declarative languages express the logic of a computation without describing its control flow in detail. Declarative programming stands in contrast to imperative programming via imperative programming languages, where control flow is specified by serial orders (imperatives). (Pure) functional and logic-based programming languages are also declarative, and constitute the major subcategories of the declarative category. This section lists additional examples not in those subcategories.

Embeddable languages

In source code

Source embeddable languages embed small pieces of executable code inside a piece of free-form text, often a web page.
Client-side embedded languages are limited by the abilities of the browser or intended client. They aim to provide dynamism to web pages without the need to recontact the server.
Server-side embedded languages are much more flexible, since almost any language can be built into a server. The aim of having fragments of server-side code embedded in a web page is to generate additional markup dynamically; the code itself disappears when the page is served, to be replaced by its output.

Server side

  • PHP
  • VBScript
  • SMX – dedicated to web pages
  • Tcl – server-side in NaviServer and an essential component in electronics industry systems
  • WebDNA – dedicated to database-driven websites
The above examples are particularly dedicated to this purpose. A large number of other languages, such as Erlang, Scala, Perl and Ruby can be adapted (for instance, by being made into Apache modules).

Client side

In object code

A wide variety of dynamic or scripting languages can be embedded in compiled executable code. Basically, object code for the language's interpreter needs to be linked into the executable. Source code fragments for the embedded language can then be passed to an evaluation function as strings. Application control languages can be implemented this way, if the source code is input by the user. Languages with small interpreters are preferred.

Educational languages

Languages developed primarily for the purpose of teaching and learning of programming.

Esoteric languages

An esoteric programming language is a programming language designed as a test of the boundaries of computer programming language design, as a proof of concept, or as a joke.

Extension languages

Extension programming languages are languages embedded into another program and used to harness its features in extension scripts.

Fourth-generation languages

Fourth-generation programming languages are high-level languages built around database systems. They are generally used in commercial environments.

Functional languages

Functional programming languages define programs and subroutines as mathematical functions and treat them as first-class. Many so-called functional languages are "impure", containing imperative features. Many functional languages are tied to mathematical calculation tools. Functional languages include:

Pure

Impure

Hardware description languages

In electronics, a Hardware description language or HDL is a specialized computer language used to describe the structure, design and operation of electronic circuits, and most commonly, digital logic circuits. The two most widely used and well-supported HDL varieties used in industry are Verilog and VHDL. Hardware description languages include:

HDLs for analog circuit design

  • Verilog-AMS (Verilog for Analog and Mixed-Signal)
  • VHDL-AMS (VHDL with Analog/Mixed-Signal extension)

HDLs for digital circuit design

Imperative languages

Imperative programming languages may be multi-paradigm and appear in other classifications. Here is a list of programming languages that follow the imperative paradigm:

Interactive mode languages

Interactive mode languages act as a kind of shell: expressions or statements can be entered one at a time, and the result of their evaluation is seen immediately. The interactive mode is also known as a REPL (read–eval–print loop).

Interpreted languages

Interpreted languages are programming languages in which programs may be executed from source code form, by an interpreter. Theoretically, any language can be compiled or interpreted, so the term *interpreted language* generally refers to languages that are commonly interpreted rather than compiled.

Iterative languages

Iterative languages are built around or offering generators.

Languages by memory management type

Garbage collected languages

Languages with manual memory management

Languages with deterministic memory management

List-based languages – LISPs

List-based languages are a type of data-structured language that are based upon the list data structure.

Little languages

Little languages serve a specialized problem domain.
  • awk – can serve as a prototyping language for C (shares similar syntax)
  • Comet – used to solve complex combinatorial optimization problems in areas such as resource allocation and scheduling
  • sed – parses and transforms text
  • SQL – has only a few keywords, and not all the constructs needed for a full programming language[3] – many database management systems extend SQL with additional constructs as a stored procedure language

Logic-based languages

Logic-based languages specify a set of attributes that a solution must have, rather than a set of steps to obtain a solution. Examples:

Machine languages

Machine languages are directly executable by a computer's CPU. They are typically formulated as bit patterns, usually represented in octal or hexadecimal. Each bit pattern causes the circuits in the CPU to execute one of the fundamental operations of the hardware. The activation of specific electrical inputs (e.g., CPU package pins for microprocessors), and logical settings for CPU state values, control the processor's computation. Individual machine languages are specific to a family of processors; machine-language code for one family of processors cannot run directly on processors in another family unless the processors in question have additional hardware to support it (for example, DEC VAX processors included a PDP-11 compatibility mode). They are (essentially) always defined by the CPU developer, not by 3rd parties. The symbolic version, the processor's assembly language, is also defined by the developer, in most cases. Some commonly used machine code instruction sets are:

Macro languages

Textual substitution macro languages

Macro languages transform one source code file into another. A "macro" is essentially a short piece of text that expands into a longer one (not to be confused with hygienic macros), possibly with parameter substitution. They are often used to preprocess source code. Preprocessors can also supply facilities like file inclusion.
Macro languages may be restricted to acting on specially labeled code regions (pre-fixed with a # in the case of the C preprocessor). Alternatively, they may not, but in this case it is still often undesirable to (for instance) expand a macro embedded in a string literal, so they still need a rudimentary awareness of syntax. That being the case, they are often still applicable to more than one language. Contrast with source-embeddable languages like PHP, which are fully featured.
  • cpp (the C preprocessor)
  • m4 (originally from AT&T, bundled with Unix)
  • ML/I (general purpose macro processor)

Application macro languages

Scripting languages such as Tcl and ECMAScript (ActionScript, ECMAScript for XML, JavaScript, JScript) have been embedded into applications. These are sometimes called "macro languages", although in a somewhat different sense to textual-substitution macros like m4.

Metaprogramming languages

Metaprogramming is the writing of programs that write or manipulate other programs (or themselves) as their data or that do part of the work that is otherwise done at run time during compile time. In many cases, this allows programmers to get more done in the same amount of time as they would take to write all the code manually.

Multiparadigm languages

Multiparadigm languages support more than one programming paradigm. They allow a program to use more than one programming style. The goal is to allow programmers to use the best tool for a job, admitting that no one paradigm solves all problems in the easiest or most efficient way.
  • Ada (concurrent, distributed, generic (template metaprogramming), imperative, object-oriented (class-based))
  • ALF (functional, logic)
  • Alma-0 (constraint, imperative, logic)
  • APL (functional, imperative, object-oriented (class-based))
  • BETA (functional, imperative, object-oriented (class-based))
  • C++ (generic, imperative, object-oriented (class-based), functional, metaprogramming)
  • C# (generic, imperative, object-oriented (class-based), functional, declarative)
  • Ceylon (generic, imperative, object-oriented (class-based), functional, declarative)
  • ChucK (imperative, object-oriented, time-based, concurrent, on-the-fly)
  • Cobra (generic, imperative, object-oriented (class-based), functional, contractual)
  • Common Lisp (functional, imperative, object-oriented (class-based), aspect-oriented (user may add further paradigms, e.g., logic))
  • Curl (functional, imperative, object-oriented (class-based), metaprogramming)
  • Curry (concurrent, functional, logic)
  • D (generic, imperative, functional, object-oriented (class-based), metaprogramming)
  • Delphi (generic, imperative, object-oriented (class-based), metaprogramming)
  • Dylan (functional, object-oriented (class-based))
  • eC (generic, imperative, object-oriented (class-based))
  • ECMAScript (functional, imperative, object-oriented (prototype-based))
  • Eiffel (imperative, object-oriented (class-based), generic, functional (agents), concurrent (SCOOP))
  • F# (functional, generic, object-oriented (class-based), language-oriented)
  • Fantom (functional, object-oriented (class-based))
  • Go (imperative, procedural),
  • Groovy (functional, object-oriented (class-based),imperative,procedural)
  • Harbour
  • Hop
  • J (functional, imperative, object-oriented (class-based))
  • Julia (imperative, multiple dispatch ("object-oriented"), functional, metaprogramming)
  • LabVIEW (dataflow, visual)
  • Lava (object-oriented (class-based), visual)
  • Leda (functional, imperative, logic, object-oriented (class-based))
  • Lua (functional, imperative, object-oriented (prototype-based))
  • Mercury (functional, logical, object-oriented)
  • Metaobject protocols (object-oriented (class-based, prototype-based))
  • Nemerle (functional, object-oriented (class-based), imperative, metaprogramming)
  • Objective-C (imperative, object-oriented (class-based), reflective)
  • OCaml (functional, imperative, object-oriented (class-based))
  • Oz (functional (evaluation: eager, lazy), logic, constraint, imperative, object-oriented (class-based), concurrent, distributed), and Mozart Programming System cross-platform Oz
  • Object Pascal (imperative, object-oriented (class-based))
  • Perl (imperative, functional (can't be purely functional), object-oriented, class-oriented, aspect-oriented (through modules))
  • PHP (imperative, object-oriented)
  • Pike
  • Prograph (dataflow, object-oriented (class-based), visual)
  • Python (functional, compiled, interpreted, object-oriented (class-based), imperative, metaprogramming, extension, impure, interactive mode, iterative, reflective, scripting)
  • R (array, interpreted, impure, interactive mode, list-based, object-oriented prototype-based, scripting)
  • Racket (functional, imperative, object-oriented (class-based) and can be extended by the user)
  • REBOL (functional, imperative, object-oriented (prototype-based), metaprogramming (dialected))
  • RED (functional, imperative, object-oriented (prototype-based), metaprogramming (dialected))
  • ROOP (imperative, logic, object-oriented (class-based), rule-based)
  • Ruby (imperative, functional, object-oriented (class-based), metaprogramming)
  • Rust (concurrent, functional, imperative)
  • Scala (functional, object-oriented)
  • Seed7 (imperative, object-oriented, generic)
  • SISAL (concurrent, dataflow, functional)
  • Spreadsheets (functional, visual)
  • Swift (protocol-oriented, object-oriented, functional, imperative, block-structured)
  • Tcl (functional, imperative, object-oriented (class-based))
    • Tea (functional, imperative, object-oriented (class-based))
  • Windows PowerShell (functional, imperative, pipeline, object-oriented (class-based))
  • Wolfram Language

Numerical analysis

Non-English-based languages

Object-oriented class-based languages

Class-based Object-oriented programming languages support objects defined by their class. Class definitions include member data. Message passing is a key concept (if not the key concept) in Object-oriented languages.
Polymorphic functions parameterized by the class of some of their arguments are typically called methods. In languages with single dispatch, classes typically also include method definitions. In languages with multiple dispatch, methods are defined by generic functions. There are exceptions where single dispatch methods are generic functions (e.g. Bigloo's object system).

Multiple dispatch

Single dispatch

Object-oriented prototype-based languages

Prototype-based languages are object-oriented languages where the distinction between classes and instances has been removed:

Off-side rule languages

Off-side rule languages are those where blocks are formed, indicated, by their indentation.

Procedural languages

Procedural programming languages are based on the concept of the unit and scope (the data viewing range) of an executable code statement. A procedural program is composed of one or more units or modules, either user coded or provided in a code library; each module is composed of one or more procedures, also called a function, routine, subroutine, or method, depending on the language. Examples of procedural languages include:

Reflective languages

Reflective languages let programs examine and possibly modify their high level structure at runtime or compile-time. This is most common in high-level virtual machine programming languages like Smalltalk, and less common in lower-level programming languages like C. Languages and platforms supporting reflection:

Rule-based languages

Rule-based languages instantiate rules when activated by conditions in a set of data. Of all possible activations, some set is selected and the statements belonging to those rules execute. Rule-based languages include:[citation needed]

Scripting languages

"Scripting language" has two apparently different, but in fact similar, meanings. In a traditional sense, scripting languages are designed to automate frequently used tasks that usually involve calling or passing commands to external programs. Many complex application programs provide built-in languages that let users automate tasks. Those that are interpretive are often called scripting languages.
Recently, many applications have built-in traditional scripting languages, such as Perl or Visual Basic, but there are quite a few native scripting languages still in use. Many scripting languages are compiled to bytecode and then this (usually) platform-independent bytecode is run through a virtual machine (compare to Java virtual machine).

Stack-based languages

Stack-based languages are a type of data-structured language that are based upon the stack data structure.

Synchronous languages

Synchronous programming languages are optimized for programming reactive systems, systems that are often interrupted and must respond quickly. Many such systems are also called realtime systems, and are used often in embedded systems. Examples:

Shading languages

A shading language is a graphics programming language adapted to programming shader effects. Such language forms usually consist of special data types, like "color" and "normal". Due to the variety of target markets for 3D computer graphics.

Real-time rendering

They provide both higher hardware abstraction and a more flexible programming model than previous paradigms which hardcoded transformation and shading equations. This gives the programmer greater control over the rendering process and delivers richer content at lower overhead.

Offline rendering

Shading languages used in offline rendering produce maximum image quality. Processing such shaders is time-consuming. The computational power required can be expensive because of their ability to produce photorealistic results.

Syntax handling languages

These languages assist with generating lexical analyzers and parsers for Context-free grammars.
  • ANTLR
  • Coco/R (EBNF with semantics)
  • GNU bison (FSF's version of Yacc)
  • GNU Flex (FSF's version of Lex)
  • glex/gyacc (GoboSoft compiler compiler to Eiffel)
  • lex (Lexical Analysis, from Bell Labs)
  • M4
  • yacc (yet another compiler compiler, from Bell Labs)
  • JavaCC

System languages

The system programming languages are for low level tasks like memory management or task management. A system programming language usually refers to a programming language used for system programming; such languages are designed for writing system software, which usually requires different development approaches when compared with application software.
System software is computer software designed to operate and control the computer hardware, and to provide a platform for running application software. System software includes software categories such as operating systems, utility software, device drivers, compilers, and linkers. Examples of system languages include:

Language Originator Birth date Influenced by Used for
ESPOL Burroughs Corporation 1961 Algol 60 MCP
PL/I IBM, SHARE 1964 Algol, FORTRAN, some COBOL Multics
PL360 Niklaus Wirth 1968 Algol 60 Algol W
C Dennis Ritchie 1969 BCPL Most operating system kernels, including Windows NT and most Unix-like systems
PL/S IBM 196x PL/I OS/360
BLISS Carnegie Mellon University 1970 Algol-PL/I[9] VMS (portions)
PL/8 IBM 197x PL/I AIX
PL-6 Honeywell, Inc. 197x PL/I CP-6
SYMPL CDC 197x JOVIAL NOS subsystems, most compilers, FSE editor
C++ Bjarne Stroustrup 1979 C, Simula See C++ Applications[10]
Ada Jean Ichbiah, S. Tucker Taft 1983 Algol 68, Pascal, C++, Java, Eiffel Embedded systems, OS kernels, compilers, games, simulations, CubeSat, air traffic control, and avionics
D Digital Mars 2001 C++ Multiple domains
Nim Andreas Rumpf 2008 Ada, Modula-3, Lisp, C++, Object Pascal, Python, Oberon OS kernels, compilers, games
Rust Mozilla Research[11] 2010 C++, Haskell, Erlang, Ruby Servo layout engine, Redox OS
Swift Apple Inc. 2014 C, Objective-C, Rust macOS, iOS app development [a]

Transformation languages

Visual languages

Visual programming languages let users specify programs in a two-(or more)-dimensional way, instead of as one-dimensional text strings, via graphic layouts of various types. Some dataflow programming languages are also visual languages.

Wirth languages

Computer scientist Niklaus Wirth designed and implemented several influential languages.

XML-based languages

These are languages based on or that operate on XML.
 SOURCE : https://en.wikipedia.org/wiki/List_of_programming_languages_by_type



JAVA PROGRAMMING LANGUAGE

Image result for Java



Java is a general-purpose computer-programming language that is concurrent, class-based, object-oriented,[15] and specifically designed to have as few implementation dependencies as possible. It is intended to let application developers "write once, run anywhere" (WORA),[16] meaning that compiled Java code can run on all platforms that support Java without the need for recompilation.[17] Java applications are typically compiled to bytecode that can run on any Java virtual machine (JVM) regardless of computer architecture. As of 2016, Java is one of the most popular programming languages in use,[18][19][20][21] particularly for client-server web applications, with a reported 9 million developers.[22] Java was originally developed by James Gosling at Sun Microsystems (which has since been acquired by Oracle Corporation) 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 it has fewer low-level facilities than either of them.
The original and reference implementation Java compilers, virtual machines, and class libraries were originally released by Sun under proprietary licenses. As of May 2007, in compliance with the specifications of the Java Community Process, Sun relicensed most of its Java technologies under the GNU General Public License. Others have also developed alternative implementations of these Sun technologies, such as the GNU Compiler for Java (bytecode compiler), GNU Classpath (standard libraries), and IcedTea-Web (browser plugin for applets).
The latest version is Java 10, released on March 20, 2018,[23] which follows Java 9 after only six months[24] in line with the new release schedule. Java 8 is still supported but there will be no more security updates for Java 9.[25] Versions earlier than Java 8 are supported by companies on a commercial basis; e.g. by Oracle back to Java 6 as of October 2017 (while they still "highly recommend that you uninstall"[26] pre-Java 8 from at least Windows computers).

SOURCE : https://en.wikipedia.org/wiki/Java_(programming_language)





 SHARING ON PROGRAMMING LANGUAGE
 


Originally appeared on Quora: the place to gain and share knowledge, empowering people to learn from others and better understand the world.
Answer by Mario Peshev, CEO of DevriX, on Quora:
I’ll outline three main elements that allow different programming languages to interact with each other, and provide data to the end user:
  1. Connection - Internet or a network access between the systems.

  2. Storage - a way to store and retrieve information (a database, RAM, ROM).
  3. Interface - a public-faced UI or some raw data protocol for sending data and reading input.
When we consider the connectivity aspect, the user should be able to exchange data with the product or the programming platform - over the Internet or even physically in the same room. It has some storage that contains the executable code and a way to sift through information and respond intelligently. And there is some established interface which could be a screen, voice commanded chip, or something else.
It’s a common practice for multiple applications to share the same storage (a database) and synchronize data processed through different mediums.
For example, a website coded in PHP/Ruby/Python/C# may use MySQL/Oracle/MS SQL database for saving data, fetching archive views, single entries, editing existing details and deleting resources. You can interact with the website directly from your laptop or a mobile phone’s browser. The generated output from a back-end programming language is rendered in the browser as browsers can interpret HTML and generate the layout, style and arrange it through CSS and implement some interactivity through JavaScript.
At the same time, a mobile application built in Java for Android or Objective-C/Swift for iOS may have a synchronized clone of the database or likely a replica (or even the production) database that the website communicates with as well. The interface is your device (mobile phone or tablet) and data is transferred directly to the database or through API calls to the website.
A desktop application could be developed in C++, C#, Java, Visual Basic or another popular programming language suitable for desktop software. The app may work offline with a local copy of the database, or synchronize similarly to the mobile app with an online database source or interacting with the website’s API endpoints.
An Amazon Echo device could download a custom skill that interacts with the website and retrieves or stores information over the Internet. Echo is controlled with voice commands and can also interact with other devices in your home.
Various low-end applications could run on a schedule in order to rearrange or sync information (or update software versions as needed), or provide additional functionality like switching drivers, communicating with lower level devices, compress and resize images, pull information from sensors (temperature or humidity), and so forth.
Your car can be connected as well if it provides some communication interface and a browser where you can access one of the other resources.
The same principle can be applied to smart watches and other interactive devices that adhere to the same model - a connectivity protocol that allows them to interact with the other devices in your environment, an interface that allows you to communicate with them, and some storage available for storing and retrieving information.

SOURCE : https://www.forbes.com/sites/quora/2017/05/01/how-do-programming-languages-work-together/#49082d9a2a3f


 

Comments