SlideShare a Scribd company logo
1 of 12
Coding in Kotlin
Debmalya Jash
Discussion Summary
• Kotlin
• What ?
• Why?
• Where?
• How?
About Kotlin
• New programming language that is a pragmatic, safe, concise, and interoperable alternative to
Java.
• With Kotlin, you can implement your projects with less code, a higher level of abstraction, and
fewer annoyances.
• Statically typed programming language (Not like other dynamically typed programming languages
Groovy, JRuby).
• [Note: However, in contrast to Java, Kotlin does not require you to specify the type of every
variable explicitly in your source code. In many cases, the type of a variable can automatically be
determined from context, and in those cases Kotlin allows you to omit the type. Here’s the simplest
possible example of this:
val x = 1]
Kotlin Sample Code
Sample Code Explanation
Explanation
• We declare a simple data class with two properties: name and age.
Age is null by default (if it isn’t specified). While creating a list of
persons, you omit Alice’s age, so the default value null is used. Then
you use the function maxBy to find the oldest person in a list. The
lambda expression passed to the function takes one parameter, and
we use "it" as the default name of that parameter. The "elvis"
operator ?: returns zero if the age is null. Because Alice’s age is not
specified, it is considered to be zero, so Bob wins the prize of being
the oldest one.
Why?
• The primary goal of Kotlin is to work as a more concise, more
productive and safer alternative to Java, suitable in all contexts where
Java is used today.
NullPointerException
• Do you cry out loud every time you see a Null Pointer Exception in
your bug tracker? Then Kotlin is your solution!
• Kotlin’s support for nullable types, which lets you write more reliable
programs by detecting possible null pointer exceptions at compile
time.
Where?
• Building server-side code (typically backends of Web applications).
• Building mobile applications that run on Android devices.
• But Kotlin works in other contexts as well. For example, you can use
RoboVM 1 to run Kotlin code on iOS devices. Or you can use Kotlin
together with JavaFX 2 to build desktop applications.
• In addition to Java, Kotlin also can be compiled to JavaScript, allowing
you to run Kotlin code in the browser.
Benefit of statically typed language
• Performance: Calling methods is faster because in most cases there is
no need to figure out at runtime which method needs to be called.
• Reliability: The compiler verifies the correctness of the program, so
there are fewer opportunities for crashes at runtime.
• Maintainability: Working with unfamiliar code is easier because you
can see what kind of objects the code is working with.
• Tool support: Static typing enables reliable refactorings, code
completion and other IDE features.
How?
Reference
• Kotlin In Action
• Kotlin Programming Language
• Kotlin Language Documentation
• Kotlin In Action Forum
• Kotlin GitHub
• https://github.com/JetBrains/Exposed
• https://github.com/jetbrains/anko
• Kotlin Tutorials
• Kotlin Playground

More Related Content

What's hot

Introduction to Kotlin for Java developer
Introduction to Kotlin for Java developerIntroduction to Kotlin for Java developer
Introduction to Kotlin for Java developerShuhei Shogen
 
Kotlin Language powerpoint show file
Kotlin Language powerpoint show fileKotlin Language powerpoint show file
Kotlin Language powerpoint show fileSaurabh Tripathi
 
Log cat kotlindsl
Log cat kotlindslLog cat kotlindsl
Log cat kotlindslsanaebadi1
 
Gdg dev fest 2107 to kotlin, with love
Gdg dev fest 2107   to kotlin, with loveGdg dev fest 2107   to kotlin, with love
Gdg dev fest 2107 to kotlin, with loveAyman Mahfouz
 
Kotlin For Android (at DevFest İzmir 2016)
Kotlin For Android (at DevFest İzmir 2016)Kotlin For Android (at DevFest İzmir 2016)
Kotlin For Android (at DevFest İzmir 2016)Semih Bozdemir
 
Extending js codemotion warsaw 2016
Extending js codemotion warsaw 2016Extending js codemotion warsaw 2016
Extending js codemotion warsaw 2016Francis Bourre
 
Extending JS WU2016 Toronto
Extending JS WU2016 TorontoExtending JS WU2016 Toronto
Extending JS WU2016 TorontoFrancis Bourre
 
Kotlin Multiplatfom In Action
Kotlin Multiplatfom In ActionKotlin Multiplatfom In Action
Kotlin Multiplatfom In ActionMarko Mitic
 
