If you read the last post (and if not, then go check it out!), you may have noticed that the example code is all written in Kotlin. I even used Kotlin for the buildscript! I did this for several reasons, and that’s what I want to discuss with this post.
Anyone who’s worked with me long enough knows that I make no effort to hide my appreciation for Kotlin. It wasn’t always this way, however, before it was Scala that held my obsession. I first started learning Kotlin back in 2017-2018. I was working on an example project to learn several new-to-me technologies: kubernetes, spring cloud, mongodb, etc. While I was working on the application code for the project, I realized that I was getting a little bored of writing everything in Java, so I decided to have some more fun and throw Kotlin into the mix. Since then, I’ve been using Kotlin a lot for hobby projects - especially those using Spring.
For the majority of my posts on Spring and related example projects, I’ll probably be using Kotlin. I’ll be doing this a for a couple of reasons. First, I’m not currently using Kotlin a lot at work so it gives me an excuse to use a language I really enjoy. Secondly, Spring has excellent support for the language, so I think it’s helpful to get exposure to the two together.
I don’t intend this to be post to convince everyone to go out and learn Kotlin. Nor will I go on about all the nice features of the language (maybe a future post?). I do encourage anyone who considers themselves a “Java Developer” to try learning it though. I believe it’s important to learn new languages and Kotlin would be a nice introduction to something as it should be familiar enough while also presenting a bit of a challenge.
Why learn new languages?
I didn’t immediately fall in love with Kotlin, there were even a few challenges that lead to some frustrations along the way. However, as I was working through the learning experience, I realized something: Writing code in a new language made me fall in love with programming all over again. I started to feel that same excitement new developers first experience upon seeing their code work. This is part of why I think it’s important to learn new programming languages, it helps keep a passion for software development alive in an engineer.
In the start of my career, I worked primarily as what many would consider a “Java Developer” - the majority of my projects were Java based with some slight variation, but the day-to-day work was done in Java. I really dislike this label though. I’m a Software Engineer gosh darn it! And to me that means knowing a lot of languages and tools so you can pick the right one for the job. And the only way to do that is to learn. So in my opinion learning a new language is a great way for a Software Engineer to embrace the spirit of lifelong learning.
Last, but not least, a more practical reason to learn a new language is that it can force you to think about problems differently. Whether it be Functional, Object Oriented, or any other style every language provides new avenues for solving problems. So even if you don’t end up using a particular language regularly, you’ll at least gain the valuable experience from thinking differently and working on your neuroplasticity.
That’s it for now
I think I’ve rambled enough at this point, and to summarize I really enjoy writing in Kotlin and I strongly encourage any Software Engineer to go out and learn a new language. Ultimately, I hope to use a lot of new-to-me technologies in these posts so that we can both learn along the way. Thanks for reading!