1. Introduction
Programming is the foundation of all technological advancements as it is what causes them all to work. Every huge breakthrough within the technological field has some type of programming behind it. This report will focus on the most popular programming languages and the applications they are best suited for.
2. Different Kinds of Programming Languages
Different styles of programming languages are called paradigms. In some cases, programming languages will make use of more than one paradigm and are known as multi-paradigm programming languages.
2.1 Declarative versus Imperative
There are two kinds of programming languages which are declarative and imperative. Declarative programming languages are functional or logical whereas imperative programming languages are procedural, object-oriented or multi-paradigm programming languages.
Declarative programming is telling the computer what to do rather than how to do it. The opposite of this is imperative programming which involves telling the computer how to do something rather than what to do.
2.2 Functional Programming Languages
Functional programming languages are vastly more complicated than any of the imperative programming languages. For example, when using an imperative programming language to create a compiler that passes the syntax tree multiple times and each time assign some information to nodes in the tree, the functional program would be a lot more complicated. For the functional program, each pass along the syntax tree would have to build a new tree with additional information for the nodes. (Loder, 2016)
2.3 Logical Programming Languages
The other kind of declarative programming language is logical. Logical programming is appealing to a lot of programmers because it is concerned with how people think rather than how computers think making it easier to understand for the programmer. “Specifications, when written in an appropriate format, can be used as a program. Then the desired conclusions follow logically from the program.” (Apt, 1990)
2.4 Procedural Programming Languages
Procedural programming languages are programming languages that keep breaking a problem up until it is simple enough to be solved. Sometimes referred to as inline programming. (Eliason, 2013)
2.5 Object-oriented Programming Languages
Object-oriented programming languages are languages that use objects and classes to create models based on a real-world environment. (Eliason, 2013)
3. JavaScript
3.1 What is JavaScript
JavaScript is a browser scripting language, inspired by Perl and Java, which aids in the creation of web applications. JavaScript is an interpreted language, meaning once the program is executed, it is translated into machine code immediately. Due to the code having to be translated each time it is run, interpreted languages are usually slow. (Stothard, 2000)
3.2 Uses of JavaScript
The most common use of JavaScript is when it is combined with HTML form elements to create web applications. This has been used for biologists to analyze DNA samples in thirty different ways such as calculating the molecular weight of a protein sequence or returning the number and positions of restriction endonuclease cut sites. These kinds of programs are very useful for doctors in training and biologists who are studying DNA samples for their research. (Stothard, 2000)
The dynamic nature of JavaScript which makes it very useful also causes it to be harmful as it makes it difficult to protect machines from malware. This is because the machines find it difficult to differentiate between non-malicious JavaScript programs and those that are malware. (Cova, et al., n.d.)
JavaScript has very few uses but, perhaps due to its simplicity, it still has a very large popularity. This may also be because although it is mainly used for web applications, those web applications have so many different possibilities that it appears to have more uses than it actually does.
4. Java
4.1 What Java Was Intended For
“The Java programming language is designed for maximum portability with as few implementation dependencies as possible.” (Arnold, et al., 2005) This portability is achieved through having each variable have the same meaning regardless of the Central Processing Unit. This allows the java programs to be compiled on every device with access to the program.
4.2 Java versus JavaScript
Java is not to be confused with JavaScript as despite the name, the two differ greatly. As discussed previously, JavaScript is mainly used for web applications meanwhile Java is mainly used for server-side applications (Chen & Ma, n.d.)
4.3 The Style of Java
Java achieves object-oriented programming by using class definitions to define objects. Java is statically typed; static typing enables the programmer to detect bugs easier.
4.4 Uses of Java
One of the main applications of Java is how it interacts with the Graphical User Interface (GUI). Using this interaction, researchers conducted an experiment to create a web-based lab. (Sánchez, et al., 2004)
5. Python
Python is a multi-paradigm programming language which is known for its simplicity. It is designed to summarise what would be massive blocks of code in other languages into just one line. Python is used for web development, GUI development, software development, system administration and for other scientific and numerical purposes.
5.1 Web-frameworks
Web-frameworks for Python such as Bottle, Django and Pyramid make web development easier for programmers. This is done in Django by including modules which include the instructions on how to carry out common tasks that would usually take a while to code. (Django, n.d.)
In Pyramid, this is done by managing the size of the framework as the code goes on. The code starts as a single-file module but it is possible to include and configure Pyramid add-ons later on in your web application. (Pyramid, n.d.) This is done in Bottle by having no dependencies other than the Python Standard Library. (Bottle, n.d.)
5.2 GUI development
Python is also used for GUI development. The most commonly used GUI programming toolkit used for Python is Tkinter. Tkinter is an object-oriented layer on top of tcl/tk. Tcl/tk is a combination of Tool Command Language (a dynamic programming language) and Tk which is a graphical user interface toolkit. (Anon., n.d.) Other software which uses Python for GUI development, like PyGObject and PyQt, use bindings and implement them into modules for Python.
5.3 Software Development
Software development applications like Buildbot, Trac and Roundup also use Python. Python code is passed to the master in order to configure Buildbot. The master is the term for the component which monitors source-code repositories for changes as well as coordinating the workers and then reporting the results (Anon., n.d.). Python is also used for Roundup, an error detecting software that is configured with the command ‘Python demo.py’ (Jones, 2018) Trac is also an issue managing software which is written in the Python programming language. (Edgewall Software, 2018)
5.4 System Administration Software
System administration software such as Ansible, Salt and OpenStack also utilize Python. Ansible is an automation language which uses Python. (Red Hat, Inc., 2018) Salt is a configuration management software which ensures specific packages are installed properly and is also used to execute commands and query data on remote nodes. (SaltStack,Inc, 2018) OpenStack is an open, scalable and compatible platform developed by NASA for big infrastructures. This makes use of Python by allowing the code to be written in the Python programming language. (Sefraoui, et al., 2012)
5.5 Scientific Purposes
Finally, Python can be used for scientific and numerical purposes by using such software as SciPy, Pandapower and IPython. IPython was created by Fernando Pérez to enhance the original Python shell by merging the personal additions he created with two open source projects. An example of how IPython is used for mathematical computing is the Software for Algebra and Geometry Experimentation project. This project used IPython to change the regular numerical types in Python to more advanced types like arbitrary precision floats. (Perez & Granger, 2007)Pandapower is a Python based open-source system analysis tool which is used for electrical power systems. “It provides power flow, optimal power flow, state estimation, topological graph searches, and short-circuit calculations.” (Thurner, et al., 2018) SciPy is one of Python’s main libraries and was used in an experiment in 2016 which aimed to research Python’s music recognition abilities. (Li & Schwiebert, 2016)
6. Conclusion
Overall, the most popular programming languages are used for many different applications. JavaScript is used for biological research, Java is used for interacting with the GUI, Python has the most applications mentioned within this report as it is used for scientific purposes as well as web development and system administration.