StxNext Lightning Talks - Feb 12, 2016
Kotlin - one of the popular programming languages built on top of Java that runs on JVM. Thanks to JetBrains support and excellent IDE integration, it’s an ideal choice when it comes to Android development. 100% Java compatibility, interoperability and no runtime overhead is just the beginning of a long list of strengths. Kotlin is supposed to be a subset of SCALA, on one hand covering major advantages for developers and on the other - keeping short compile times.
This presentation is a Developer Starter - a set of hand-picked information allowing a person with no knowledge of Kotlin to start writing basic Android activities and set up an Android-kotlin project. It starts with language background, reasons for its creation and advantages. Then presents basic use cases, syntax, structures and patterns. Later on Kotlin is presented in Android context. Simple project structure, imports and Kotlin usage with Android SDK is explained. In the end cost of Kotlin usage is presented and the language is compared to SCALA and SWIFT.
Kotlin advanced - language reference for android developersBartosz Kosarzycki
StxNext Lightning Talks - Mar 11, 2016
Kotlin Advanced - language reference for Android developers
This presentation contains the second talk on Kotlin language we had at STXNext. We try go deeper into language specifics and look at the positive impact new syntax can have on boilerplate removal and readability improvement.
Kotlin really shines in Android development when one looks at “Enum translation”, “Extension functions”, “SAM conversions”, “Infix notation”, “Closures” and “Fluent interfaces” applied to lists. The talk, however, compares language-specifics of Java & Kotlin in terms of “Type Variance”, “Generics” and “IDE tools” as well.
We present real-world example based on Stx-Insider project written in Kotlin which incorporates Dagger 2, Kotterknife, Retrofit2 and is composed of 5+ Activities.
Full agenda
Live templates
Enum translation
Calling extension functions from Kotlin/Java
Constructors with backing fields
Warnings
F-bound polymorphism
Variance (Covariance/Contravariance)
Variance comparison in Kotlin/Java/Scala
Annotation processing - KAPT
SAM conversions
Type equality
Lambda vs Closure
Reified generics
Fluent interfaces
Infix notation
Static extension methods in Kotlin
Generic types
Sealed classes
Dokka - documentation in Kotlin
J2K converter
Real-world example
Reflection
Presentation is accompanied with an example project (StxInsider):
https://github.com/kosiara/stx-insider
Android Developer Group Poznań - Kotlin for Android developers
STXInsider example project in Kotlin:
https://github.com/kosiara/stx-insider
Kotlin - one of the popular programming languages built on top of Java that runs on JVM. Thanks to JetBrains support and excellent IDE integration, it’s an ideal choice for Android development. 100% Java compatibility, interoperability and no runtime overhead is just the beginning of a long list of strengths. Kotlin is supposed to be a subset of SCALA, has clear benefits for developers on one hand and keeps short compile times on the other.
As a mobile team we got interested in Kotlin a few months before its final release which gave us time to test it thoroughly before production use. The language has some clear advantages for an Android programmer - it enables migration from Java projects that have been under development for some time already. Java&Kotlin coexistence simplifies Kotlin introduction as only new functionality is written in JetBrain’s new language leaving all the legacy code untouched.
Transitioning gives the developer an opportunity to use lambdas, new syntax for data objects, extension functions to easily expand Android SDK’s classes functionality and infix notation to write DSL-like structures. Almost all the libraries you use today will work with Kotlin thanks to 100% Java compatibility. The same is true for Android SDK classes - all of them will seamlessly work with the new programming language. Kotlin gives you more choice when it comes to reflection, creating documentation and being null-pointer safe. Android works great with it out of the box so you won’t need to change your development habits.
Our production project in Kotlin turned out to be a success after 4 months of development. We had 0 bugs related to Kotlin as a programming language. Our code footprint is almost 30% smaller thanks to JetBrain’s, we benefit from nullpointer safety, closures, translated enums, data objects and use infix notation for logging and displaying Snackbars.
===========
In this presentation you'll find basic use cases, syntax, structures and patterns. Later on Kotlin is presented in Android context. Simple project structure, imports and Kotlin usage with Android SDK is explained. In the end cost of Kotlin compilation is presented and the language is compared to SCALA and SWIFT.
We look at the positive impact new syntax can have on boilerplate removal and readability improvement.
Kotlin really shines in Android development when one looks at “Enum translation”, “Extension functions”, “SAM conversions”, “Infix notation”, “Closures” and “Fluent interfaces” applied to lists. The talk, however, compares language-specifics of Java & Kotlin in terms of “Type Variance”, “Generics” and “IDE tools” as well.
Kotlin is a JVM language developed by Jetbrains. Its version 1.0 (production ready) was released at the beginning of the year and made some buzz within the android community. This session proposes to discover this language, which takes up some aspects of groovy or scala, and that is very close to swift in syntax and concepts. We will see how Kotlin boosts the productivity of Java & Android application development and how well it accompanies reactive development.
Introduction to kotlin for android app development gdg ahmedabad dev fest 2017Hardik Trivedi
The presentation was given in Ahmedabad GDG DevFest 2017. It has introduction to Kotlin for Android App Development.
Talk will is specially designed for beginners, who has heard about Kotlin but couldn’t explore it till date. The talk will take attendees to the journey where they can know Kotlin as a programming language. What Kotlin offers for Android? How to start the development using Kotlin, Features of Kotlin, Some of the disadvantages of Kotlin.
I will be discussing about following topics
- What’s Kotlin
- Why Kotlin
- Setting up Kotlin
- Features of Kotlin
- Syntax crash course
- Classes
- Features of function programming like Lamdabs and Higher order functions
- Usage of Anko
- Migrating from Java project to Kotlin
- Future of Kotlin
- Disadvantages of Kotlin
Kotlin advanced - language reference for android developersBartosz Kosarzycki
StxNext Lightning Talks - Mar 11, 2016
Kotlin Advanced - language reference for Android developers
This presentation contains the second talk on Kotlin language we had at STXNext. We try go deeper into language specifics and look at the positive impact new syntax can have on boilerplate removal and readability improvement.
Kotlin really shines in Android development when one looks at “Enum translation”, “Extension functions”, “SAM conversions”, “Infix notation”, “Closures” and “Fluent interfaces” applied to lists. The talk, however, compares language-specifics of Java & Kotlin in terms of “Type Variance”, “Generics” and “IDE tools” as well.
We present real-world example based on Stx-Insider project written in Kotlin which incorporates Dagger 2, Kotterknife, Retrofit2 and is composed of 5+ Activities.
Full agenda
Live templates
Enum translation
Calling extension functions from Kotlin/Java
Constructors with backing fields
Warnings
F-bound polymorphism
Variance (Covariance/Contravariance)
Variance comparison in Kotlin/Java/Scala
Annotation processing - KAPT
SAM conversions
Type equality
Lambda vs Closure
Reified generics
Fluent interfaces
Infix notation
Static extension methods in Kotlin
Generic types
Sealed classes
Dokka - documentation in Kotlin
J2K converter
Real-world example
Reflection
Presentation is accompanied with an example project (StxInsider):
https://github.com/kosiara/stx-insider
Android Developer Group Poznań - Kotlin for Android developers
STXInsider example project in Kotlin:
https://github.com/kosiara/stx-insider
Kotlin - one of the popular programming languages built on top of Java that runs on JVM. Thanks to JetBrains support and excellent IDE integration, it’s an ideal choice for Android development. 100% Java compatibility, interoperability and no runtime overhead is just the beginning of a long list of strengths. Kotlin is supposed to be a subset of SCALA, has clear benefits for developers on one hand and keeps short compile times on the other.
As a mobile team we got interested in Kotlin a few months before its final release which gave us time to test it thoroughly before production use. The language has some clear advantages for an Android programmer - it enables migration from Java projects that have been under development for some time already. Java&Kotlin coexistence simplifies Kotlin introduction as only new functionality is written in JetBrain’s new language leaving all the legacy code untouched.
Transitioning gives the developer an opportunity to use lambdas, new syntax for data objects, extension functions to easily expand Android SDK’s classes functionality and infix notation to write DSL-like structures. Almost all the libraries you use today will work with Kotlin thanks to 100% Java compatibility. The same is true for Android SDK classes - all of them will seamlessly work with the new programming language. Kotlin gives you more choice when it comes to reflection, creating documentation and being null-pointer safe. Android works great with it out of the box so you won’t need to change your development habits.
Our production project in Kotlin turned out to be a success after 4 months of development. We had 0 bugs related to Kotlin as a programming language. Our code footprint is almost 30% smaller thanks to JetBrain’s, we benefit from nullpointer safety, closures, translated enums, data objects and use infix notation for logging and displaying Snackbars.
===========
In this presentation you'll find basic use cases, syntax, structures and patterns. Later on Kotlin is presented in Android context. Simple project structure, imports and Kotlin usage with Android SDK is explained. In the end cost of Kotlin compilation is presented and the language is compared to SCALA and SWIFT.
We look at the positive impact new syntax can have on boilerplate removal and readability improvement.
Kotlin really shines in Android development when one looks at “Enum translation”, “Extension functions”, “SAM conversions”, “Infix notation”, “Closures” and “Fluent interfaces” applied to lists. The talk, however, compares language-specifics of Java & Kotlin in terms of “Type Variance”, “Generics” and “IDE tools” as well.
Kotlin is a JVM language developed by Jetbrains. Its version 1.0 (production ready) was released at the beginning of the year and made some buzz within the android community. This session proposes to discover this language, which takes up some aspects of groovy or scala, and that is very close to swift in syntax and concepts. We will see how Kotlin boosts the productivity of Java & Android application development and how well it accompanies reactive development.
Introduction to kotlin for android app development gdg ahmedabad dev fest 2017Hardik Trivedi
The presentation was given in Ahmedabad GDG DevFest 2017. It has introduction to Kotlin for Android App Development.
Talk will is specially designed for beginners, who has heard about Kotlin but couldn’t explore it till date. The talk will take attendees to the journey where they can know Kotlin as a programming language. What Kotlin offers for Android? How to start the development using Kotlin, Features of Kotlin, Some of the disadvantages of Kotlin.
I will be discussing about following topics
- What’s Kotlin
- Why Kotlin
- Setting up Kotlin
- Features of Kotlin
- Syntax crash course
- Classes
- Features of function programming like Lamdabs and Higher order functions
- Usage of Anko
- Migrating from Java project to Kotlin
- Future of Kotlin
- Disadvantages of Kotlin
The Jetbrain's Kotlin language cheat sheet, created by ekito and launched for the Toulouse's devfest - https://www.ekito.fr/people/kotlin-cheat-sheet/
This paper helps you keep the main feature of the Kotlin language, under the hand. Just download it & print it !
Next Insurance was founded in the beginning of 2016 and first lines of our production code started accumulating in May 2016. In the beginning I have started writing in Java and experimenting with Kotlin, which saw its 1.0 release two months earlier. 6 months later, the development of our backend services has totally shifted to Kotlin. We still keep a few classes in Java just to make sure that the integration remains seamless but the vast majority of our codebase is written in Kotlin. In this talk I will cover the language features and why I think it is awesome, from null safety to smart casts and data classes. We will also look into the future with 1.1 async/await feature and more.
Will talk about kotlin the language and new concepts introduced in the language including functional programming.
And how to use your springframework knowlege to write more concise and elegant backend systems.
We will demo a backend written in spring boot and kotlin and will see how it is so easy to interoperate between java and kotlin code.
Coding for Android on steroids with KotlinKai Koenig
Kotlin is a new language for the JVM that aims to be a "better Java". Made in-house by Jetbrains, the company behind IntelliJ IDEA and also Android Studio, it's been in development for more than 5 years. Just a few weeks ago the final version of Kotlin 1.0 saw the light of day.
This talk will start with a brief introduction into Kotlin and its core language features. After this brief foray into concepts like Kotlin's immutable variables, null behaviour and other smarts like the syntactic sugar it provides for dealing with types and properties you'll discover what's in store for Android developers.
Particularly noteworthy are the decrease in annoying Java boilerplate code, fewer of the irritating "Process has stopped unexpectedly" messages and the easily available Kotlin Android Extensions. You will also explore the toolchain and compiler tools Kotlin provides for Android development, the differences to using Kotlin for Java development as well as the integration into Android Studio.
Little Helpers for Android Development with KotlinKai Koenig
Kotlin is a new language for the JVM that aims to be a "better Java". Made in-house by Jetbrains, the company behind IntelliJ IDEA and also Android Studio, it's been in development for more than 5 years. Just a few months ago the final version of Kotlin 1.0 saw the light of day.
Starting off with Kotlin for Java development and for Android is actually quite straight forward. There's a lot of well written documentation, there are the Kotlin Koans and blogs seem to pick up Kotlin-related topics more and more. What a lot of people are not aware of though is that there are a bunch of really useful libraries and tools for Kotlin developers, in particular on Android (the most common and well known one being Ando).
This session from Droidcon Germany 2016 in Berlin will start with a quick introduction into Kotlin and its benefits over Java. Then we'll dive into the Kotlin-Android-ecosystem and look at a variety of Kotlin tools and libraries that can make one's life much easier - even to a level going beyond what core Kotlin already has to offer.
Le slide deck de l'Université que nous avons donnée avec Rémi Forax à Devoxx France 2019.
Comme promis, Java sort sa version majeure tous les 6 mois. Le train passe et amène son lot de nouveautés. Parmi elles, certaines sont sorties : une nouvelle syntaxe pour les clauses switch et l'instruction de byte code CONSTANT_DYNAMIC. D'autres sont en chantier, plus ou moins avancé : une nouvelle façon d'écrire des méthodes de façon condensée, un instanceof 'intelligent', des constantes évaluées au moment où elles sont utilisées. Les projets progressent. Loom, et son nouveau modèle de programmation concurrente que l'ont peut tester avec Jetty. Amber, qui introduit les data types et des nouvelles syntaxes. Valhalla, dont les value types donnent leurs premiers résultats. S'il est difficile de prévoir une date de sortie pour ces nouveautés, on sait en revanche qu'une fois prêtes elles sortiront en moins de 6 mois. De tout ceci nous parlerons donc au futur et en public, avec des démonstrations de code, des slides, du code, de la joie et de la bonne humeur !
Kotlin Bytecode Generation and Runtime Performanceintelliyole
In this talk, we'll dive into the details of how various language features supported by Kotlin are translated to Java bytecode. We'll use the JMH microbenchmarking tool to study the relative performance of various constructs and to understand how we can ensure top performance of the Kotlin code that we write.
It's 2017. Kotlin, a great language for the JVM, has been around for more than 6 years now and has changed the way a lot of developers look at the features and evolutionary progress of Java. Kotlin has become a very popular alternative to Java for Android developers and with Kotlin 1.1 being on its way, thing are going to become more exciting.
This talk will start with a brief introduction into Kotlin and its core language features. After this brief foray into concepts like Kotlin's immutable variables, null behaviour and other smarts like the syntactic sugar it provides for dealing with types and properties we'll have a look into what in store for Android developers and into new features in Kotlin 1.1, such as Kotlin Coroutines, Jack support for Android and lots of improvements to the standard library.
I used these slides to present the benefits of using Kotlin to a group of people I work with. The presentation focuses on comparing Kotlin to Java, and in particular showing how Kotlin can help in writing safer, more concise and readable code. I used a few java gotchas/puzzles to demonstrate how Kotlin may prevent us from doing silly things.
Presented on 27th September 2017 to a joint meeting of 'Cork Functional Programmers' and the 'Cork Java Users Group'
Based on the Kotlin Language programming course from Instil. For more details see https://instil.co/courses/kotlin-development/
The Jetbrain's Kotlin language cheat sheet, created by ekito and launched for the Toulouse's devfest - https://www.ekito.fr/people/kotlin-cheat-sheet/
This paper helps you keep the main feature of the Kotlin language, under the hand. Just download it & print it !
Next Insurance was founded in the beginning of 2016 and first lines of our production code started accumulating in May 2016. In the beginning I have started writing in Java and experimenting with Kotlin, which saw its 1.0 release two months earlier. 6 months later, the development of our backend services has totally shifted to Kotlin. We still keep a few classes in Java just to make sure that the integration remains seamless but the vast majority of our codebase is written in Kotlin. In this talk I will cover the language features and why I think it is awesome, from null safety to smart casts and data classes. We will also look into the future with 1.1 async/await feature and more.
Will talk about kotlin the language and new concepts introduced in the language including functional programming.
And how to use your springframework knowlege to write more concise and elegant backend systems.
We will demo a backend written in spring boot and kotlin and will see how it is so easy to interoperate between java and kotlin code.
Coding for Android on steroids with KotlinKai Koenig
Kotlin is a new language for the JVM that aims to be a "better Java". Made in-house by Jetbrains, the company behind IntelliJ IDEA and also Android Studio, it's been in development for more than 5 years. Just a few weeks ago the final version of Kotlin 1.0 saw the light of day.
This talk will start with a brief introduction into Kotlin and its core language features. After this brief foray into concepts like Kotlin's immutable variables, null behaviour and other smarts like the syntactic sugar it provides for dealing with types and properties you'll discover what's in store for Android developers.
Particularly noteworthy are the decrease in annoying Java boilerplate code, fewer of the irritating "Process has stopped unexpectedly" messages and the easily available Kotlin Android Extensions. You will also explore the toolchain and compiler tools Kotlin provides for Android development, the differences to using Kotlin for Java development as well as the integration into Android Studio.
Little Helpers for Android Development with KotlinKai Koenig
Kotlin is a new language for the JVM that aims to be a "better Java". Made in-house by Jetbrains, the company behind IntelliJ IDEA and also Android Studio, it's been in development for more than 5 years. Just a few months ago the final version of Kotlin 1.0 saw the light of day.
Starting off with Kotlin for Java development and for Android is actually quite straight forward. There's a lot of well written documentation, there are the Kotlin Koans and blogs seem to pick up Kotlin-related topics more and more. What a lot of people are not aware of though is that there are a bunch of really useful libraries and tools for Kotlin developers, in particular on Android (the most common and well known one being Ando).
This session from Droidcon Germany 2016 in Berlin will start with a quick introduction into Kotlin and its benefits over Java. Then we'll dive into the Kotlin-Android-ecosystem and look at a variety of Kotlin tools and libraries that can make one's life much easier - even to a level going beyond what core Kotlin already has to offer.
Le slide deck de l'Université que nous avons donnée avec Rémi Forax à Devoxx France 2019.
Comme promis, Java sort sa version majeure tous les 6 mois. Le train passe et amène son lot de nouveautés. Parmi elles, certaines sont sorties : une nouvelle syntaxe pour les clauses switch et l'instruction de byte code CONSTANT_DYNAMIC. D'autres sont en chantier, plus ou moins avancé : une nouvelle façon d'écrire des méthodes de façon condensée, un instanceof 'intelligent', des constantes évaluées au moment où elles sont utilisées. Les projets progressent. Loom, et son nouveau modèle de programmation concurrente que l'ont peut tester avec Jetty. Amber, qui introduit les data types et des nouvelles syntaxes. Valhalla, dont les value types donnent leurs premiers résultats. S'il est difficile de prévoir une date de sortie pour ces nouveautés, on sait en revanche qu'une fois prêtes elles sortiront en moins de 6 mois. De tout ceci nous parlerons donc au futur et en public, avec des démonstrations de code, des slides, du code, de la joie et de la bonne humeur !
Kotlin Bytecode Generation and Runtime Performanceintelliyole
In this talk, we'll dive into the details of how various language features supported by Kotlin are translated to Java bytecode. We'll use the JMH microbenchmarking tool to study the relative performance of various constructs and to understand how we can ensure top performance of the Kotlin code that we write.
It's 2017. Kotlin, a great language for the JVM, has been around for more than 6 years now and has changed the way a lot of developers look at the features and evolutionary progress of Java. Kotlin has become a very popular alternative to Java for Android developers and with Kotlin 1.1 being on its way, thing are going to become more exciting.
This talk will start with a brief introduction into Kotlin and its core language features. After this brief foray into concepts like Kotlin's immutable variables, null behaviour and other smarts like the syntactic sugar it provides for dealing with types and properties we'll have a look into what in store for Android developers and into new features in Kotlin 1.1, such as Kotlin Coroutines, Jack support for Android and lots of improvements to the standard library.
I used these slides to present the benefits of using Kotlin to a group of people I work with. The presentation focuses on comparing Kotlin to Java, and in particular showing how Kotlin can help in writing safer, more concise and readable code. I used a few java gotchas/puzzles to demonstrate how Kotlin may prevent us from doing silly things.
Presented on 27th September 2017 to a joint meeting of 'Cork Functional Programmers' and the 'Cork Java Users Group'
Based on the Kotlin Language programming course from Instil. For more details see https://instil.co/courses/kotlin-development/
This is an introductory SCALA workshop for a JAVA developer. Hence, we're going to explore 'functional' side of the language. SCALA is 50% OOP (Object-Oriented-Programming) and 50% FP (Functional-Programming). Main principles of FP are discussed, such as: tail-recursion, currying, pure-functions, lazy evaluation etc.) along with some examples in code.
We look at the basic keywords and constructs in SCALA.
In the end SCALA tools which are helpful for developers are listed.
While Google is adding Kotlin as an official Android language, we're also expanding our research on this language. It’s developed by JetBrains, and the fact that these are the people behind a suite of IDEs, such as IntelliJ and ReSharper, really shines through in Kotlin. It’s pragmatic and concise and makes coding a satisfying and efficient experience.
Although Kotlin compiles to both JavaScript and soon machine code, I’ll focus on its prime environment, the JVM.
Please see my presentation to learn more!
A look at the future of JVM languages including Kotlin, Scala, Groovy, and latest Java.
Which language to use ? what are the benefits of higher level abstractions ? and what are the benefits of programming on the JVM ?
This is an quick introduction to Scalding and Monoids. Scalding is a Scala library that makes writing MapReduce jobs very easy. Monoids on the other hand promise parallelism and quality and they make some more challenging algorithms look very easy.
The talk was held at the Helsinki Data Science meetup on January 9th 2014.
This is the slide for what I shared in JS Group meetup, 2014, Taiwan. It covers what JavaScript could do for making the program more "functional", the benefits, price and the limitation.
Not so long ago Microsoft announced a new language trageting on front-end developers. Everybody's reaction was like: Why?!! Is it just Microsoft darting back to Google?!
So, why a new language? JavaScript has its bad parts. Mostly you can avoid them or workaraund. You can emulate class-based OOP style, modules, scoping and even run-time typing. But that is doomed to be clumsy. That's not in the language design. Google has pointed out these flaws, provided a new language and failed. Will the story of TypeScript be any different?
This is a quick summary of interesting talk I visited during Droidcon Online 2020. This year the conference was different - due to covid-19. Nevertheless there were some thing worth mentioning!
In the following presentation I compare main Flutter architecture patterns - package:provider, BLoC and Redux.
Source: https://github.com/kosiara/bloc-vs-pprov-vs-redux
Different architecture have their advantages & disadvantages. Simplest application can take advantage of a stateful widget + inherited widget - which solves the problem of reference passing.
BLoC is more complicated but definitely pays off when you're dealing with a bigger application.
Finally we have redux. This is the most robust example with most boilerplate code. There are non-deniable example of such an architecture:
- single source of truth which can be serialized and later on saved/restored from disk
- ease of logging actions
- clear data-flow
- ability to undo actions
Animations in Flutter from Poznań Flutter Developer Group (PFDG)
- types of animations
- tween animations
- Flare
https://www.meetup.com/poznan-flutter-developers/
https://www.facebook.com/poznanflutter
Flutter overview - advantages & disadvantages for businessBartosz Kosarzycki
After half a year experience with Fluttter, two internal projects and one commercial one, we'd like to share our view on what FLUTTER as a framework gives developers and businesses alike.
In this short presentation, we're gonna look through all the available CI options for flutter. Next, we'll what cloud device farms are available for us, to test flutter apps on real devices.
In this short presentation we go through several topics: drone types, motor types, lift, basic physics of drones, accessories, antennas, controllers and racing tracks. We compare brushed vs brushless motor, quadcopters with tricopters and show how modern motors are assembled in China. Notions such as Lift and Yawning are discussed in the end. Remember about safety: keep LiPO baterries inside fire-proof cases.
The concept of running Android apps on Desktops circulated for a couple of years. First, there were Android emulators, then Chrome ARChon project. Now we have native support for Android apps on Chromebooks. It's time to learn how to optimize your apps for new form factors and markets....
Simple tips on how to speed up your Android builds.
This talk is inspired by Stefan Oehme ( Gradle, Lead Developer) talk on “IMPROVING ANDROID BUILD PERFORMANCE” - Droidcon Berlin 2018
Summary of the DroidCon 2018 conference in Berlin.
It was the biggest one to date with 1200+ Attendees and 100+ sessions. We took part in as many sessions as we could and these are our thoughts.
This is a short introduction to Android Things development. Presentation starts with Android Things OS description, differences between Android & Android Things. Later on we describe benefits & downsides of using Android Things. We give a sample AT usage - from a mobile we're able to set the temperature inside a Home equipped with a Raspberry Pie 3 running AT & Bluetooth Smart thermostats.
The core of the presentation covers the development process - ADB connection, ROM flashing etc.
In the end, we describe peripherals supported by Android Things.
Summarizing we try to dig deeper into driver development for Android Things.
Daggerate your code - Write your own annotation processorBartosz Kosarzycki
Length: 30 min
Annotations have become a trendy topic in the Android community. Almost all automation & boiler-plate code elimination is done through annotations - starting from DTOs description (google.GSON), REST libraries (Retrofit) to dependency injection (google.Dagger2). But what if you want to eliminate boiler-plate code in your custom project? Or maybe you're writing a library for other Android-developers and you want to easily initialize that library with annotations.
This presentation walks you through the basic theory behind annotation processing and tells you how to write the most elemental annotation processor. Starting from annotation-search in the source code, source-code analysis and lastly source-code generation. The latter is done with the use of Square's JavaPoet library.
Inspirations for this presentation were drawn from a couple of sprints in one of our internal projects in which we had the freedom of choosing our own technical solutions.
We go through premature optimisation, silver-bullet antipattern, duplication and null-pointer hell.
In the end other antipatterns are swiftly mentioned.
Introduction to Flutter - truly crossplatform, amazingly fastBartosz Kosarzycki
Intro: Flutter meaning rapid variation of electronic signal recently became Dart's framework name for mobile development. This presentation is a short introduction into a cross-platform solution covering iOS/Android. During this 45 minute period you'll learn what is flutter, where it came from and what it's for.
Search and Society: Reimagining Information Access for Radical FuturesBhaskar Mitra
The field of Information retrieval (IR) is currently undergoing a transformative shift, at least partly due to the emerging applications of generative AI to information access. In this talk, we will deliberate on the sociotechnical implications of generative AI for information access. We will argue that there is both a critical necessity and an exciting opportunity for the IR community to re-center our research agendas on societal needs while dismantling the artificial separation between the work on fairness, accountability, transparency, and ethics in IR and the rest of IR research. Instead of adopting a reactionary strategy of trying to mitigate potential social harms from emerging technologies, the community should aim to proactively set the research agenda for the kinds of systems we should build inspired by diverse explicitly stated sociotechnical imaginaries. The sociotechnical imaginaries that underpin the design and development of information access technologies needs to be explicitly articulated, and we need to develop theories of change in context of these diverse perspectives. Our guiding future imaginaries must be informed by other academic fields, such as democratic theory and critical theory, and should be co-developed with social science scholars, legal scholars, civil rights and social justice activists, and artists, among others.
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...UiPathCommunity
💥 Speed, accuracy, and scaling – discover the superpowers of GenAI in action with UiPath Document Understanding and Communications Mining™:
See how to accelerate model training and optimize model performance with active learning
Learn about the latest enhancements to out-of-the-box document processing – with little to no training required
Get an exclusive demo of the new family of UiPath LLMs – GenAI models specialized for processing different types of documents and messages
This is a hands-on session specifically designed for automation developers and AI enthusiasts seeking to enhance their knowledge in leveraging the latest intelligent document processing capabilities offered by UiPath.
Speakers:
👨🏫 Andras Palfi, Senior Product Manager, UiPath
👩🏫 Lenka Dulovicova, Product Program Manager, UiPath
"Impact of front-end architecture on development cost", Viktor TurskyiFwdays
I have heard many times that architecture is not important for the front-end. Also, many times I have seen how developers implement features on the front-end just following the standard rules for a framework and think that this is enough to successfully launch the project, and then the project fails. How to prevent this and what approach to choose? I have launched dozens of complex projects and during the talk we will analyze which approaches have worked for me and which have not.
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
State of ICS and IoT Cyber Threat Landscape Report 2024 previewPrayukth K V
The IoT and OT threat landscape report has been prepared by the Threat Research Team at Sectrio using data from Sectrio, cyber threat intelligence farming facilities spread across over 85 cities around the world. In addition, Sectrio also runs AI-based advanced threat and payload engagement facilities that serve as sinks to attract and engage sophisticated threat actors, and newer malware including new variants and latent threats that are at an earlier stage of development.
The latest edition of the OT/ICS and IoT security Threat Landscape Report 2024 also covers:
State of global ICS asset and network exposure
Sectoral targets and attacks as well as the cost of ransom
Global APT activity, AI usage, actor and tactic profiles, and implications
Rise in volumes of AI-powered cyberattacks
Major cyber events in 2024
Malware and malicious payload trends
Cyberattack types and targets
Vulnerability exploit attempts on CVEs
Attacks on counties – USA
Expansion of bot farms – how, where, and why
In-depth analysis of the cyber threat landscape across North America, South America, Europe, APAC, and the Middle East
Why are attacks on smart factories rising?
Cyber risk predictions
Axis of attacks – Europe
Systemic attacks in the Middle East
Download the full report from here:
https://sectrio.com/resources/ot-threat-landscape-reports/sectrio-releases-ot-ics-and-iot-security-threat-landscape-report-2024/
UiPath Test Automation using UiPath Test Suite series, part 4DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 4. In this session, we will cover Test Manager overview along with SAP heatmap.
The UiPath Test Manager overview with SAP heatmap webinar offers a concise yet comprehensive exploration of the role of a Test Manager within SAP environments, coupled with the utilization of heatmaps for effective testing strategies.
Participants will gain insights into the responsibilities, challenges, and best practices associated with test management in SAP projects. Additionally, the webinar delves into the significance of heatmaps as a visual aid for identifying testing priorities, areas of risk, and resource allocation within SAP landscapes. Through this session, attendees can expect to enhance their understanding of test management principles while learning practical approaches to optimize testing processes in SAP environments using heatmap visualization techniques
What will you get from this session?
1. Insights into SAP testing best practices
2. Heatmap utilization for testing
3. Optimization of testing processes
4. Demo
Topics covered:
Execution from the test manager
Orchestrator execution result
Defect reporting
SAP heatmap example with demo
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf91mobiles
91mobiles recently conducted a Smart TV Buyer Insights Survey in which we asked over 3,000 respondents about the TV they own, aspects they look at on a new TV, and their TV buying preferences.
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Jeffrey Haguewood
Sidekick Solutions uses Bonterra Impact Management (fka Social Solutions Apricot) and automation solutions to integrate data for business workflows.
We believe integration and automation are essential to user experience and the promise of efficient work through technology. Automation is the critical ingredient to realizing that full vision. We develop integration products and services for Bonterra Case Management software to support the deployment of automations for a variety of use cases.
This video focuses on the notifications, alerts, and approval requests using Slack for Bonterra Impact Management. The solutions covered in this webinar can also be deployed for Microsoft Teams.
Interested in deploying notification automations for Bonterra Impact Management? Contact us at sales@sidekicksolutionsllc.com to discuss next steps.
UiPath Test Automation using UiPath Test Suite series, part 3DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 3. In this session, we will cover desktop automation along with UI automation.
Topics covered:
UI automation Introduction,
UI automation Sample
Desktop automation flow
Pradeep Chinnala, Senior Consultant Automation Developer @WonderBotz and UiPath MVP
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
Accelerate your Kubernetes clusters with Varnish CachingThijs Feryn
A presentation about the usage and availability of Varnish on Kubernetes. This talk explores the capabilities of Varnish caching and shows how to use the Varnish Helm chart to deploy it to Kubernetes.
This presentation was delivered at K8SUG Singapore. See https://feryn.eu/presentations/accelerate-your-kubernetes-clusters-with-varnish-caching-k8sug-singapore-28-2024 for more details.
Connector Corner: Automate dynamic content and events by pushing a buttonDianaGray10
Here is something new! In our next Connector Corner webinar, we will demonstrate how you can use a single workflow to:
Create a campaign using Mailchimp with merge tags/fields
Send an interactive Slack channel message (using buttons)
Have the message received by managers and peers along with a test email for review
But there’s more:
In a second workflow supporting the same use case, you’ll see:
Your campaign sent to target colleagues for approval
If the “Approve” button is clicked, a Jira/Zendesk ticket is created for the marketing design team
But—if the “Reject” button is pushed, colleagues will be alerted via Slack message
Join us to learn more about this new, human-in-the-loop capability, brought to you by Integration Service connectors.
And...
Speakers:
Akshay Agnihotri, Product Manager
Charlie Greenberg, Host
GraphRAG is All You need? LLM & Knowledge GraphGuy Korland
Guy Korland, CEO and Co-founder of FalkorDB, will review two articles on the integration of language models with knowledge graphs.
1. Unifying Large Language Models and Knowledge Graphs: A Roadmap.
https://arxiv.org/abs/2306.08302
2. Microsoft Research's GraphRAG paper and a review paper on various uses of knowledge graphs:
https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-data/
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualityInflectra
In this insightful webinar, Inflectra explores how artificial intelligence (AI) is transforming software development and testing. Discover how AI-powered tools are revolutionizing every stage of the software development lifecycle (SDLC), from design and prototyping to testing, deployment, and monitoring.
Learn about:
• The Future of Testing: How AI is shifting testing towards verification, analysis, and higher-level skills, while reducing repetitive tasks.
• Test Automation: How AI-powered test case generation, optimization, and self-healing tests are making testing more efficient and effective.
• Visual Testing: Explore the emerging capabilities of AI in visual testing and how it's set to revolutionize UI verification.
• Inflectra's AI Solutions: See demonstrations of Inflectra's cutting-edge AI tools like the ChatGPT plugin and Azure Open AI platform, designed to streamline your testing process.
Whether you're a developer, tester, or QA professional, this webinar will give you valuable insights into how AI is shaping the future of software delivery.
3. What is it?
KOTLIN is:
● safe
● versatile
● interoparable
● IDE support
● fast
JAVA SCALA
KOTLIN
+ fast compilation
+ simplicity
+ swift’s syntax is similar
Online compiler:
http://try.kotlinlang.org/
SWIFT
4. Why KOTLIN?
● no javax.time from JDK8
● no try-with resources
● no lambdas!
● no new java stream api
● no way to add methods to
platform data types (e.g. View)
List<string> names = students.stream()
.map(Student::getName)
.filter(name->name.startsWith("B"))
.collect(Collectors.toList());
ZoneId zone = ZoneId.systemDefault();
Clock clock = Clock.system(zone);
LocalDate date = LocalDate.now();
LocalTime time = LocalTime.now();
time = time.plus(Period.ofDays(12));
javax.time
Java Stream API
static String readFirstLineFromFile(String path) throws IOException {
try (BufferedReader br =
new BufferedReader(new FileReader(path))) {
return br.readLine();
}
}
try-with resources
5. Advantages
fun finish(obj: Any) {
if (obj is Activity)
obj.finish()
}
Auto-casting:
Named args in func calls:
fun circle(x: Int, y: Int, rad: Int, stroke: Int) {…}
circle(15, 40, rad = 20, stroke = 1);
Built-in lambdas:
val numbers: IntArray = intArrayOf(11, 20, 31, 40, 51)
val predicate: (Int) -> Boolean = { it -> it % 2 == 1 }
val list1 = numbers.filter { it % 2 == 1 }
val list2 = numbers.filter(predicate)
println("Lists identical: " + list1.equals(list2));
> Lists identical: true
Compactness:
* no new statement:
val a = B();
* optional brackets, return statement and one-line
function declarations:
class A {
var field1: String = "No ";
fun printNews () = field1 + " news for you" ;
}
println(A().printNews())
● all of these are much-needed
in Android development
6. Nullpointer
safety
var output : String?
output = null
println(output!!.length)
Exception in thread "main" kotlin.KotlinNullPointerException
at Simplest_versionKt.main(Simplest version.kt:11)
Java-like !! Operator: (for NPE lovers) - Optional.get() equivalent
var output : String?
output = null
println(output?.length)
val len = output?.length ?: -1 //elvis operator
println(len)
> null
> -1
?. Safe calls: (for if not null -> call function; return null otherwise)
Kotlin type aliases - planned in roadmap
(not yet released - as of Feb 2016)
Java JDK 10 will push Optional onto
the default stack ~ 2018
Optional<> pattern no longer
needed!
kotlin.Unit
If a function does not return any useful value, its
return type is Unit
7. Advantages
val arr = arrayOf(D("1A", "1B"),
D( "2A", "2B"), D("3A", "3B"));
for ((first, second) in arr )
println("a: $first, b: $second")
class D {
public var nameA: String = ""
public var nameB: String = ""
constructor (nameA: String , nameB: String) {
this.nameA = nameA
this.nameB = nameB
}
operator fun component1() : String {
return nameA
}
operator fun component2() : String {
return nameB
}
}
(a, b) Destructuring Declaration
Singleton:
object SampleSingleton {
var baseUrl: String = "https://aaa.bbb"
fun printUrl() = println(baseUrl)
}
SampleSingleton.printUrl()
SampleSingleton.baseUrl = "https://ccc.ddd"
SampleSingleton.printUrl()
> https://aaa.bbb
> https://ccc.ddd
● Singletons and
destructuring declarations
are built-in:
8. Data objects
data class Point(val x: Double = 0.0, val y: Double = 0.0, var descr: String?)
val point1 = Point( x = 1.0, y = 2.0, descr = "no description");
val point2 = Point( descr = "no description", y = 2.0, x = 1.0);
println(point1.equals(point2))
println(point1.hashCode().equals(point2.hashCode()) )
println(point1.toString().equals(point2.toString()) )
println(point1.toString())
Data object:
hashCode()
toString()
equals()
+ properties
Automatically generated:● removes most of
the boilerplate
code
9. Traits
TRAITS - java-like interfaces
with default implementation
class ExampleActivity :
AppCompatActivity(), ActivitySessionHandling {
override fun onDestroy() {
super.onDestroy()
closeSession()
}
}
open interface ActivitySessionHandling {
fun closeSession() = println("Session closed")
}
JAVA JDK 8 - extension methods
- default interface implementation
public class ItemListActivity extends AppCompatActivity
implements Java8DefaultInterface {
@Override
protected void onDestroy() {
super.onDestroy();
closeSession();
}
}
public interface Java8DefaultInterface {
default void closeSession() {
Log.i("TAG", "Session closed");
}
}
(not available in Android)
10. Class
delegation
Built-in delegate pattern:
class Derived(b: Base) : Base by b
class BaseImpl(val x: Int) : Base {
override fun print() { println(x) }
}
interface Base {
fun print()
}
val b = BaseImpl(10)
Derived(b).print()
> 10
Java equivalent:
class Derived {
Base base;
public Derived(Base b) {
this.base = b;
}
void print(){
base.print();
}
}
class BaseImpl implements Base {
int val;
public BaseImpl(int v) {
this.val = v;
}
public void print() { System.out.println(val); }
}
interface Base {
void print();
}
BaseImpl base = new BaseImpl(10);
new Derived(base).print();
11. Properties
Properties & read-only properties:
public class Address(addr : String) {
public var name: String = ""
public val address: String = addr //read-only
}
val address = Address(addr = "Low street 123")
address.name = "Mickey mouse"
println(address.address)
println(address.name)
> Low street 123
> Mickey mouse
address.address = "Another street 123" //Error:
val cannot be reassigned
Getters & setters:
public class Address() {
var address: String
get() = "Lorem ipsum"
set(value) {
println(value)
}
}
public class Address() {
var address: String = ""
get //default getter
private set //default private setter
}
Companion objects:
class CarAssemblyFactory {
companion object Factory {
fun createCar(): String
= String().plus("This is a car")
}
}
println(CarAssemblyFactory.createCar())
12. Utility
classes
UTILS:
StringUtil
ActivityUtil
ListUtil
JAVA utility class
public class StringUtils {
public static String encodeString(String str) {
return str.replaceAll(" ", "_");
}
}
KOTLIN utility class
fun String.encodeSpaces():String = this.replace(" ", "_")
println("Neque porro quisquam".encodeSpaces())
Separate packages:
package main.kotlin.utils
fun String.encodeSpaces(): String = this.replace(" ", "_")
import main.kotlin.utils.encodeSpaces
println("Neque porro quisquam".encodeSpaces())
● no utils hell
● extend final classes
● classes in Kotlin are
final by default
@JvmName("DateUtil")
fun Date.isTuesday() = day == 2
//in fact it's:
//Date.getDay() == 2
16. Higher-order
functions
Introduction
//extension function
fun Date.isTuesday() = day == 2
//function expression as contant
val addition = { x: Int, y:Int -> x + y }
//higher order function
fun higherOrder(x : Int, y: Int, func : (x : Int, y : Int) -> Int ) : Int { return func.invoke(x, y); }
Higher-order extension function
fun Int.addCustomFunc(arg: Int, func : (x : Int, y : Int) -> Int ) : Int
{ return func.invoke(this, arg); }
val addition = { x: Int, y:Int -> x + y }
val result = 1.addCustomFunc(5, addition);
18. Helpers ● Lambda expressions in EditText listeners
● usually handled by kotlin android libs
class TextWatcherFunctions : TextWatcher {
private var _beforeTextChanged : ((CharSequence , Int, Int, Int) -> Unit)? = null
private var _onTextChanged : ((CharSequence , Int, Int, Int) -> Unit)? = null
private var _afterTextChanged : ((Editable) -> Unit)? = null
override fun beforeTextChanged
(s: CharSequence , start: Int , count: Int , after: Int) : Unit
= _beforeTextChanged ?.invoke(s , start, count, after) ?: Unit ;
override fun onTextChanged
(s: CharSequence , start: Int , before: Int , count: Int) : Unit
= _onTextChanged ?.invoke(s , start, before, count) ?: Unit
override fun afterTextChanged (s: Editable) : Unit
= _afterTextChanged ?.invoke(s) ?: Unit
fun beforeTextChanged (function: (CharSequence , Int, Int, Int) -> Unit) {
_beforeTextChanged = function
}
fun onTextChanged (function: (CharSequence , Int, Int, Int) -> Unit) {
_onTextChanged = function
}
fun afterTextChanged (function: (Editable) -> Unit) {
_afterTextChanged = function
}
}
fun EditText.addTextChangedListener
(init: TextWatcherFunctions.()
-> Unit): TextWatcher {
val watcher = TextWatcherFunctions()
watcher.init()
addTextChangedListener(watcher)
return watcher
}
19. Kotterknife
val mHeaderTextView: TextView by bindView(R.id.activity_team_details_team_header)
val mDescriptionTextView: TextView by bindView(R.id.activity_team_details_team_description)
val textViews: List<TextView> by bindViews(R.id.activity_team_details_team_header,
R.id.activity_team_details_team_description)
// List binding with optional items being omitted.
val nameViews: List<TextView> by bindOptionalViews(R.id.first_name, R.id.middle_name, R.id.last_name)
● bindView() instead of
@Bind annotation
● developed by Jake Wharton
● still not pushed to maven
central
20. Dagger 2
& KOTLIN
@Module
class AndroidModule(private val application: Application) {
@Provides
@Singleton
fun provideLocationManager(): LocationManager {
return
application
.getSystemService(Context.LOCATION_SERVICE)
as LocationManager
}
@Provides
@Singleton
@Named("something")
fun provideSomething(): String {
return "something"
}
}
class MainActivity : AppCompatActivity() {
@Inject
lateinit var locationManager: LocationManager
@field:[Inject Named("something")]
lateinit var something: String
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
}
}
● compatible with KOTLIN
since M13
● introduction of lateinit property
Late-initialized property: e.g. for unit tests
public class MyTest {
lateinit var subject: TestSubject
@SetUp fun setup() {
subject = TestSubject()
}
@Test fun test() {
subject.method()
}
}
21. Kotlin Anko
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
verticalLayout {
padding = dip(30)
editText {
hint = "Name"
textSize = 24f
}
editText {
hint = "Password"
textSize = 24f
}
button("Login") {
textSize = 26f
}
}
}
● from Jetbrains
● create layouts from code
dependencies {
compile 'org.jetbrains.anko:anko-sdk15:0.8'
compile 'org.jetbrains.anko:anko-support-v4:0.8'
compile 'org.jetbrains.anko:anko-appcompat-v7:0.8'
}
verticalLayout {
val name = editText()
button("Say Hello") {
onClick { toast("Hello, ${name.text}!") }
}
}
22. Sample
Activity
class TeamDetailsActivity : AppCompatActivity() {
val mHeaderTextView: TextView by bindView(R.id.activity_team_details_team_header)
var mTeam: Team? = null
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_team_details)
supportActionBar!!.title = "Team description"
supportActionBar!!.setDisplayHomeAsUpEnabled(true)
mTeam = Gson().fromJson<Team>(intent.getStringExtra("item"), Team::class.java)
bind(mTeam!!)
}
private fun bind(item: Team) {
mHeaderTextView.text = item.header
}
override fun onOptionsItemSelected(item: MenuItem): Boolean {
if (item.itemId == android.R.id.home)
finish()
return super.onOptionsItemSelected(item)
}
}
● 100% Java compatibility
● kotterknife
● Android SDK usage in Kotlin is simple
23. SWIFT
var myVariable = 42 //Variable
val explicitDouble: Double = 70.0 //Explicit Type Constant
for (i in 1..5) { print(i) } //Inclusive Range Operator
val a = "A"; val b = "B";
val str = "I have ${a + b} "; //String interpolation
var shoppingList = arrayOf("catfish" , "water") //Array Creation
var hashMap = hashMapOf("Malcolm" to "Captain" ); //Maps
val emptyArray = arrayOf<String>() //Empty Typed Array
interface Nameable { fun name(): String } //Interface
val movie = obj as Movie //Downcasting
fun Double.km() : Double = this * 1000; //Extension function
KOTLIN SWIFT
var myVariable = 42 //Variable
let explicitDouble: Double = 70 //Explicit Type Constant
for i in 1...5 { println( i) } //Inclusive Range Operator
let a = "A"; let b = "B";
let str = "I have (a + b) " //String interpolation
var shoppingList = [ "catfish" , "water"] //Array Creation
var occupations = [ "Malcolm" : "Captain" ] //Maps
let emptyArray = String[]() //Empty Typed Array
protocol Nameable { func name() -> String } //Protocol (Interface)
let movie = object as Movie //Downcasting
extension Double { var km: Double { return self * 1_000.0 } }
//Extension function
● Kotlin’s syntax is similar
Swift
24. Command line
compiler
$ curl -s get.sdkman.io | bash
$ source "$HOME/.sdkman/bin/sdkman-init.sh"
$ sdk install kotlin
Do you want kotlin 1.0.0-rc-1036 to be set as default?
(Y/n): Y
Setting kotlin 1.0.0-rc-1036 as default.
Installation:
● Let us compare the
resulting bytecode of
kotlin and java
compilation
OsX
SDKMAN
or homebrew
Linux
FreeBSD
Cygwin
SDKMAN
25. Command line
compiler
Kotlin:
class Capturing {
fun run2(func: Runnable) {
func.run()
}
}
fun main(args: Array<String>) {
Capturing().run2(Runnable { println("Hey! $args") })
}
$ kotlinc Capturing.kt
$ javap -p
Compiled from "Capturing.kt"
public final class Capturing {
public final void run2(java.lang.Runnable);
public Capturing();
}
public final class CapturingKt {
public static final void main(java.lang.String[]);
}
Java:
● Let us compare the
resulting bytecode of
kotlin and java
compilation
import java.util.Arrays;
class Capturing {
public static void main(final String... args) {
run(new Runnable() {
@Override public void run() {
System.out.println("Hey! " + Arrays.toString(args));
}
});
}
private static void run(Runnable run) {
run.run();
}
}
$ javac Capturing.java
$ javap -p Capturing
Compiled from "Capturing.java"
class Capturing {
Capturing();
public static void main(java.lang.String...);
private static void run(java.lang.Runnable);
}
26. What is
KOTLIN :)?
RUSSIAN WARSHIP
ISLAND
source:
https://en.wikipedia.org/wiki/Kotlin
CITY IN POLAND
KETCHUP BRANDPROGRAMMING
LANGUAGE
27. Comparison
KOTLIN
WORSE THAN SCALA: BETTER THAN SCALA:
● no static members (BY DESIGN) - if you need something that
is not attached to an instance of any class, you define it in a
package
● no checked exceptions (BY DESIGN)
no functions like:
void copy(CharSequence csq) throws IOException
● primitive types that are not classes
● non-private fields (i.e. java’s public int field; ) - by design - in kotlin
one should use properties instead of public fields
IN JAVA NOT IN KOTLIN:
● Overridable type members
● Path-dependent types
● Macros
● Existential types
● Complicated logic for initialization of traits
● Custom symbolic operations
● Built-in XML
● Parallel collections
● Structural types
● Value types
● Yield operator
● Actors
● smart-casts
● first-class delegation (built-in delegate pattern)
● no overhead in extension functions
(compared to implicit class in Scala [link])
● no overhead in null-safety
28. Resources
RESOURCES:
● http://kotlinlang.org/
● Jake Wharton - Using Project Kotlin for Android - https://t.co/9t8qsBGPlo
● Mike Gouline - Kotlin the Swift of Android - - https://blog.gouline.net/2014/08/31/kotlin-the-swift-of-android/
● Paweł Gajda - Kotlin Android - http://slides.com/pawegio/kotlin-android, https://github.com/pawegio/KAndroid
● Jetbrains Kotlin Anko - https://github.com/Kotlin/anko
● Amit Phaltankar Java 8 streams - https://dzone.com/articles/understanding-java-8-streams-1
● Salomon Brys - https://github.com/SalomonBrys
● Gautier Mechling - http://nilhcem.github.io/swift-is-like-kotlin/