So, I asked ChatGPT which should be your very first programming language as a beginner. Is it going to be C++ or Java? And it really gave me an interesting answer. Let’s talk about it.
Hey, what’s going on guys? Tanma here, welcome to my channel Simple Snippets. I make tech educational videos like programming, networking, data structures, and whatnot. So, if you’re interested in such content, definitely check out my channel and do subscribe if you like these videos.
Today’s video is going to be a little interesting one because this is a question that I get a lot from beginners, especially who are just starting off their computer science and IT careers, and they’re choosing their very first programming language.
Obviously, the first question that arises in everyone’s mind is which programming language should you choose? Now, if you ask an experienced programmer or your mentor or your teacher, all these humans will give you somewhat of a biased answer. In fact, if you ask this question to me, I am more biased towards C++ programming because I find it easy. My friend started off with Java, some people even start off with Python. So, how do you get an unbiased objective answer to this question? This is where someone who is not really human comes into the picture. Yep, artificial intelligence is generally solving many of our problems lately, and you know ChatGPT is definitely in the market and has been making programmers’ lives a lot easier. So, why not ask the same question to ChatGPT? That’s what I did, and I definitely got an interesting answer.
Now, the whole intention of asking this question to ChatGPT is to get an objective answer where ChatGPT AI analyzes the pros and cons and suggests us one programming language as the very first programming language. Initially, I just asked point blank to ChatGPT, ‘Which programming language is better as a first programming language for beginners, C++ or Java?’ I was not expecting ChatGPT to pick one winner immediately, and rightly so, it basically gave me a huge paragraph with the pros and cons and different aspects to consider, like the learning curve, application memory management, and comparison between both Java and C++. And I was like, ‘Hey bro, that’s not really what I want. Are you going to pick one programming language or what?’ So, the second follow-up question that I asked ChatGPT was, ‘Can you pick one?’ And to my surprise, it actually suggested one programming language, which is Java, and it gave me five points as reasons to choose Java as the very first programming language, and it really makes sense. Let’s go through these points.
The first point says Simplicity. Now, this might be subjective. I don’t think it’s simple because I started off with C++. However, there is a lot of commonality between C++ and Java syntax. Some things are different, some things are common, especially the concepts. So, according to ChatGPT, Java has a simpler syntax compared to C++, making it more accessible to beginners.
The second point is automatic memory management, which is true in Java’s case. So, Java has its own garbage collection, which reduces the likelihood of memory leaks and errors. If you don’t know what all these things are as a beginner, you can look it up. I also have C++ as well as Java for beginners tutorials in separate playlists on this channel. You guys can check it out.
The third one is platform independence. Java has the ‘write once, run anywhere’ philosophy. It follows that philosophy, so it’s very advantageous for beginners as it is kind of versatile.
The fourth point is versatility. Java is used in a wide range of applications, even in mainstream applications. In real-world use cases, Java is still one of the most popular programming languages, and it is versatile enough to be used in web applications, desktop applications, mobile applications, etc. So, it has a huge scope. As a first programming language, it will definitely be advantageous when you’re actually getting into the corporate world.
Lastly, it also said that the community and resources are strong. Java is a very old programming language. There are huge resources, a big and strong community. Java is being updated quite a lot. There are new software updates to the Java programming language itself, and a lot of functionalities are also updated.
So yeah, even after that, ChatGPT gave me a note. However, it is important that the best programming language can vary depending on individual preferences. Yeah, we know that bro, that’s not why we asked you. But yes, ChatGPT has suggested Java, and as someone who started off with C++ and I’ve been recommending C++ to many beginners, it might be a good choice to go ahead with Java as well since we’ve got an objective and non-biased answer from a non-human being, ChatGPT AI.
So yeah, this is the answer of ChatGPT when you’re comparing between two programming languages and you’re picking up one particular language. Pretty interesting, right? I think maybe we can ask some more questions to ChatGPT about the same. Let me know in the comments what would you want to ask ChatGPT, and we can ask it and discuss some of the answers that ChatGPT gives us.
I’m going to wrap up this quick short video over here. Hope you like this one. If you want such interesting videos where we try to explore AI and other technologies, we can definitely do that. Let me know in the comments if you are down for such things along with tutorials as well. And yeah, thanks for watching guys. I’m going to wrap up this video over here. This is Tan Sakal signing off. See you in the next one. Peace.