Last year I gave a lightning talk at droidcon London titled iOS For Android Developers. A tour of iOS and Android and the common development patterns each platform possesses. The goal of the talk to encourage developers to embrace developing for another mobile platform, to learn something new and better themselves.
Once I finished the talk, I took some questions from the audience, I had one person ask me the following question:
Why didn’t you use Kotlin to compare language snippets against Swift?
My answer to paraphrase was:
Kotlin isn’t supported by Google and I wanted to keep the talk within the realms of supported languages
What a world of difference 7 months makes. Last month Google at their annual developer conference, Google I/O, announced official support for Kotlin as a first class language on Android. Furthermore they’ll be working with JetBrains, the creators of Kotlin, to create a non-profit foundation to support the development of the language.
Until recently I’ve not taken notice of Kotlin. It’s one of those things that’s been assigned to the project that seems cool alongside 8 million other things that seem cool too list. Nothing I thought I’d get much production value from.
So naturally with this announcement of support from Google I decided to download the latest Canary preview of Android Studio containing the embedded support of Kotlin. I was in awe of what I realised.
This feels really familiar, almost like writing an iOS app but with different libraries.
And that’s exactly what it is. Kotlin is similar to Swift, or rather Swift is similar to Kotlin since it was announced by JetBrains in 2011, a full three years before Apple announced Swift in 2014.
Apply your knowledge To Something New
I’m a big believer that people should be accountable for their individual learning and improvement. It’s the reason why for my own personal development I’ve skirted between developing for iOS and Android over the years. It’s a combination of skills I’m proud to have acquired.
It’s also a belief I want to instill in others for their own benefit, as well as the indirect benefits the company they work for will gain. My focus however is always on the individual to better their skills, to have a better hand in persuading people and businesses why their skills and experience mean a choice is better suited long term. To persuade them to give them that pay raise, shares, whatever they need to be happy with their work.
This is why I believe stronger than ever before that iOS and Android development go firmly hand in hand. Yes there are differences in terms of API but one of the biggest challenges, the language barrier, in my mind has been dramatically reduced.
iOS and Android are both mature mobile platforms. They have faced the same problems and provided similar solutions, mobile engineers for both platforms have tremendous amounts of transferrable skills relevant to the opposing platform. The only thing stopping them from learning something new is their reluctance to embrace something new.
When speaking with Mobile Engineers I still see a number of engineers who are firmly in the mindset of developing for one platform whilst brandishing a pitchfork at the other. If anything it’s telling of an unwillingness to accept there are other solutions to problems similar to your own, tech moves fast and having this mindset is detrimental to ones own ability to learn.
7 months ago I didn’t care about Kotlin, now it’s something I am learning about everyday. I accept there is another boat to jump on and I’m happy to make the jump to keep learning just incase the previous boat sinks. An unlikely scenario with the prevalence of Java in enterprise but you never know.
It’s this kind of accepted mindset that you are ether an engineer for X or Y that I feel people get too bogged down in. Specialising in a field is fine and is natural if you want to be seen as an expert in that field, but like all human beings our interests are numerous so embrace that curiosity!
Resources To Bridge The Gap Between Kotlin And Swift
To help bridge transfer my Swift knowledge over to Kotlin I’ve come across some useful links to help solidify and link my understanding of Kotlin and Swift. These are:
Swift Is Like Kotlin: A one pager that compares language features between Kotlin and Swift through simple to read examples. Highly recommended and one I constantly refer to.
SwiftKotlin: A tool that’s gained a lot of publicity in iOS and Android dev newsletters. I find it useful for playing around with concepts and seeing how it maps from one language to another.
Swift vs Kotlin For Real iOS / Android Apps: An insightful blog post by Ángel García Olloqui on how choosing a similar architecture style across platforms can lead to better logic / code reuse between. I also like how honest the blog is about the differences that do exist between Kotlin and Swift.
Android Development With Kotlin: A talk given by Jake Wharton discussing the problems of Android that Kotlin helps solve. A good talk to watch to gain some understanding as to why Kotlin has gained official Google support.
Engineering The Architecture Behind Uber’s New Rider App: An Uber Engineering post discussing how they developed a cross platform architecture to reduce friction between iOS and Android.
These are the most useful I’ve found up to now. I’d be interested to know any others that exist, let me know and I’ll be happy to add them to the list.
I’m really excited to what the future holds for Kotlin and Android. I’m also optimistic that mobile developers will take the jump to become cross platform mobile developers and expand their skillsets to better themselves. All it takes is a little curiosity and self belief.