If you’ve been following me, you’ve probably noticed that I’ve used Java in my Ultimate Data Structures and Algorithms course. I’m also planning to use Java in my upcoming Design Patterns course.
Well… there were a few well-thought reasons behind this decision.
Why not Python?
Python is a great language. I love it! It’s free of clutter and is simple to use. It also has better support for OOP features. So, why didn’t I choose Python? Because based on my research, Python is often used among people in the data science community, rather than professional software engineers. A lot of people are learning Python because it’s the best language for machine learning and AI.
Yes, you we use Python to build desktop and mobile apps as well as backends. However, Python is not the language of choice for building mobile or desktop apps. These days, the majority of people are building mobile apps using cross-platform solutions such as React Native or Flutter. Others do native development in Java (for Android) or Swift (for iOS). The same applies to building desktop applications with Python. Python is not very well known for that reason.
Why not C#?
C# and Java are very similar in terms of syntax and they both have great support for OOP features. So, why didn’t I choose C# given that I have several C# courses?
Well… I looked at different sources to see the popularity of Java vs C#. Google Trends is a great resource. As you saw earlier in the post, Java is way more popular than C#. Does it mean it’s a better language? Well, it depends on how we define “better”.
What is better? A Ferrari or a truck? It depends on what you want to do. Ferrari is a super-fast car but it’s useless if you want to use it to move house. Programming languages are the same. There is no such thing as the best programming language. Every language has pros and cons. C++ is well known for its speed. Python is popular for its simple and clean syntax as well as tons of resources for machine learning.
Just because Java is more popular, it doesn’t mean it’s a better language than C#. In my opinion, C# is a more feature-rich language but Java was marketed better.
C# and Java have been rivals since day one. Many of the features we’ve had in C# for a long time were introduced in Java years later. Some features don’t exist to this day! For example, in Java, we don’t have optional parameters which are very handy. We have to overload a method. Ugly! Jave interfaces are also bad. They allow implementation (default and static methods) which don’t belong to interfaces. I’ve talked about this issue in the second part of my Ultimate Java Series.
I personally prefer C#. But as I said, Java has had better marketing and that’s why it’s always been more popular than C#.
So, I chose Java because it’s used more widely than C# amongst professional software engineers. There are more Java developers out there than C# developers. Most universities and colleges also tend to teach Java, rather than C#.
Now, all that aside, C# and Java are very similar in terms of the syntax. Recently I posted this tweet asking my students if this is Java or C# code?
Is this C# or Java? pic.twitter.com/DxpChbQalP
— Moshfegh Hamedani (@moshhamedani) November 16, 2019
The reality is I wrote this code in IntelliJ (a popular Java IDE). But the code is valid C# and Java code. Someone argued that this is an over-simplified example and shouldn’t be used as a basis for comparison. That is true. But my whole point is that if you understand this code, you can perfectly take my Data Structures or Design Patterns courses.
The point is: You don’t need to be a professional Java developer to take these courses.
What You Should Take Away
In my opinion, Java in the programming world, is like the English language in the world we live in. If Italian or Hindi is the only language you speak, you’re probably not gonna get very far ahead.
If you understand English, you have access to tons of valuable resources. Whether you want to learn programming, or painting, or piano, if you “understand” English, you have tons of resources in front of you. You don’t need to be fluent in speaking English. All you need is to just understand it.
So, that’s it my friends! That’s why I’ve chosen Java to teach the fundamental software engineering topics such as Data Structures and Design Patterns.
My Upcoming Design Patterns Course
My upcoming Design Patterns course is gonna be one-of-a-kind. I can proudly say that. Most design patterns books and courses are average at best. Many of them are awful. So boring, so dry, without real-world examples. They teach you the concepts using ducks, cars, and pizzas. And worse, most of them don’t teach you the thought process behind these patterns. They don’t tell you how GoF patterns were discovered. My course is gonna be the one that fills the gap. Unlike other courses, I’m not gonna give you a list of patterns to memorize. I’ll teach you how to think and how to design extensible and reusable object-oriented software.
All you need to take this course is basic Java syntax, which you can learn in an afternoon or two.
So if you’re totally set on not learning anything that’s not C#, I think you’re missing out. The choice is yours!