At the end of October, Viktor and I, Mikael, visited London to attend droidcon 2018. We are both Android developers here at Bonnier Broadcasting, so it was a natural fit for us to attend the largest Android development conference in Europe, especially as one of my former colleagues was doing a talk on modularization. The London version of droidcon has been going for ten years, and this year there was a celebration for it’s tenth anniversary.
The conference was held at the Business Design Centre, which is located in Islington, a bustling borough of Inner London. For two full days, we listened to talks and talked to fellow developers about the ins and outs of Android.
At first when arriving in London, we thought things would go very poorly indeed, as the tube was shut down due to fires on the tracks in King’s Cross station, one of the major hubs of the London Underground. Imagine if that would happen at T-Centralen here in Stockholm! After being stuck in Earl’s Court for about 20 minutes, we decided to brave the rest of the network, and make our way to our hotel by an alternative route. Once at the hotel, we calmed down, but realized that eating and sleeping were our priorities, the conference was about to start in less than 12 hours.
So what did we learn at droidcon?
- We want the future to be now! Modern Android platforms have really improved garbage collection, to the point where it no longer is a primary cause of app slowdown. In earlier versions, it would basically be a stop-the-world type of GC, causing massive yank in UI, and pre-Lollipop (API level 21) the heap is often fragmented to the point where larger chunks of memory cannot be allocated even though there is plenty free memory. We very much looking forward to the day when none of our users are on old devices. 😀
- Functional Programming is very much the new black in Android right now. This can be seen in the rapid adoption of Kotlin, a language better suited than Java to express proper functional programming concepts, but also in the rise of functional reactive programming libraries such as RxJava and applications moving towards Model-View-Intent structures, à la The Elm Architecture. Many of the talks were focused on these topics, and the words ”Unidirectional dataflow”, ”Immutable state” and ”Managed side effects” were used so often that one could have built a rather dangerous drinking game from it. Hadi Hariri of Kotlin fame was even there to hold a keynote on the virtues of functional programming.
- There is great value in constructing a shared definition of what words inside the business means. If there is no lexicon, build one.
- Google is really working their ConstraintLayout-fu. In version 2.0, you can define animations inside the xml layout. Now is the time to brush up on how it works!
- Modularization is also a hot topic. As apps grow more and more complex, build times and maintenance burden are both on the increase. One way of dealing with this is to structure you app in independent modules, for example according to Clean Architecture or some other mode du jour. This is also seen in Googles push to make download and installation of apps easier by allowing dynamic download of entire features using App Bundles, letting the original download be much smaller and thus faster.
- Something that fairly often comes up in development work is the idea of just throwing out all that old ”bad” code and doing a complete rewrite. One of the talks this year was ”The Big Rewrite” by Jeroen Mols, which argues for refactoring over rewriting. (Here’s a link to the same talk from another conference). Three things Jeroen said stuck with me. Slightly paraphrased they are ”The only source of truth is the old source code”, ”It’s not Don’t Ever Rewrite, it’s rather Don’t Rewrite All Of It” and ”Refactoring to a better state guarantees that you have better code, a rewrite has no such guarantee.”. Go watch the talk, what are you waiting for?
So, after a rocky start, when we arrived at the finish line for this year’s droidcon, we found that we had made new friends at other companies, knew more about the state of the art in Android, and had lots of new ideas of where to take our Android apps in the future.