SlideShare une entreprise Scribd logo
1  sur  15
KOTLIN
HI
2
ROBERT
MACLEAN
@rmaclean
REQUIRED ADVERTISING
You can click next in 5 seconds…
3
• Kotlin History
• How I’m Learning Kotlin
• [ INTERACTIVE DEMO ]
• Remember demos aren’t real
• Problems
4
AGENDA
The WYSIWYG slide
• Started in 2010
• Version 1 in 2016
• Developed by JetBrains
• Built in response to real
development pains
• Borrows from other languages
• Built on the JVM
• Sum of the parts
• First class support from Google
• Hybrid language
• Not pure OO
• Not pure functional
5
KOTLIN HISTORY
I have clothes older than this…
• IntelliJ
• Android Studio
• VIM
• Sublime
• Code
• Atom
• Eclipse
• Netbeans
6
YOUR FAVOURITE EDITOR SUPPORTS IT
Unless your favourite is Fat Visual Studio
• Normal Person
• Basic  Pascal  Delphi 
PHP  Perl  C#  JavaScript
 TypeScript  Java
• Where do I begin?
7
HOW IAM LEARNING KOTLIN
How awkward would it be if I didn’t know it….
KOANS
Out of nowhere, the
mind comes forth.
— The Diamond Sutra
8
• Simple “game”
• Start with a grid of alive & dead
cells
• 4 rules
• Under population: Any live cell
with < 2 neighbours dies
• Any live cell with 2 or 3
neighbours lives
• Over population: Any live cell
with > 3 neighbours dies
• Reproduction: Any dead cell with
exactly 3 neighbours comes to life
9
GAME OF LIFE
Background for the big demo
TRUE: 3 neighbours it lives
TRUE: 2 neighbours & was
already alive, stays alive
FALSE: Everything else dies
• Grid is an array of booleans in an
array
• Render
• Draw to the screen
• Evolve
• Make a new grid
• Go though each cell
• Count how many neighbours it has
• Apply rules to new grid
• Replace the existing grid
• Repeat
10
GAME OF LIFE
Big demo time
GAME OF LIFE
Shall we play a game
11
• Getters & Setters
• Null Safety
• When
• Inheritance
• High Order Functions
• by (delegated properties)
• todo
• Reflection
• Making your own Operators
• String Templates
• Backticks
12
OTHER THINGS
In no particular order
• JetBrains
• Interoperability hacks
• “Kt” suffix on classes
• Kotlin to JS
• Lack of static
• Maybe
• Is it not opinionated enough?
13
PROBLEMS
Is Kotlin Perfect?
https://github.com/JetBrains/kotlin-workshop
https://kotlin.link
https://try.kotlinlang.org
https://github.com/Kotlin/kotlin-koans
https://github.com/gradle/kotlin-
dsl/tree/master/samples
https://kotlinlang.org/docs/reference/idioms.ht
ml
http://bit.ly/kotlinhelp
14
MORE RESOURCES
I know it is too small to read; grab these slides from me
THANK YOU
Robert MacLean @rmaclean
www.sadev.co.za
15

Contenu connexe

Similaire à Kotlin 101

Watch Your Language! - What my Mother Taught Me about Being an Engineer.
Watch Your Language! - What my Mother Taught Me about Being an Engineer.Watch Your Language! - What my Mother Taught Me about Being an Engineer.
Watch Your Language! - What my Mother Taught Me about Being an Engineer.
Neal Richardson Sr
 
Kernel Development: Drawing Lessons From "Mistakes" (Japan Linux Symposium 2009)
Kernel Development: Drawing Lessons From "Mistakes" (Japan Linux Symposium 2009)Kernel Development: Drawing Lessons From "Mistakes" (Japan Linux Symposium 2009)
Kernel Development: Drawing Lessons From "Mistakes" (Japan Linux Symposium 2009)
guest40cf23
 
OGDC 2014: Architecting Games in Unity
OGDC 2014: Architecting Games in UnityOGDC 2014: Architecting Games in Unity
OGDC 2014: Architecting Games in Unity
GameLandVN
 
OGDC 2014_Architecting Games in Unity_Mr. Rustum Scammell
OGDC 2014_Architecting Games in Unity_Mr. Rustum ScammellOGDC 2014_Architecting Games in Unity_Mr. Rustum Scammell
OGDC 2014_Architecting Games in Unity_Mr. Rustum Scammell
ogdc
 

Similaire à Kotlin 101 (20)

Making A Game Engine Is Easier Than You Think
Making A Game Engine Is Easier Than You ThinkMaking A Game Engine Is Easier Than You Think
Making A Game Engine Is Easier Than You Think
 
There Is No JavaScript
There Is No JavaScriptThere Is No JavaScript
There Is No JavaScript
 
Noam Kfir - There is no Java Script - code.talks 2015
Noam Kfir - There is no Java Script - code.talks 2015Noam Kfir - There is no Java Script - code.talks 2015
Noam Kfir - There is no Java Script - code.talks 2015
 
Test-Driven Sitecore
Test-Driven SitecoreTest-Driven Sitecore
Test-Driven Sitecore
 
Programming with Kotlin
Programming with KotlinProgramming with Kotlin
Programming with Kotlin
 
Things you should know if you plan to ship a game
Things you should know if you plan to ship a gameThings you should know if you plan to ship a game
Things you should know if you plan to ship a game
 
Understand Java for Android the Hard Way
Understand Java for Android the Hard WayUnderstand Java for Android the Hard Way
Understand Java for Android the Hard Way
 
