Learning a new programming language? Here's how to go about it
EzeanaMichael
Posted on July 16, 2022
Intro
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
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
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
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.
Comparison
Here is a simple if statement in the languages.
C.
As seen in the 3 languages they all have the format
if (condition){
statement}
Else{
}
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.
C.
The while loop takes a similar format
While(condition){
expression}
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.
Conclusion
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.
Posted on July 16, 2022
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.