Kotlin as a first class language!

 
android_kotlin.png
 

This morning my wildest dreams came true - Kotlin became a first class language for Android development! This is exciting and it firms up what I've believed since the summer of 2015. Kotlin is the best language available to write native Android apps.

It's exciting because it means Google listens.

Pressure from developers has made it clear that Kotlin is where we see the platform going. It solves so many problems common to Android app development and brings features many developers lost hope of having. Method references, null data types, flexible control flows, lambdas, extension functions. There are plenty of libraries, hacks, and work arounds, but Kotlin brings consistency. The choice to support Kotlin means it will only get better and continue to flourish.

It's exciting because Kotlin can make you faster.

After the 1-2 days ramping up you find yourself accomplishing simple tasks in a fraction of the time it would have taken in Java. Language level features reduce ambiguity, drive readability, and make code more concise. You have first class nullability and you are forced to deal with it before you ship your app. It's as if JetBrains felt the pain of developing applications in Java and wrote a language to make it better (spoiler, they did.) You can see this throughout the language as you learn to write idiomatic Kotlin. You spend less time writing boilerplate (data classes anyone?) and more time writing interesting code.

It's exciting because it's rock solid on day one.

Years of testing and iteration before Google gave the green light has lead to a language and tool set that just works. It runs in your favorite IDE. It's works on every version of Android. Let me phrase this in another way - When was the last time you got an Android developer tool that just plain works. On day one. Like right now, go get it, and ship an app on the same day it was announced - 

This is the very first time and I hope this trend continues. Google doesn't need to invent everything and this proves that. They can be an amazing facilitator and still win. 

Clearly I am super jazzed about this and it's should be exciting for anyone who writes Android apps. You can check out my other Kotlin posts here and be sure to keep an eye out for more.

Android Studio vs. IntelliJ IDEA

Many Android new comers haven't experience the pain of Eclipse for Android development. When I started in 2009 it was the IDE and tool kit to use. IDEA from Jetbrains was around and had basic support for Android projects but it wasn't super compelling. In 2010 I made the switch and its been wonderful ever since. However it wasn't until Google I/O 2013 when they released the first version of Android Studio and even then it was a very subtle "we are probably going this direction but still love Eclipse" kind of move.

So beyond the mini history lesson, why does this matter? Because you can still use IntelliJ IDEA Community or Ultimate editions to build your Android apps and there are a couple of good reasons why I do this.

I find it more stable and up to date

Its true Android Studio is built using the open source Community edition, however, its often out of date. It took 6 months for Android Studio to upgrade from IDEA 15 to IDEA 16, which had some fantastic improvements

It does a lot more than just Android

If you find yourself working in multiple languages and frameworks IDEA Ultimate covers you more than Android Studio. I also find it way easier to create simple Java projects using IDEA, which is useful for sketching ideas or building pure Java or Kotlin libraries. If you are building a hybrid app, the web technology support is superior out of the box.

It can be configured without all the bloat

In my workflow I don't use many (if any) Google plugins. In Android Studio I choose to disable 10+ of them removing UI clutter and overhead. On the flip side, IDEA asks you up front what you do day to day to help customize your environment right from the start.

Worst case, its a great back up

If something just isn't right with your Android Studio, try IDEA. It could help sanity check if the issue is truly with your app, computer, or just Android Studio itself.

While IDEA Ultimate is my daily driver, I do still have Android Studio around. Many of the new utilities haven't made it into IDEA and in the off chance I need them its just a double click away.