The 7 success factors in building 5 millions downloaded app
Why I write it
Why I write it
Controllers and CRUD
Models and ActiveRecord
What is Ruby on Rails
If you are new to coroutine or looking for the continuation, you could start from the previous article.
Coroutine Builders
Introduction
Introduction
Introduction
Introduction
Sometimes, we want to initialize the properties of the class after it is created, but in a separate member function instead of using lazy
So far, we have two ways to initialize properties:
The standard library contains special property delegation properties. Map is one of the few types in Kotlin library. Each property identifier becomes a Strin...
In Kotlin, we could connect a property to a delegate with the by keyword:
Back in the school while I was learning C++, operator overloading was one of the topics in academic. But in practice, I rarely overload operators. However, i...
I love template in C++ in the olden day. In many good languages that I had chance to come across, such as TypeScript, Java (it was added later) and Kotlin, t...
When I started doing Kotlin, the one that confused me the most was scope functions. However, once I understand what it is, it becomes my most favorite Kotlin...
Any fool can write code that a computer can understand. Good programmers write code that humans can understand.
Using try, catch and finally blocks for resource cleanup is tedious and error-prone. In fact, Kotlin has a library functions that could help us to manage cle...
What is Nothing in Kotlin? Does it even exist? A Nothing return type indicates a function that never returns. This is usually a function that always throws a...
Check Instructions are like assert - they act like a constraints that must be met before it could proceed. Usually, they are used to validate function argume...
Failure is always a possibility
Companion Object
Inner class
What is object
Nested Class
To constrain a class hierarchy, we have to declare the superclass sealed. Without the constraint, our code will look like this:
Downcasting is to discover the specific type of a previously upcast object. Upcast is always safe because the base class cannot have a bigger interface than ...
Both composition and inheritance place sub objects inside the new class. With composition, the sub object is explicit whereas the sub object with inheritance...
One of most compelling arguments for object oriented programming is code reuse.
We touched a bit on Inheritance concept. Inheritance is sometimes used to add functions to a class as a way of reuse for a new purpose.
One of the Object Oriented Programming concept is the ability of polymorphism. The word, polymorphism is an ancient Greek term. It means many forms. In progr...
What is upcasting?
An abstract class is like an ordinary class except one or more functions or properties is incomplete - ie. a function without implementation or a property wi...
A constructor is a special function that creates a new object. Using var or val in the parameter list makes them accessible from outside the object.
Inheritance is a mechanism for creating a new class by reusing and modifying an existing class.
What is recursion?
fold() combines all elements of a list, in order to generate a single result. Here is how we can use fold() to calculate the sum -
What exactly is local function? It was new to me in Kotlin and thought it is interesting to dig deeper. In a normal class, we have many functions within a cl...
What is Sequence? A Kotlin Sequence is like a List, but you can only iterate. You cannot index into Sequence. And this restriction produces very efficient ch...
List Manipulation
What is it? If you are coming from JavaScript, this concept may sound familiar to you. Otherwise, here is what it means.
Background
Most functional programming has a great support for working with collections and so is Kotlin. If you are coding with Kotlin for sometimes, you might notice ...
To some people, lambda may seem like syntax sugar, but it is more than that. If you have to repeat some codes with minor modification, you can leverage on th...
The unavoidable price of reliability is simplicity – C.A.R Hoare
Jump history
Generics Intro
Extension Properties
This operator is a question mark followed by a colon (?:) with no space in between. It is named for an emoticon (short form of “emotion icon”) of the musicia...
Many times, you may encounter use cases where you need to return more than one item from a function. One way that people usually do is to create a custom obj...
A large part of computer programming is performing an action when a pattern matches.
Overload
One of main motivation of Kotlin is to reduce repetitive coding. One that many of us have spent a significant amount of time and effort is the class mechanis...
Some background
This is one of my most favorite features of Kotlin - Extension Function. Imagine this. You are using a 3rd party library - String that have all the things th...
If you are new to Kotlin, there is something in property accessor that you might find it interesting. There are two methods - get() for getter and set() for ...
So we have seen the wonderful Set. Next, we are going to look at Map.
A fundamental principle in programming is the acronym DRY: Don't Repeat Yourself.
In computer science, Set is an interesting abstract data type that stores unique values. It is a collection that allows only one element of each value.
Another Kotlin treasure that I have not known is the ability to write infix notation in function. We use infix notation in most arithmetic operation such as ...
Do you know what vararg keyword is? Using this vararg, you can define a function that takes any number of argument.
A List is a container, which is an object that holds other objects. Containers are also called collections.
Alright. Who here think that testing is optional? Even though some doesn’t write tests, I believe no one will openly say so. Oops. it hurts.
Objects are the foundation for many modern languages, including Kotlin.
You can insert a value within a String using String templates. Remember to use a $ before the identifier name:
One of basic things that gives me a spark in the eye is when I realise in Kotlin that:
While there are many great features in Kotlin language, there are two features which are very impactful and outstanding.
Why Kotlin? I mean why we need Kotlin in this world. Don’t we have enough of programming language already? This was exactly the question that I have when Kot...
Sprint Planning 1
It is the ongoing effort by the whole team needed within each sprint to refine items in the backlog to be ready to ready for future sprints. There are a numb...
Product Owner Role
Why Agile
Forming a team
Purpose of Software Development
Definition of Done
Introduction
About this book
About this book
About this book
I am quitting
Why wasn’t I the one who get promoted?