Search This Blog

Tuesday, April 12, 2016

Kotlin during Android Developer Group Poznań (ADG) meetup


Last week I presented STX Insider project at Android Developer Group meetup in Poznań, Poland (ADG). It’s entirely written in JetBrains’ new programming language Kotlin. The presentation was focused on technical aspects of the code, mainly on nullpointer safety, interoperability with Java, final value preference, nullable types and extension functions. After the talk, participants had the chance to answer a few questions about the language.

One can draw the following conclusions from the survey:
  • developers are intersted in Kotlin but most of them haven’t written anything in it yet
  • they see the potential but aren’t ready to abandon Java just yet

Event details (ADG Poznań):
https://www.facebook.com/PoznanADG/posts/1458635877496012

Presentation slides:
http://www.slideshare.net/BartoszKosarzycki/adg-pozna-kotlin-for-android-developers






Thursday, April 7, 2016

Kotlin advanced - language reference for android developers


Kotlin - one of the popular programming languages built on top of Java that runs on JVM.

As a mobile team we got interested in Kotlin a few months before its final release which gave us time to test it thoroughly before production use. The language has some clear advantages for an Android programmer - it enables migration from Java projects that have been under development for some time already. Java&Kotlin coexistence simplifies Kotlin introduction as only new functionality is written in JetBrain’s new language leaving all the legacy code untouched.

Transitioning gives the developer an opportunity to use lambdas, new syntax for data objects, extension functions to easily expand Android SDK’s classes functionality and infix notation to write DSL-like structures. Almost all the libraries you use today will work with Kotlin thanks to 100% Java compatibility. The same is true for Android SDK classes - all of them will seamlessly work with the new programming language. Kotlin gives you more choice when it comes to reflection, creating documentation and being null-pointer safe. Android works great with it out of the box so you won’t need to change your development habits.

Our production project in Kotlin turned out to be a success after 4 months of development. We had 0 bugs related to Kotlin as a programming language. Our code footprint is almost 30% smaller thanks to JetBrain’s, we benefit from nullpointer safety, closures, translated enums, data objects and use infix notation for logging and displaying Snackbars.

Kotlin advanced - language reference for android developers

Second talk on Kotlin language we had at STXNext. We try go deeper into language specifics and look at the positive impact new syntax can have on boilerplate removal and readability improvement. Kotlin really shines in Android development when one looks at “Enum translation”, “Extension functions”, “SAM conversions”, “Infix notation”, “Closures” and “Fluent interfaces” applied to lists. The talk, however, compares language-specifics of Java & Kotlin in terms of “Type Variance”, “Generics” and “IDE tools” as well.



Monday, March 21, 2016

Zulip IM


Lately we've moved to Zulip as our main company IM app.
The story behind Zulip is that it was created as group chat application optimized for software development teams and later on (around 2014) acquired by Dropbox. The development of the core application ceased due to harsh competition from Slack. On Sept 25, 2015 the original Zulip team decided to open-source the project and make it publicly available.
Zulip has some clear advantages over the pure internal jabber server, the main of which is the web client access and no configuration to hassle with (other features are listed here - https://zulip.org/features.html)

Zulip's Android app has not been updated since Feb, 2015 and probably will never be so we took the code and refreshed it. On the plus side - it works with our internal IM server, the design has been slightly refreshed (although almost no material design is present there).
With the current version push-notifications are switched off so there is no battery drain and the IM doesn't bother you until you open the app to have a chat.
In future versions push notifications will be present ONLY as an option.

You can download the app here:
https://goo.gl/u8QU1x

The source code is available here:
https://github.com/kosiara/zulip-android





Tuesday, February 16, 2016

Kotlin Developer Starter in Android projects


During our STX Next's Lightning Talks I'd given a presentation about Kotlin. It's a quick starter about the language. The idea was to create a short talk that would fit in a timeframe of 45m-1h. I assumed that attendees had basic skills from Android development, functional programming, java JDK and some JVM languages like - scala, closure or groovy.



Slideshare presentation:
https://t.co/oVPJw1YIGa


Presentation summary:
Kotlin - one of the popular programming languages built on top of Java that runs on JVM. Thanks to JetBrains support and excellent IDE integration, it’s an ideal choice for Android development. 100% Java compatibility, interoperability and no runtime overhead is just the beginning of a long list of strengths. Kotlin is supposed to be a subset of SCALA, on one hand covering major advantages for developers and keeping short compile times on the other.

This presentation is a Developer Starter - a set of hand-picked information allowing a person with no knowledge of Kotlin to start writing basic Android activities and set up a kotlin-based Android project. It starts with language background, reasons for its creation and advantages. Then presents basic use cases, syntax, structures and patterns. Later on Kotlin is presented in Android context. Simple project structure, imports and Kotlin usage with Android SDK is explained. In the end cost of Kotlin compilation is presented and the language is compared to SCALA and SWIFT.