Skip to content

Latest commit

 

History

History
51 lines (26 loc) · 6.96 KB

sprint04-programmingLang.md

File metadata and controls

51 lines (26 loc) · 6.96 KB

Sprint 04: Programming Languages

Programming languages started as an abstract concept, and then adapted and changed over time. From the early days of simple line-by-line coding like COBOL or BASIC to object-oriented languages like Java and C#, to quantum computer languages like Q#, the evolution of programming languages has developed over the course of many decades.

Origin of Programming

In the early 1840s, Charles Babbage proposed a machine called the Analytical Engine. It was only a proposal—no actual machine was built, but one inventive woman by the name of Ada Lovelace decided to write an article that provided detailed instructions on how to represent Bernoulli [ber-noo-li] numbers, a recursive equation based in number theory, on the Analytical Engine. This article is considered to be the very first computer program.

Since then the devices that can be programmed went from theoretical to physical, manual to automatic, analog to digital. With each evolutionary step, the way we program computers needed to evolve as well.

With the birth of mainframe computers, data processing required instructions to be sent to the machine to process and interpret the instructions from the programmer. This was then applied to data to organize and analyze the data. Instructions were entered through a keyboard, but without the benefit of a monitor, so everything was done through printouts on paper. If you look carefully at text encodings and at some programming languages, you’ll see things like “carriage return” or “print” that are carryovers from those printer days from decades ago.

As computers got smaller and more powerful, more languages were created. Languages also were created to serve specific types of projects and industries like mathematics and science, data storage and graphics.

Today, we work with programming languages that can serve many different purposes. In fact, a programmer often needs to use multiple programming languages to get a project completed. As languages have evolved they have become specialized to complete specific tasks. As a programmer, you will use the best languages for specific tasks and combine them together to create your project.

The programming languages you learn today will continue to evolve and change in the future. With future waves of new technology, new languages will be developed to allow programmers to drive even more innovation.

Forms of Programming

As programming has evolved over the decades, the types of programming you can do have changed as well. Depending on what you want to do, there are different types or forms of programming languages that work in different ways. As a programmer, some forms of programming give you direct access to the computer processor, while others abstract the hardware into more human language that needs to be translated or converted into the native language of the hardware. Here are some example forms of programming that you might encounter.

Machine language

Machine languages allow programmers to code instructions directly to the processor or hardware. Processors can be programmed by sending sequences and patterns of bits through the processor to enable actions to take place. As a result, the code that is entered by the programmer is almost natively written. Assembly language, which is an abstraction of machine language uses codes to modify processor registers and perform functions.

Interpreted

Interpreted languages are readable by humans more easily than assembly or machine languages. The programmer writes the code and then runs it. A component called an interpreter reads each line of code and then “interprets” it into native instructions for the computer. The process is much slower than machine language since the interpreter needs to convert each instruction provided by the programmer. JavaScript is an example of an interpreted language. A programmer can stop the execution of the program, make a change to a line and then run it again without any other steps.

Compiled

A compiled language takes instructions written by a human and sends that code to something called a compiler. A compiler takes the program instructions and converts it to binary bytecode, or native code for the hardware and creates a program called an executable. This program is native to the hardware and operating system and can’t easily be converted back to the original programmed instructions. With the code now in the native computer format, it runs much faster than interpreted code, but if you need to make a change, you need to adjust the original program instructions and recompile it to create a new executable. If you are creating programs for multiple types of processors, you need to compile unique versions for each native instruction code for the target platforms. C is an example of a compiled language.

Object-Oriented

Object-oriented programming, or OOP treats everything as an object. An object can store values, perform actions, called methods, and accept and return values. An object is defined using a template, called a class, that defines what an object can do. A programmer can then create an instance of that class that has all of the capabilities defined by the class. Java and C# are examples of Object-oriented languages.

Data

There are languages that are specifically designed at working with data. One example is SQL, pronounced as see-quel, which is a language designed for working with databases. This is a query language, where you ask a database a question and it gives you a set of data as a result. You can use SQL to combine multiple databases together to create combinations that you can then analyze. R is another example of a data language. R is designed for statistical computing and graphing.

Functional

Functional programming approaches programming in a much different way. Think of it like this: In a traditional programming language, which is called imperative, you are defining the state of a value, object or component. You create and define tasks to complete, called an algorithm, that goes from beginning to end. Functional programming isn’t bound by an algorithm. In a functional language you perform transformations on values, like a function in mathematics. You take a value or object and modify it, with the ability to string multiple transformations together using functions. Examples of functional languages include Haskell, Scala and F#.

Scripting

Operating systems regularly need to execute commands to configure servers, install software, or perform maintenance. To automate that process there are scripting languages that allow systems like Windows, Linux and macOS to save common commands as a script that can be run multiple times or distributed to multiple computers. PowerShell, perl and bash are examples of scripting languages.

As you can see, there are multiple types of programming languages that you can work with to perform different types of tasks. This course will focus on concepts found in object-oriented, compiled and interpreted languages like JavaScript, Java, C# and Swift.