DEV Community

Cover image for Learning a new programming language? Here's how to go about it

Posted on

Learning a new programming language? Here's how to go about it


Venturing into a tech field often requires expertise or knowledge of a programming language, some may require 1 or several depending on the aspect you'll focus on(web development, machine learning, software engineering, etc.)
During my research on various programming languages and their uses I found similarities in the syntax used to write them, they may not be written in the exact format I.e word for word but as you gradually learn one you find the rest becomes easier to understand and apply when solving problems and challenges, in this article I'll be comparing some codes in 3 languages:

  • C
  • Javascript
  • Python

Brief explanation and differences

C language was one of the earliest high-level languages developed and still has some use today. It is used for building some operating systems, GUI's, and more. During my time of learning, I started with python and got stuck. Eventually, I came to the C language and took my time to understand it. Python became very easy to understand after that. C is a structural programming language.

Javascript is a popular language among many, don't get scared yet it's not as difficult to learn as java, some might even say it's easier to learn than Python, Javascript is a language that focuses on web development, the interaction of the site built with HTML and CSS, you can say HTML provides the basic structure of the website, CSS styles the website and javascript creates an interaction between the user and the website. Javascript is a multi-paradigm language that can be written in a functional, object-oriented, or structural format.

Python is usually regarded as the easiest programming language to learn, but honestly can be tricky at times, it uses ranges from web development, data science, data analysis, machine learning, and more it is generally used cause it's easy to type and learn for most people and one of the fastest programming languages to execute. Just like JavaScript python is a multi-paradigm programming language but is usually classified as a functional programming language it can also be written in structural and object-oriented as well.


Here is a simple if statement in the languages.
Image description

Image description

Image description

As seen in the 3 languages they all have the format
if (condition){
They are codes that do the same thing all written in a structural format, there are more differences with python given that the data type is automatically deployed while it has to be specified in C lang and javascript(var means variable which makes it automatically given a data type just like python).
Javascript and c lang also possess the same type of comment which makes it easier to understand, any programmer can understand the code above given that it is written in the same syntax, not word for word, but can be understood if not written. Aside from that, the relational operators, the keywords "if else" and the string outputs are also the same.

Here is a simple while loop in the following statement.
Image description

Image description

Image description

The while loop takes a similar format
Another simple code that does the same thing, once the syntax of a programming language is learned, it becomes overall easier to learn the basics of every programming language, though it won't always be this way given that they are used and excel in different aspects of the tech industry, pick the best suited and it'll work out fine, and if your want to change your tech field, it'll be easier to get started on another tech track.

When learning a programming language, one of the most important steps is to be patient, you can't just start and stop today, some make learn in weeks, and some may learn in months, so take your time and practice challenges on sites like google kick start or hacker rank they will show you there is more than one solution to a particular problem once you learn and understand the syntax it comes naturally as English or your local language is to you, then get better and start working on real-world applications, as important as it is not to rush it's also important not to be too slow when you feel it's right, go for it, all the best, thanks for reading πŸ˜‡take care and happy coding.

Top comments (2)

armousness profile image
Sean Williams

Interestingly, C is a fairly recent language: it came out in 1972. It was created alongside UNIX, to serve as its primary programming language. Accordingly, almost all of the Linux kernel is written in C, and most of the baseline programs for Linux (aka GNU) are written in C.

I believe the oldest high-level programming language still in widespread use is FORTRAN (1957), and the second-oldest is Lisp (1958).

FORTRAN is focused on manipulating arrays, and (lord knows why) it's still heavily used in scientific computing. Interestingly, Python has been gaining a lot of ground in science, at least outside high-performance computing.

Lisp is the oldest major functional programming language, and it's still in use mainly because there's a popular Lisp interpreter called Emacs. There are some other GNU projects that use Lisp, but Emacs is the big one.

ezeanamichael profile image

Ooh,Thanks for the insight.