Javascript Or Python?

Javascript Or Python?

There's an upward trend in the number of people venturing into Tech. Awesome as this sounds, most newbies are either confused with which language to begin with or are lost in the variety of online courses available for free learning.

If you have interest in becoming a Website Developer, Application Developer, Data Scientist and the likes, you'd definitely need to learn one or more programming languages. I could go on to say, "learn JavaScript (JS) for Application Development" or "learn Python (Django) for Website Development". All of these would amount to nothing if you do not understand the structure on which these languages are built.

The aim of this article is to:

  • Demystify the concept of Programming Languages
  • Provide clarity on the kinds of programming languages available
  • Help you select at least one programming language to learn

Hello World!

Interaction with the computer requires certain instructions written by man and recognized by the computer. Programming or "coding" as it is popularly called involves writing commands understandable by the computer which is used to execute specified tasks.

In most programming languages, your first task is often to produce a simple output known as "Hello World!" The joy that comes with seeing your codes produce human readable characters is unexplained but, that's just a tip of the iceberg. As you advance in your programming career, you'd be writing more lines of code than just "Hello World".

Did I scare you?

Sorry if I did, you'd understand better after I explain the kinds of programming languages.

Categories of Programming Languages

Py Js (1).png

There are thousands of existing languages and more would still unfold as time goes on but each one follows a particular set of pre-existing principles. This implies that programming languages are in categories, vis-à-vis:

Low Level Language

A language is referred to as a low level language when its codes are close to the computer's hardware. This implies that the processor does not need an interpreter or compiler to execute these codes. Low level languages are machine oriented i.e for computers only and written mostly by computer scientists with expertise in binary codes.

The types of Low Level Languages are:

  • Machine Language: Remember binary codes, I mean 0s and 1s? Sometimes they look clumsy and not understandable but in the real sense they're the instructions your computer system architecture works with. Machine Language is a low level language directly acted upon by the CPU (Computer Processing Unit). It is difficult to write, debug and consists of only 1s and 0s.

image.png

  • Assembly Language:Assembly Language is a set of instructions written in binary and hexadecimal codes for direct interaction with the computer's hardware. Assembly Language is unique because it translates High Level Language to Machine language. In other words, it is the link between software programs and the corresponding hardware. The example below shows a set of assembly codes on the left with the corresponding instruction on the left.

image.png

High Level Language

Initially, computers only performed mathematical operations but as technology advanced, there came a need for software programs. From utility software to application software, these programs became necessary for a computer to do more than calculations.

Obviously, such software cannot be written in binary codes as they'd take forever and may end up crashing. To build these software, the need for high-level programming arose. High Level Languages are a set of instructions for building software i.e programs written for performing certain tasks. There are thousands of high level programming languages such as JavaScript, Python, PHP, Ruby etc.

image.png

Each one of these languages fall into one or more of the categories below:

  • Procedural Languages: From the word "Procedure", they are instructions following a certain order. Procedural languages involve the use of logically structured codes to build applications. They employ functions, conditionals and variables to achieve specific tasks. Examples of procedural languages are: PROLOG, SQL etc

  • Non-procedural Languages: Also known as Functional Languages, non-procedural language involves the use of functions that tell the computer how to perform tasks. It could be a simple function or a a collection of functions. Examples of non- procedural languages are: FORTRAN, C, PASCAL etc

  • Object Oriented Programming Languages: This is the most commonly used type in the High Level Languages. It involves structuring data into objects. These objects can have properties (known as attributes) and can perform or accept actions (known methods). Object Oriented Programming Languages has three features which makes it stands out from other High Level Languages, they are:

    • Encapsulation
    • Inheritance
    • Polymorphism

In subsequent articles, the principles and features of OOP would be discussed in detail.

Examples of Object Oriented Programming languages are: Java, Python, C++, JavaScript, C#, Visual Basic and many more.

The major difference between high level and low-level programming languages is that, the former is human readable while the latter is machine readable. Also, high level languages are used in software development.

Did you know?

Asides programming languages, there's another kind of computer language known as Scripting Language. It is a kind of language that doesn't require compilation before running. The major difference between scripting and programming languages is that the former is interpreted while the latter is compiled although both languages are often used for software development interchangeably.

Conclusion

Congratulations for taking your first step into the world of programming! Now that you know the types of languages and their principles, which of these do you intend to learn?