SlideShare a Scribd company logo
1 of 162
Dmitry Vinnik
@DmitryVinnik dvinnik.com
Do you even Function?
Guiding Through
Functional Interfaces
What are our goals?
@DmitryVinnik dvinnik.com
Goals
Functional Programming (FP):
What, How, When and Why
Default FP Capabilities in Java
Custom Functional Solutions
Why Functional
Programming?
@DmitryVinnik dvinnik.com
Because Concurrency
@DmitryVinnik dvinnik.com
Multi-Core
Motivation
Microservices
CCSs
@DmitryVinnik dvinnik.com
Conclusion?
@DmitryVinnik dvinnik.com
Concurrency is
a New Reality
@DmitryVinnik dvinnik.com
Concurrency is
a Reality
@DmitryVinnik dvinnik.com
But!
@DmitryVinnik dvinnik.com
What’s in it for us?
@DmitryVinnik dvinnik.com
Benefits
No Idling ↑ UX
Abstraction
@DmitryVinnik dvinnik.com
Only good parts, right?
@DmitryVinnik dvinnik.com
Complexities
Thread
Safety
Performanc
e
Liveness
SDLC
@DmitryVinnik dvinnik.com
How do we tackle it?
@DmitryVinnik dvinnik.com
With Functional
Programming
@DmitryVinnik dvinnik.com
Design for Functional
Programming
@DmitryVinnik dvinnik.com
Design for FP
Design by
Contract
Temporal
Coupling
Immutability &
Atomicity
Lazy Evaluation
Lazy
Evaluation
No Temporal
Coupling
Immutability &
Atomicity
@DmitryVinnik dvinnik.com
Design by Contract
@DmitryVinnik dvinnik.com
“Require No More,
Promise No Less”
Quote from Bertrand Meyer,
“Design by Contract”
@DmitryVinnik dvinnik.com
Design by Contract
@DmitryVinnik dvinnik.com
Design for FP
Design by
Contract
Temporal
Coupling
Immutability &
Atomicity
Lazy Evaluation
Lazy
Evaluation
No Temporal
Coupling
Immutability &
Atomicity
@DmitryVinnik dvinnik.com
Design by
Contract
Lazy
Evaluation
Lazy Evaluation
@DmitryVinnik dvinnik.com
"Lazy Evaluation is like
Filing Taxes"
Quote from Venkat Subramaniam,
“Let’s Get Lazy”
@DmitryVinnik dvinnik.com
Lazy Evaluation
@DmitryVinnik dvinnik.com
Design for FP
Design by
Contract
Temporal
Coupling
Immutability &
Atomicity
Lazy Evaluation
Lazy
Evaluation
No Temporal
Coupling
Immutability &
Atomicity
@DmitryVinnik dvinnik.com
Design by
Contract
Lazy
Evaluation
Lazy
Evaluation
No Temporal
Coupling
Temporal Coupling
@DmitryVinnik dvinnik.com
“When time & order
really matter”
@DmitryVinnik dvinnik.com
Temporal Coupling
@DmitryVinnik dvinnik.com
Temporal Coupling
@DmitryVinnik dvinnik.com
Temporal Coupling
@DmitryVinnik dvinnik.com
Temporal Coupling
@DmitryVinnik dvinnik.com
Design for FP
Design by
Contract
Temporal
Coupling
Immutability &
Atomicity
Lazy Evaluation
Lazy
Evaluation
No Temporal
Coupling
Immutability &
Atomicity
@DmitryVinnik dvinnik.com
Design by
Contract
Lazy
Evaluation
Lazy
Evaluation
No Temporal
Coupling
No Temporal
Coupling
Immutability &
Atomicity
Functional Programming
@DmitryVinnik dvinnik.com
In Practice
@DmitryVinnik dvinnik.com
How would we write
Functional Code?
@DmitryVinnik dvinnik.com
Let’s consider two styles:
Imperative and
Declarative
@DmitryVinnik dvinnik.com
Assume a Use Case:
Searching for a word
in a phrase
@DmitryVinnik dvinnik.com
Imperative Style
@DmitryVinnik dvinnik.com
Declarative Style
@DmitryVinnik dvinnik.com
Styles Side by Side
@DmitryVinnik dvinnik.com
Benefits of
Declarative Style
↑ Readability
↓ Verbosity↓ Complexity ↓ Verbosity
↑ Readability
@DmitryVinnik dvinnik.com
Decreased Complexity
@DmitryVinnik dvinnik.com
Benefits of
Declarative Style
↑ Readability
↓ Verbosity↓ Complexity ↓ Verbosity
↑ Readability
@DmitryVinnik dvinnik.com
↓ Complexity ↓ Verbosity
Decreased Verbosity
@DmitryVinnik dvinnik.com
Decreased Verbosity
@DmitryVinnik dvinnik.com
Decreased Verbosity
@DmitryVinnik dvinnik.com
Benefits of
Declarative Style
↑ Readability
↓ Verbosity↓ Complexity ↓ Verbosity
↑ Readability
@DmitryVinnik dvinnik.com
↓ Complexity ↓ Verbosity↓ Verbosity
↑ Readability
Increased Readability
@DmitryVinnik dvinnik.com
Conclusion?
@DmitryVinnik dvinnik.com
Changing Paradigms
@DmitryVinnik dvinnik.com
FP
Changing Paradigms
Imperative
Programming
Declarative
Programming
@DmitryVinnik dvinnik.com
Enough Theory!
@DmitryVinnik dvinnik.com
Let’s see some FP in Java
@DmitryVinnik dvinnik.com
Starting from the Base
@DmitryVinnik dvinnik.com
Stream
Optional
Starting from the Base
@DmitryVinnik dvinnik.com
What do we do the most?
@DmitryVinnik dvinnik.com
Dealing with Data
@DmitryVinnik dvinnik.com
Dealing with Collections
@DmitryVinnik dvinnik.com
How do we get Functional
with Collections?
@DmitryVinnik dvinnik.com
Pipeline of
Functions
Data
Mutation
Lazily
Evaluated
Data
Transformation
Streams
@DmitryVinnik dvinnik.com
Streams
@DmitryVinnik dvinnik.com
That’s all great
@DmitryVinnik dvinnik.com
But...
@DmitryVinnik dvinnik.com
What if I want to find
something?
@DmitryVinnik dvinnik.com
Optional is the answer
@DmitryVinnik dvinnik.com
Finding Optional Talk
@DmitryVinnik dvinnik.com
Optional
Value State
Null Check
Supplement
Data
Mutation
Data
Transformation
@DmitryVinnik dvinnik.com
Optional
@DmitryVinnik dvinnik.com
Looks promising
@DmitryVinnik dvinnik.com
But it still seems verbose
@DmitryVinnik dvinnik.com
Method Reference
to the Rescue!
@DmitryVinnik dvinnik.com
What is it good for?
@DmitryVinnik dvinnik.com
“There are only two hard
things in Computer Science:
Cache Invalidation and
Naming Things”
Quote from Phil Karlton
@DmitryVinnik dvinnik.com
Method Reference: Before
@DmitryVinnik dvinnik.com
Why do we need
temporary variables?
@DmitryVinnik dvinnik.com
Method Reference: After
@DmitryVinnik dvinnik.com
Method Reference
@DmitryVinnik dvinnik.com
Looks good
@DmitryVinnik dvinnik.com
But what about
Functional Programming
and Debugging
@DmitryVinnik dvinnik.com
One Line per Statement Style
@DmitryVinnik dvinnik.com
Now we have all the tools
@DmitryVinnik dvinnik.com
Let’s Get Functional
@DmitryVinnik dvinnik.com
High Order(HO) Functions
Functions
as First Class Entities
Functions
as Input
Functions
as Output
@DmitryVinnik dvinnik.com
Why HO Functions?
↑ Abstraction
DRY by
Design
↓ Complexity ↑ Readability
@DmitryVinnik dvinnik.com
Are all Functions equal?
@DmitryVinnik dvinnik.com
No!
@DmitryVinnik dvinnik.com
Types of Functions
Pure
Functions
Impure
Functions
@DmitryVinnik dvinnik.com
Pure Functions
Immutable Side Effects
Same
Input
Same
Output
@DmitryVinnik dvinnik.com
Pure Functions
@DmitryVinnik dvinnik.com
Let’s see Functions
in Action
@DmitryVinnik dvinnik.com
Let’s see Functions
in Java
@DmitryVinnik dvinnik.com
Single Abstract
Method
Helper
Annotation
Static
Methods
Default
Methods
Functional Interfaces
@DmitryVinnik dvinnik.com
Functional Interfaces
@DmitryVinnik dvinnik.com
High Order Functions
Out-of-the-Box
Function<T, R> Predicate<T>
Consumer<T> Supplier<T>
Predicate<T>
Consumer<T> Supplier<T>
@DmitryVinnik dvinnik.com
Function<T, R>
@DmitryVinnik dvinnik.com
One OutputOne Input
Function<T, R>
@DmitryVinnik dvinnik.com
Function<T, R>
@DmitryVinnik dvinnik.com
Function<T, R>
@DmitryVinnik dvinnik.com
Function<T, R>
@DmitryVinnik dvinnik.com
Function<T, R>
@DmitryVinnik dvinnik.com
Capabilities:
Functions Composition
Function<T, R>
@DmitryVinnik dvinnik.com
Function<T, R>
@DmitryVinnik dvinnik.com
Function<T, R>
@DmitryVinnik dvinnik.com
Function<T, R>
@DmitryVinnik dvinnik.com
Function<T, R>
@DmitryVinnik dvinnik.com
High Order Functions
Out-of-the-Box
Function<T, R> Predicate<T>
Consumer<T> Supplier<T>
Predicate<T>
Consumer<T> Supplier<T>
@DmitryVinnik dvinnik.com
Function<T, R> Predicate<T>
Predicate<T>
@DmitryVinnik dvinnik.com
Boolean
Output
One Input
Predicate<T>
@DmitryVinnik dvinnik.com
Predicate<T>
@DmitryVinnik dvinnik.com
Predicate<T>
@DmitryVinnik dvinnik.com
Predicate<T>
@DmitryVinnik dvinnik.com
Predicate<T>
@DmitryVinnik dvinnik.com
Capabilities:
Logical Operators
Predicate<T>
@DmitryVinnik dvinnik.com
Predicate<T>
@DmitryVinnik dvinnik.com
Predicate<T>
@DmitryVinnik dvinnik.com
Predicate<T>
@DmitryVinnik dvinnik.com
Predicate<T>
@DmitryVinnik dvinnik.com
High Order Functions
Out-of-the-Box
Function<T, R> Predicate<T>
Consumer<T> Supplier<T>
Predicate<T>
Consumer<T> Supplier<T>
@DmitryVinnik dvinnik.com
Function<T, R> Predicate<T>Predicate<T>
Consumer<T>
Consumer<T>
@DmitryVinnik dvinnik.com
No OutputOne Input
Consumer<T>
@DmitryVinnik dvinnik.com
Consumer<T>
@DmitryVinnik dvinnik.com
Consumer<T>
@DmitryVinnik dvinnik.com
Consumer<T>
@DmitryVinnik dvinnik.com
Capabilities:
Functions Chaining
Consumer<T>
@DmitryVinnik dvinnik.com
Consumer<T>
@DmitryVinnik dvinnik.com
Consumer<T>
@DmitryVinnik dvinnik.com
Consumer<T>
@DmitryVinnik dvinnik.com
High Order Functions
Out-of-the-Box
Function<T, R> Predicate<T>
Consumer<T> Supplier<T>
Predicate<T>
Consumer<T> Supplier<T>
@DmitryVinnik dvinnik.com
Function<T, R> Predicate<T>Predicate<T>
Consumer<T>Consumer<T> Supplier<T>
Supplier<T>
@DmitryVinnik dvinnik.com
One OutputNo Input
Supplier<T>
@DmitryVinnik dvinnik.com
Supplier<T>
@DmitryVinnik dvinnik.com
Supplier<T>
@DmitryVinnik dvinnik.com
Supplier<T>
@DmitryVinnik dvinnik.com
Capabilities:
Wrapped Execution
Supplier<T>
@DmitryVinnik dvinnik.com
Supplier<T>
@DmitryVinnik dvinnik.com
Supplier<T>
@DmitryVinnik dvinnik.com
Summary
High Order Functions
@DmitryVinnik dvinnik.com
Function<T, R>
Consumer<T>
Data
Transformation
Predicate<T> Data Filtering
Data
Processing
Supplier<T>
Process
Execution
Out-of-the-Box is nice
@DmitryVinnik dvinnik.com
But what about Custom
Functional Use Cases?
@DmitryVinnik dvinnik.com
Let’s Build Custom
Functional Interface
@DmitryVinnik dvinnik.com
@DmitryVinnik dvinnik.com
What about some
Common Use Cases?
@DmitryVinnik dvinnik.com
Error
Handling
Error
Passing
Multi-Dimensional
Structures
Common Use Cases
Error
Passing
Multi-Dimensional
Structures
@DmitryVinnik dvinnik.com
FP: Error Handling
@DmitryVinnik dvinnik.com
FP: Error Handling
@DmitryVinnik dvinnik.com
FP: Error Handling
@DmitryVinnik dvinnik.com
Let’s simplify
@DmitryVinnik dvinnik.com
FP: Error Handling
@DmitryVinnik dvinnik.com
FP: Error Handling
@DmitryVinnik dvinnik.com
FP: Error Handling
@DmitryVinnik dvinnik.com
Error
Handling
Error
Passing
Multi-Dimensional
Structures
Common Use Cases
Error
Passing
Multi-Dimensional
Structures
Error
Handling
Error
Passing
@DmitryVinnik dvinnik.com
FP: Error Passing
@DmitryVinnik dvinnik.com
Error
Handling
Error
Passing
Multi-Dimensional
Structures
Common Use Cases
Error
Passing
Multi-Dimensional
Structures
Error
Handling
Error
Passing
Error
Passing
Multi-Dimensional
Structures
@DmitryVinnik dvinnik.com
Multi-Dimensional
Structures: jOOQ/jOOL
Function
1...16
Consumer
1...16
Tuple
1...16
Sequences
@DmitryVinnik dvinnik.com
Functional Programming
looks great!
@DmitryVinnik dvinnik.com
But is there anything to
be avoided?
@DmitryVinnik dvinnik.com
Functional Programming:
Antipatterns
Overly
DRY
Early
Optimization
Impure
Functions
@DmitryVinnik dvinnik.com
Call For Action
Embrace FP
Review Your
Application
Continue
Learning
@DmitryVinnik dvinnik.com
Q/A
@DmitryVinnik dvinnik.com
About Speaker
Twitter: @DmitryVinnik
Blog: dvinnik.com
LinkedIn: in/dmitry-vinnik/
Email: dmitry@dvinnik.com

