Extension functions, and Lambdas and even Extension Lambdas have both been discussed already (and are assumed knowledge for this page). But the uses of lambdas goes beyond just functionality, and into the realm of expressive code. Expressive code is about having the code represent the ideas behind the code more clearly, allowing better reading of the… Continue reading From Extension Lambdas to expressive Kotlin DSLs
Kotlin has Interface, Abstract Classes and Delegation, while Python has multiple inheritance. Different tools, same problems. The different tools reflect an evolution of what Object Oriented best summed up by: Composition over inheritance. The rethink, the new concepts and how to use them are explained here. Abstract Classes Interfaces: Duck Typing with Safety Multiple Interfaces… Continue reading Interfaces, Delegation & Composition vs Multiple Inheritance & Duck Typing
Everything you ever wondered about closures, and a few things more: Closures: just what are closures? Closures as code, packaged with parameters Methods as closures: Python Methods as closures: Kotlin Static Methods class level methods/companion object methods Closures: just what are closures? Lets start with an example, and then discuss how it works. The function… Continue reading Closures, methods, static methods, class methods
Ok, Object Oriented Programming (OOP)is not exactly new, and there are lots of pages on OOP on the web. This page comes from a background of both Python and Kotlin, and how improved programming styles offered by Kotlin can change how you program. Although Kotlin automates newer techniques and provides assistance coding, you can 'backport'… Continue reading OOP: Using Kotlin to improve OOP Skills
This program is relevant for building your first "hello world" and first sample kotlin apps. However, once you have even hello world running, it is recommended now to move to gradle for building, even when building with Intellij. The topics for this page: Introduction: why use Intellij at all. The Roles on an IDE What… Continue reading Building in Intellij IDEA
Python has only one way of saying 'there is nothing here': None. Java has the keyword 'void' and the value 'null', kotlin has Unit, Nothing and null. What is the actual difference in meaning for all of these? Python None Kotlin Unit, null and Nothing Java void and null The concept of 'Nullable' Null Safety… Continue reading Nullable, null, None, Unit, Nothing and void: the many faces of nothing
Or perhaps: schedule, design, build? Either way, while that sequence may sound like waterfall, even agile is really a repetition of this sequence over and over. This page discusses why these 3 steps are problematic for software, but still must be followed despite problems, and how to schedule projects using this sequence that initially can… Continue reading Scheduling: Schedule, design, code?