Kotlin is a programming language that the author chose to use for Android development. Some reasons for this choice include curiosity about the language, reviews of its code from JetBrains, and benefits like small app size and fast compilation. While there was a learning curve of around 50 hours, the syntax and approach are different from Java. Some of the features the author most appreciates about Kotlin are its safe code, simple class definitions, lambda expressions, and string templates. Issues are addressed quickly by JetBrains and the Kotlin team. Recommendations for learning Kotlin include reviewing documentation on the Kotlin website and Google samples. Major companies that use Kotlin include Google and JetBrains.
An Elephant of a Different Colour: HackVic Metcalfe
Slides from my GTA-PHP Meetup talk about Hack which is the Facebook version of the PHP programming language which runs under their HHVM runtime environment for PHP. The focus of my talk was the language improvements that the Facebook team has added to PHP.
There's a lot of information in the presenter's notes, so if you're interested in Hack scroll down to see the extras.
Taking Perl to Eleven with Higher-Order FunctionsDavid Golden
Sometimes, you just need your Perl to go one higher. This talk will teach you how to use functions that return functions for powerful, succinct solutions to some repetitive coding problems. Along the way, you’ll see concrete examples using higher-order Perl to generate declarative, structured “fake” data for testing.
Aggregation Pipeline Power++: MongoDB 4.2 파이프 라인 쿼리, 업데이트 및 구체화된 뷰 소개 [MongoDB]MongoDB
MongoDB 2.2 이후 집계 파이프라인을 통한 데이터 분석을 강화하고 있습니다.
버전 4.2 에서는 더 많은 기능을 추가 했으며, 더 강력한 쿼리 및 업데이트 그리고 MView 기능까지 사용 할 수
있습니다. 집계파이프 라인을 포함한 해당 기능을 이용하여 단일뷰(SignleView), ETL, 데이터 롤업 및 MView 수행하는 방법을 설명합니다.
An Elephant of a Different Colour: HackVic Metcalfe
Slides from my GTA-PHP Meetup talk about Hack which is the Facebook version of the PHP programming language which runs under their HHVM runtime environment for PHP. The focus of my talk was the language improvements that the Facebook team has added to PHP.
There's a lot of information in the presenter's notes, so if you're interested in Hack scroll down to see the extras.
Taking Perl to Eleven with Higher-Order FunctionsDavid Golden
Sometimes, you just need your Perl to go one higher. This talk will teach you how to use functions that return functions for powerful, succinct solutions to some repetitive coding problems. Along the way, you’ll see concrete examples using higher-order Perl to generate declarative, structured “fake” data for testing.
Aggregation Pipeline Power++: MongoDB 4.2 파이프 라인 쿼리, 업데이트 및 구체화된 뷰 소개 [MongoDB]MongoDB
MongoDB 2.2 이후 집계 파이프라인을 통한 데이터 분석을 강화하고 있습니다.
버전 4.2 에서는 더 많은 기능을 추가 했으며, 더 강력한 쿼리 및 업데이트 그리고 MView 기능까지 사용 할 수
있습니다. 집계파이프 라인을 포함한 해당 기능을 이용하여 단일뷰(SignleView), ETL, 데이터 롤업 및 MView 수행하는 방법을 설명합니다.
MySQLConf2009: Taking ActiveRecord to the Next LevelBlythe Dunham
Taking ActiveRecord to the next level contains tips and tricks for using ActiveRecord with enterprise Ruby on Rails Applications. Learn how to import and export multiple records, read off replicas, handle deadlocks, and use temporary tables. Use MySQL functionality such as adding index hints, on duplicate key update, insert select and more.
JDD2015: Functional programing and Event Sourcing - a pair made in heaven - e...PROIDEA
Contact
FUNCTIONAL PROGRAMING AND EVENT SOURCING - A PAIR MADE IN HEAVEN - EXTENDED, 2 HOURS LONG BRAINWASH
TL;DR: This is talk is a solid introduction to two (supposedly) different topics: FP & ES. I will cover both the theory and the practice. We will emerage ES+FP application starting from ES+OO one.
While reading blogs or attending conferences, you might have heard about Event Sourcing. But didn't you get this feeling, that while there is a lot of theory out there, it is really hard to see a hands-on example? And even if you find some, those are always orbiting around Object Oriented concepts?
Greg Young once said "When we talk about Event Sourcing, current state is a left-fold of previous behaviours. Nothing new to Functional Programmers". If Functional Programming is such a natural concept for event sourced systems, shouldn't they fit together on a single codebase?
In this talk we will quickly introduce Event Sourcing (but without going into details), we will introduce some functional concepts as well (like State monad). Armoured with that knowledge we will try to transform sample ES application (OO-style, tightly coupled with framework) to frameworkless, FP-style solution).
Talk is targeted for beginner and intermediate audience. Examples will be in Scala but nothing fancy - normal syntax.
This talk is an extended version of a presentation "Event Sourcing & Functional Programming - a pair made in heaven". It is enriched with content of presentations: "Monads - asking the right question" and "It's all been done before - The Hitchhiker's Guide to Time Travel".
Ochrona podatnych webaplikacji za pomocą wirtualnych poprawek3camp
Bartosz Jerzman - Ochrona podatnych webaplikacji za pomoca wirtualnych poprawek
Prezentacja poświęcona jest ochronie webaplikacji za pomocą procedury wdrażania wirtualnych poprawek. W ramach prelekcji zostaną przedstawione:
– wykorzystanie Web Application Firewall (implementacja za pomocą projektu opensource – ModSecurity);
– opis poszczególnych faz procedury wdrażania wirtualnych poprawek do ochrony podatnych webaplikacji;
– trzy przypadki użycia wirtualnych poprawek dla rożnych typów ataków.
Marcin Hoppe - HTTPS bez wymówek
HTTPS to podstawa każdej bezpiecznej aplikacji Webowej. Niewielu spieszy się jednak z wdrożeniem. Co jeżeli strona będzie ładowała się wolniej? Czy koszty nie okażą się zbyt wysokie? Czy protokół jest naprawdę bezpieczny? Podczas prezentacji znajdziemy odpowiedzi na te pytania, obalimy kilka popularnych mitów na temat HTTPS i poznamy kilka sztuczek, które ułatwią zdobycie upragnionej zielonej kłódki.
Jako opiekun praktyk, stażów, mentor młodszych kolegów i koleżanek z zespołu, osoba odpowiedzialna za rekrutację techniczną, a także programista, który każdego dnia pracuje z oprogramowaniem dane mi było widzieć wiele błędów, złych zachowań i pomyłek w podejściu do tworzenia czystego kodu. Chciałbym się z Wami podzielić tymi najczęstszymi wpadkami w pracy z językiem Java. To nie będzie zwyczajna pogawędka! Zobaczycie kod źródłowy i ostry refaktoring. Zobaczycie, jak proste zmiany i lepsze zrozumienie samego języka mogą poprawić wydajność i czytelność Waszych aplikacji. Na podstawie całkiem prostych fragmentów kodu pokażę, na co zwrócić uwagę, żeby - to zabrzmi banalnie - być lepszym. Prezentacja dla wszystkich, którzy są na początku (i nie tylko) wspaniałej przygody z programowaniem (i zawrotnej kariery!).
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.
MySQLConf2009: Taking ActiveRecord to the Next LevelBlythe Dunham
Taking ActiveRecord to the next level contains tips and tricks for using ActiveRecord with enterprise Ruby on Rails Applications. Learn how to import and export multiple records, read off replicas, handle deadlocks, and use temporary tables. Use MySQL functionality such as adding index hints, on duplicate key update, insert select and more.
JDD2015: Functional programing and Event Sourcing - a pair made in heaven - e...PROIDEA
Contact
FUNCTIONAL PROGRAMING AND EVENT SOURCING - A PAIR MADE IN HEAVEN - EXTENDED, 2 HOURS LONG BRAINWASH
TL;DR: This is talk is a solid introduction to two (supposedly) different topics: FP & ES. I will cover both the theory and the practice. We will emerage ES+FP application starting from ES+OO one.
While reading blogs or attending conferences, you might have heard about Event Sourcing. But didn't you get this feeling, that while there is a lot of theory out there, it is really hard to see a hands-on example? And even if you find some, those are always orbiting around Object Oriented concepts?
Greg Young once said "When we talk about Event Sourcing, current state is a left-fold of previous behaviours. Nothing new to Functional Programmers". If Functional Programming is such a natural concept for event sourced systems, shouldn't they fit together on a single codebase?
In this talk we will quickly introduce Event Sourcing (but without going into details), we will introduce some functional concepts as well (like State monad). Armoured with that knowledge we will try to transform sample ES application (OO-style, tightly coupled with framework) to frameworkless, FP-style solution).
Talk is targeted for beginner and intermediate audience. Examples will be in Scala but nothing fancy - normal syntax.
This talk is an extended version of a presentation "Event Sourcing & Functional Programming - a pair made in heaven". It is enriched with content of presentations: "Monads - asking the right question" and "It's all been done before - The Hitchhiker's Guide to Time Travel".
Ochrona podatnych webaplikacji za pomocą wirtualnych poprawek3camp
Bartosz Jerzman - Ochrona podatnych webaplikacji za pomoca wirtualnych poprawek
Prezentacja poświęcona jest ochronie webaplikacji za pomocą procedury wdrażania wirtualnych poprawek. W ramach prelekcji zostaną przedstawione:
– wykorzystanie Web Application Firewall (implementacja za pomocą projektu opensource – ModSecurity);
– opis poszczególnych faz procedury wdrażania wirtualnych poprawek do ochrony podatnych webaplikacji;
– trzy przypadki użycia wirtualnych poprawek dla rożnych typów ataków.
Marcin Hoppe - HTTPS bez wymówek
HTTPS to podstawa każdej bezpiecznej aplikacji Webowej. Niewielu spieszy się jednak z wdrożeniem. Co jeżeli strona będzie ładowała się wolniej? Czy koszty nie okażą się zbyt wysokie? Czy protokół jest naprawdę bezpieczny? Podczas prezentacji znajdziemy odpowiedzi na te pytania, obalimy kilka popularnych mitów na temat HTTPS i poznamy kilka sztuczek, które ułatwią zdobycie upragnionej zielonej kłódki.
Jako opiekun praktyk, stażów, mentor młodszych kolegów i koleżanek z zespołu, osoba odpowiedzialna za rekrutację techniczną, a także programista, który każdego dnia pracuje z oprogramowaniem dane mi było widzieć wiele błędów, złych zachowań i pomyłek w podejściu do tworzenia czystego kodu. Chciałbym się z Wami podzielić tymi najczęstszymi wpadkami w pracy z językiem Java. To nie będzie zwyczajna pogawędka! Zobaczycie kod źródłowy i ostry refaktoring. Zobaczycie, jak proste zmiany i lepsze zrozumienie samego języka mogą poprawić wydajność i czytelność Waszych aplikacji. Na podstawie całkiem prostych fragmentów kodu pokażę, na co zwrócić uwagę, żeby - to zabrzmi banalnie - być lepszym. Prezentacja dla wszystkich, którzy są na początku (i nie tylko) wspaniałej przygody z programowaniem (i zawrotnej kariery!).
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.
Empathic Programming - How to write comprehensible codeMario Gleichmann
Slides to a (non-commercial) talk i gave 2011 at XPUG Rhein/Main (Germany) about how to write comprehensible code, regarding cognitive abilities of human mind.
Madrid gug - sacando partido a las transformaciones ast de groovyIván López Martín
Groovy es un gran lenguaje con capacidades muy potentes de metaprogramación en tiempo de compilación. ¿Sabías que hay más de 40 transformaciones AST disponibles para hacernos la vida más fácil como desarrolladores?
En esta charla aprenderás las transformaciones más importantes que proporciona Groovy a través de muchos ejemplos para explicar todos los conceptos.
Greach 2015 AST – Groovy Transformers: More than meets the eye!Iván López Martín
Slides for my Greach 2015 talk: http://greachconf.com/speakers/ivan-lopez-ast-groovy-transformers-more-than-meets-the-eye/
The source code is: https://github.com/lmivan/greach2015
Groovy is a great language with extremely powerful capabilities about compile time meta-programming. Do you know that provides more than 40 AST transformations out-of-the box just to make your life as a developer easier?
In this talk you will learn the most important transformations provided by Groovy. I’ll use a lot of code examples to explain all the concepts.
Groovy is a great language with extremely powerful capabilities about compile time meta-programming. Do you know that provides more than 40 AST transformations out-of-the box just to make your life as a developer easier?
In this talk you will learn the most important transformations provided by Groovy. I'll use a lot of code examples to explain all the concepts.
From java to kotlin beyond alt+shift+cmd+k - Droidcon italyFabio Collini
Kotlin is a first-class language for Android development since Google I/O 2017. And it’s here to stay!
Thanks to Android Studio it’s really easy to introduce Kotlin in an existing project, the configuration is trivial and then we can convert Java classes to Kotlin using a Alt+Shift+Cmd+K. But the new syntax is the just beginning, using Kotlin we can improve our code making it more readable and simpler to write.
In this talk we’ll see how to use some Kotlin features (for example data classes, collections, coroutines and delegates) to simplify Android development comparing the code with the equivalent “modern” Java code. It’s not fair to compare Kotlin code with plain Java 6 code so the Java examples will use lambdas and some external libraries like RxJava and AutoValue.
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!
Presentation for Android Developers about why they should consider using Kotlin. Key features of the language are discussed in comparison with Java. #LanguageChoiceMatters
http://blog.jimbaca.com
자프링(자바 + 스프링) 외길 12년차 서버 개발자가 코프링(코틀린 + 스프링)을 만난 후 코틀린의 특징과 스프링의 코틀린 지원을 알아가며 코프링 월드에서 살아남은 이야기…
코드 저장소: https://github.com/arawn/kotlin-support-in-spring
Nasze wieloTORowe doświadczenia w technologicznym safari: Python, Anaconda, RabbitMQ i pożerające wszystko Celery… Czyli Big Data i social commerce na przykładzie aplikacji MioSpot.
Piotr Macuk, Konfeo.com, Programista i biznes – plusy i minusy własnej działa...3camp
Po latach pracy dla klientów i realizowania cudzych pomysłów, przychodzi moment kiedy pragnie się stworzyć własny produkt. Chciałbym opowiedzieć o moim procesie migracji programisty we właściciela biznesu. Pokażę plusy i minusy tej migracji oraz wnioski, które nasuwają mi się po prawie 3 latach pracy nad Konfeo.com.
Marcin Maj, Kainos - QA – wartko, zmiennie i interdyscyplinarnie3camp
Testowanie, walidacja, automatyzacja, QA i wiele innych okiem osoby z wewnątrz. Dlaczego warto się tym zajmować i docenić szerokie możliwości rozwoju. Praca w specyficznym środowisku, które wymaga niezwykłego przystosowania się do zmiany. W końcu, praca dla ludzi odważnych i niezwykłych.
QA to również interdyscyplinarność i wielozadaniowość, często wymagająca wyjścia poza ramy IT. Techniczna podróż od BIOSu do Selenium przez programowanie do datacenter.
Jak przesiąść się na rower na dwóch kółkach? Od trzyosobowego startupu do spó...3camp
Opowieść o tym, jak pasja zmienia się w pracę i co zrobić, by nie stać się korporacją. Do tego parę słów o budowaniu relacji, barierach przy wchodzeniu na nowe rynki i zmienności, do której trzeba się przyzwyczaić.
Łukasz Brzeziński - Jak zarabiać z Wikingami? Czyli monetyzacja portalu inter...3camp
W Norwegii jest ok 4 milionów internautów, z czego 5% to Polacy. Portal www.mojanorwegia.pl skupia prawie 90% rodaków mieszkających w kraju Wikingów. Prezentacja o tym jak i dlaczego warto budować biznes wokół niszowego portalu internetowego.
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!SOFTTECHHUB
As the digital landscape continually evolves, operating systems play a critical role in shaping user experiences and productivity. The launch of Nitrux Linux 3.5.0 marks a significant milestone, offering a robust alternative to traditional systems such as Windows 11. This article delves into the essence of Nitrux Linux 3.5.0, exploring its unique features, advantages, and how it stands as a compelling choice for both casual users and tech enthusiasts.
The Art of the Pitch: WordPress Relationships and SalesLaura Byrne
Clients don’t know what they don’t know. What web solutions are right for them? How does WordPress come into the picture? How do you make sure you understand scope and timeline? What do you do if sometime changes?
All these questions and more will be explored as we talk about matching clients’ needs with what your agency offers without pulling teeth or pulling your hair out. Practical tips, and strategies for successful relationship building that leads to closing the deal.
Dr. Sean Tan, Head of Data Science, Changi Airport Group
Discover how Changi Airport Group (CAG) leverages graph technologies and generative AI to revolutionize their search capabilities. This session delves into the unique search needs of CAG’s diverse passengers and customers, showcasing how graph data structures enhance the accuracy and relevance of AI-generated search results, mitigating the risk of “hallucinations” and improving the overall customer journey.
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...Neo4j
Leonard Jayamohan, Partner & Generative AI Lead, Deloitte
This keynote will reveal how Deloitte leverages Neo4j’s graph power for groundbreaking digital twin solutions, achieving a staggering 100x performance boost. Discover the essential role knowledge graphs play in successful generative AI implementations. Plus, get an exclusive look at an innovative Neo4j + Generative AI solution Deloitte is developing in-house.
UiPath Test Automation using UiPath Test Suite series, part 5DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 5. In this session, we will cover CI/CD with devops.
Topics covered:
CI/CD with in UiPath
End-to-end overview of CI/CD pipeline with Azure devops
Speaker:
Lyndsey Byblow, Test Suite Sales Engineer @ UiPath, Inc.
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Albert Hoitingh
In this session I delve into the encryption technology used in Microsoft 365 and Microsoft Purview. Including the concepts of Customer Key and Double Key Encryption.
Essentials of Automations: The Art of Triggers and Actions in FMESafe Software
In this second installment of our Essentials of Automations webinar series, we’ll explore the landscape of triggers and actions, guiding you through the nuances of authoring and adapting workspaces for seamless automations. Gain an understanding of the full spectrum of triggers and actions available in FME, empowering you to enhance your workspaces for efficient automation.
We’ll kick things off by showcasing the most commonly used event-based triggers, introducing you to various automation workflows like manual triggers, schedules, directory watchers, and more. Plus, see how these elements play out in real scenarios.
Whether you’re tweaking your current setup or building from the ground up, this session will arm you with the tools and insights needed to transform your FME usage into a powerhouse of productivity. Join us to discover effective strategies that simplify complex processes, enhancing your productivity and transforming your data management practices with FME. Let’s turn complexity into clarity and make your workspaces work wonders!
Communications Mining Series - Zero to Hero - Session 1DianaGray10
This session provides introduction to UiPath Communication Mining, importance and platform overview. You will acquire a good understand of the phases in Communication Mining as we go over the platform with you. Topics covered:
• Communication Mining Overview
• Why is it important?
• How can it help today’s business and the benefits
• Phases in Communication Mining
• Demo on Platform overview
• Q/A
How to Get CNIC Information System with Paksim Ga.pptxdanishmna97
Pakdata Cf is a groundbreaking system designed to streamline and facilitate access to CNIC information. This innovative platform leverages advanced technology to provide users with efficient and secure access to their CNIC details.
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfPaige Cruz
Monitoring and observability aren’t traditionally found in software curriculums and many of us cobble this knowledge together from whatever vendor or ecosystem we were first introduced to and whatever is a part of your current company’s observability stack.
While the dev and ops silo continues to crumble….many organizations still relegate monitoring & observability as the purview of ops, infra and SRE teams. This is a mistake - achieving a highly observable system requires collaboration up and down the stack.
I, a former op, would like to extend an invitation to all application developers to join the observability party will share these foundational concepts to build on:
Climate Impact of Software Testing at Nordic Testing DaysKari Kakkonen
My slides at Nordic Testing Days 6.6.2024
Climate impact / sustainability of software testing discussed on the talk. ICT and testing must carry their part of global responsibility to help with the climat warming. We can minimize the carbon footprint but we can also have a carbon handprint, a positive impact on the climate. Quality characteristics can be added with sustainability, and then measured continuously. Test environments can be used less, and in smaller scale and on demand. Test techniques can be used in optimizing or minimizing number of tests. Test automation can be used to speed up testing.
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...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.
5. 2. CZY TRUDNO JEST
ZACZĄĆ?
50 GODZIN
SKŁADNIA
NOWE PODEJŚCIE
6. class User(val name: String, age: Int?)
val name: String = “Damian”
var isSuperUser: Boolean = true
var pet: String? = null
public fun sayHi(name: String, times: Int = 3) {
for (i in 1..times) {
println(“Hi $name”)
}
}
private fun getSome() : String {
return “some”
}
Kotlin
9. 3. CO NAJBARDZIEJ MI SIĘ
PODOBA W KOTLINIE?
BEZPIECZNY KOD
PROSTE DEFINICJE KLAS
10. public class Item {
private String type;
public Item(String type) {
this.type = type;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
Item item2 = (Item) o;
if (type != null ? !type.equals(item2.type) : item2.type != null) return false;
return true;
}
@Override
public int hashCode() {
return type != null ? type.hashCode() : 0;
}
@Override
public String toString() {
return "Item2{" +
"type='" + type + ''' +
'}';
}
}
public class Article extends Item {
private Boolean isDeleted;
private String id;
private String category;
private String published;
private String publishedFormatted;
private String firstPublished;
private String updated;
private String created;
private List<Topic> topics;
private String title;
private String newsLifetime;
private Integer newsValue;
private List<Author> authors;
private List<Resource> resources
private Version version;
private String vignette;
private String displaySize;
private Boolean live;
private Boolean breaking;
private Story story;
private Boolean sponsored = false;
public Article(String type) {
super(type);
}
public Article(String type, Boolean isDeleted, String id, String category, String published,
String publishedFormatted, String firstPublished, String updated, String created,
List<Topic> topics, String title, String newsLifetime, Integer newsValue,
List<Author> authors, List<Resource> resources, Version version, String vignette,
String displaySize, Boolean live, Boolean breaking, Story story, Boolean sponsored) {
super(type);
this.isDeleted = isDeleted;
this.id = id;
this.category = category;
this.published = published;
this.publishedFormatted = publishedFormatted;
this.firstPublished = firstPublished;
this.updated = updated;
this.created = created;
this.topics = topics;
this.title = title;
this.newsLifetime = newsLifetime;
this.newsValue = newsValue;
this.authors = authors;
this.resources = resources;
this.version = version;
this.vignette = vignette;
this.displaySize = displaySize;
this.live = live;
this.breaking = breaking;
this.story = story;
this.sponsored = sponsored;
}
public Boolean getIsDeleted() {
return isDeleted;
}
public void setIsDeleted(Boolean isDeleted) {
this.isDeleted = isDeleted;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getCategory() {
return category;
}
public void setCategory(String category) {
this.category = category;
}
public String getPublished() {
return published;
}
public void setPublished(String published) {
this.published = published;
}
public String getPublishedFormatted() {
return publishedFormatted;
}
public void setPublishedFormatted(String publishedFormatted) {
this.publishedFormatted = publishedFormatted;
}
public String getFirstPublished() {
return firstPublished;
}
public void setFirstPublished(String firstPublished) {
this.firstPublished = firstPublished;
}
public String getUpdated() {
return updated;
}
public void setUpdated(String updated) {
this.updated = updated;
}
public String getCreated() {
return created;
}
public void setCreated(String created) {
this.created = created;
}
public List<Topic> getTopics() {
return topics;
}
public void setTopics(List<Topic> topics) {
this.topics = topics;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getNewsLifetime() {
return newsLifetime;
}
public void setNewsLifetime(String newsLifetime) {
this.newsLifetime = newsLifetime;
}
public Integer getNewsValue() {
return newsValue;
}
public void setNewsValue(Integer newsValue) {
this.newsValue = newsValue;
}
public List<Author> getAuthors() {
return authors;
}
public void setAuthors(List<Author> authors) {
this.authors = authors;
}
public List<Resource> getResources() {
return resources;
}
public void setResources(List<Resource> resources) {
this.resources = resources;
}
public Version getVersion() {
return version;
}
public void setVersion(Version version) {
this.version = version;
}
public String getVignette() {
return vignette;
}
public void setVignette(String vignette) {
this.vignette = vignette;
}
public String getDisplaySize() {
return displaySize;
}
public void setDisplaySize(String displaySize) {
this.displaySize = displaySize;
}
public Boolean getLive() {
return live;
}
public void setLive(Boolean live) {
this.live = live;
}
public Boolean getBreaking() {
return breaking;
}
public void setBreaking(Boolean breaking) {
this.breaking = breaking;
}
public Story getStory() {
return story;
}
public void setStory(Story story) {
this.story = story;
}
public Boolean getSponsored() {
return sponsored;
}
public void setSponsored(Boolean sponsored) {
this.sponsored = sponsored;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
if (!super.equals(o)) return false;
Article article2 = (Article) o;
if (authors != null ? !authors.equals(article2.authors) : article2.authors != null) return false;
if (breaking != null ? !breaking.equals(article2.breaking) : article2.breaking != null) return false;
if (category != null ? !category.equals(article2.category) : article2.category != null) return false;
if (created != null ? !created.equals(article2.created) : article2.created != null) return false;
if (displaySize != null ? !displaySize.equals(article2.displaySize) : article2.displaySize != null)
return false;
if (firstPublished != null ? !firstPublished.equals(article2.firstPublished) : article2.firstPublished != null)
return false;
if (id != null ? !id.equals(article2.id) : article2.id != null) return false;
if (isDeleted != null ? !isDeleted.equals(article2.isDeleted) : article2.isDeleted != null) return false;
if (live != null ? !live.equals(article2.live) : article2.live != null) return false;
if (newsLifetime != null ? !newsLifetime.equals(article2.newsLifetime) : article2.newsLifetime != null)
return false;
if (newsValue != null ? !newsValue.equals(article2.newsValue) : article2.newsValue != null) return false;
if (published != null ? !published.equals(article2.published) : article2.published != null) return false;
if (publishedFormatted != null ? !publishedFormatted.equals(article2.publishedFormatted) :
article2.publishedFormatted != null) return false;
if (resources != null ? !resources.equals(article2.resources) : article2.resources != null) return false;
if (sponsored != null ? !sponsored.equals(article2.sponsored) : article2.sponsored != null) return false;
if (story != null ? !story.equals(article2.story) : article2.story != null) return false;
if (title != null ? !title.equals(article2.title) : article2.title != null) return false;
if (topics != null ? !topics.equals(article2.topics) : article2.topics != null) return false;
if (updated != null ? !updated.equals(article2.updated) : article2.updated != null) return false;
if (version != null ? !version.equals(article2.version) : article2.version != null) return false;
if (vignette != null ? !vignette.equals(article2.vignette) : article2.vignette != null) return false;
return true;
}
@Override
public int hashCode() {
int result = super.hashCode();
result = 31 * result + (isDeleted != null ? isDeleted.hashCode() : 0);
result = 31 * result + (id != null ? id.hashCode() : 0);
result = 31 * result + (category != null ? category.hashCode() : 0);
result = 31 * result + (published != null ? published.hashCode() : 0);
result = 31 * result + (publishedFormatted != null ? publishedFormatted.hashCode() : 0);
result = 31 * result + (firstPublished != null ? firstPublished.hashCode() : 0);
result = 31 * result + (updated != null ? updated.hashCode() : 0);
result = 31 * result + (created != null ? created.hashCode() : 0);
result = 31 * result + (topics != null ? topics.hashCode() : 0);
result = 31 * result + (title != null ? title.hashCode() : 0);
result = 31 * result + (newsLifetime != null ? newsLifetime.hashCode() : 0);
result = 31 * result + (newsValue != null ? newsValue.hashCode() : 0);
result = 31 * result + (authors != null ? authors.hashCode() : 0);
result = 31 * result + (resources != null ? resources.hashCode() : 0);
result = 31 * result + (version != null ? version.hashCode() : 0);
result = 31 * result + (vignette != null ? vignette.hashCode() : 0);
result = 31 * result + (displaySize != null ? displaySize.hashCode() : 0);
result = 31 * result + (live != null ? live.hashCode() : 0);
result = 31 * result + (breaking != null ? breaking.hashCode() : 0);
result = 31 * result + (story != null ? story.hashCode() : 0);
result = 31 * result + (sponsored != null ? sponsored.hashCode() : 0);
return result;
}
@Override
public String toString() {
return "Article{" +
open class Item(val type: ItemTypeEnum): Serializable
data class Article(type: ItemTypeEnum,
val isDeleted: Boolean?,
val id: String,
val category: String,
val published: String,
var publishedFormatted: String?,
val firstPublished: String?,
val updated: String,
val created: String,
val topics: Array<Topic>,
val title: String,
val newsLifetime: String,
val newsValue: Int,
val authors: Array<Author>,
val resources: Array<Resource>,
val version: Version?,
val vignette: String?,
val displaySize: String,
val live: Boolean?,
val breaking: Boolean?,
val story: Story?,
val sponsored: Boolean = false
) : Item(type)
Java - 354 Kotlin - 25
11. data class User(val name: String,
val surname: String,
val age: Int)
val user = User(“Damian”, “Petla”, 33)
val user2 = user.copy(age = 30, name = “Adam”)
println(user)
println(user2)
User(name=Damian, surname=Petla, age=33)
User(name=Adam, surname=Petla, age=30)
Kotlin
Log
12. 3. CO NAJBARDZIEJ MI SIĘ
PODOBA W KOTLINIE?
BEZPIECZNY KOD
PROSTE DEFINICJE KLAS
LAMBDA
STRING TEMPLATES
14. 3. CO NAJBARDZIEJ MI SIĘ
PODOBA W KOTLINIE?
BEZPIECZNY KOD
PROSTE DEFINICJE KLAS
LAMBDA
STRING TEMPLATES
SMART CAST
15. int l = 0;
if (obj instanceof String) {
l = ((String)obj).length;
}
Java
Kotlin
var l = 0
if (obj is String) {
l = obj.length
}
val l : Int = (obj as? String)?.length ?: 0
16. 3. CO NAJBARDZIEJ MI SIĘ
PODOBA W KOTLINIE?
BEZPIECZNY KOD
PROSTE DEFINICJE KLAS
LAMBDA
STRING TEMPLATES
SMART CAST
FUNCTION EXTENSIONS
18. 4. CZY SĄ JAKIEŚ
PROBLEMY Z KOTLINEM?
SZYBKA ODPOWIEDŹ NA ZGŁOSZONE BŁEDY
JETBRAINS AKTYWNY NA STACK OVERFLOW
220 BUGÓW NAPRAWIONYCH W WERSJI M11(0.11.91)