0% found this document useful (0 votes)
289 views

Kotlin - Why, How and When and Android

Kotlin allows developers to write less code that is safer and more concise compared to Java. It reduces null pointer exceptions and avoids boilerplate code. Kotlin can be used alongside Java on projects and helps speed up Android development. Developers can convert existing Java code to Kotlin with one-click and should consider adopting it anytime since it costs nothing to adapt.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
289 views

Kotlin - Why, How and When and Android

Kotlin allows developers to write less code that is safer and more concise compared to Java. It reduces null pointer exceptions and avoids boilerplate code. Kotlin can be used alongside Java on projects and helps speed up Android development. Developers can convert existing Java code to Kotlin with one-click and should consider adopting it anytime since it costs nothing to adapt.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 23

Kotlin - Why,

How and When


with Android
Hello!
I am Sadman Samee

I’m here to talk about kotlin and


Android

You can find me at:


fb.me/sameesadman

2
Why move to
Kotlin?
Less codes, less crash, nicer
codebase.

3

Kotlin is very concise.
Drastically reduce the amount
of boilerplate code.

4

Saves a lot more time to get
more sleep.

5
In Java we write...

6
And In Kotlin...

7

Get more with less code =
Decreased dev time and cost.

8

That’s why many big companies
are moving to Kotlin

9
Safe
Avoid
NullPointerException.
The Billion Dollar
mistake

10
The Pyramid of Doom...

if(pyramid != null){

if(sheep != null){

if(you != null){

}
11
... will be replaced with this!

val name = pyramid?.sheep?.you ?: "idiot"

12
Less Verbose code
Kotlin requires less numbers of code
compared to Java.

Java
private String s1 = "my string 1";
private final String s2 = "my string 2";
private static final String s3 = "my string 3";

Kotlin
var s1 = "my string 1"
val s2 = "my string 2"
val s3 = """my string 3"""

13
When should you move to
Kotlin?

ANYTIME!

14
Because
Kotlin costs
nothing to adapt

15
One-click Java to Kotlin converter.
3 seconds task and 90-99% code
coverage!

16
Both languages can be used on the same
project.
Convenient

17
Kotlin can use existing Java libraries.
Availability

18
Kotlin Helps Android Development
faster, convenient and most importantly
Awesome

19
Anko is a Kotlin library which makes
Android application development faster
and easier. It makes your code clean and
easy to read, and lets you forget about
rough edges of the Android SDK for
Java.

20
With Java

With Kotlin

21
Let’s Try...

22
Thanks!
Any questions?

You can find me at:


sadmansamee.blog
[email protected]

23

You might also like