More Related Content

Similar to Do you even Function? Guiding Through Functional Interfaces

Modern Web Testing: Going Beyond Selenium
Modern Web Testing: Going Beyond SeleniumModern Web Testing: Going Beyond Selenium
Modern Web Testing: Going Beyond SeleniumDmitry Vinnik
 
Domain Driven Testing: Know What You’re Doing
Domain Driven Testing: Know What You’re DoingDomain Driven Testing: Know What You’re Doing
Domain Driven Testing: Know What You’re DoingDmitry Vinnik
 
Application architecture doesn't have to suck
Application architecture doesn't have to suckApplication architecture doesn't have to suck
Application architecture doesn't have to suckjtregunna
 
Angular 8 Services and Dependency Injection - William Liebenberg
Angular 8 Services and Dependency Injection - William LiebenbergAngular 8 Services and Dependency Injection - William Liebenberg
Angular 8 Services and Dependency Injection - William LiebenbergWilliam Liebenberg
 
Testing Svelte with Jest: Validate Your Components Quickly!
Testing Svelte with Jest: Validate Your Components Quickly!Testing Svelte with Jest: Validate Your Components Quickly!
Testing Svelte with Jest: Validate Your Components Quickly!Dmitry Vinnik
 
React Lifecycle and Reconciliation
React Lifecycle and ReconciliationReact Lifecycle and Reconciliation
React Lifecycle and ReconciliationZhihao Li
 