Low-level concurrency (reinvent vehicle)
Low-level concurrency (reinvent vehicle)Low-level concurrency (reinvent vehicle)
Low-level concurrency (reinvent vehicle)
 
Functional Programming in Clojure
Functional Programming in ClojureFunctional Programming in Clojure
Functional Programming in Clojure
 
Watch Your Language! - What my Mother Taught Me about Being an Engineer.
Watch Your Language! - What my Mother Taught Me about Being an Engineer.Watch Your Language! - What my Mother Taught Me about Being an Engineer.
Watch Your Language! - What my Mother Taught Me about Being an Engineer.
 
Kernel Development: Drawing Lessons From "Mistakes" (Japan Linux Symposium 2009)
Kernel Development: Drawing Lessons From "Mistakes" (Japan Linux Symposium 2009)Kernel Development: Drawing Lessons From "Mistakes" (Japan Linux Symposium 2009)
Kernel Development: Drawing Lessons From "Mistakes" (Japan Linux Symposium 2009)
 
OGDC 2014: Architecting Games in Unity
OGDC 2014: Architecting Games in UnityOGDC 2014: Architecting Games in Unity
OGDC 2014: Architecting Games in Unity
 
A Prelude to Android
A Prelude to AndroidA Prelude to Android
A Prelude to Android
 
Concurrency in Python
Concurrency in PythonConcurrency in Python
Concurrency in Python
 
David Brevik - LOGIN Conference 2012
David Brevik - LOGIN Conference 2012David Brevik - LOGIN Conference 2012
David Brevik - LOGIN Conference 2012
 
Enterprise Strength Mobile JavaScript
Enterprise Strength Mobile JavaScriptEnterprise Strength Mobile JavaScript
Enterprise Strength Mobile JavaScript
 
Kotlin Multiplatfom In Action
Kotlin Multiplatfom In ActionKotlin Multiplatfom In Action
Kotlin Multiplatfom In Action
 
Kotlin Multiplatfom In Action
Kotlin Multiplatfom In ActionKotlin Multiplatfom In Action
Kotlin Multiplatfom In Action
 
3 years with Clojure
3 years with Clojure3 years with Clojure
3 years with Clojure
 
OGDC 2014_Architecting Games in Unity_Mr. Rustum Scammell
OGDC 2014_Architecting Games in Unity_Mr. Rustum ScammellOGDC 2014_Architecting Games in Unity_Mr. Rustum Scammell
OGDC 2014_Architecting Games in Unity_Mr. Rustum Scammell
 

Plus de Robert MacLean

Plus de Robert MacLean (20)

14 things you need to be a successful software developer (v3)
14 things you need to be a successful software developer (v3)14 things you need to be a successful software developer (v3)
14 things you need to be a successful software developer (v3)
 
Git
GitGit
Git
 
OWASP TOP 10
OWASP TOP 10OWASP TOP 10
OWASP TOP 10
 
Building a µservice with Kotlin, Micronaut & GCP
Building a µservice with Kotlin, Micronaut & GCPBuilding a µservice with Kotlin, Micronaut & GCP
Building a µservice with Kotlin, Micronaut & GCP
 
Looking at the Vue
Looking at the VueLooking at the Vue
Looking at the Vue
 
Features of Kotlin I find exciting
Features of Kotlin I find excitingFeatures of Kotlin I find exciting
Features of Kotlin I find exciting
 
JavaScript Gotchas
JavaScript GotchasJavaScript Gotchas
JavaScript Gotchas
 
DevConf Survival Guide
DevConf Survival GuideDevConf Survival Guide
DevConf Survival Guide
 
The state of testing @ Microsoft
The state of testing @ MicrosoftThe state of testing @ Microsoft
The state of testing @ Microsoft
 
Visual Studio ❤ JavaScript
Visual Studio ❤ JavaScriptVisual Studio ❤ JavaScript
Visual Studio ❤ JavaScript
 
What is new in C# 6?
What is new in C# 6?What is new in C# 6?
What is new in C# 6?
 
Putting the DOT in .NET - Dev/Ops/Test
Putting the DOT in .NET - Dev/Ops/TestPutting the DOT in .NET - Dev/Ops/Test
Putting the DOT in .NET - Dev/Ops/Test
 
A Developer Day 2014 - Durban
A Developer Day 2014 - Durban A Developer Day 2014 - Durban
A Developer Day 2014 - Durban
 
Agile lessons learned in the Microsoft ALM Rangers
Agile lessons learned in the Microsoft ALM RangersAgile lessons learned in the Microsoft ALM Rangers
Agile lessons learned in the Microsoft ALM Rangers
 
Hour of code - Train the trainer
Hour of code - Train the trainerHour of code - Train the trainer
Hour of code - Train the trainer
 
Building services for apps on a shoestring budget
Building services for apps on a shoestring budgetBuilding services for apps on a shoestring budget
Building services for apps on a shoestring budget
 
3 things your app API is doing WRONG
3 things your app API is doing WRONG3 things your app API is doing WRONG
3 things your app API is doing WRONG
 
ASP.NET
ASP.NETASP.NET
ASP.NET
 
LightSwitch
LightSwitchLightSwitch
LightSwitch
 
How to build a Mobile API or HTML 5 app in 5 minutes
How to build a Mobile API or HTML 5 app in 5 minutesHow to build a Mobile API or HTML 5 app in 5 minutes
How to build a Mobile API or HTML 5 app in 5 minutes
 

Dernier

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Dernier (20)

presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 

Kotlin 101