What  is programming?

What is programming?

Hi there, Hope you are doing great. Today I would be discussing on one of the most puzzling questions I had as a beginner and I believe it is also a question for someone relatively new to tech; What is programming?

Programming is often described from many perspectives but I would like to start with a basic approach. The concept Programming has been in existence since the days of Ada Lovelace's work on Babbage's Analytical engine and has thus evolved since then. Programming have grown in terms of complexities, style and adaptations. Programming has to do with the process writing instructions which tells the computer what to do, sometimes even defining steps on how what to do tasks. Simply put without programs, computers are just dumb machines. Right now, your computer is currently running the way it is due to programs pre-installed in the OS and no matter the device you are using to read this now, it would interest you to know that its only made possible through programming.

A program is a set of instructions that tells the computer what to do in order to achieve certain goals or tasks. A Program can also be referred to as code.

Computing devices run on binary inputs at the fundamental level using "1s" and "0s". Every computing device out there run on these fundamentals, no matter how complex they might seem. On the lowest level, computers only understand binary (1s and 0s). In the past, it was a ton of work to create programs because it required feeding computers with stages and stages of binary inputs for every step it has to take along a function. Then as computing devices evolved better programming methodologies came into existence which Included the creation of programming languages.

Instructing computers became easier when programming languages were created. A Programing language is like a language that we share with a computer or any computing device, it is the language that a computer understands. As humans we speak human languages, computers speak 1s and 0s : on and off in its interpretation of tasks. Programming languages came as a means to bridge this language barrier by serving as an intermediary between human and computer language. Through the evolution of computer programming, programming languages has been categorized into three;

  • Machine level language
  • Assembly languages
  • High level languages.

In context to modern day computing, we interact mostly with high level languages because of the simplicity it offers but that should not be a reason to undermine the other two categories as it paved the way for the computer languages we are used to seeing around.

Machine language This is the language that a machine understands primarily "1s" and the "0s" .It is the native language of a central processing unit, it consists of binary - hexadecimal characters and it's not easily understood by humans. Every other form of computer programming is interpreted down to machine language for the computer to understand, for example a simple "hello world" is written in 8bit as

    01001000 0110101 01101100 01101100 01101111 00100000 01010111 01101111 01110010 01101100 01100100

Assembly language This is a second generation language , operations conducted using assembly language is faster than that of high level language. Assembly language is designed to be readable by humans and it is as an intermediate level which is converted to an executable machine code by an assembler (converts syntax to numerical equivalents, it's more like a program that assembles multiple assembly code into a single program). Assembly language eliminated the error prone, time consuming first generation machine programming needed for earlier computing. Today assembly language is used for direct hardware manipulation or to address performance issues on hardware directly. The major disadvantage of assembly language is that code varied in different computing architecture since its syntax is written directly based on type processing units and it wouldn't be compatible across other units. Here is an example of a "Hello, World" statement written in an x86 assembly language for a NASM assembler

     hello-DOS.asm - single-segment, 16-bit "hello world" program
     ;
     ; assemble with "nasm -f bin -o hi.com hello-DOS.asm"

    org  0x100        ; .com files always start 256 bytes into the segment

    ; int 21h is going to want...

    mov  dx, msg      ; the address of or message in dx
    mov  ah, 9        ; ah=9 - "print string" sub-function
    int  0x21         ; call dos services

    mov  ah, 0x4c     ; "terminate program" sub-function
    int  0x21         ; call dos services

    msg  db 'Hello, World!', 0x0d, 0x0a, '$'   ; $-terminated message

High level language When a modern day person imagines programing its always from the high level approach. high level programming was developed due to lack of portability in other languages available which simply meant that code had to be written for specific machine processors and couldn't be shared across other machine of different processor types. High level language is easy to understand and uses basic words for its implementation. Under the hood, high level programming languages get converted using compilers or interpreters to machine code which computers understand. Just like how a human language would have set of rules governing the language, programming languages also have set of predefined rules which a person must follow when writing such language. As you read this, you are able to understand what is being said because your brain has a form of interpretation library which makes meaning off the symbols put together to form words and it makes meaning off this. In a high level language the compiler or interpreters works like a library that transforms the languages syntax down to the form a computer can understand. there are so many high level languages out there, examples of programming languages include Java, php, JavaScript, Ruby, Go, python and lots more. Here is an example of a "Hello World" syntax in PHP

<?php

echo "Hello World";

?>

The various high level programming languages are further classified based on specialization. these classification types include;

  1. Procedural programming
  2. Object Oriented
  3. Scripting Programming language
  4. Parallel Processed
  5. Logical
  6. Functional
  7. Database Oriented

I have come across some languages falling under some of these categories and will give Further details on my top three of these specializations;

Procedural programming These are sequence based and they make use of multiple looping and variables , it works by assigning calls on procedures. This specialization is found in Fortran, Basic, Pascal and C programming language

Object Oriented Object oriented programming (OOP) arranges its software model around objects with various unique behaviors of internal and external parts. In OOP the programmer collects many objects and they are brought together with their various attributes to build a more complex rigid system. It is centered around many development factors such as Polymorphism , Encapsulation, Inheritance , Abstraction and also in its Collection abilities. examples of programming languages include Ruby, Scala, C++.

Scripting Programming language These are comprised of both Object oriented and Procedural Programming and they require small syntax and are interpreted at runtime. Scripting languages are one of the easiest to learn too examples of scripting programming languages include python, JavaScript, perl.

Some programming languages are known to share specialization characteristics for example C++ can be seen as parallel processed because of the simplicity it offers through parallel implementations and languages like python, kotlin, rust, C# and java can be seen as functional because it can be constructed by applying/composing functions. Most languages offer database oriented systems too. As you go deeper in tech differences in high level language syntax becomes shallow and your ability to learn multiple languages faster increases as you familiarize.

Want to know more about other tech related topics and how to go about being a good programmer ? , Follow and watch out for our next posts on topics like "the steps and procedure required in writing code". Don't forget to leave a like if you enjoyed this post, For now;

System.out.printf("%s%n", "see you later");