ylliX - Online Advertising Network

Uniform list access with subscripts

Accessing values from an array using subscripts is a light and easy way to fetch list data. Kotlin brought uniformity in data access across regular arrays and Lists by allowing us to access data from a List using subscripts. But, what about our custom data models? Can they have subscripts if they mostly represent a […]

Avoiding fake italic and bold text on Android

Changing line heights in Android using LineHeightSpan has this ugly side-effect where the cursor ends up being very tall, extending till the full line height instead of just the text height. I’ve decided to go to extreme lengths to fix this over the next few days. For science. pic.twitter.com/2tWLvDq1rz — Saket Narayan (@Saketme) November 24, […]

Instagram Data Saver Mode

We recently shipped Data Saver Mode, a new feature on Instagram for Android that helps the app consume less mobile data. In this post, we’ll go over why we decided to work on this feature, our approach in developing it, the engineering implementation, and how people were impacted by it. The motivation behind building Data […]

Low-overhead wrappers using inline classes

Previously, we discussed how Kotlin’s type aliases could make our code more readable. However, if you remember, since type aliases don’t introduce new types, they don’t provide any type-safety. This week we will be exploring Kotlin’s experimental inline classes which have benefits that type aliases provide but go further than that. A little about inline […]

Writing clean models using extensions

Models in Kotlin with data classes are already leaner and cleaner than their Java counterparts. Abstracting away all those getters, setters, toString() and copy() method with a single keyword makes our models reflect the only thing they should be concerned about — holding data. As I was exploring Swift for a project, I came across […]

Concerning Jetpack Compose

Jetpack Compose is an intriguing library but is not without concerns. The Jetpack Compose library provides the ability to create declarative and reactive UIs written in Kotlin for Android. It’s another attempt to avoid XML layout files by allowing the creation of layouts in a DSL-esque manner. The library borrows heavily from cross-platform application frameworks […]

Kotlin “Server-less” Functions

A concept about single focus server functions written in Kotlin. Recently I found the need to create a Server-less Function for a project and was disappointed in both the lack of Kotlin options and the tightly-coupled, framework-specific code necessary to implement one. This lead me to ponder about how a Server-less Function could be implemented […]