Lock-free algorithms for Kotlin Coroutines
Lock-free algorithms for Kotlin CoroutinesLock-free algorithms for Kotlin Coroutines
Lock-free algorithms for Kotlin CoroutinesRoman Elizarov
 
The Spoofax Language Workbench (SPLASH 2010)
The Spoofax Language Workbench (SPLASH 2010)The Spoofax Language Workbench (SPLASH 2010)
The Spoofax Language Workbench (SPLASH 2010)lennartkats
 
Kotlin for android
Kotlin for androidKotlin for android
Kotlin for androidShady Selim
 
Kotlin Multiplatfom In Action
Kotlin Multiplatfom In ActionKotlin Multiplatfom In Action
Kotlin Multiplatfom In ActionMarko Mitic
 
Using Aspects for Language Portability (SCAM 2010)
Using Aspects for Language Portability (SCAM 2010)Using Aspects for Language Portability (SCAM 2010)
Using Aspects for Language Portability (SCAM 2010)lennartkats
 
CSP: Huh? And Components
CSP: Huh? And ComponentsCSP: Huh? And Components
CSP: Huh? And ComponentsDaniel Fagnan
 

What's hot (20)

Android with kotlin course
Android with kotlin courseAndroid with kotlin course
Android with kotlin course
 
Kotlin & Swift
Kotlin & SwiftKotlin & Swift
Kotlin & Swift
 
Introduction to Kotlin for Java developer
Introduction to Kotlin for Java developerIntroduction to Kotlin for Java developer
Introduction to Kotlin for Java developer
 
Kotlin Language powerpoint show file
Kotlin Language powerpoint show fileKotlin Language powerpoint show file
Kotlin Language powerpoint show file
 
Log cat kotlindsl
Log cat kotlindslLog cat kotlindsl
Log cat kotlindsl
 
Gdg dev fest 2107 to kotlin, with love
Gdg dev fest 2107   to kotlin, with loveGdg dev fest 2107   to kotlin, with love
Gdg dev fest 2107 to kotlin, with love
 
Why Kotlin?
Why Kotlin?Why Kotlin?
Why Kotlin?
 
Kotlin For Android (at DevFest İzmir 2016)
Kotlin For Android (at DevFest İzmir 2016)Kotlin For Android (at DevFest İzmir 2016)
Kotlin For Android (at DevFest İzmir 2016)
 
Extending js codemotion warsaw 2016
Extending js codemotion warsaw 2016Extending js codemotion warsaw 2016
Extending js codemotion warsaw 2016
 
Extending JS WU2016 Toronto
Extending JS WU2016 TorontoExtending JS WU2016 Toronto
Extending JS WU2016 Toronto
 
hexMachina WWX 2016
hexMachina WWX 2016hexMachina WWX 2016
hexMachina WWX 2016
 
Kotlin Multiplatfom In Action
Kotlin Multiplatfom In ActionKotlin Multiplatfom In Action
Kotlin Multiplatfom In Action
 
Lock-free algorithms for Kotlin Coroutines
Lock-free algorithms for Kotlin CoroutinesLock-free algorithms for Kotlin Coroutines
Lock-free algorithms for Kotlin Coroutines
 
Es build presentation
Es build presentationEs build presentation
Es build presentation
 
The Spoofax Language Workbench (SPLASH 2010)
The Spoofax Language Workbench (SPLASH 2010)The Spoofax Language Workbench (SPLASH 2010)
The Spoofax Language Workbench (SPLASH 2010)
 
Kotlin for android
Kotlin for androidKotlin for android
Kotlin for android
 
Kotlin Multiplatfom In Action
Kotlin Multiplatfom In ActionKotlin Multiplatfom In Action
Kotlin Multiplatfom In Action
 
Using Aspects for Language Portability (SCAM 2010)
Using Aspects for Language Portability (SCAM 2010)Using Aspects for Language Portability (SCAM 2010)
Using Aspects for Language Portability (SCAM 2010)
 
CSP: Huh? And Components
CSP: Huh? And ComponentsCSP: Huh? And Components
CSP: Huh? And Components
 
Kotlin L → ∞
Kotlin L → ∞Kotlin L → ∞
Kotlin L → ∞
 

Viewers also liked

Manual de interpol_sobre_adn[1]
Manual de interpol_sobre_adn[1]Manual de interpol_sobre_adn[1]
Manual de interpol_sobre_adn[1]ATUX
 
Fourlsides
FourlsidesFourlsides
FourlsidesDizavid
 