Kentico Cloud - Our First Impressions
Kentico Cloud - Our First Impressions Kentico Cloud - Our First Impressions
Kentico Cloud - Our First Impressions Brian McKeiver
 
Modular Web Applications With Netzke
Modular Web Applications With NetzkeModular Web Applications With Netzke
Modular Web Applications With Netzkenetzke
 
Refacoring vs Rewriting WixStores
Refacoring vs Rewriting WixStoresRefacoring vs Rewriting WixStores
Refacoring vs Rewriting WixStoresDoron Rosenstock
 
Continuous delivery @CD Summit Stockholm
Continuous delivery @CD Summit StockholmContinuous delivery @CD Summit Stockholm
Continuous delivery @CD Summit StockholmMichael Medin
 
Declarative UI의 이론과 실제
Declarative UI의 이론과 실제Declarative UI의 이론과 실제
Declarative UI의 이론과 실제승용 윤
 
Evolving a Clean, Pragmatic Architecture - A Craftsman's Guide
Evolving a Clean, Pragmatic Architecture - A Craftsman's GuideEvolving a Clean, Pragmatic Architecture - A Craftsman's Guide
Evolving a Clean, Pragmatic Architecture - A Craftsman's GuideVictor Rentea
 
Continuous delivery from the trenches Redhat Forum Edition
Continuous delivery from the trenches Redhat Forum EditionContinuous delivery from the trenches Redhat Forum Edition
Continuous delivery from the trenches Redhat Forum EditionMichael Medin
 
