This document provides an overview of key Kotlin concepts compared to Java, including:
- Null safety in Kotlin prevents null reference exceptions at compile time by distinguishing nullable and non-nullable types.
- The Elvis operator (?:) provides a shorthand for checking for null values and returning a default.
- Smart casts allow the compiler to infer the type of a variable after checking its type against an if or when condition without needing an explicit cast.
- Kotlin collections APIs provide concise ways to filter, map, sort and iterate over collections compared to Java by leveraging functions like filterNotNull(), sortedBy(), map(), forEach().
The document demonstrates these Kotlin features through code examples
Android & Kotlin - The code awakens #03Omar Miatello
A series of 3 events for building apps with Kotlin on Android.
Introduction to Kotlin, a modern language, developed by JetBrains (those who developed the IDE on which is based Android Studio) that compared to Java is more concise, versatile and with better error handling. The code is 100% interoperable with Java, and can be used to write native Android apps or small component.
Introduction to Kotlin, a modern language, developed by JetBrains (those who developed the IDE on which is based Android Studio) that compared to Java is more concise, versatile and with better error handling. The code is 100% interoperable with Java, and can be used to write native Android apps or small component.
Google Presentation: https://docs.google.com/presentation/d/1XTm-9WnwoiYhyHGamt-dHJBKmkEr3WajDCOGxgfIRsc/edit?usp=sharing
Android & Kotlin - The code awakens #01Omar Miatello
A series of 3 events for building apps with Kotlin on Android.
Introduction to Kotlin, a modern language, developed by JetBrains (those who developed the IDE on which is based Android Studio) that compared to Java is more concise, versatile and with better error handling. The code is 100% interoperable with Java, and can be used to write native Android apps or small component.
Statically typed programming language for the JVM, Android and the browser.
(http://kotlinlang.org/)
Why Kotlin?
Concise: drastically reduce the amount of boilerplate code you need to write.
Safe: avoid entire classes of errors such as null pointer exceptions.
Interoperable: leverage existing frameworks and libraries of the JVM with 100% Java Interoperability.
and more... http://kotlinlang.org/docs/reference/comparison-to-java.html
GeeCON 2017 - TestContainers. Integration testing without the hassleAnton Arhipov
TestContainers is a Java library that supports JUnit tests, providing lightweight, throwaway instances of common databases, Selenium web browsers, or anything else that can run in a Docker container.
Android & Kotlin - The code awakens #03Omar Miatello
A series of 3 events for building apps with Kotlin on Android.
Introduction to Kotlin, a modern language, developed by JetBrains (those who developed the IDE on which is based Android Studio) that compared to Java is more concise, versatile and with better error handling. The code is 100% interoperable with Java, and can be used to write native Android apps or small component.
Introduction to Kotlin, a modern language, developed by JetBrains (those who developed the IDE on which is based Android Studio) that compared to Java is more concise, versatile and with better error handling. The code is 100% interoperable with Java, and can be used to write native Android apps or small component.
Google Presentation: https://docs.google.com/presentation/d/1XTm-9WnwoiYhyHGamt-dHJBKmkEr3WajDCOGxgfIRsc/edit?usp=sharing
Android & Kotlin - The code awakens #01Omar Miatello
A series of 3 events for building apps with Kotlin on Android.
Introduction to Kotlin, a modern language, developed by JetBrains (those who developed the IDE on which is based Android Studio) that compared to Java is more concise, versatile and with better error handling. The code is 100% interoperable with Java, and can be used to write native Android apps or small component.
Statically typed programming language for the JVM, Android and the browser.
(http://kotlinlang.org/)
Why Kotlin?
Concise: drastically reduce the amount of boilerplate code you need to write.
Safe: avoid entire classes of errors such as null pointer exceptions.
Interoperable: leverage existing frameworks and libraries of the JVM with 100% Java Interoperability.
and more... http://kotlinlang.org/docs/reference/comparison-to-java.html
GeeCON 2017 - TestContainers. Integration testing without the hassleAnton Arhipov
TestContainers is a Java library that supports JUnit tests, providing lightweight, throwaway instances of common databases, Selenium web browsers, or anything else that can run in a Docker container.
JEEConf 2017 - Having fun with JavassistAnton Arhipov
Javassist makes Java bytecode manipulation simple. At ZeroTurnaround we use Javassist a lot to implement the integrations for our tools.
In this talk we will go through the examples of how Javassist can be applied to alter the applications behavior and do all kind of fun stuff with it.
Why is it interesting? Because while trying to do unusual things in Java, you learn much more about the language and the platform itself and learning about Javassist will actually make you a better Java developer!
The Guava project contains several of Google’s core libraries that we rely on in our Java-based projects: collections, caching, primitives support, concurrency libraries, common annotations, string processing, I/O, and so forth. There will be the slides presenting most useful and interesting features of Guava (v.12) that makes stuff simpler, better and code cleaner. We will cover most of the com.google.common.base.* classes and basic use of functions in collection and Google collections and few other features that are part of Guava and I find them very useful. Some of you will think that there is an overlap with Apache commons – and it’s true, but Guava is built with expectation that there is a Function and a Predicate class as well as various builders which makes it really cool and simple for many use cases.
Unit testing without Robolectric, Droidcon Berlin 2016Danny Preussler
Are you bound to flaky, slow Robolectric Tests? Do you want to know a way out of it? This session shows ideas and concepts to replace Robolectric from your test code base
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
Presentation in Portuguese (Brazilian) about Kotlin basics. Can be used as reference to the basics of the language. It is specially focused on people with prior development experience, specially in Java.
Understanding bytecode and what bytecode is likely to be generated by a Java compiler helps the Java programmer in the same way that knowledge of assembler helps the C or C++ programmer. Java bytecode is the form of instructions that Java virtual machine executes. This knowledge is crucial when debugging and doing performance and memory usage tuning. The presenter will share his knowledge on what bytecode means for your platform and how to create compiler while using some awesome tools.
Google Guava - Core libraries for Java & AndroidJordi Gerona
Talk at GDG DevFest Barcelona 2013.
The Guava project contains several of Google's core libraries that we rely on in our Java-based projects: collections, caching, primitives support, concurrency libraries, common annotations, string processing, I/O, and so forth.
Slides for the presentation that I made for LambdaConf 2015 in Boulder
Codebase available at http://www.slideshare.net/paulszulc/monads-asking-the-right-question
This presentation is on advanced debugging using Java bytecodes (presented in Core Java meetup on 1st October in Accion Labs). If you are a Java developer and are interested in knowing advanced debugging techniques or understanding bytecodes, this presentation is for you.
Functional programming in Scala. Looking at various examples of defining a program first and executing it at some later stage, separating pure functions from side effects.
JEEConf 2017 - Having fun with JavassistAnton Arhipov
Javassist makes Java bytecode manipulation simple. At ZeroTurnaround we use Javassist a lot to implement the integrations for our tools.
In this talk we will go through the examples of how Javassist can be applied to alter the applications behavior and do all kind of fun stuff with it.
Why is it interesting? Because while trying to do unusual things in Java, you learn much more about the language and the platform itself and learning about Javassist will actually make you a better Java developer!
The Guava project contains several of Google’s core libraries that we rely on in our Java-based projects: collections, caching, primitives support, concurrency libraries, common annotations, string processing, I/O, and so forth. There will be the slides presenting most useful and interesting features of Guava (v.12) that makes stuff simpler, better and code cleaner. We will cover most of the com.google.common.base.* classes and basic use of functions in collection and Google collections and few other features that are part of Guava and I find them very useful. Some of you will think that there is an overlap with Apache commons – and it’s true, but Guava is built with expectation that there is a Function and a Predicate class as well as various builders which makes it really cool and simple for many use cases.
Unit testing without Robolectric, Droidcon Berlin 2016Danny Preussler
Are you bound to flaky, slow Robolectric Tests? Do you want to know a way out of it? This session shows ideas and concepts to replace Robolectric from your test code base
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
Presentation in Portuguese (Brazilian) about Kotlin basics. Can be used as reference to the basics of the language. It is specially focused on people with prior development experience, specially in Java.
Understanding bytecode and what bytecode is likely to be generated by a Java compiler helps the Java programmer in the same way that knowledge of assembler helps the C or C++ programmer. Java bytecode is the form of instructions that Java virtual machine executes. This knowledge is crucial when debugging and doing performance and memory usage tuning. The presenter will share his knowledge on what bytecode means for your platform and how to create compiler while using some awesome tools.
Google Guava - Core libraries for Java & AndroidJordi Gerona
Talk at GDG DevFest Barcelona 2013.
The Guava project contains several of Google's core libraries that we rely on in our Java-based projects: collections, caching, primitives support, concurrency libraries, common annotations, string processing, I/O, and so forth.
Slides for the presentation that I made for LambdaConf 2015 in Boulder
Codebase available at http://www.slideshare.net/paulszulc/monads-asking-the-right-question
This presentation is on advanced debugging using Java bytecodes (presented in Core Java meetup on 1st October in Accion Labs). If you are a Java developer and are interested in knowing advanced debugging techniques or understanding bytecodes, this presentation is for you.
Functional programming in Scala. Looking at various examples of defining a program first and executing it at some later stage, separating pure functions from side effects.
Hear Employment Office’s Employer Branding expert, who has worked on global brands such as Flight Centre Travel Group and Parmalat, discuss why all organisations need to be in control of their employer brand and the steps they need to take to be seen as an employer of distinction.
Operations Excellence in Apparel Logistics: This presentation looks at what operational excellence is and the benefits of being excellent in all aspects of apparel logistics operations.
This presentation shows tools and technologies used in Android Development such as Kotlin, Retrofit, and Room. It also shows different architectural patterns such as MVC, MVP, and MVVM
Ever wonder what this "new" Kotlin thing is? Curious what the syntax looks like? Unsure how to implement this at your own company? Or do you just want to know what Nick and Cody's favorite things are about this language?
All that and (maybe) more are revealed in Privet Kotlin.
Meetup di GDG Italia - Leonardo Pirro - Codemotion Rome 2018 Codemotion
I Google Developer Group (GDG) sono una community internazionale di appassionati delle tecnologie: sviluppatori, designer e startupper. Sono suddivisi per città, e GDG Italia è la famiglia che rappresenta tutti i gruppi presenti sul territorio locale. Mike Trizio e Carmelo Ventimiglia introdurranno i GDG, le loro attività e perchè è utile e divertente farne parte. Leonardo Pirro invece ci introdurrà Kotlin, un linguaggio di programmazione che ha avuto un crescente successo negli ultimi anni. Analizzeremo le caratteristiche principali del linguaggio e i suoi vantaggi/benefici rispetto a Java.
Kotlin for Android Developers - Victor Kropp - Codemotion Rome 2018Codemotion
Kotlin is a programming language developed by JetBrains that targets multiple platforms including the JVM, JavaScript, and native binaries. A year ago it has been adopted as an officially supported language for Android development. Kotlin offers clean and concise syntax, interoperability, both object-oriented and functional code constructs, and a lot of other cool features with little or no overhead. Let's find out together why developers love this language and how it helps them to be productive and have fun!
Introduction to the Kotlin statically typed programming language, a concise and elegant language targeting the Java Virtual Machine (JVM) and Javascript which has good support for functional programming and also object-oriented programming.
Includes examples of key features.
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.
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!
Practical tips for building apps with kotlinAdit Lal
Kotlin with Android
Code snippets and explanation of how kotlin can help do better with less code, it would help to understand the various Kotlin-specific behaviors
This talk would help people to take a swing at kotlin and see it in action
With the announcement on officially supporting Kotlin for Android, this presentation tries to compare Java and Kotlin to encourage people to switch to Kotlin
자프링(자바 + 스프링) 외길 12년차 서버 개발자가 코프링(코틀린 + 스프링)을 만난 후 코틀린의 특징과 스프링의 코틀린 지원을 알아가며 코프링 월드에서 살아남은 이야기…
코드 저장소: https://github.com/arawn/kotlin-support-in-spring
SpringOne Platform 2017
Sébastien Deleuze, Pivotal
"In this new talk, I will explain why Spring <3 Kotlin and how you can leverage Spring official support for Kotlin (in Framework, Boot, Data) to build your next Spring project more efficiently and with more pleasure.
I will describe gradually how you can transform your Spring Boot 1.0 Java + Javascript project with into a Spring Boot 2.0 pure Kotlin project running on top of the new WebFlux functional web framework."
Similar to Android & Kotlin - The code awakens #02 (20)
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Globus
Large Language Models (LLMs) are currently the center of attention in the tech world, particularly for their potential to advance research. In this presentation, we'll explore a straightforward and effective method for quickly initiating inference runs on supercomputers using the vLLM tool with Globus Compute, specifically on the Polaris system at ALCF. We'll begin by briefly discussing the popularity and applications of LLMs in various fields. Following this, we will introduce the vLLM tool, and explain how it integrates with Globus Compute to efficiently manage LLM operations on Polaris. Attendees will learn the practical aspects of setting up and remotely triggering LLMs from local machines, focusing on ease of use and efficiency. This talk is ideal for researchers and practitioners looking to leverage the power of LLMs in their work, offering a clear guide to harnessing supercomputing resources for quick and effective LLM inference.
How Recreation Management Software Can Streamline Your Operations.pptxwottaspaceseo
Recreation management software streamlines operations by automating key tasks such as scheduling, registration, and payment processing, reducing manual workload and errors. It provides centralized management of facilities, classes, and events, ensuring efficient resource allocation and facility usage. The software offers user-friendly online portals for easy access to bookings and program information, enhancing customer experience. Real-time reporting and data analytics deliver insights into attendance and preferences, aiding in strategic decision-making. Additionally, effective communication tools keep participants and staff informed with timely updates. Overall, recreation management software enhances efficiency, improves service delivery, and boosts customer satisfaction.
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Shahin Sheidaei
Games are powerful teaching tools, fostering hands-on engagement and fun. But they require careful consideration to succeed. Join me to explore factors in running and selecting games, ensuring they serve as effective teaching tools. Learn to maintain focus on learning objectives while playing, and how to measure the ROI of gaming in education. Discover strategies for pitching gaming to leadership. This session offers insights, tips, and examples for coaches, team leads, and enterprise leaders seeking to teach from simple to complex concepts.
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Globus
The Earth System Grid Federation (ESGF) is a global network of data servers that archives and distributes the planet’s largest collection of Earth system model output for thousands of climate and environmental scientists worldwide. Many of these petabyte-scale data archives are located in proximity to large high-performance computing (HPC) or cloud computing resources, but the primary workflow for data users consists of transferring data, and applying computations on a different system. As a part of the ESGF 2.0 US project (funded by the United States Department of Energy Office of Science), we developed pre-defined data workflows, which can be run on-demand, capable of applying many data reduction and data analysis to the large ESGF data archives, transferring only the resultant analysis (ex. visualizations, smaller data files). In this talk, we will showcase a few of these workflows, highlighting how Globus Flows can be used for petabyte-scale climate analysis.
Accelerate Enterprise Software Engineering with PlatformlessWSO2
Key takeaways:
Challenges of building platforms and the benefits of platformless.
Key principles of platformless, including API-first, cloud-native middleware, platform engineering, and developer experience.
How Choreo enables the platformless experience.
How key concepts like application architecture, domain-driven design, zero trust, and cell-based architecture are inherently a part of Choreo.
Demo of an end-to-end app built and deployed on Choreo.
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamtakuyayamamoto1800
In this slide, we show the simulation example and the way to compile this solver.
In this solver, the Helmholtz equation can be solved by helmholtzFoam. Also, the Helmholtz equation with uniformly dispersed bubbles can be simulated by helmholtzBubbleFoam.
Cyaniclab : Software Development Agency Portfolio.pdfCyanic lab
CyanicLab, an offshore custom software development company based in Sweden,India, Finland, is your go-to partner for startup development and innovative web design solutions. Our expert team specializes in crafting cutting-edge software tailored to meet the unique needs of startups and established enterprises alike. From conceptualization to execution, we offer comprehensive services including web and mobile app development, UI/UX design, and ongoing software maintenance. Ready to elevate your business? Contact CyanicLab today and let us propel your vision to success with our top-notch IT solutions.
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTier1 app
Even though at surface level ‘java.lang.OutOfMemoryError’ appears as one single error; underlyingly there are 9 types of OutOfMemoryError. Each type of OutOfMemoryError has different causes, diagnosis approaches and solutions. This session equips you with the knowledge, tools, and techniques needed to troubleshoot and conquer OutOfMemoryError in all its forms, ensuring smoother, more efficient Java applications.
In software engineering, the right architecture is essential for robust, scalable platforms. Wix has undergone a pivotal shift from event sourcing to a CRUD-based model for its microservices. This talk will chart the course of this pivotal journey.
Event sourcing, which records state changes as immutable events, provided robust auditing and "time travel" debugging for Wix Stores' microservices. Despite its benefits, the complexity it introduced in state management slowed development. Wix responded by adopting a simpler, unified CRUD model. This talk will explore the challenges of event sourcing and the advantages of Wix's new "CRUD on steroids" approach, which streamlines API integration and domain event management while preserving data integrity and system resilience.
Participants will gain valuable insights into Wix's strategies for ensuring atomicity in database updates and event production, as well as caching, materialization, and performance optimization techniques within a distributed system.
Join us to discover how Wix has mastered the art of balancing simplicity and extensibility, and learn how the re-adoption of the modest CRUD has turbocharged their development velocity, resilience, and scalability in a high-growth environment.
Software Engineering, Software Consulting, Tech Lead.
Spring Boot, Spring Cloud, Spring Core, Spring JDBC, Spring Security,
Spring Transaction, Spring MVC,
Log4j, REST/SOAP WEB-SERVICES.
First Steps with Globus Compute Multi-User EndpointsGlobus
In this presentation we will share our experiences around getting started with the Globus Compute multi-user endpoint. Working with the Pharmacology group at the University of Auckland, we have previously written an application using Globus Compute that can offload computationally expensive steps in the researcher's workflows, which they wish to manage from their familiar Windows environments, onto the NeSI (New Zealand eScience Infrastructure) cluster. Some of the challenges we have encountered were that each researcher had to set up and manage their own single-user globus compute endpoint and that the workloads had varying resource requirements (CPUs, memory and wall time) between different runs. We hope that the multi-user endpoint will help to address these challenges and share an update on our progress here.
Globus Connect Server Deep Dive - GlobusWorld 2024Globus
We explore the Globus Connect Server (GCS) architecture and experiment with advanced configuration options and use cases. This content is targeted at system administrators who are familiar with GCS and currently operate—or are planning to operate—broader deployments at their institution.
Understanding Globus Data Transfers with NetSageGlobus
NetSage is an open privacy-aware network measurement, analysis, and visualization service designed to help end-users visualize and reason about large data transfers. NetSage traditionally has used a combination of passive measurements, including SNMP and flow data, as well as active measurements, mainly perfSONAR, to provide longitudinal network performance data visualization. It has been deployed by dozens of networks world wide, and is supported domestically by the Engagement and Performance Operations Center (EPOC), NSF #2328479. We have recently expanded the NetSage data sources to include logs for Globus data transfers, following the same privacy-preserving approach as for Flow data. Using the logs for the Texas Advanced Computing Center (TACC) as an example, this talk will walk through several different example use cases that NetSage can answer, including: Who is using Globus to share data with my institution, and what kind of performance are they able to achieve? How many transfers has Globus supported for us? Which sites are we sharing the most data with, and how is that changing over time? How is my site using Globus to move data internally, and what kind of performance do we see for those transfers? What percentage of data transfers at my institution used Globus, and how did the overall data transfer performance compare to the Globus users?
Developing Distributed High-performance Computing Capabilities of an Open Sci...Globus
COVID-19 had an unprecedented impact on scientific collaboration. The pandemic and its broad response from the scientific community has forged new relationships among public health practitioners, mathematical modelers, and scientific computing specialists, while revealing critical gaps in exploiting advanced computing systems to support urgent decision making. Informed by our team’s work in applying high-performance computing in support of public health decision makers during the COVID-19 pandemic, we present how Globus technologies are enabling the development of an open science platform for robust epidemic analysis, with the goal of collaborative, secure, distributed, on-demand, and fast time-to-solution analyses to support public health.
Code reviews are vital for ensuring good code quality. They serve as one of our last lines of defense against bugs and subpar code reaching production.
Yet, they often turn into annoying tasks riddled with frustration, hostility, unclear feedback and lack of standards. How can we improve this crucial process?
In this session we will cover:
- The Art of Effective Code Reviews
- Streamlining the Review Process
- Elevating Reviews with Automated Tools
By the end of this presentation, you'll have the knowledge on how to organize and improve your code review proces
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteGoogle
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
👉👉 Click Here To Get More Info 👇👇
https://sumonreview.com/ai-pilot-review/
AI Pilot Review: Key Features
✅Deploy AI expert bots in Any Niche With Just A Click
✅With one keyword, generate complete funnels, websites, landing pages, and more.
✅More than 85 AI features are included in the AI pilot.
✅No setup or configuration; use your voice (like Siri) to do whatever you want.
✅You Can Use AI Pilot To Create your version of AI Pilot And Charge People For It…
✅ZERO Manual Work With AI Pilot. Never write, Design, Or Code Again.
✅ZERO Limits On Features Or Usages
✅Use Our AI-powered Traffic To Get Hundreds Of Customers
✅No Complicated Setup: Get Up And Running In 2 Minutes
✅99.99% Up-Time Guaranteed
✅30 Days Money-Back Guarantee
✅ZERO Upfront Cost
See My Other Reviews Article:
(1) TubeTrivia AI Review: https://sumonreview.com/tubetrivia-ai-review
(2) SocioWave Review: https://sumonreview.com/sociowave-review
(3) AI Partner & Profit Review: https://sumonreview.com/ai-partner-profit-review
(4) AI Ebook Suite Review: https://sumonreview.com/ai-ebook-suite-review
A Comprehensive Look at Generative AI in Retail App Testing.pdfkalichargn70th171
Traditional software testing methods are being challenged in retail, where customer expectations and technological advancements continually shape the landscape. Enter generative AI—a transformative subset of artificial intelligence technologies poised to revolutionize software testing.
Navigating the Metaverse: A Journey into Virtual Evolution"Donna Lenk
Join us for an exploration of the Metaverse's evolution, where innovation meets imagination. Discover new dimensions of virtual events, engage with thought-provoking discussions, and witness the transformative power of digital realms."
2. Omar Miatello
Member of GDG Milano (Italy)
Android Developer @ Satispay
Personal profile
google.com/+OmarMiatello
Google+ Community: Kotlin for Android
goo.gl/mUKF1w
Google Presentation
#01 goo.gl/0jHLmE
#02 goo.gl/h3uG8M
#03 goo.gl/hnwvqu
Google Photo
#01 goo.gl/photos/cKP9L6zqZcxDRGzQ8
#02 goo.gl/photos/sXdpkbihCi5xAAnx7
#03 goo.gl/photos/P6kGhLE8yrWYnhAW6
3. Previously on Android & Kotlin #01: goo.gl/0jHLmE
Properties
val a: Int = 1 // val = READ ONLY (getter)
var b: Int = 1 // var = READ/WRITE (getter/setter)
String templates
"My name is $name $surname"
Lambdas
view.setOnClickListener { Log.d("TAG", "Item clicked!") }
Delegated properties (example: lazy)
val item by lazy { MyItem() }
4. dummy/HeroAdapter.java
public class HeroAdapter extends RecyclerView.Adapter<HeroAdapter.ViewHolder> {
private final List<HeroItem> mValues;
private final HeroOnClickListener mListener;
public HeroAdapter(List<HeroItem> items, HeroOnClickListener listener) {
mValues = items;
mListener = listener;
}
@Override
public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_hero, parent, false);
return new ViewHolder(view);
}
@Override
public void onBindViewHolder(final ViewHolder holder, int position) {
HeroItem item = mValues.get(position);
“Convert Java File to Kotlin File”
CTRL + ALT + SHIFT + K
(or CMD + ALT + SHIFT + K)
5. Kotlin vs Java - Part 2
Null-safety
Elvis Operator
Smart-cast
Collections
6. class MyKotlinClass {
val a: String = "ciao"
val b: String = null // Error at compile time
}
#5 Kotlin - Null Safety
http://kotlinlang.org/docs/reference/null-safety.html
vs
7. class MyKotlinClass {
val a: String = "ciao"
val b: String = null // Error at compile time
val c: String? = null
val d: String? = "ok"
}
#5 Kotlin - Null Safety
http://kotlinlang.org/docs/reference/null-safety.html
vs
8. class MyKotlinClass {
val a: String = "ciao"
val b: String = null // Error at compile time
val c: String? = null
val d: String? = "ok"
fun example(e: String, f: String?) {
e.length()
f.length() // Error at compile time
}
}
static class MyUtils {
void example(String e, String f) {
e.length(); // throw NullPointerException?
f.length(); // throw NullPointerException?
}
}
#5 Kotlin - Null Safety
http://kotlinlang.org/docs/reference/null-safety.html
vs
9. class MyKotlinClass {
val a: String = "ciao"
val b: String = null // Error at compile time
val c: String? = null
val d: String? = "ok"
fun example(e: String, f: String?) {
e.length()
f.length() // Error at compile time
f?.length()
}
}
static class MyUtils {
void example(String e, String f) {
e.length(); // throw NullPointerException?
f.length(); // throw NullPointerException?
}
}
#5 Kotlin - Null Safety
http://kotlinlang.org/docs/reference/null-safety.html
vs
10. class MyKotlinClass {
val a: String = "ciao"
val b: String = null // Error at compile time
val c: String? = null
val d: String? = "ok"
fun example(e: String, f: String?) {
e.length()
f.length() // Error at compile time
f?.length()
if (f != null) {
f.length()
}
}
}
static class MyUtils {
void example(String e, String f) {
e.length(); // throw NullPointerException?
f.length(); // throw NullPointerException?
if (e != null) {
e.length();
}
if (f != null) {
e.length();
}
}
}
#5 Kotlin - Null Safety
http://kotlinlang.org/docs/reference/null-safety.html
vs
11. val map = mapOf(
"dog" to "woof",
"cat" to "meow",
"bird" to "tweet",
"mouse" to "squeek")
fun sound(animal: String): String? {
return map.get(animal)
}
class MyUtils {
static Map<String, String> map = // ...
static String sound(String animal) {
return map.get(animal);
}
}
#6 Kotlin - Elvis Operator
http://kotlinlang.org/docs/reference/idioms.html#if-not-null-and-else-shorthand
vs
12. val map = mapOf(
"dog" to "woof",
"cat" to "meow",
"bird" to "tweet",
"mouse" to "squeek")
fun sound(animal: String): String? {
return map.get(animal)
}
fun example() {
val foxSay = sound("fox") ?: "No one knows"
}
class MyUtils {
static Map<String, String> map = // ...
static String sound(String animal) {
return map.get(animal);
}
static void example() {
String s = sound("fox");
String foxSay =
s != null ? s : "No one knows";
}
}
#6 Kotlin - Elvis Operator
http://kotlinlang.org/docs/reference/idioms.html#if-not-null-and-else-shorthand
vs
13. val map = mapOf(
"dog" to "woof",
"cat" to "meow",
"bird" to "tweet",
"mouse" to "squeek")
fun sound(animal: String): String? {
return map.get(animal)
}
fun example() {
val foxSay = sound("fox") ?: "No one knows"
}
class MyUtils {
static Map<String, String> map = // ...
static String sound(String animal) {
return map.get(animal);
}
static void example() {
String s = sound("fox");
String foxSay =
s != null ? s : "No one knows";
}
}
#6 Kotlin - Elvis Operator
http://kotlinlang.org/docs/reference/idioms.html#if-not-null-and-else-shorthand
vs
14. class MyUtils {
static void example(View myView) {
if (myView instanceof ImageView) {
}
}
}
#7 Kotlin - Smart Cast
http://kotlinlang.org/docs/reference/typecasts.html#smart-casts
vs
15. class MyUtils {
static void example(View myView) {
if (myView instanceof ImageView) {
ImageView imageView =
(ImageView) myView;
}
}
}
#7 Kotlin - Smart Cast
http://kotlinlang.org/docs/reference/typecasts.html#smart-casts
vs
16. class MyUtils {
static void example(View myView) {
if (myView instanceof ImageView) {
ImageView imageView =
(ImageView) myView;
imageView.setImageAlpha(10);
}
}
}
#7 Kotlin - Smart Cast
http://kotlinlang.org/docs/reference/typecasts.html#smart-casts
vs
18. fun example1(myView: View) {
if (myView is ImageView) {
myView.setImageAlpha(10)
} else if (myView is TextView) {
myView.setText("Ciao")
}
}
class MyUtils {
static void example(View myView) {
if (myView instanceof ImageView) {
ImageView imageView =
(ImageView) myView;
imageView.setImageAlpha(10);
} else if (myView instanceof TextView) {
TextView textView = (TextView) myView;
textView.setText("Ciao");
}
}
}
#7 Kotlin - Smart Cast
http://kotlinlang.org/docs/reference/typecasts.html#smart-casts
vs
19. fun example1(myView: View) {
if (myView is ImageView) {
myView.setImageAlpha(10)
} else if (myView is TextView) {
myView.setText("Ciao")
}
}
fun example2(myView: View) {
when (myView) {
is ImageView -> myView.imageAlpha = 10
is TextView -> myView.text = "Ciao"
}
}
class MyUtils {
static void example(View myView) {
if (myView instanceof ImageView) {
ImageView imageView =
(ImageView) myView;
imageView.setImageAlpha(10);
} else if (myView instanceof TextView) {
TextView textView = (TextView) myView;
textView.setText("Ciao");
}
}
}
#7 Kotlin - Smart Cast
http://kotlinlang.org/docs/reference/typecasts.html#smart-casts
vs
20. fun example() {
val os = listOf("Android", "iOS", null,
"Windows Phone")
}
class MyUtils {
static void example() {
List<String> os = Arrays.asList("Android",
"iOS", null, "Windows Phone");
}
}
#8 Kotlin - Using collections
http://kotlinlang.org/docs/reference/basic-syntax.html#using-collections
vs
21. fun example() {
val os = listOf("Android", "iOS", null,
"Windows Phone")
os.filterNotNull()
}
class MyUtils {
static void example() {
List<String> os = Arrays.asList("Android",
"iOS", null, "Windows Phone");
List<String> osNotNull = new ArrayList<>();
for (String name : os) {
if (name != null) osNotNull.add(name);
}
}
}
#8 Kotlin - Using collections
http://kotlinlang.org/docs/reference/basic-syntax.html#using-collections
vs
22. fun example() {
val os = listOf("Android", "iOS", null,
"Windows Phone")
os.filterNotNull().sortedBy { it.length() }
}
class MyUtils {
static void example() {
List<String> os = Arrays.asList("Android",
"iOS", null, "Windows Phone");
List<String> osNotNull = new ArrayList<>();
for (String name : os) {
if (name != null) osNotNull.add(name);
}
Collections.sort(osNotNull, new
Comparator<String>() { @Override
public int compare(String l, String r) {
return r.length() - l.length();
}
});
}
}
#8 Kotlin - Using collections
http://kotlinlang.org/docs/reference/basic-syntax.html#using-collections
vs
23. fun example() {
val os = listOf("Android", "iOS", null,
"Windows Phone")
os.filterNotNull().sortedBy { it.length() }
.map { it.toUpperCase() }
}
class MyUtils {
static void example() {
List<String> os = Arrays.asList("Android",
"iOS", null, "Windows Phone");
List<String> osNotNull = new ArrayList<>();
for (String name : os) {
if (name != null) osNotNull.add(name);
}
Collections.sort(osNotNull, new
Comparator<String>() { @Override
public int compare(String l, String r) {
return l.length() - r.length();
}
});
for (String name : osNotNull) {
String value = name.toUpperCase();
}
}
}
#8 Kotlin - Using collections
http://kotlinlang.org/docs/reference/basic-syntax.html#using-collections
vs
24. fun example() {
val os = listOf("Android", "iOS", null,
"Windows Phone")
os.filterNotNull().sortedBy { it.length() }
.map { it.toUpperCase() }
.forEach { print(it) }
}
class MyUtils {
static void example() {
List<String> os = Arrays.asList("Android",
"iOS", null, "Windows Phone");
List<String> osNotNull = new ArrayList<>();
for (String name : os) {
if (name != null) osNotNull.add(name);
}
Collections.sort(osNotNull, new
Comparator<String>() { @Override
public int compare(String l, String r) {
return l.length() - r.length();
}
});
for (String name : osNotNull) {
String value = name.toUpperCase();
print(value);
}
} }
#8 Kotlin - Using collections
http://kotlinlang.org/docs/reference/basic-syntax.html#using-collections
vs
32. MainActivity.kt
class MainActivity : AppCompatActivity() {
private var currentHero: HeroItem? = null
private val adapter by lazy {
HeroAdapter(HeroDummyContent.ITEMS) {
// onItemClick ...
}
}
// ...
}
33. MainActivity.kt > adapter (lazy)
HeroAdapter(HeroDummyContent.ITEMS) { // onClick
val previousHero = currentHero
if (previousHero != null) { // fight
val conclusion = if (previousHero.power == it.power) {
"It's a draw"
} else if (previousHero.power > it.power) {
"${previousHero.name} wins!"
} else {
"${it.name} wins!"
}
Snackbar.make(fab, "${previousHero.name} vs ${it.name}!n$conclusion", Snackbar.LENGTH_LONG).show()
currentHero = null
} else { // assign current hero
Snackbar.make(fab, "Choose: ${it.name}", Snackbar.LENGTH_SHORT).show()
currentHero = it
}
}
34. MainActivity.kt > adapter (lazy) > Smart cast
HeroAdapter(HeroDummyContent.ITEMS) { // onClick
val previousHero = currentHero
if (previousHero != null) { // fight
val conclusion = if (previousHero.power == it.power) {
"It's a draw"
} else if (previousHero.power > it.power) {
"${previousHero.name} wins!"
} else {
"${it.name} wins!"
}
Snackbar.make(fab, "${previousHero.name} vs ${it.name}!n$conclusion", Snackbar.LENGTH_LONG).show()
currentHero = null
} else { // assign current hero
Snackbar.make(fab, "Choose: ${it.name}", Snackbar.LENGTH_SHORT).show()
currentHero = it
}
}
35. MainActivity.kt > adapter (lazy) > return if expression
HeroAdapter(HeroDummyContent.ITEMS) { // onClick
val previousHero = currentHero
if (previousHero != null) { // fight
val conclusion = if (previousHero.power == it.power) {
"It's a draw"
} else if (previousHero.power > it.power) {
"${previousHero.name} wins!"
} else {
"${it.name} wins!"
}
Snackbar.make(fab, "${previousHero.name} vs ${it.name}!n$conclusion", Snackbar.LENGTH_LONG).show()
currentHero = null
} else { // assign current hero
Snackbar.make(fab, "Choose: ${it.name}", Snackbar.LENGTH_SHORT).show()
currentHero = it
}
}
36. Questions?
Developers playground - #EX2
- Aggiungere le proprietà a HeroItem: hair (String?), eyes (String?)
- Mostrarle (se presenti) nella lista
- Se vengono scelti 2 eroi di sesso opposto, viene creato un nuovo eroe
- Si possono usare le proprietà dei genitori, oppure dei valori di default se
mancano
Start with: https://github.com/jacklt/KotlinExample/tree/ex1
Solution: https://github.com/jacklt/KotlinExample/tree/ex2