So You Say You Want Communication
So You Say You Want CommunicationSo You Say You Want Communication
So You Say You Want Communicationmbamom
 
Kutna Hora
Kutna HoraKutna Hora
Kutna Horavegacan
 
Festa della Maggiolina
Festa della MaggiolinaFesta della Maggiolina
Festa della Maggiolinaadrianocolombo
 
Residential Investment Advisory Report - Dec 2015
Residential Investment Advisory Report - Dec 2015Residential Investment Advisory Report - Dec 2015
Residential Investment Advisory Report - Dec 2015Knight Frank India
 
Medicina legal tocoginecologica
Medicina legal tocoginecologicaMedicina legal tocoginecologica
Medicina legal tocoginecologicaPaulin Betancourt
 
Auto admisión de querella contra cupula sanitaria Madrid
Auto admisión de querella contra cupula sanitaria MadridAuto admisión de querella contra cupula sanitaria Madrid
Auto admisión de querella contra cupula sanitaria MadridComuna Jurídica
 

Viewers also liked (12)

Historia del computador
Historia del computadorHistoria del computador
Historia del computador
 
20160119_172712jpg
20160119_172712jpg20160119_172712jpg
20160119_172712jpg
 
Codes and Conventions
Codes and ConventionsCodes and Conventions
Codes and Conventions
 
Manual de interpol_sobre_adn[1]
Manual de interpol_sobre_adn[1]Manual de interpol_sobre_adn[1]
Manual de interpol_sobre_adn[1]
 
Fourlsides
FourlsidesFourlsides
Fourlsides
 
So You Say You Want Communication
So You Say You Want CommunicationSo You Say You Want Communication
So You Say You Want Communication
 
Kutna Hora
Kutna HoraKutna Hora
Kutna Hora
 
IMAGENES
IMAGENESIMAGENES
IMAGENES
 
Festa della Maggiolina
Festa della MaggiolinaFesta della Maggiolina
Festa della Maggiolina
 
Residential Investment Advisory Report - Dec 2015
Residential Investment Advisory Report - Dec 2015Residential Investment Advisory Report - Dec 2015
Residential Investment Advisory Report - Dec 2015
 
Medicina legal tocoginecologica
Medicina legal tocoginecologicaMedicina legal tocoginecologica
Medicina legal tocoginecologica
 
Auto admisión de querella contra cupula sanitaria Madrid
Auto admisión de querella contra cupula sanitaria MadridAuto admisión de querella contra cupula sanitaria Madrid
Auto admisión de querella contra cupula sanitaria Madrid
 

Similar to Coding in kotlin

Kotlin vs Java-A Comparison for Application Development Projects.pdf
Kotlin vs Java-A Comparison for Application Development Projects.pdfKotlin vs Java-A Comparison for Application Development Projects.pdf
Kotlin vs Java-A Comparison for Application Development Projects.pdfTechugo
 
What's new with Kotlin - Google IO18' extended Covenant University.
What's new with Kotlin - Google IO18' extended Covenant University.What's new with Kotlin - Google IO18' extended Covenant University.
What's new with Kotlin - Google IO18' extended Covenant University.SimileoluwaAluko
 
Kotlin Overview
Kotlin OverviewKotlin Overview
Kotlin OverviewEkta Raj
 
Kotlin vs Java: Choosing The Right Language
Kotlin vs Java: Choosing The Right LanguageKotlin vs Java: Choosing The Right Language
Kotlin vs Java: Choosing The Right LanguageFredReynolds2
 
Android Development with Kotlin course
Android Development  with Kotlin courseAndroid Development  with Kotlin course
Android Development with Kotlin courseGoogleDevelopersLeba
 
Kotlin Vs Java A Comparison For Application Development Projects.pdf
Kotlin Vs Java A Comparison For Application Development Projects.pdfKotlin Vs Java A Comparison For Application Development Projects.pdf
Kotlin Vs Java A Comparison For Application Development Projects.pdfTechugo
 
Kotlin App Development Tips.pdf
Kotlin App Development Tips.pdfKotlin App Development Tips.pdf
Kotlin App Development Tips.pdfMarie Weaver
 
Android with Kotlin Course - SkillIQ.pdf
Android with Kotlin Course - SkillIQ.pdfAndroid with Kotlin Course - SkillIQ.pdf
Android with Kotlin Course - SkillIQ.pdfSkilliQCourse
 
