A Freshman's confusion: C, C++vs JAVA vs Python. Which one to learn and why?
#myfirsttechblog
Are you a newcomer who has recently embarked on the journey of learning a programming language and finds yourself perplexed by it all? Your mind may be bombarding you with questions such as: Why are there so many programming languages? Is it imperative to master C/C++ before delving into anything else? Will learning Java alone guarantee me a job? Is learning the C language even relevant anymore?
Allow me to introduce myself, I am Keerthan, currently employed as a java developer at an esteemed organization, and in this article, I will be sharing my perspectives and experiences on programming.
Why there are many programming languages?
care to read some history?
It's just that developers always wanted a language that is easy to work with, close to human communication language and supports the features that they feel are most useful. However, not all are simultaneously possible, so language designers have to choose which to prioritize. Thus, not every language can satisfy every developer's preferences. Fortunately, the accessibility and maturity of modern language creation tools (lexers, parsers, compilers, transpilers, interpreters) make it easier for developers to create new languages specific to their own needs.
As time passes, developers are always striving to reduce the difficulty of learning a programming language by making it more human-readable, akin to common English language.
Which programming language do I need to learn first, then?
If you are a beginner, my suggestion is you should learn java first. why? Let's see:
Java is actually developed by combining the features of C and C++. So, you are actually covering some important programming fundamentals of those legacy languages.
Java is known for its adaptability. Despite its invention in 1995, Java remains one of the most popular languages for developing large-scale enterprise applications, web servers, Android apps, and mission-critical systems. Its strong typing and performance make it suitable for projects where reliability and scalability are paramount.
Java also has a strong community with a wealth of resources and support available. The Java community has been instrumental in driving the language forward and maintaining its relevance over the years.
After learning java thoroughly, it is easy to transition to other modern programming languages can be relatively straightforward because java provides strong foundation on OOPS, core java concepts can be applied everywhere, java supports multiple programming paradigms, including procedural, object-oriented, and functional programming. This exposure prepares you to adapt to different programming paradigms found in other languages.
What about python then?
Python's syntax is designed to be simple, clean, and easy to understand, resembling the English language. This makes it an ideal language for beginners to grasp fundamental programming concepts quickly.
Python is often preferred for rapid prototyping, scripting, data analysis, scientific computing, machine learning, and web development. Its simplicity and versatility make it suitable for a wide range of applications.
Let us look a sample code to read and print an integer in java and python:
Java :
import java.util.*;
/* Basic Java program to read and print an integer */
public class Application {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int a = in.nextInt();
System.out.println(a);
}
}
Python :
a = input()
print(a)
Well, you can see the differences clearly😉
Conclusion
In conclusion, be it java or python, it's crucial not to limit oneself to a single programming language in today's dynamic and evolving technological landscape. Embracing multiple programming languages offers several significant benefits.
Technology is constantly evolving, and new programming languages and frameworks emerge regularly. By diversifying their skill set, developers position themselves to adapt more easily to emerging technologies and industry trends, ensuring their long-term relevance and employability.
Thank you for reading!
Sai Keerthan, Junior Developer.