
General overview of Kotlin, without delving into language details.
In this lesson we create a Kotlin project in IntelliJ, build a hello world app and cover some Kotlin basics.
We create a simple class in Kotlin and compare it to the equivalent class in Java. Along the way we learn how to call Java from Kotlin and Kotlin from Java.
In this lesson, we setup a new Gradle project for the Blackjack app that we will be creating throughout this workshop.
In this lecture we setup a git repository for our project, so we can keep track of each revision of the blackjack application. If you are not interested in git, you can skip this lecture.
In this lesson we create the suitName getter in Card.
Explore anonymous and lambda functions in Kotlin, learn to assign functions to variables, pass them as parameters, and use type inference to write concise, expressive code.
Add lazy error messages to the Card init with require and lambdas, validating values 1–13 and suits 1–4. Explore anonymous functions and concise lambdas for on-demand error text.
Create a Hand class in Kotlin for blackjack, a test-driven wrapper around a mutable list of cards with add, size, and point total methods, plus Kotlin syntax and refactoring.
Demonstrates rendering a hand to the console by printing names, points, and cards with a render hand function, and exposes a read-only card view from a private list.
create a deck class representing a 52-card deck with a take function that removes the top card and a size property. render the deck and expose a read-only cards view.
Builds a blackjack game class with a deck and player and dealer hands, performs the initial deal, and implements player hits and dealer auto-hit until 17.
Final remarks and wrap-up.
In this course, I will guide you through a number of small examples and one modestly complex project. Through these examples, you'll learn the fundamental language features needed to create Kotlin applications.
This isn't an in-depth reference covering every detail of the language. Rather, it's a tutorial covering the most important parts of the language, the 80% that I use every day. After completing this course, you'll still have more to learn, but you'll have everything you need to start being productive with Kotlin.
The table of contents is not ordered in terms of Kotlin features. Rather, the course is organized by the business features we add to our sample project. We introduce new Kotlin concepts as the need organically arises in the context of building our project.
We'll be using the IntelliJ IDE. So you'll be learning the fundamentals of Kotlin in the context of one of the world's greatest IDEs. And that's important because Kotlin, when teamed with IntelliJ, provides the most productive programming environment I ever used. With that said, this course is still appropriate for those who just want to learn Kotlin but don't plan on using IntelliJ.
Lastly, this course is not specific to any particular problem domain (i.e. android apps, server-side web apps, compile-to-JavaScript apps, or native apps). Instead, we focus on the core concepts common to all domains. As such, most of our examples take the form junit test cases.