LinkedIn principal author Doug Winnie explains various forms of programming. These types include programming native hardware instructions with machine language, interpreted and compiled languages for converting human code to native instructions, treatment of everything as reusable objects in object-oriented programming, functional programming, and system scripting to automate common actions and tasks.
- 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 will 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 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 languages are readable by humans more easily than assembly or machine languages.
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 program 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're 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 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 the capabilities defined by the class. Java and C# are examples of object-oriented languages. There are languages that are specifically designed at working with data. One example is SQL, pronounced as sequel, 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 dataset 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 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 a 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#.
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.
Join Doug Winnie as he explains the principles of programming and helps you connect to core concepts by exploring three ways that programmers perform their jobs. Doug starts by sharing the history of coding and then dives into functions, values, variables, and parameters used to define actions. He covers capturing input from users, creating conditional tests, using loops with arrays, and object-oriented programming basics. He also takes you beyond programming, into processes like debugging, refactoring, and building iteratively.
- Working with values and variables
- Breaking down tasks
- Customizing functions and parameters
- Building conditional tests
- Creating and changing arrays
- Working with objects and classes
- Debugging and refactoring code
- Going beyond the code as a programmer