All Posts tagged as "Kotlin"

Android Arch's Room - Introduction

My first reaction when Android Architecture Component is out is just **meh..** I mean come on, the ViewModel is heavily tied to Activity and Fragment and basically i don't need it because i use Conductor…

Read

Redux-Like State Management with Sealed Class in Kotlin

On the previous post, we already discussed how your view should have its own model. We also have discussed how you can make a simple redux-like state machine in Kotlin.

Read

A Model for Your View

Not so long ago, on my Android's MVP architecture, my view layer does not have a model. The view only renders what the presenter tell them to do which is good because then, we have a passive view. But, there's no representation of the view itself.

Read

FizzBuzz with Pattern Matching in Kotlin

Seeing FizzBuzz implementation in Clojure with clojure.core.match makes me wondering if Kotlin has the same pattern matching capabilities or at least some resemblance in the way of doing matching.

Read

Running Kotlin Code in VSCode

Suppose you want to test some Kotlin code, but it is too simple for you so you don't want to create a project in your IDE and it also too complex to put it in your REPL

Read

Kotlin 101 - Constructors

If you're familiar with OOP then you must be familiar with constructors. A constructors is a special method of a `class` that initialize an object of that type. Simply put, a constructors is a function that return your object.

Read

Kotlin 101 - Extension Function

There is some code that we write everywhere. It doesn't have **state** and usually small enough to become a `class`. We often call it a helper function and in Java we used to save it in some `*Utils` class.

Read

Lambda and SAM Conversion in Kotlin - Part 2

So we already create `Interface` in Java and convert it to lambda with in Kotlin through SAM conversion. How about `interface` in Kotlin? As the previous part suggest, currently there's no SAM conversion in Kotlin interface.

Read

Experimenting Kotlin without Editor

What will you do if you want to test some Kotlin syntax? Chance you are opening your favorite IDE or text editor (not mentioning `vim` or `emacs` user in here) are very likely.

Read

Lambda and SAM Conversion in Kotlin - Part 1

I love lambda expression. Whether it's in Java, Kotlin, or Javascript (arrow function). It helps me remove verbosity from my code

Read

Kotlin Coroutines - Introduction

Just like async/await in Javascript and C#, Kotlin Couroutines is trying to make asyncrhronous programming easier by enabling you to write async code with imperative style

Read