The document discusses mixing Scala and Kotlin code. It provides reasons why a company using Scala may want to adopt Kotlin, such as it being easier for mobile developers who prefer Kotlin. It also notes reasons to continue using Scala, like existing Scala code and its powerful features. The document outlines some challenges in mixing the languages, like differences in collections and functions, but provides solutions like converting between the types. It recommends it is easier to call Kotlin from Scala than the other way around.
This document discusses how AI can be used to train personalized avatars in the metaverse. It begins by outlining the speaker's background in AI and VR. The speaker then proposes that advances in tracking technologies can improve immersion for avatars. Deep reinforcement learning techniques that model complex human behavior could be used to capture individuals' mannerisms and personalities, allowing customized AI-powered avatars to represent users when they are offline. These digital representations could also be traded as NFTs or used to enhance interactions across different virtual reality platforms. The goal is to build avatars that can authentically share aspects of human uniqueness and identity in the metaverse.
This document discusses how AI can be used to train personalized avatars in the metaverse. It begins by outlining the speaker's background in AI and VR. The speaker then proposes that advances in tracking technologies can improve immersion for avatars. Deep reinforcement learning techniques that model complex human behavior could be used to capture individuals' mannerisms and personalities, allowing customized AI-powered avatars to represent users when they are offline. These digital representations could also be traded as NFTs or used to enhance interactions across different virtual reality platforms. The goal is to build avatars that can authentically share aspects of human uniqueness and identity in the metaverse.
There are several types of cryptocurrency wallets including mobile, desktop, online, hardware, full node, and universal wallets. Mobile wallets can be used anywhere but have limited storage, while desktop wallets are downloaded to a computer. Online wallets allow access from any device but are cloud-based. Hardware wallets have the highest security as they can be taken offline, and full node wallets verify transactions locally. A universal wallet supports multiple cryptocurrencies. It is important to choose a wallet that fits your needs and takes precautions to protect private keys and passwords.
Using ChatGPT can be helpful in presentations to explain concepts in easy-to-understand terms.
Pairing that with Dall-E 2 can make your slides fun and interesting.
Presented at GoTo Night Zurich, June 12 2014
Many teams struggle with the implementation of user story acceptance criteria and establishing a shared understanding about the expected story outcomes. This results in missed stakeholder expectations and ad-hoc assumptions made by the team. High efforts for regression testing and the lack of a reliable documentation about the current system behavior are further problems resulting from an unstructured approach to define and validate acceptance criteria.
In this session, you will learn how specification-by-example addresses these problems and overall increases the level of clarity on the project end-to-end. The presentation will cover the theory and practical experience from real projects, with concrete implementation examples based on the Gherkin specification language, that can be used for automated specification validation (available for .NET, Java, Ruby, PHP, JavaScript).
You will leave this session with a fundamental understanding of specification-by-example and its benefits, as well as concrete pointers on how to get started using it in your own projects.
This document provides 10 ways to teach kids how to code with suggestions for different age ranges. It recommends starting with maze and board games for ages 4-8. Then moving to the Hour of Code for ages 6-12+ and animation using Scratch for ages 8-16. Other suggestions include making websites for ages 8+, learning actual coding languages for ages 6+, fostering interests through contests and courses for all ages, using hardware like Arduino for ages 7+, robots for ages 4+, and teaching coding to others for age 7+.
The document discusses whether the metaverse is the next big thing. It describes the metaverse as a collection of 3D virtual worlds where users can access activities and create avatars. Many large companies like Facebook, Microsoft, and Roblox are investing heavily in developing metaverse technologies. Key elements needed for the metaverse include infrastructure, human interfaces, decentralization, spatial computing, and support for a creator economy. The possibilities of the metaverse include virtual tourism and remote learning.
As per Gartner’s top strategic predictions for 2018 report more than 50% of enterprises will spend more on chatbots and bot creation by 2021.
After processing more than a billion consumer chats and solving business challenges for enterprises, we at Haptik bring to you “top 3 business problems chatbots solve best”.
This interactive webinar by our Business Head - Kartik Poddar will help you understand the best chatbot use case for your business and a lot more.
Every business can use a chatbot. Think your business needs one but don't know how to decide?
Get in touch & we'll help you out: https://haptik.ai/contact-us
A non-fungible token or NFT is a type of digital token. This type of token can’t be interchanged or replaced as every token comes with unique attributes. Understanding how NFTs work is very important. However, to do that, we need to look into the fundamentals behind this technology.
NFTs use public blockchain platforms to function. At this time, Ethereum is the most popular public platform that many of the NFT projects are using for storing or minting NFTs. Due to using blockchain, transparency regarding NFT ownership is high, as anyone can see the ownership status. ERC-721 and ERC-1155 are the only 2 token standards that can help create NFTs.
To help you better understand how NFT works, we at 101 Blockchains offer an array of courses that will help you better comprehend the topic. More so, we have an exclusive course on NFT, where we cover every single element within the ecosystem.
The following courses will help you learn about NFTs->
NFT Fundamentals Course
https://academy.101blockchains.com/courses/nft-fundamentals
Ethereum Development Fundamentals Course
https://academy.101blockchains.com/courses/ethereum-development-fundamentals
Learn more about the certification courses from here ->
Certified Enterprise Blockchain Professional (CEBP) course
https://academy.101blockchains.com/courses/blockchain-expert-certification
Certified Enterprise Blockchain Architect (CEBA) course
https://academy.101blockchains.com/courses/certified-enterprise-blockchain-architect
Certified Blockchain Security Expert (CBSE) course
https://academy.101blockchains.com/courses/certified-blockchain-security-expert
Learn more from our guides ->
https://101blockchains.com/non-fungible-tokens-nft/
https://101blockchains.com/nft-minting/
https://101blockchains.com/buy-and-sell-nfts/
https://101blockchains.com/nft-in-blockchain/
https://101blockchains.com/nft-marketplace/
https://101blockchains.com/types-of-non-fungible-tokens/
https://101blockchains.com/nft-attributes/
https://101blockchains.com/best-nft-wallets/
https://101blockchains.com/sell-nfts-on-shopify/
This document summarizes Mosa Siru's engineering work at DeNA and Gunosy. It describes Gunosy's RSS/Atom feed crawler system which includes components like a job queue, fetcher, parser, updater, content generator, and indexer. It also discusses technologies used like Python, Celery, MySQL, S3, Elasticsearch. The system is designed to efficiently parse, store, generate content and index feeds at scale.
Kotlin was created by JetBrains to improve developer productivity and enjoyment when building tools like IntelliJ IDEA. Some key features of Kotlin include properties, smart casts, extension functions, and null safety. Kotlin works well for server-side development using frameworks like Kara and Exposed, as well as Android development using Android Extensions and Anko. To succeed with Kotlin, developers should take initiative by starting with tests and utilities in existing Java projects rather than waiting for new projects.
The things we don't see – stories of Software, Scala and AkkaKonrad Malawski
The document discusses some of the unseen aspects of software, programming languages, and distributed systems. It covers topics like tradeoffs that must be made in software but are not visible, the impact of blocking code in Akka applications, and how traits are represented differently in Scala depending on the version. Messages are emphasized as a core abstraction in Akka rather than method calls. Some hidden features of ScalaDoc are also shown.
There are several types of cryptocurrency wallets including mobile, desktop, online, hardware, full node, and universal wallets. Mobile wallets can be used anywhere but have limited storage, while desktop wallets are downloaded to a computer. Online wallets allow access from any device but are cloud-based. Hardware wallets have the highest security as they can be taken offline, and full node wallets verify transactions locally. A universal wallet supports multiple cryptocurrencies. It is important to choose a wallet that fits your needs and takes precautions to protect private keys and passwords.
Using ChatGPT can be helpful in presentations to explain concepts in easy-to-understand terms.
Pairing that with Dall-E 2 can make your slides fun and interesting.
Presented at GoTo Night Zurich, June 12 2014
Many teams struggle with the implementation of user story acceptance criteria and establishing a shared understanding about the expected story outcomes. This results in missed stakeholder expectations and ad-hoc assumptions made by the team. High efforts for regression testing and the lack of a reliable documentation about the current system behavior are further problems resulting from an unstructured approach to define and validate acceptance criteria.
In this session, you will learn how specification-by-example addresses these problems and overall increases the level of clarity on the project end-to-end. The presentation will cover the theory and practical experience from real projects, with concrete implementation examples based on the Gherkin specification language, that can be used for automated specification validation (available for .NET, Java, Ruby, PHP, JavaScript).
You will leave this session with a fundamental understanding of specification-by-example and its benefits, as well as concrete pointers on how to get started using it in your own projects.
This document provides 10 ways to teach kids how to code with suggestions for different age ranges. It recommends starting with maze and board games for ages 4-8. Then moving to the Hour of Code for ages 6-12+ and animation using Scratch for ages 8-16. Other suggestions include making websites for ages 8+, learning actual coding languages for ages 6+, fostering interests through contests and courses for all ages, using hardware like Arduino for ages 7+, robots for ages 4+, and teaching coding to others for age 7+.
The document discusses whether the metaverse is the next big thing. It describes the metaverse as a collection of 3D virtual worlds where users can access activities and create avatars. Many large companies like Facebook, Microsoft, and Roblox are investing heavily in developing metaverse technologies. Key elements needed for the metaverse include infrastructure, human interfaces, decentralization, spatial computing, and support for a creator economy. The possibilities of the metaverse include virtual tourism and remote learning.
As per Gartner’s top strategic predictions for 2018 report more than 50% of enterprises will spend more on chatbots and bot creation by 2021.
After processing more than a billion consumer chats and solving business challenges for enterprises, we at Haptik bring to you “top 3 business problems chatbots solve best”.
This interactive webinar by our Business Head - Kartik Poddar will help you understand the best chatbot use case for your business and a lot more.
Every business can use a chatbot. Think your business needs one but don't know how to decide?
Get in touch & we'll help you out: https://haptik.ai/contact-us
A non-fungible token or NFT is a type of digital token. This type of token can’t be interchanged or replaced as every token comes with unique attributes. Understanding how NFTs work is very important. However, to do that, we need to look into the fundamentals behind this technology.
NFTs use public blockchain platforms to function. At this time, Ethereum is the most popular public platform that many of the NFT projects are using for storing or minting NFTs. Due to using blockchain, transparency regarding NFT ownership is high, as anyone can see the ownership status. ERC-721 and ERC-1155 are the only 2 token standards that can help create NFTs.
To help you better understand how NFT works, we at 101 Blockchains offer an array of courses that will help you better comprehend the topic. More so, we have an exclusive course on NFT, where we cover every single element within the ecosystem.
The following courses will help you learn about NFTs->
NFT Fundamentals Course
https://academy.101blockchains.com/courses/nft-fundamentals
Ethereum Development Fundamentals Course
https://academy.101blockchains.com/courses/ethereum-development-fundamentals
Learn more about the certification courses from here ->
Certified Enterprise Blockchain Professional (CEBP) course
https://academy.101blockchains.com/courses/blockchain-expert-certification
Certified Enterprise Blockchain Architect (CEBA) course
https://academy.101blockchains.com/courses/certified-enterprise-blockchain-architect
Certified Blockchain Security Expert (CBSE) course
https://academy.101blockchains.com/courses/certified-blockchain-security-expert
Learn more from our guides ->
https://101blockchains.com/non-fungible-tokens-nft/
https://101blockchains.com/nft-minting/
https://101blockchains.com/buy-and-sell-nfts/
https://101blockchains.com/nft-in-blockchain/
https://101blockchains.com/nft-marketplace/
https://101blockchains.com/types-of-non-fungible-tokens/
https://101blockchains.com/nft-attributes/
https://101blockchains.com/best-nft-wallets/
https://101blockchains.com/sell-nfts-on-shopify/
This document summarizes Mosa Siru's engineering work at DeNA and Gunosy. It describes Gunosy's RSS/Atom feed crawler system which includes components like a job queue, fetcher, parser, updater, content generator, and indexer. It also discusses technologies used like Python, Celery, MySQL, S3, Elasticsearch. The system is designed to efficiently parse, store, generate content and index feeds at scale.
Kotlin was created by JetBrains to improve developer productivity and enjoyment when building tools like IntelliJ IDEA. Some key features of Kotlin include properties, smart casts, extension functions, and null safety. Kotlin works well for server-side development using frameworks like Kara and Exposed, as well as Android development using Android Extensions and Anko. To succeed with Kotlin, developers should take initiative by starting with tests and utilities in existing Java projects rather than waiting for new projects.
The things we don't see – stories of Software, Scala and AkkaKonrad Malawski
The document discusses some of the unseen aspects of software, programming languages, and distributed systems. It covers topics like tradeoffs that must be made in software but are not visible, the impact of blocking code in Akka applications, and how traits are represented differently in Scala depending on the version. Messages are emphasized as a core abstraction in Akka rather than method calls. Some hidden features of ScalaDoc are also shown.
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
Anko is a library that reduces boilerplate code in Android development using Kotlin. It has four main parts: Anko Commons, Anko Layouts, Anko SQLite, and Anko Coroutines. Anko Commons simplifies tasks like creating intents and dialogs. Anko Layouts allows defining UI with a DSL instead of XML for type safety and null safety. Anko SQLite helps with database operations. Anko Coroutines integrates coroutines into Android. The presentation compares code samples with and without Anko to demonstrate how it reduces boilerplate. It also discusses using AnkoComponents to define custom UI elements and keep the code separated.
Why scala is not my ideal language and what I can do with thisRuslan Shevchenko
- The document discusses some of the author's criticisms of Scala, including its use of implicit parameters to configure runtime behavior, and lack of good support for asynchronous programming.
- The author proposes some workarounds, like annotating imports to avoid implicit conflicts, and patching the compiler to add more information to Future exceptions. However, the ideal solution would be language changes or improvements to asynchronous abstractions like Async.
- Overall, the author argues that Scala is not ideal for some use cases like asynchronous programming, but provides some workarounds people can use in the meantime. The best solutions require changes to the language and standard library.
ScalaDays 2013 Keynote Speech by Martin OderskyTypesafe
Scala gives you awesome expressive power, but how to make best use of it? In my talk I will discuss the question what makes good Scala style. We will start with syntax and continue with how to name things, how to mix objects and functions, where (and where not) to use mutable state, and when to use which design pattern. As most questions of style, the discussion will be quite subjective, and some of it might be controversial. I am looking forward to discuss these topics with the conference attendees.
Power Up Your Build - Omer van Kloeten @ Wix 2018-04Omer van Kloeten
I was invited to give this talk at the Wix Backend Guild Day, an internal event which was broadcast live internationally, on 2018-04-12
Video: https://youtu.be/cQ7UvUybceA
These days sbt is the de-facto build tool for Scala, but most of us just write the minimum viable build.sbt file, import the libraries we need (and maybe throw in some sbt-assembly) and forget about it.
In this Good Practices session, you will learn about making your build safer and more robust by making the Scala compiler work for you and through using some sbt plugins.
This talk will be quite high-level. There will be no need for prior knowledge of sbt and it should be beneficial for you even if you don’t use sbt.
Rory Preddy gave a presentation on polyglot programming. He defined a polyglot programmer as someone who uses multiple programming languages in a single application. He discussed polyglot paradigm programming, which combines multiple programming paradigms like object-oriented, functional, and logic paradigms. He also discussed polyglot systems, which use different languages for different parts of a multi-tiered project based on which language is best suited. He provided examples of domain-specific languages, dynamic languages, and stable core languages used in polyglot systems. Finally, he discussed benefits and challenges of polyglot programming and how to get started with it.
This document provides an overview of an object-oriented programming workshop. The schedule includes checking in from 10:00-10:15, workshops from 10:15-11:30 and 11:50-12:50, and a break from 11:30-11:50. The mission is to not only teach OOP concepts but show how they provide solutions to real-world software problems. The overview compares OOP to procedural and functional programming. Core OOP concepts covered include classes, objects, encapsulation, inheritance, polymorphism, and abstraction. Code examples are provided in Ruby, Java, and JavaScript to demonstrate these concepts.
This document discusses two little functions (assoc and subs), one big macro (dosync), and the calc function. It provides examples of using the calc function to perform basic arithmetic operations like addition, subtraction, multiplication, and division. It also outlines upcoming homework assignments involving creating new functions from Clojure.core and functions for calculating car taxes and modeling bank account transactions with unit tests.
This document provides an overview and agenda for a presentation on Scala game development using LibGDX and RxJava. The presentation will introduce Scala, promote LibGDX, discuss reactive functional programming, and provide a functional perspective on games. It will give a small tour of functional reactive programming in Scala using Observables. The presentation will also discuss implementing a type-safe Entity-Component-System game architecture in Scala.
Design Summit - UI Roadmap - Dan Clarizio, Martin PovolnyManageIQ
The UI, while fullty-features, is intimidating to new users. The roadmap for the UI is to make it more intuitive and navigable for new users.
For more on ManageIQ, see http://manageiq.org/
This document introduces meta-programming in Scala. It discusses how Scalameta allows treating programs as data by providing APIs to read, analyze, transform and generate Scala programs. Scalameta represents programs as syntax trees and provides utilities like Scalafmt and Scalafix. SemanticDB extracts semantic information from programs to enable features like code navigation and semantic code analysis. The document provides examples of using Scalameta to work with syntax trees and SemanticDB.
The document summarizes a Scala meetup discussing functional programming concepts and techniques. It covers topics like monadic IO, monad transformers, free monads, tagless final encoding, and domain specific languages. Sample code is provided demonstrating storing a file using monadic IO and rewriting it without side effects using equational reasoning.
1. Qt is a cross-platform application development framework written in C++ that allows developers to write once and deploy applications across desktop and mobile platforms like Windows, Mac, Linux and embedded systems.
2. Qt provides modules for user interfaces, databases, networking, multimedia and more that have a common API design. It extends C++ with macros and introspection.
3. The presentation demonstrated a simple "Hello World" Qt application and introduced Qt Creator as the IDE for Qt development. It also covered signals and slots, stylesheets, deployment and the Qt Mobility APIs for mobile.
Bekket McClane gave a presentation on moving from the Android NDK to AOSP. The presentation covered the Android NDK introduction and JNI programming. It provided an overview of AOSP including the zygote process and Binder IPC. An example was shown for controlling the vibrator using C/C++ Binder APIs by accessing libraries from AOSP. The steps included building AOSP libraries, creating an Android.mk file, and interacting with the vibrator service via a fake AIDL interface. Questions were invited via the speaker's online accounts.
Kotlin is a statically typed programming language that runs on the Java Virtual Machine (JVM) and is fully interoperable with Java. Some key features of Kotlin include being less verbose than Java, property-based accessors, lambdas and type inference, which allow code to be more concise and readable. Kotlin aims to be practical for building large applications and introduces modern language features while also having a smooth learning curve for Java developers.
Slides from a talk and live-coding session about Koin, a pragmatic and lightweight Dependency Injection framework for Kotlin. This talk was given at Auckland Android Community on Dec 5.
https://www.meetup.com/Android-Meetup/events/256734688/
Monix, a functional library a substitute cum extension to Monix, download this slides which highlight major modules of it and some places where Monix offers functional and cleaner APIs for both Java and Scala wrt existing concurrency APIs in both of the above languages.
Spring helps developers adapt to change by providing tools and frameworks that make code easy to modify. Reactor brings asynchronous non-blocking I/O capabilities to Spring while maintaining familiar programming models. Spring Tools 4 and Boot 2.0 further enhance developer productivity with improved tooling and new features.
14 th Edition of International conference on computer visionShulagnaSarkar2
About the event
14th Edition of International conference on computer vision
Computer conferences organized by ScienceFather group. ScienceFather takes the privilege to invite speakers participants students delegates and exhibitors from across the globe to its International Conference on computer conferences to be held in the Various Beautiful cites of the world. computer conferences are a discussion of common Inventions-related issues and additionally trade information share proof thoughts and insight into advanced developments in the science inventions service system. New technology may create many materials and devices with a vast range of applications such as in Science medicine electronics biomaterials energy production and consumer products.
Nomination are Open!! Don't Miss it
Visit: computer.scifat.com
Award Nomination: https://x-i.me/ishnom
Conference Submission: https://x-i.me/anicon
For Enquiry: Computer@scifat.com
UI5con 2024 - Bring Your Own Design SystemPeter Muessig
How do you combine the OpenUI5/SAPUI5 programming model with a design system that makes its controls available as Web Components? Since OpenUI5/SAPUI5 1.120, the framework supports the integration of any Web Components. This makes it possible, for example, to natively embed own Web Components of your design system which are created with Stencil. The integration embeds the Web Components in a way that they can be used naturally in XMLViews, like with standard UI5 controls, and can be bound with data binding. Learn how you can also make use of the Web Components base class in OpenUI5/SAPUI5 to also integrate your Web Components and get inspired by the solution to generate a custom UI5 library providing the Web Components control wrappers for the native ones.
Using Query Store in Azure PostgreSQL to Understand Query PerformanceGrant Fritchey
Microsoft has added an excellent new extension in PostgreSQL on their Azure Platform. This session, presented at Posette 2024, covers what Query Store is and the types of information you can get out of it.
E-commerce Development Services- Hornet DynamicsHornet Dynamics
For any business hoping to succeed in the digital age, having a strong online presence is crucial. We offer Ecommerce Development Services that are customized according to your business requirements and client preferences, enabling you to create a dynamic, safe, and user-friendly online store.
Consistent toolbox talks are critical for maintaining workplace safety, as they provide regular opportunities to address specific hazards and reinforce safe practices.
These brief, focused sessions ensure that safety is a continual conversation rather than a one-time event, which helps keep safety protocols fresh in employees' minds. Studies have shown that shorter, more frequent training sessions are more effective for retention and behavior change compared to longer, infrequent sessions.
Engaging workers regularly, toolbox talks promote a culture of safety, empower employees to voice concerns, and ultimately reduce the likelihood of accidents and injuries on site.
The traditional method of conducting safety talks with paper documents and lengthy meetings is not only time-consuming but also less effective. Manual tracking of attendance and compliance is prone to errors and inconsistencies, leading to gaps in safety communication and potential non-compliance with OSHA regulations. Switching to a digital solution like Safelyio offers significant advantages.
Safelyio automates the delivery and documentation of safety talks, ensuring consistency and accessibility. The microlearning approach breaks down complex safety protocols into manageable, bite-sized pieces, making it easier for employees to absorb and retain information.
This method minimizes disruptions to work schedules, eliminates the hassle of paperwork, and ensures that all safety communications are tracked and recorded accurately. Ultimately, using a digital platform like Safelyio enhances engagement, compliance, and overall safety performance on site. https://safelyio.com/
How Can Hiring A Mobile App Development Company Help Your Business Grow?ToXSL Technologies
ToXSL Technologies is an award-winning Mobile App Development Company in Dubai that helps businesses reshape their digital possibilities with custom app services. As a top app development company in Dubai, we offer highly engaging iOS & Android app solutions. https://rb.gy/necdnt
Mobile App Development Company In Noida | Drona InfotechDrona Infotech
Drona Infotech is a premier mobile app development company in Noida, providing cutting-edge solutions for businesses.
Visit Us For : https://www.dronainfotech.com/mobile-application-development/
Hand Rolled Applicative User ValidationCode KataPhilip Schwarz
Could you use a simple piece of Scala validation code (granted, a very simplistic one too!) that you can rewrite, now and again, to refresh your basic understanding of Applicative operators <*>, <*, *>?
The goal is not to write perfect code showcasing validation, but rather, to provide a small, rough-and ready exercise to reinforce your muscle-memory.
Despite its grandiose-sounding title, this deck consists of just three slides showing the Scala 3 code to be rewritten whenever the details of the operators begin to fade away.
The code is my rough and ready translation of a Haskell user-validation program found in a book called Finding Success (and Failure) in Haskell - Fall in love with applicative functors.
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...XfilesPro
Wondering how X-Sign gained popularity in a quick time span? This eSign functionality of XfilesPro DocuPrime has many advancements to offer for Salesforce users. Explore them now!
Artificia Intellicence and XPath Extension FunctionsOctavian Nadolu
The purpose of this presentation is to provide an overview of how you can use AI from XSLT, XQuery, Schematron, or XML Refactoring operations, the potential benefits of using AI, and some of the challenges we face.
Preparing Non - Technical Founders for Engaging a Tech AgencyISH Technologies
Preparing non-technical founders before engaging a tech agency is crucial for the success of their projects. It starts with clearly defining their vision and goals, conducting thorough market research, and gaining a basic understanding of relevant technologies. Setting realistic expectations and preparing a detailed project brief are essential steps. Founders should select a tech agency with a proven track record and establish clear communication channels. Additionally, addressing legal and contractual considerations and planning for post-launch support are vital to ensure a smooth and successful collaboration. This preparation empowers non-technical founders to effectively communicate their needs and work seamlessly with their chosen tech agency.Visit our site to get more details about this. Contact us today www.ishtechnologies.com.au
Flutter is a popular open source, cross-platform framework developed by Google. In this webinar we'll explore Flutter and its architecture, delve into the Flutter Embedder and Flutter’s Dart language, discover how to leverage Flutter for embedded device development, learn about Automotive Grade Linux (AGL) and its consortium and understand the rationale behind AGL's choice of Flutter for next-gen IVI systems. Don’t miss this opportunity to discover whether Flutter is right for your project.
2. Agenda
● What is Depop
● Why?!
● Collections
● Nullability
● Functions
● Coroutines
3. Depop
Building the most diverse, progressive
Home of Fashion.
● Fashion marketplace app for the next generation
to buy, sell and discover unique fashion.
● Community of like minded creatives, young
entrepreneurs and sustainable enthusiasts who
are transforming the fashion industry.
● Globally, over 26 million users on the platform in
147 countries, and 90% of our active users are
under the age of 26, or Gen Z.
● As an app based platform, Depop combines the
familiarity of social media with the mechanics of
a resale marketplace.
● Our Mission is to Empower our community to
create a new sustainable and equitable fashion
system.
9. Mobile Developers ❤️ Kotlin
● Kotlin is the main language
on Android
● Conceptually closer to Swift
than Scala
● Great for Backend For
Frontend approach, where
Mobile engineers control the
API layer
11. def doSomething(properties: Map[String, List[String]])
fun doSomething(properties: Map<String, List<String>>)
Type mismatch:
inferred type is kotlin.collections.Map<String, kotlin.collections.List<String>>
but scala.collection.immutable.Map<String!,
scala.collection.immutable.List<String!>!>! was expected
🤔
😱
Collections
18. def executeBlock(block: () => Unit) = {
println("I'm going to execute it!")
block()
}
fun executeBlock(block: () -> Unit) {
println("I'm going to execute it!")
block()
}
Functions
=?
19. MainKt.executeBlock(() => println("Hello from Scala"))
Error: type mismatch;
found : Unit (in scala)
required: Unit (in kotlin)
MainKt.executeBlock(() => println("hello"))
Functions
24. class AsyncKotlinClass : CoroutineScope {
override val coroutineContext = Dispatchers.Default
fun getCatAsync(name: String) = async {
Cat(name)
}
suspend fun getCat(name: String): Cat {
delay(100)
return Cat(name)
}
}
Coroutines
25. val asyncKotlinClass = new AsyncKotlinClass()
val res = asyncKotlinClass.getCatAsync("Fluffy")
val cat = res.await()
Error: not enough arguments for method await:
(x$1: kotlin.coroutines.Continuation[_ >: Cat])Object.
Unspecified value parameter x$1.
val cat = res.await()
Coroutines
26. val asyncKotlinClass = new AsyncKotlinClass()
val cat = asyncKotlinClass.getCat("Fluffy")
Error: not enough arguments for method getCat:
(x$1: String, x$2: kotlin.coroutines.Continuation[_ >: Cat])Object.
Unspecified value parameter x$2.
val cat = asyncKotlinClass.getCat("Fluffy")
😱
Coroutines
28. import kotlinx.coroutines.future.*
fun getCatAsync(name: String) =
async {
Cat(name)
}.asCompletableFuture()
import
scala.compat.java8.FutureConverters._
val asyncKotlinClass = new
AsyncKotlinClass()
val res =
asyncKotlinClass.getCatAsync("Fluffy")
val cat = toScala(res)
Coroutines
29. Summary
● Reasons to adopt Kotlin in a Scala company:
○ Easier to adopt
○ Mobile Developers love it
● Reasons to keep using Scala
○ Very powerful language
○ Lots of code already written in it
● If you need to mix Scala and Kotlin
○ Easier to call Kotlin from Scala than Scala from
Kotlin
Hi,
My name is Alexey Soshin, I’m a Solutions Architect at Depop,
And today we are gonna talk about mixing Scala and Kotlin
So, the agenda for this evening.
First shortly about Depop
Then why would we even consider mixing Scala and Kotlin
And then we’ll dive into different topics.
So for today I want to cover collections, handling nulls, working with functions and coroutines
Sounds good?
Depop is a marketplace for fashion. We have about 25 million users globally, 30 million items, and more than one hundred thousand items added every day.
In terms of engineering, we are about one hundred engineers at the moment, and around 200 microservices, which are mostly written in Scala.
We also have a Python monolith that we’re slowly breaking down, but I won’t talk about that today.
Every time I even mention this talk, people ask me: but why would you even do that?!
Well, there are a few reasons.
Scala came out in 2004, so it has at least 7 to 10 years of active development on top of Kotlin.
So, companies have a lot of code already written in Scala, a lot of libraries, and we want to reuse that.
Now, there’s a dinosaur in the room, and it’s of course Java.
But scenarios where you need to mix Scala and Java or Kotlin in Java are actually well supported.
Because authors of both languages knew that Java has a huge codebase, a lot of libraries, and you want to make sure that you can make good use of them.
If you wanted to throw everything mankind achieved since 95 out of the window, you could try Go instead.
Okay, so why not simply keep writing everything in Scala then?
There are a few reasons for that.
First, Scala engineers are hard to find. There is a lot of competition on the market for them.
And once you hire them, you want to put them on the most difficult tasks.
But not all of the tasks in your company are difficult. So, Kotlin is a good way to diversify your codebase.
https://unsplash.com/photos/dxFi8Ea670E
And the reason Scala engineers are hard to find is because Scala is a hard language.
I have another talk where I try to convince the audience that it’s not that hard, but in general, it is.
I encountered it mainly at Wix, where we were hiring a lot of graduates.
And those were top graduates from top universities. But still for a lot of them functional programming in Scala was hard. It took them months to get productive.
The courses in the university are mainly C, Java, Python, and all those are mostly imperative, almost procedural languages.
So again, I would advocate Kotlin for the places that have a lot of juniors and struggle to onboard them well.
https://unsplash.com/photos/WiKEnlt6Z3U
And finally, there’s the Backend for Frontend services.
Well, hopefully I convinced you now that there are some valid reasons to mix the two.
The main goal is always to reuse the Scala codebase, Scala libraries that the organisation already has, in Kotlin microservice.
I’m not advocating for putting Scala and Kotlin code in the same microservice. Although
Now, let’s dive into the problems, I don’t like the word challenges, that you’ll be facing.
https://unsplash.com/photos/Rs9ypWXB1vE
So, let’s start with something that seems relatively simple.
Compatibility between data structures
So, if we look at those two functions, one is written in Kotlin, another is in Scala, we, as people, can argue that their input is exactly the same.
But if we tried to invoke one passing the input to the other, we would get this friendly error message.
And that will be a common motive in this talk. Since we’re on JVM, it may seem like every should just work.
People were asking me why was I hired as a Principal Engineer to solve those kinds of issues.
Should it you know, just work? No, it shouldn’t.
So, that’s what we want to do. Just call a Scala method from Kotlin that receives a map of lists of strings.
For that in Scala, we’ll need the help of JavaConverters, and to have another adapter function.
Notice that here w use Java Map and Java List, instead of Scala’s
That’s because Kotlin has built in support for them.
But that’s not all.
Even with JavaConverters, we can convert Java map to Scala map, but that won’t do a deeper conversion.
So then we need to iterate over map values and convert each of them to a Scala list too.
But this doesn’t produce the correct map yet, so we’ll need to call toMap on a map, to get the map we want.
Fun!
Those two have similar meanings, both indicate possible absence of value.
But how can we integrate between them?
So, your Kotlin function works with something that is a String or null.
And Scala likes to receives those as Option. But nullable string is clearly not on Option of a string for the compiler.
Kotlin extension methods to the rescue.
I guess everybody here like functional programming. Functions are great.
Let’s dive into that.
On the left we have a higher order function definition from Kotlin
And on the right we have the same definition in Scala
You need to squint really hard to notice the difference
But are they really equal?
So, let’s try to pass Scala lambda to this Kotlin function
And we get this error, saying that Scala Unit is not a Kotlin Unit
Well, in the hindsight, that totally makes sense
Those are two totally different classes
So, we figured out that those two are definitely not the same
And we could see that even earlier, if we just had looked at the classes behind the lambdas
So, we figured out that those lambdas are represented by two different classes.
If we change the return type of the lambda, the problem would still be the same.
Right?
Turns out, they are interchangable
You can pass Scala lambda to Kotlin, and you can pass Kotlin block to Scala.
So, in fact, Function in Kotlin and Function in Scala are interchangeable, as long as their input and output is interchangeable.
I guess everybody here like functional programming. Functions are great.
Let’s dive into that.
Coroutines are similar to lightweight threads or fibers.
So, here we have a Kotlin class with two methods
One is asynchronous method, that returns a deferred result
And another is a suspending method, which is like blocking, but instead of blocking a thread, it suspends the coroutine
CoroutineContext is like an execution context
Let’s try using the first one from Scala
It even may look like it’s working, until you try to get the result
Await() method has no arguments, but compiler demands that we pass it something called continuation as the first parameter.
Doesn’t make any sense.
Ok, let’s try to invoke second method. It should be simple.
Now although we have one argument, we’re required to pass Continuation as a second parameter. Again, no luck.
Trying to complete Scala future from Kotlin won’t work, because it’ll need execution context.
So, you’ll be passing the gorilla and the entire jungle, when you just wanted the banana.
But there’s something else that will help us. And this “something else” is weirdly enough - Java
We can import coroutines/future package in Kotlin, and we’ll get a method that converts Kotlin Deferred value into CompletableFuture
Now, Java CompletableFuture can be converted to Scala future.
Or to any other future, for this matter.