Kotlin Object Oriented Programming

Interfaces Note this blog post contains my notes from the Object Oriented section of the book Atomic Kotlin. Consider buying a copy of the book for a more detailed reference. An interface describes the concept of a type. It is the prototype for all classes that implement the interface. Interfaces describe what a class should do, but not how they should do it. (think protocol in swift) an API is a set of clearly defined communication paths between various software components.

Continue reading →


Kotlin Functional Programming

Kotlin Functional Programming Note this blog post contains my notes from the Functional Programming section of the book Atomic Kotlin. Consider buying a copy of the book for a more detailed reference. Lambdas Lambdas produce compact code that is easier to understand. Lambdas are AKA function literal. Lambdas require a minimal amount of code to create and can be inserted directly into other code. The map() function works with collections such as List.

Continue reading →


Kotlin Usability

Note this blog post contains my notes from the Usability section of the book Atomic Kotlin. Consider buying a copy of the book for a more detailed reference. Extension Functions Extension functions add member functions to existing classes The receiver is the type you extend Example defining an extension function package extensionfunctions import atomictest.eq fun String.singleQuote() = "'$this'" fun String.doubleQuote() = "\"$this\"" fun main() { "Hi".singleQuote() eq "'Hi'" "Hi".doubleQuote() eq "\"Hi\"" } You call extension functions as if they were members of the class

Continue reading →


Introduction to Kotlin Objects

Introduction to Kotlin Objects Note this blog post contains my notes from the Introduction to Kotlin Objects chapter in the book Atomic Kotlin. Consider buying a copy of the book for a more detailed reference. Objects hold data and perform actions. They store data using properties (vals and vars) and perform actions using functions. Creating Classes Classes are called user-defined types A class member is a property or function of a class

Continue reading →


Introduction to Kotlin

Introduction to Kotlin Note this blog post is a summary of my notes from the introductory chapter of the book Atomic Kotlin. Consider buying a copy of the book for a more detailed reference. In Kotlin, every data type is an object. You can store either immutable or mutable references to objects. val references are immutable while var references are mutable. To store an object reference to an identifier use an assignment statement:

Continue reading →


Hello Kotlin

In Kotlin, the entry point to your program is the main function. You can easily create a Hello World program like so:

fun main() {
  println("Hello, world!")
}

I recently finished reading Atomic Kotlin. Over the next few days I plan on formatting my notes in Markdown and sharing them on my blog. Hopefully it will give newcomers a quickstart on learning Kotlin.


I want to eventually write my own Hugo theme for my blog. Having explored many of the themes on micro.blog, either the designs or configurations don’t stick with my tastes. I will blog about what I learn and my progress.​


Going to watch: Minions & Monsters 🍿later today!


The Clicks Communicator seems like a great device for focused writing on the go.