By Neil Power on November 10, 2017
Last week, I had the great honour to be an attendee and a speaker at the very first KotlinConf in San Francisco. As a self-described Kotlin evangelist, it was a great opportunity to be inspired by the stories and projects of other Kotlin developers from around the world. With three session tracks, and 1200 attendees, there was no shortage of things to do!
I wanted to write a post about my experiences at the conference while it is still fresh in my mind. All the sessions were recorded and will be uploaded to Youtube sometime this month, I will post again a link to my talk when they are public.
In addition to the two days of conference proceedings, as a speaker, I was invited on a Hornblower cruise around the bay the night before the conference began.
I admit that I had to fight the feeling of imposter syndrome on the boat with some of the great names in Kotlin. I saw Andrey Breslav, the father of Kotlin, Dmitry Jemerov and Svetlana Isakova, authors of “Kotlin in Action” that we had previously read at Hootsuite in our Kotlin Book Club. I spoke with Hadi Hariri, myself and Simon Tse had previously appeared on his “Talking Kotlin” podcast. I also got a chance to thank Alina Dolgikh, who has been instrumental in the success of our Vancouver Kotlin Meetup Group (join at http://vankotl.in).
The cruise was great, we travelled out underneath the Golden Gate Bridge and braved the wind for a good view of the city. Sadly, my Pixel 2 has not yet arrived, otherwise my picture taken from above deck might have been clearer. Meeting some of the JetBrains team as well as the other speakers and connecting with them on a personal level was an experience that helped me to feel more comfortable speaking myself.
Conference Day 1The conference began the following morning, in beautiful Pier 27, on the Embarcadero. Immediately upon entering the venue, we were greeted by all things Kotlin: banners, swag, even pillows on the couch!
In the keynote, Andrey and team introduced some amazing new things for Kotlin. Kotlin Multiplatform Projects sound very interesting! In the future, you will be able to share code between your iOS, Android, and web clients as well as your backend servers. An official Kotlin wrapper for React is out now meaning you could soon swap jsx for kotlin, exciting!
There were a lot of great things announced so check out the KotlinConf Keynote Recap that JetBrains posted on the Kotlin blog.
The Morning Sessions
There are so many new stickers, I’m running out of laptop room!
Cords and Gumballs
The first session that I attended was Mike Hearn’s talk “Cords and Gumballs”. The first part of his talk was about how Corda is using Kotlin in the banking industry. Some of his stories of the way in which they trained devs on Kotlin in house reminded me of our own adoption here at Hootsuite. We found that it was very easy to have devs fall in love with Kotlin.
The second part of Mike’s talk was about a side project that he has been working on to package Kotlin into native go-like binaries. The tool, Gumball, is open-source, and he invites people to contribute to the project.
What’s New and Cool in Kotlin Tools
Dmitry Jemerov, the aforementioned coauthor of “Kotlin in Action” spoke on new features of Kotlin and its tooling. In this talk we got a closer look at Kotlin multiplatform. This initiative is incredibly exciting. Being able to share code across Mobile, Web Backend, and Web Frontend has the potential to save vast amounts of development time and effort. Additionally, in the new serialization library, protobuf is supported out of the box!
I had made it one of the objectives of my attendance at KotlinConf to get my copy of “Kotlin in Action” signed by both of its authors, after this Dmitry was kind enough to be the first.
Over lunch I ran into Svetlana and she was happy to sign as well, now I am the proud owner of a signed copy of the book.
The Afternoon Sessions
After getting some lunch, it was time for the afternoon sessions.
Kotlin Static Analysis with Android Lint
This talk with Tor Norbye was a real eye opener. The Android lint program is incredibly extensible and powerful. I can envision how much time we could save on pull requests if we wrote a few lint checks to automatically flag and fix common errors. My big takeaway from this talk is that our Android team needs to sit down for a few hours with Android lint.
Lessons Learned Building a Build Tool
The first were the problems of figuring out what nodes of a dependency graph are safe to build. Simon Tse and I created a tool called “Peon” that automatically creates Pull Requests based on changes to dependencies in a graph. I will expand on the details of this tool in an upcoming blog post but the core similarity with Cedric’s problem was that we had to figure out how to create the minimum number of pull requests and in which order to merge them, to propagate changes through the graph.
The algorithm that Cedric used in Kobalt was a similar to (though more advanced than) the algorithm that Simon and I used in Peon. Cedric’s algorithm allowed for the parallelization of builds, it could be a great extension to the peon tool.
The other piece of the talk which stood out was Cedric’s discussion of Ad-hoc Polymorphism. His solution of how to implement it in Kotlin is similar (though more structured) than some of the things that we do in our own app to decouple the way we call APIs for displaying streams of social content. Both I and Andy Fisher, an Android developer at Hootsuite, who was with me at the talk, resolved to take this lesson back to our own code base, to perform ad-hoc polymorphism in a cleaner fashion.
The final talk of the day was Anton Keks speaking about “Kotlin Puzzlers”. His talk was inspired by Java Puzzlers and it had a very interactive format. Anton showed small snippets of code and had the audience guess the output of the program, then explain why they thought it was so.
The whole talk was great fun and full of head scratching and even counting exclamation marks for:
In the end, I walked away from the talk with a smile on my face and a healthy distrust of the Kotlin compiler in certain circumstances. Check out Anton’s repo of puzzlers here: https://github.com/angryziber/kotlin-puzzlers.
Day 1 Evening
After the final session of the day, there was an evening full of events, a party in Pier 27 kicked off by a “Party Keynote”. I had to ask myself, “What the heck is a Party Keynote?”
Thankfully our Party Keynote speaker, Michael Carducci answered that question for us. Starting with illusions on a software development theme and ending with some mentalism, including guessing that Stephanie Cuthbertson was thinking of her son Peter.
After the keynote, everyone was ready for a bite to eat. There was a lot of great food waiting for us, unfortunately everyone had the same idea and so it left to some long lines at the start.
After the lines settled down, there was still plenty for everyone and in the meantime, Andy and I were able to get a photo to commemorate the event.
Conference Day 2
After a great first day of the conference, I woke up on day 2 anxiously awaiting my presentation slot as the first after lunch. However, the first thing we had in store for the day was a talk from the always interesting, Erik Meijer.
My Life as a Tech Transfer Monad
I’m still reeling from this talk by Erik Meijer, on what exactly probabilistic programming is and how we as programmers can apply it to real world problems. However, There were two things I loved immediately from this talk. First, near the beginning, Erik had a very succinct description on the expressiveness of Kotlin.
The other is that, we as programmers need to learn to think and develop differently because machines are coming for our jobs vis-à-vis Machine Learning Algorithms.
Now it was time for me to do some final preparation for my talk. I presented earlier this year at AnDevCon and I covered my experience here. KotlinConf was a lot larger though, with some 1200 attendees.
Kickstarting Kotlin Culture: The Journey from Java to Kotlin
I had been scheduled at the same time as Andrey Breslav and so I wasn’t sure if anyone would show up. However, I was pleasantly surprised when I had a room more than half full to present to.
As I mentioned in my talk, which I won’t go into detail until a later date when the video is published, I try to live by the principle of “working out loud”. Noel Pullen (who also wrote on Guilds at Hootsuite) gave me that advice on my first day at Hootsuite and it has really stuck with me. To me, working out loud means: Work passionately, know that what you’re doing will be valuable to someone, and strive to share what you’re working on with those around you.
This was a major motivator for me wanting to share our story of Kotlin adoption at Hootsuite. I hope that my talk helps others accelerate their adoption and to grow Kotlin culture in their own organizations and communities.
I was honoured to be able to tell our story at KotlinConf but I certainly had help doing so. I would like to thank my director, Paul Cowles, for supporting me and the team through our Kotlin journey here at Hootsuite, and for helping me tell this story. I also need to thank Simon Tse, who appeared on Talking Kotlin with me, and who wrote the first line of Kotlin at Hootsuite. Finally, my team at Hootsuite for driving Kotlin Culture with me, both within and outside Hootsuite.
When the slides and video of my talk are posted by JetBrains, I will share them here in another post!
The Cost of Kotlin Language Features
The next talk after mine was about the cost of Kotlin features relative to Java by Duncan McGregor.
The talk was very enlightening and despite there being a measurable cost to some of the features of Kotlin, null safety, let blocks, etc. Duncan’s conclusion is that “Everything is reassuringly OK”. So based on his research, keep using your fancy Kotlin language features.
Going Serverless with Kotlin
Next was a talk that I knew I had to attend from the title alone by Marcos Placona. Paul Cowles and I wrote on our experience using AWS Lambda functions for cross platform iOS and Android development earlier this year. That blog post formed the conference talk that I gave at AnDevCon in July of this year.
Marcos had experimented with a variety of cloud providers which was interesting as we have just used AWS Lambda and API Gateway here at Hootsuite. One of his points aligned with what we found, Serverless functions are very cheap to execute and the free tiers from cloud providers is generous.
I chatted with Marcos shortly after his talk about Serverless and about the open source library that we created at Hootsuite to help people set up and maintain Lambda functions with Terraform and Gradle. Our function currently uses Java, he inspired me to cut a ticket to convert it to Kotlin.
Two Stones, One Bird: Implementation Tradeoffs
In the final talk of the conference, Christina Lee talked about tradeoffs in implementation while reviewing some Kotlin language features.
She discussed some of the differences between: let, with, run, apply, and also. When I see these features discussed I think of the graphic that we created at Hootsuite last year to help us understand the symmetry of these functions. I’ve since seen a similar illustration in other places (a missed opportunity to work out loud on my part) but I will also share it here.
apply and also return the object that the functions are called on while run and let return the last expression of the lambda.
apply and run have ‘this’ as the receiver inside the lambda while also and let have the renamable ‘it’.
The symmetry of these functions makes them easier to understand and we have cases we each at Hootsuite described in our style guide.
All good things…
The closing panel was very insightful and the panel answered a lot of hard questions. There were some laughs when Andrey was asked what else he might add to Kotlin. He rephrased the question as “What haven’t I stolen yet?” and gave immutable data as a possible answer.
It’s at the panel that I learned there are around 50 people working full time on the Kotlin language, no wonder they’re making such great strides with Kotlin/Native, multiplatform, and other initiatives! I’m very happy that Jetbrains has invested and continues to invest so much in the Kotlin language.
I also learned that 17% of all apps in the Google Play Store are using Kotlin! I’m sure that number will rise before the next KotlinConf. The conference app, on web, Android, and iOS was programmed in Kotlin using Kotlin/Native, Kotlin/JVM, and Kotlin/JS.
Andrey and Stephanie Cuthbertson also talked about the language foundation which was promised when Kotlin was made an official Android development language during Google I/O this year. They currently have a language committee and they are committed to developing Kotlin in a thoughtful manner. The committee so far has: William Cook, University of Texas at Austin, Andrey Breslav, JetBrains, Jeffrey van Gogh, Google.
Andrey reiterated that with Kotlin, he’s more concerned about the features that are not added than the features that are. He doesn’t want the language to become too large, if they add many new features in the future, it will likely be coupled with the gradual phasing out of other features.
ConclusionAfter two whirlwind days the first KotlinConf is over! I can’t overstate how honored I was to be selected as a speaker and how happy I was to simply attend. I hope that I can continue to #workoutloud and share my journey with Kotlin and more!
If anyone would like to reach out to me about my talk, about growing Kotlin culture, or about the Atlas and Peon tools that we use at Hootsuite, please contact me at firstname.lastname@example.org or on Twitter.