Classes (Part I)

Classes are the core of Object-oriented programming (OOP). The most common analogy out there is that a class is like a blueprint. It will give you the structure or the details about something and you can then use this blueprint to build things. I guess another analogy that works would be that a class isContinue reading “Classes (Part I)”


According to the Oxford dictionary, a collection is, in the simplest definition I have ever seen, a group of things or people. But, to be honest, there’s no reason to complicate this. You can have a collection of stamps, rare coins, some people collect beer bottle caps, some people collect Funko Pops, some people collectContinue reading “Collections”

App Components

App components are the fundamental elements, the building blocks of an Android app. There are four different types of app components and each of them is an entry point to the app through which either the system or the user can access it: Each serves a different purpose and has a different lifecycle that determinesContinue reading “App Components”

A Brave New World of Functions (λ)

In a previous post, I wrote about Kotlin Functions and, amongst other things, how they can be defined, named and then used by calling the function’s name. However, this is not the only way to define a function. When you call a function like println() , readLine(), etc you are calling regular named functions. TheyContinue reading “A Brave New World of Functions (λ)”

Exceptions in Kotlin

Just like several other languages, Kotlin includes exceptions to indicate something went wrong in your application. Here we saw the NumberFormatException when we tried to convert a String that had stored a Double into an Int. Another well-known exception is the NullPointerException which occurs when a variable is accessed and it’s not pointing to anyContinue reading “Exceptions in Kotlin”

More on Null Safety

In my previous post about null safety, I wrote a bit about what it is and why it is such a good thing that Kotlin has a clever way to deal with that by verifying all your assignments to make sure you don’t accidentally assign null values to variables that are not marked as nullable.Continue reading “More on Null Safety”

Numbers in Kotlin

As I mentioned here, Kotlin has different data types you can use to store information. In this post, I will focus on the ones used to hold numbers, since there are different ways to store both whole numbers and decimals depending on how much data you need the variable to hold. In Kotlin, regardless ofContinue reading “Numbers in Kotlin”

Kotlin Functions

A function is a reusable portion of code that will perform a specific task. They encapsulate one or more tasks and can be reused throughout the code avoiding repetition. Kotlin (and other languages) provide a myriad of functions that help us write code like the println() function, for example, that will print things to theContinue reading “Kotlin Functions”

Compile Time vs Run-time Errors

Before we start talking about compile-time errors vs Run-time errors let’s get an overview of what Compile means. When we (humans) write a code to create a program we do it in human-understandable languages called high-level languages. They use English words and have a syntax that our brains can read and understand. Some examples ofContinue reading “Compile Time vs Run-time Errors”

The only thing CONSTANT in life is CHANGE (or Variables). Regardless of their TYPE.

When we talk about programming, almost all languages use variables and constants to store information in a very similar way. We use variables to store data and pass information around in the program. You can think of a variable as a container that will hold something you will put inside of it to be usedContinue reading “The only thing CONSTANT in life is CHANGE (or Variables). Regardless of their TYPE.”