Kotlin vs Java | A Comparative Analysis | IDEA USHER
Kotlin vs Java | A Comparative Analysis | IDEA USHERKotlin vs Java | A Comparative Analysis | IDEA USHER
Kotlin vs Java | A Comparative Analysis | IDEA USHERNitish Garg
 
Az ve Öz Kotlin - Beyza KOYULMUS
 Az ve Öz Kotlin - Beyza KOYULMUS Az ve Öz Kotlin - Beyza KOYULMUS
Az ve Öz Kotlin - Beyza KOYULMUSBeyzaKOYULMUS
 
Kotlin vs Java- Finding The All-Time Favorite Fit!
Kotlin vs Java- Finding The All-Time Favorite Fit!Kotlin vs Java- Finding The All-Time Favorite Fit!
Kotlin vs Java- Finding The All-Time Favorite Fit!Techugo
 
Learn Kotlin and Build Robust Android Apps with Bcoder.pdf
Learn Kotlin and Build Robust Android Apps with Bcoder.pdfLearn Kotlin and Build Robust Android Apps with Bcoder.pdf
Learn Kotlin and Build Robust Android Apps with Bcoder.pdfBcoder Dev
 
DevNight #1 (Kotlin) @ The Brick Space
DevNight #1 (Kotlin) @ The Brick SpaceDevNight #1 (Kotlin) @ The Brick Space
DevNight #1 (Kotlin) @ The Brick SpaceJedsada Tiwongvokul
 
Kotlin vs Java: Which is Better for Android App Development?
Kotlin vs Java: Which is Better for Android App Development?Kotlin vs Java: Which is Better for Android App Development?
Kotlin vs Java: Which is Better for Android App Development?Marie Weaver
 
Kotlin for Android
Kotlin for AndroidKotlin for Android
Kotlin for AndroidHan Yin
 
MOOC_PRESENTATION_KOTLIN[1].pptx
MOOC_PRESENTATION_KOTLIN[1].pptxMOOC_PRESENTATION_KOTLIN[1].pptx
MOOC_PRESENTATION_KOTLIN[1].pptxkamalkantmaurya1
 

Similar to Coding in kotlin (20)

Kotlin vs Java-A Comparison for Application Development Projects.pdf
Kotlin vs Java-A Comparison for Application Development Projects.pdfKotlin vs Java-A Comparison for Application Development Projects.pdf
Kotlin vs Java-A Comparison for Application Development Projects.pdf
 
What's new with Kotlin - Google IO18' extended Covenant University.
What's new with Kotlin - Google IO18' extended Covenant University.What's new with Kotlin - Google IO18' extended Covenant University.
What's new with Kotlin - Google IO18' extended Covenant University.
 
Kotlin
KotlinKotlin
Kotlin
 
Kotlin from-scratch
Kotlin from-scratchKotlin from-scratch
Kotlin from-scratch
 
Kotlin Overview
Kotlin OverviewKotlin Overview
Kotlin Overview
 
Introduction to Kotlin
Introduction to KotlinIntroduction to Kotlin
Introduction to Kotlin
 
Kotlin vs Java: Choosing The Right Language
Kotlin vs Java: Choosing The Right LanguageKotlin vs Java: Choosing The Right Language
Kotlin vs Java: Choosing The Right Language
 
Android Development with Kotlin course
Android Development  with Kotlin courseAndroid Development  with Kotlin course
Android Development with Kotlin course
 
Kotlin Vs Java A Comparison For Application Development Projects.pdf
Kotlin Vs Java A Comparison For Application Development Projects.pdfKotlin Vs Java A Comparison For Application Development Projects.pdf
Kotlin Vs Java A Comparison For Application Development Projects.pdf
 
Kotlin App Development Tips.pdf
Kotlin App Development Tips.pdfKotlin App Development Tips.pdf
Kotlin App Development Tips.pdf
 
Android with Kotlin Course - SkillIQ.pdf
Android with Kotlin Course - SkillIQ.pdfAndroid with Kotlin Course - SkillIQ.pdf
Android with Kotlin Course - SkillIQ.pdf
 
Kotlin vs Java | A Comparative Analysis | IDEA USHER
Kotlin vs Java | A Comparative Analysis | IDEA USHERKotlin vs Java | A Comparative Analysis | IDEA USHER
Kotlin vs Java | A Comparative Analysis | IDEA USHER
 
Az ve Öz Kotlin - Beyza KOYULMUS
 Az ve Öz Kotlin - Beyza KOYULMUS Az ve Öz Kotlin - Beyza KOYULMUS