Techlunch - Dependency Injection with Vaadin
Techlunch - Dependency Injection with VaadinTechlunch - Dependency Injection with Vaadin
Techlunch - Dependency Injection with VaadinPeter Lehto
 
Taking Your Rails Tests Offline
Taking Your Rails Tests OfflineTaking Your Rails Tests Offline
Taking Your Rails Tests OfflineJoshua Plicque
 
Testing React with Jest: Validate Your Components Quickly!
Testing React with Jest: Validate Your Components Quickly!Testing React with Jest: Validate Your Components Quickly!
Testing React with Jest: Validate Your Components Quickly!Dmitry Vinnik
 
REST API vs gRPC, which one should you use in breaking a monolith [Dev conf 2...
REST API vs gRPC, which one should you use in breaking a monolith [Dev conf 2...REST API vs gRPC, which one should you use in breaking a monolith [Dev conf 2...
REST API vs gRPC, which one should you use in breaking a monolith [Dev conf 2...Vladimir Dejanovic
 
Mocking your Microservices with Mock Server
Mocking your Microservices with Mock ServerMocking your Microservices with Mock Server
Mocking your Microservices with Mock ServerJaap Coomans
 
Behaviour driven architecture
Behaviour driven architectureBehaviour driven architecture
Behaviour driven architectureJan Molak
 
Gauge + Taiko, BDD for Web Revived
Gauge + Taiko, BDD for Web RevivedGauge + Taiko, BDD for Web Revived
Gauge + Taiko, BDD for Web RevivedDmitry Vinnik
 

Similar to Do you even Function? Guiding Through Functional Interfaces (20)

Modern Web Testing: Going Beyond Selenium
Modern Web Testing: Going Beyond SeleniumModern Web Testing: Going Beyond Selenium
Modern Web Testing: Going Beyond Selenium
 
Domain Driven Testing: Know What You’re Doing
Domain Driven Testing: Know What You’re DoingDomain Driven Testing: Know What You’re Doing
Domain Driven Testing: Know What You’re Doing
 
Application architecture doesn't have to suck
Application architecture doesn't have to suckApplication architecture doesn't have to suck
Application architecture doesn't have to suck
 
Angular 8 Services and Dependency Injection - William Liebenberg
Angular 8 Services and Dependency Injection - William LiebenbergAngular 8 Services and Dependency Injection - William Liebenberg
Angular 8 Services and Dependency Injection - William Liebenberg
 
Testing Svelte with Jest: Validate Your Components Quickly!
Testing Svelte with Jest: Validate Your Components Quickly!Testing Svelte with Jest: Validate Your Components Quickly!
Testing Svelte with Jest: Validate Your Components Quickly!
 
React Lifecycle and Reconciliation
React Lifecycle and ReconciliationReact Lifecycle and Reconciliation
React Lifecycle and Reconciliation
 
Kentico Cloud - Our First Impressions
Kentico Cloud - Our First Impressions Kentico Cloud - Our First Impressions
Kentico Cloud - Our First Impressions
 
Modular Web Applications With Netzke
Modular Web Applications With NetzkeModular Web Applications With Netzke
Modular Web Applications With Netzke
 
Refacoring vs Rewriting WixStores
Refacoring vs Rewriting WixStoresRefacoring vs Rewriting WixStores
Refacoring vs Rewriting WixStores
 
Continuous delivery @CD Summit Stockholm
Continuous delivery @CD Summit StockholmContinuous delivery @CD Summit Stockholm
Continuous delivery @CD Summit Stockholm
 
Declarative UI의 이론과 실제
Declarative UI의 이론과 실제Declarative UI의 이론과 실제
Declarative UI의 이론과 실제
 
Evolving a Clean, Pragmatic Architecture - A Craftsman's Guide
Evolving a Clean, Pragmatic Architecture - A Craftsman's GuideEvolving a Clean, Pragmatic Architecture - A Craftsman's Guide
Evolving a Clean, Pragmatic Architecture - A Craftsman's Guide
 
Continuous delivery from the trenches Redhat Forum Edition
Continuous delivery from the trenches Redhat Forum EditionContinuous delivery from the trenches Redhat Forum Edition
Continuous delivery from the trenches Redhat Forum Edition
 
Techlunch - Dependency Injection with Vaadin
Techlunch - Dependency Injection with VaadinTechlunch - Dependency Injection with Vaadin
Techlunch - Dependency Injection with Vaadin
 
Taking Your Rails Tests Offline
Taking Your Rails Tests OfflineTaking Your Rails Tests Offline
Taking Your Rails Tests Offline
 
Testing React with Jest: Validate Your Components Quickly!
Testing React with Jest: Validate Your Components Quickly!Testing React with Jest: Validate Your Components Quickly!
Testing React with Jest: Validate Your Components Quickly!
 
REST API vs gRPC, which one should you use in breaking a monolith [Dev conf 2...
REST API vs gRPC, which one should you use in breaking a monolith [Dev conf 2...REST API vs gRPC, which one should you use in breaking a monolith [Dev conf 2...
REST API vs gRPC, which one should you use in breaking a monolith [Dev conf 2...
 
Mocking your Microservices with Mock Server
Mocking your Microservices with Mock ServerMocking your Microservices with Mock Server
Mocking your Microservices with Mock Server
 
Behaviour driven architecture
Behaviour driven architectureBehaviour driven architecture
Behaviour driven architecture
 
Gauge + Taiko, BDD for Web Revived
Gauge + Taiko, BDD for Web RevivedGauge + Taiko, BDD for Web Revived
Gauge + Taiko, BDD for Web Revived
 

More from Dmitry Vinnik

Leadership in Open Source and Why Companies Care
Leadership in Open Source and Why Companies CareLeadership in Open Source and Why Companies Care
Leadership in Open Source and Why Companies CareDmitry Vinnik
 
Maximizing React Speed: Hands-On Guide to Debugging and Optimizing React Appl...
Maximizing React Speed: Hands-On Guide to Debugging and Optimizing React Appl...Maximizing React Speed: Hands-On Guide to Debugging and Optimizing React Appl...
Maximizing React Speed: Hands-On Guide to Debugging and Optimizing React Appl...Dmitry Vinnik
 
Cross-Platform CSS (Yes, it's Possible!) with Yoga
Cross-Platform CSS (Yes, it's Possible!) with YogaCross-Platform CSS (Yes, it's Possible!) with Yoga
Cross-Platform CSS (Yes, it's Possible!) with YogaDmitry Vinnik
 
Documentation Made Easy with Docusaurus
Documentation Made Easy with DocusaurusDocumentation Made Easy with Docusaurus
Documentation Made Easy with DocusaurusDmitry Vinnik
 
Fixing Broken Windows: Dealing with Legacy Systems, Poor Quality and Gaps
Fixing Broken Windows: Dealing with Legacy Systems, Poor Quality and GapsFixing Broken Windows: Dealing with Legacy Systems, Poor Quality and Gaps
Fixing Broken Windows: Dealing with Legacy Systems, Poor Quality and GapsDmitry Vinnik
 
Ent: Making Data Easy in Go
Ent: Making Data Easy in GoEnt: Making Data Easy in Go
Ent: Making Data Easy in GoDmitry Vinnik
 
The 10,000 Steps of Open Source Project Health
The 10,000 Steps of Open Source Project HealthThe 10,000 Steps of Open Source Project Health
The 10,000 Steps of Open Source Project HealthDmitry Vinnik
 
Better Start: Enforcing Best Engineering Practices with Kotlin
Better Start: Enforcing Best Engineering Practices with KotlinBetter Start: Enforcing Best Engineering Practices with Kotlin
Better Start: Enforcing Best Engineering Practices with KotlinDmitry Vinnik
 
Developing Lightning Components for Communities.pptx
Developing Lightning Components for Communities.pptxDeveloping Lightning Components for Communities.pptx
Developing Lightning Components for Communities.pptxDmitry Vinnik
 
Remote Work: Gateway to Freedom
Remote Work: Gateway to FreedomRemote Work: Gateway to Freedom
Remote Work: Gateway to FreedomDmitry Vinnik
 
Kindness Engineering: Focusing on What Matters
Kindness Engineering: Focusing on What MattersKindness Engineering: Focusing on What Matters
Kindness Engineering: Focusing on What MattersDmitry Vinnik
 
Stress Driven Development, and How to Avoid It
Stress Driven Development, and How to Avoid ItStress Driven Development, and How to Avoid It
Stress Driven Development, and How to Avoid ItDmitry Vinnik
 
Build Tests to Build Websites
Build Tests to Build WebsitesBuild Tests to Build Websites
Build Tests to Build WebsitesDmitry Vinnik
 

More from Dmitry Vinnik (13)

Leadership in Open Source and Why Companies Care
Leadership in Open Source and Why Companies CareLeadership in Open Source and Why Companies Care
Leadership in Open Source and Why Companies Care
 
Maximizing React Speed: Hands-On Guide to Debugging and Optimizing React Appl...
Maximizing React Speed: Hands-On Guide to Debugging and Optimizing React Appl...Maximizing React Speed: Hands-On Guide to Debugging and Optimizing React Appl...
Maximizing React Speed: Hands-On Guide to Debugging and Optimizing React Appl...
 
Cross-Platform CSS (Yes, it's Possible!) with Yoga
Cross-Platform CSS (Yes, it's Possible!) with YogaCross-Platform CSS (Yes, it's Possible!) with Yoga
Cross-Platform CSS (Yes, it's Possible!) with Yoga
 
Documentation Made Easy with Docusaurus
Documentation Made Easy with DocusaurusDocumentation Made Easy with Docusaurus
Documentation Made Easy with Docusaurus
 
Fixing Broken Windows: Dealing with Legacy Systems, Poor Quality and Gaps
Fixing Broken Windows: Dealing with Legacy Systems, Poor Quality and GapsFixing Broken Windows: Dealing with Legacy Systems, Poor Quality and Gaps
Fixing Broken Windows: Dealing with Legacy Systems, Poor Quality and Gaps
 
Ent: Making Data Easy in Go
Ent: Making Data Easy in GoEnt: Making Data Easy in Go
Ent: Making Data Easy in Go
 
The 10,000 Steps of Open Source Project Health
The 10,000 Steps of Open Source Project HealthThe 10,000 Steps of Open Source Project Health
The 10,000 Steps of Open Source Project Health
 
Better Start: Enforcing Best Engineering Practices with Kotlin
Better Start: Enforcing Best Engineering Practices with KotlinBetter Start: Enforcing Best Engineering Practices with Kotlin
Better Start: Enforcing Best Engineering Practices with Kotlin
 
Developing Lightning Components for Communities.pptx
Developing Lightning Components for Communities.pptxDeveloping Lightning Components for Communities.pptx
Developing Lightning Components for Communities.pptx
 
Remote Work: Gateway to Freedom
Remote Work: Gateway to FreedomRemote Work: Gateway to Freedom
Remote Work: Gateway to Freedom
 
Kindness Engineering: Focusing on What Matters
Kindness Engineering: Focusing on What MattersKindness Engineering: Focusing on What Matters
Kindness Engineering: Focusing on What Matters
 
Stress Driven Development, and How to Avoid It
Stress Driven Development, and How to Avoid ItStress Driven Development, and How to Avoid It
Stress Driven Development, and How to Avoid It
 
Build Tests to Build Websites
Build Tests to Build WebsitesBuild Tests to Build Websites
Build Tests to Build Websites
 

Recently uploaded

The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is insideshinachiaurasa2
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareJim McKeeth
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfonteinmasabamasaba
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park masabamasaba
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnAmarnathKambale
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfkalichargn70th171
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastPapp Krisztián
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park masabamasaba
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in sowetomasabamasaba
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...masabamasaba
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...masabamasaba
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension AidPhilip Schwarz
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...Shane Coughlan
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024VictoriaMetrics
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2
 

Recently uploaded (20)

The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 

Do you even Function? Guiding Through Functional Interfaces

Editor's Notes

  1. How many of you have Macbook Pro? How many of you used AWS/Azure? Have you heard about Microservices
  2. How many of you have Macbook Pro? How many of you used AWS/Azure? Have you heard about Microservices
  3. How many of you have Macbook Pro? How many of you used AWS/Azure? Have you heard about Microservices Source: The Next Platform
  4. Change or die situation at this point World perspective
  5. Change or die situation at this point World perspective
  6. Change or die situation at this point World perspective
  7. “Always Design for Concurrency” - Pragmatic Programmer
  8. “Always Design for Concurrency” - Pragmatic Programmer
  9. “Always Design for Concurrency” - Pragmatic Programmer
  10. Good example is http clienta
  11. Good example is http clienta
  12. Good example is http clienta
  13. Good example is http clienta
  14. Good example is http clienta
  15. Good example is http clienta
  16. “Always Design for Concurrency” - Pragmatic Programmer
  17. Especially Complexity of Concurrency
  18. Especially Complexity of Concurrency
  19. Especially Complexity of Concurrency
  20. Not a data stracture Cannot reuse
  21. Note how field is not optional Always check before invoking get()
  22. https://softwareengineering.stackexchange.com/questions/39742/when-is-a-feature-considered-a-first-class-citizen-in-a-programming-language-p
  23. Java so flexible, need to be extra careful
  24. Java so flexible, need to be extra careful
  25. Java so flexible, need to be extra careful
  26. Even Runnable is FI Annotation is optional
  27. High Order Function Javadoc Function<T, R> Represents a function that accepts one argument and produces a result Predicate<T> Represents a predicate (boolean-valued function) of one argument Consumer<T> Represents an operation that accepts a single input argument and returns no result Supplier<T> Represents a supplier of results ... ... High Order Function Javadoc Function<T, R> Represents a function that accepts one argument and produces a result Predicate<T> Represents a predicate (boolean-valued function) of one argument Consumer<T> Represents an operation that accepts a single input argument and returns no result Supplier<T> Represents a supplier of results ... ...
  28. High Order Function Javadoc Function<T, R> Represents a function that accepts one argument and produces a result Predicate<T> Represents a predicate (boolean-valued function) of one argument Consumer<T> Represents an operation that accepts a single input argument and returns no result Supplier<T> Represents a supplier of results ... ... High Order Function Javadoc Function<T, R> Represents a function that accepts one argument and produces a result Predicate<T> Represents a predicate (boolean-valued function) of one argument Consumer<T> Represents an operation that accepts a single input argument and returns no result Supplier<T> Represents a supplier of results ... ...
  29. High Order Function Javadoc Function<T, R> Represents a function that accepts one argument and produces a result Predicate<T> Represents a predicate (boolean-valued function) of one argument Consumer<T> Represents an operation that accepts a single input argument and returns no result Supplier<T> Represents a supplier of results ... ... High Order Function Javadoc Function<T, R> Represents a function that accepts one argument and produces a result Predicate<T> Represents a predicate (boolean-valued function) of one argument Consumer<T> Represents an operation that accepts a single input argument and returns no result Supplier<T> Represents a supplier of results ... ...
  30. High Order Function Javadoc Function<T, R> Represents a function that accepts one argument and produces a result Predicate<T> Represents a predicate (boolean-valued function) of one argument Consumer<T> Represents an operation that accepts a single input argument and returns no result Supplier<T> Represents a supplier of results ... ... High Order Function Javadoc Function<T, R> Represents a function that accepts one argument and produces a result Predicate<T> Represents a predicate (boolean-valued function) of one argument Consumer<T> Represents an operation that accepts a single input argument and returns no result Supplier<T> Represents a supplier of results ... ...
  31. The simplest one Use as Executor
  32. The simplest one Use as Executor
  33. The simplest one Use as Executor
  34. The simplest one Use as Executor
  35. The simplest one Use as Executor
  36. The simplest one Use as Executor
  37. The simplest one Use as Executor
  38. The simplest one Use as Executor
  39. Making next step in FP
  40. Making next step in FP
  41. diffplug/durian
  42. diffplug/durian
  43. diffplug/durian
  44. diffplug/durian
  45. diffplug/durian
  46. diffplug/durian
  47. jOOQ/jOOL
  48. jOOQ/jOOL
  49. Early Optimization (Streams, or Parallel Streams)
  50. Need to embrace, move java 9,10,11 Look at reactive