Some posts ago I published that I was embarking myself into learning Java. Today I realized that it’s been a month now! 😮 My previous post was a bit opinionated on why I had never learned Java. It makes sense to write an update on this mission.
First month thoughts
As per my previous post, I decided to follow the Java Programming MOOC, and I have done it thoroughly this month. The content is well laid-out and with many exercises for making me feel comfortable with the language syntax. I have covered the first 5 parts (out of 7). I have to give it to the course organizers, I have changed my mind about Java. I don’t love it, but I see why Java is the staple language for teaching object-oriented programming, it’s quite didactic.
I haven’t written a line of C# code since 2020, and Java made me remember those times. The fact that C# and Java have similar syntaxes has been an advantage for going through the course slightly faster. To be fair, I learned C# on the go, with work being my main driving force for making the program compile 🤪
I am considering on doing the second Java course from the University of Helsinki, why not? The material keeps building on complexity and has now hooked me to code a bit more on Java every day.
The whole reason why I decided to learn Java was because of a job requirement, and I am glad I started learning before starting my full-time job. The proprietary solution that is used at work is heavily inspired in Java. It has a plugin for Eclipse. More Java stuff for me LOL.
Lessons learned
So far so good, and I have learned stuff on the way (on top of Java syntax). Here are the main ones:
- I installed OpenJDK 11 in the beginning, but I did not like that VSCode kept complaining about “not finding Maven”, so I ended up removing OpenJDK 11 and installed Oracle Java instead. VSCode does not complain anymore. I still don’t know exactly what Maven is, but I’ll find out soon 😀
- The official Java documentation is not that friendly, but hey this is my personal opinion. Perhaps I am biased after coding in C# and Python (their docs are excellent!). Java docs is good though.
- Rarely the Java MOOC material is not that detailed and it does not explain
some details. For instance, the exercises where you have to use the
Paths.get()
method. I spent a lot of time on it, thinking that I was doing something wrong. However, it was all a misunderstanding about what the method does. - I installed Java on both Linux and Windows. Both times I had to uninstall and then install a different version. The winner was Linux. No need to do esoteric stuff on environment variables. Windows is messy, but we knew that already 🤪
- I didn’t realize how much I missed writing proper code. After spending almost 2 years writing Python (and seldom R), I almost forgot about access modifiers, reference variables and OOP concepts. C# and Java are my favourite languages for OOP. Sorry not sorry Python.
- The experience of writing Java in VSCode is completely different to writing code in Eclipse. True, Eclipse is an IDE (i.e. heavy, bulky, bloating) but it does have everything for creating a Java project from scratch. In fact, Java MOOC recommended to use NetBeans but as usual, I’m a bad a student…
That’s it for now, month 2 and counting.