Az ve Öz Kotlin - Beyza KOYULMUS
 
Kotlin vs Java- Finding The All-Time Favorite Fit!
Kotlin vs Java- Finding The All-Time Favorite Fit!Kotlin vs Java- Finding The All-Time Favorite Fit!
Kotlin vs Java- Finding The All-Time Favorite Fit!
 
Learn Kotlin and Build Robust Android Apps with Bcoder.pdf
Learn Kotlin and Build Robust Android Apps with Bcoder.pdfLearn Kotlin and Build Robust Android Apps with Bcoder.pdf
Learn Kotlin and Build Robust Android Apps with Bcoder.pdf
 
CC Presentation.pptx
CC Presentation.pptxCC Presentation.pptx
CC Presentation.pptx
 
DevNight #1 (Kotlin) @ The Brick Space
DevNight #1 (Kotlin) @ The Brick SpaceDevNight #1 (Kotlin) @ The Brick Space
DevNight #1 (Kotlin) @ The Brick Space
 
Kotlin vs Java: Which is Better for Android App Development?
Kotlin vs Java: Which is Better for Android App Development?Kotlin vs Java: Which is Better for Android App Development?
Kotlin vs Java: Which is Better for Android App Development?
 
Kotlin for Android
Kotlin for AndroidKotlin for Android
Kotlin for Android
 
MOOC_PRESENTATION_KOTLIN[1].pptx
MOOC_PRESENTATION_KOTLIN[1].pptxMOOC_PRESENTATION_KOTLIN[1].pptx
MOOC_PRESENTATION_KOTLIN[1].pptx
 

Recently uploaded

MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfPower Karaoke
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....kzayra69
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 

Recently uploaded (20)

MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdf
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 

Coding in kotlin

  • 2. Discussion Summary • Kotlin • What ? • Why? • Where? • How?
  • 3. About Kotlin • New programming language that is a pragmatic, safe, concise, and interoperable alternative to Java. • With Kotlin, you can implement your projects with less code, a higher level of abstraction, and fewer annoyances. • Statically typed programming language (Not like other dynamically typed programming languages Groovy, JRuby). • [Note: However, in contrast to Java, Kotlin does not require you to specify the type of every variable explicitly in your source code. In many cases, the type of a variable can automatically be determined from context, and in those cases Kotlin allows you to omit the type. Here’s the simplest possible example of this: val x = 1]
  • 6. Explanation • We declare a simple data class with two properties: name and age. Age is null by default (if it isn’t specified). While creating a list of persons, you omit Alice’s age, so the default value null is used. Then you use the function maxBy to find the oldest person in a list. The lambda expression passed to the function takes one parameter, and we use "it" as the default name of that parameter. The "elvis" operator ?: returns zero if the age is null. Because Alice’s age is not specified, it is considered to be zero, so Bob wins the prize of being the oldest one.
  • 7. Why? • The primary goal of Kotlin is to work as a more concise, more productive and safer alternative to Java, suitable in all contexts where Java is used today.
  • 8. NullPointerException • Do you cry out loud every time you see a Null Pointer Exception in your bug tracker? Then Kotlin is your solution! • Kotlin’s support for nullable types, which lets you write more reliable programs by detecting possible null pointer exceptions at compile time.
  • 9. Where? • Building server-side code (typically backends of Web applications). • Building mobile applications that run on Android devices. • But Kotlin works in other contexts as well. For example, you can use RoboVM 1 to run Kotlin code on iOS devices. Or you can use Kotlin together with JavaFX 2 to build desktop applications. • In addition to Java, Kotlin also can be compiled to JavaScript, allowing you to run Kotlin code in the browser.
  • 10. Benefit of statically typed language • Performance: Calling methods is faster because in most cases there is no need to figure out at runtime which method needs to be called. • Reliability: The compiler verifies the correctness of the program, so there are fewer opportunities for crashes at runtime. • Maintainability: Working with unfamiliar code is easier because you can see what kind of objects the code is working with. • Tool support: Static typing enables reliable refactorings, code completion and other IDE features.
  • 11. How?
  • 12. Reference • Kotlin In Action • Kotlin Programming Language • Kotlin Language Documentation • Kotlin In Action Forum • Kotlin GitHub • https://github.com/JetBrains/Exposed • https://github.com/jetbrains/anko • Kotlin Tutorials • Kotlin Playground