SlideShare une entreprise Scribd logo
1  sur  93
Télécharger pour lire hors ligne
This slide is intentionally left blank
Developer Advocate @JFrog
@jbaruch on the internetz
Developer Advocate @Hazelcast
@gAmUssA on the internetz
@tagir_valeev
@jbaruch										@gamussa #devnexus http://jfrog.com/shownotes
@jbaruch										@gamussa #devnexus http://jfrog.com/shownotes
@jbaruch										@gamussa #devnexus http://jfrog.com/shownotes
@jbaruch										@gamussa #devnexus http://jfrog.com/shownotes
1. Two entertaining guys on
the stage
2. Funny puzzling questions
3. You think and vote
4.T-shirts are airborne
5. Official twitter hashtags:
#javapuzzlersng
#devnexus
Which Java version are you on?
A. Java 7
B. Java 8
C. Java 9
D. Java 6
E. Java 5
F. Java 2
@jbaruch										@gamussa #devnexus http://jfrog.com/shownotes
Watching the puzzlers like… #dafaq
@jbaruch										@gamussa #devnexus http://jfrog.com/shownotes
Everything works (or doesn't)
in the latest Java 8 and/or 9 update
@jbaruch										@gamussa #devnexus http://jfrog.com/shownotes
public class PerfectRobbery {
private Semaphore bankAccount = new Semaphore(-42);
public static void main(String[] args) {
PerfectRobbery perfectRobbery = new PerfectRobbery();
perfectRobbery.takeAllMoney();
perfectRobbery.checkBalance();
}
public void takeAllMoney(){
bankAccount.drainPermits();
}
public void checkBalance(){
System.out.println(bankAccount.availablePermits());
}
}
A. IllegalArgumentException –can’t create semaphore with negative
B. UnsupportedOperationException –can’t drain when negative
C. 0
D. -42
@jbaruch										@gamussa #devnexus http://jfrog.com/shownotes
A. IllegalArgumentException –can’t create semaphore with negative
B. UnsupportedOperationException –can’t drain when negative
C. 0
D. -42
public class PerfectRobbery {
private Semaphore bankAccount = new Semaphore(-42);
public static void main(String[] args) {
PerfectRobbery perfectRobbery = new PerfectRobbery();
perfectRobbery.takeAllMoney();
perfectRobbery.checkBalance();
}
public void takeAllMoney(){
bankAccount.drainPermits();
}
public void checkBalance(){
System.out.println(bankAccount.availablePermits());
}
}
Available
-42?!
@jbaruch										@gamussa #devnexus http://jfrog.com/shownotes
Available
-42?!
@jbaruch										@gamussa #devnexus http://jfrog.com/shownotes
@jbaruch										@gamussa #devnexus http://jfrog.com/shownotes
A. true/true
B. true/false
C. false/true
D. false/false
Collections.emptyList() == Collections.emptyList();
Collections.emptyIterator() == Collections.emptyIterator();
@jbaruch										@gamussa #devnexus http://jfrog.com/shownotes
@jbaruch										@gamussa #devnexus http://jfrog.com/shownotes
A. true/true
B. true/false
C. false/true
D. false/false
Spliterators.emptySpliterator() == Spliterators.emptySpliterator();
Stream.empty() == Stream.empty();
Singleton Strikes Back!
@jbaruch										@gamussa #devnexus http://jfrog.com/shownotes
A. true/true
B. true/false
C. false/true
D. false/false
Spliterators.emptySpliterator() == Spliterators.emptySpliterator();
Stream.empty() == Stream.empty();
@jbaruch										@gamussa #devnexus http://jfrog.com/shownotes
Even empty Stream has state!
@jbaruch										@gamussa #devnexus http://jfrog.com/shownotes
”Identical”
1. Has the same state
2. Not related to “equals and hashcode”contract
3. Not related to references to objects in memory
@jbaruch										@gamussa #devnexus http://jfrog.com/shownotes
List[] twins = new List[2];
Arrays.setAll(twins, ArrayList::new);
A. Absolutely identical empty lists
B. Absolutely identical non-empty lists
C. Non-identical empty lists
D. Non-identical non-empty lists
@jbaruch										@gamussa #devnexus http://jfrog.com/shownotes
@jbaruch										@gamussa #devnexus http://jfrog.com/shownotes
List[] twins = new List[2];
Arrays.setAll(twins, ArrayList::new);
A. Absolutely identical empty lists
B. Absolutely identical non-empty lists
C. Non-identical empty lists
D. Non-identical non-empty lists
@jbaruch										@gamussa #devnexus http://jfrog.com/shownotes
@jbaruch										@gamussa #devnexus http://jfrog.com/shownotes
How single is a Single Abstract Method Interface?
@jbaruch										@gamussa #devnexus http://jfrog.com/shownotes
A. WTF?! ’Single’means one,not three!
B. Problem is with partyHard(T),remove it and it will work
C. Problem is the drinkIn methods,removing one of them and it will
work
D. It will work fine! Both partyHard() and drinkIn() are merged in
SingleAndHappy,leaving one abstract method
public interface Single<T> {
default void partyHard(String songName) { System.out.println(songName); }
void partyHard(T songName);
void drinkIn(T drinkName);
void drinkIn(String dringName);
}
@FunctionalInterface
public interface SingleAndHappy extends Single<String> { }
@jbaruch										@gamussa #devnexus http://jfrog.com/shownotes
A. WTF?! ’Single’means one,not three!
B. Problem is with partyHard(T),remove it and it will work
C. Problem are the drinkIn methods,removing it will leave one abstract
method
D. Yes! Both partyHard() and drinkIn() are merged in SingleAndHappy,
leaving one abstract method
public interface Single<T> {
default void partyHard(String songName) { System.out.println(songName); }
void partyHard(T songName);
void drinkIn(T drinkName);
void drinkIn(String dringName);
}
@FunctionalInterface
public interface SingleAndHappy extends Single<String> { }
@jbaruch										@gamussa #devnexus http://jfrog.com/shownotes
@jbaruch										@gamussa #devnexus http://jfrog.com/shownotes
Hacking the bank
☑Bank software written in Java
☑Hack into it
☑Analyze the accounts
@jbaruch										@gamussa #devnexus http://jfrog.com/shownotes
Given the code above,which statement is wrong:
A. The Set is ordered by hashcode
B. The order is predictable across multiple runs of the JVM on the same machine
C. The order of elements in Set is not predictable
D. Statements A & B are correct
Set<String>	accounts=	new	HashSet<>(Arrays.asList("Gates",	"Buffett",	"Bezos",	"Zuckerberg"));
System.out.println(”accounts=	"	+	accounts);
@jbaruch										@gamussa #devnexus http://jfrog.com/shownotes
Given the code above,which statement is wrong:
A. The Set is ordered
B. The order is predictable across multiple runs of the JVM on the same machine
C. The order of elements in Set is not predictable
D. Statements A & B are correct
Set<String>	accounts=	new	HashSet<>(Arrays.asList("Gates",	"Buffett",	"Bezos",	"Zuckerberg"));
System.out.println(”accounts=	"	+	accounts);
@jbaruch										@gamussa #devnexus http://jfrog.com/shownotes
public boolean add(E e) {
return map.put(e, PRESENT)==null;
}
@jbaruch										@gamussa #devnexus http://jfrog.com/shownotes
Your turn,FBI
@jbaruch										@gamussa #devnexus http://jfrog.com/shownotes
Given the code above,which statement is wrong:
A. The Set is ordered
B. The order is predictable across multiple runs of the JVM on the same machine
C. The order of elements in Set is not predictable
D. Statements A & B are correct
Set<String>	accounts	=	Set.of("Gates",	"Buffett",	"Bezos",	"Zuckerberg");
System.out.println(”accounts=	"	+	accounts);
@jbaruch										@gamussa #devnexus http://jfrog.com/shownotes
@jbaruch										@gamussa #devnexus http://jfrog.com/shownotes
@jbaruch										@gamussa #devnexus http://jfrog.com/shownotes
Given the code above,which statement is wrong:
A. The Set is ordered
B. The order is predictable across multiple runs of the JVM on the same machine
C. The order of elements in Set is not predictable
D. Statements A & B are correct
Set<String>	accounts	=	Set.of("Gates",	"Buffett",	"Bezos",	"Zuckerberg");
System.out.println(”accounts=	"	+	accounts);
@jbaruch										@gamussa #devnexus http://jfrog.com/shownotes
private int probe(Object pe) {
int idx = Math.floorMod(pe.hashCode() ^ SALT, elements.length);
while (true) {
E ee = elements[idx];
if (ee == null) {
return -idx - 1;
} else if (pe.equals(ee)) {
return idx;
} else if (++idx == elements.length) {
idx = 0;
}
}
}
@jbaruch										@gamussa #devnexus http://jfrog.com/shownotes
Juggling Accident
What’s correct?
A. If you convert your application to module,classpath
dependencies will still be resolved correctly
B. If one of the dependencies was converted to a module,you
have to declare it in module-info in order to use
C. Once you added the module-info to your project you have to
declare the dependencies twice,in classpath and in module-
info
D. None of the above
@jbaruch										@gamussa #devnexus http://jfrog.com/shownotes
What’s correct?
A. If you convert your application to module,classpath
dependencies will still be resolved correctly
B. If one of the dependencies was converted to a module,you
have to declare it in module-info in order to use
C. Once you added the module-info to your project you have to
declare the dependencies twice,in classpath and in module-
info
D. None of the above
@jbaruch										@gamussa #devnexus http://jfrog.com/shownotes
@jbaruch										@gamussa #devnexus http://jfrog.com/shownotes
A. You killed them all
B. You killed only even ones
C. They all survived
D. You killed only odd ones
E. All answers are correct
static void killThemAll(Collection<Hero> expendables) {
Iterator<Hero> heroes = expendables.iterator();
heroes.forEachRemaining(e -> {
if (heroes.hasNext()) {
heroes.next();
heroes.remove();
}
});
System.out.println(expendables);
}
@jbaruch										@gamussa #devnexus http://jfrog.com/shownotes
A. You killed them all
B. You killed only even ones
C. They all survived
D. You killed only odd ones
E. All answers are correct
static void killThemAll(Collection<Hero> expendables) {
Iterator<Hero> heroes = expendables.iterator();
heroes.forEachRemaining(e -> {
if (heroes.hasNext()) {
heroes.next();
heroes.remove();
}
});
System.out.println(expendables);
}
Don’t do that.Really,don’t.
killThemAll(new ArrayList<String>(Arrays.asList("N","S","W","S","L","S","L","V")));
[]
killThemAll(new LinkedList<String>(Arrays.asList("N","S","W","S","L","S","L","V")));
[S,S,S,V]
killThemAll(new ArrayDeque<String>(Arrays.asList("N","S","W","S","L","S","L","V")));
[N,S,W,S,L,S,L,V]
killThemAll(new TreeSet<String>(Arrays.asList("N","S","W","S","L","S","L","V")));
[N,W,L,L]
@jbaruch										@gamussa #devnexus http://jfrog.com/shownotes
Subtle Difference
@jbaruch										@gamussa #devnexus http://jfrog.com/shownotes
A. Both work just fine
B. Lambda works,method ref fails
C. Method ref works,lambda fails
D. Won’t compile
@FunctionalInterface
public interface OriginalPredicate<T> {
boolean test(T t);
}
OriginalPredicate<Object> lambda = (Object obj) -> ”adidas".equals(obj);
OriginalPredicate<Object> methodRef = ”adidas"::equals;
A. Both work just fine
B. Lambda works,method ref fails
C. Method ref works,lambda fails
D. Not a functional interface,will fail on annotation processing
@FunctionalInterface
Public interface CopyCatPredicate {
<T> boolean test(T t);
}
CopyCatPredicate lambda = (Object obj) -> " adadas".equals(obj);
CopyCatPredicate methodRef = " adadas"::equals;
@jbaruch										@gamussa #devnexus http://jfrog.com/shownotes
A	generic	function	type	for	a	functional	interface	may	be	implemented	by	a	
method	reference	expression	(§15.13),	but	not	by	a	lambda	expression	
(§15.27)	as	there	is	no	syntax	for	generic	lambda	expressions.	“
@jbaruch										@gamussa #devnexus http://jfrog.com/shownotes
A.[Data, Kirk, Spock]
B.[Spock, Kirk, Data, Data, Kirk]
C.[Spock, Kirk, Data]
D.[Data, Data, Kirk, Kirk, Spock, Spock]
E.Are you nuts? Won’t compile! Data with
Kirk?!
List<String> list = Stream.of("Spock", "Kirk", "Data", "Data", "Kirk",
"Spock").sequential()
.filter(new TreeSet<>()::add).collect(Collectors.toList());
System.out.println(list);
@jbaruch										@gamussa #devnexus http://jfrog.com/shownotes
A.[Data, Kirk, Spock]
B.[Spock, Kirk, Data, Data, Kirk]
C.[Spock, Kirk, Data]
D.[Data, Data, Kirk, Kirk, Spock, Spock]
E.Are you nuts? Won’t compile! Data with
Kirk?!
List<String> list = Stream.of("Spock", "Kirk", "Data", "Data", "Kirk",
"Spock").sequential()
.filter(new TreeSet<>()::add).collect(Collectors.toList());
System.out.println(list);
@jbaruch										@gamussa #devnexus http://jfrog.com/shownotes
A.[Data, Kirk, Spock]
B.[Spock, Kirk, Data, Data, Kirk]
C.[Spock, Kirk, Data]
D.[Data, Data, Kirk, Kirk, Spock, Spock]
E.Are you nuts? Won’t compile! Data with
Kirk?!
List<String> list = Stream.of("Spock", "Kirk", "Data", "Data", "Kirk",
"Spock").sequential()
.filter(new TreeSet<>()::add).collect(Collectors.toList());
System.out.println(list);
@jbaruch										@gamussa #devnexus http://jfrog.com/shownotes
filter(new TreeSet<>()::add) filter(i -> new TreeSet<>().add(i))!=
New	instance	is	
created	every	time!
Instance	method	is	
created	once!
@jbaruch										@gamussa #devnexus http://jfrog.com/shownotes
@jbaruch										@gamussa #devnexus http://jfrog.com/shownotes
A. obvious / obvious
B. obvious / NullPointerException
C. NullPointerException / obvious
D. NullPointerException / NullPointerException
Optional.of("obvious").orElseGet(null);
Optional.empty().map(null).orElse("obvious");
@jbaruch										@gamussa #devnexus http://jfrog.com/shownotes
@jbaruch										@gamussa #devnexus http://jfrog.com/shownotes
A. obvious / obvious
B. obvious / NullPointerException
C. NullPointerException / obvious
D. NullPointerException / NullPointerException
Optional.of("obvious").orElseGet(null);
Optional.empty().map(null).orElse("obvious");
Will	never	happen
Will	never	happen
@jbaruch										@gamussa #devnexus http://jfrog.com/shownotes
@jbaruch										@gamussa #devnexus http://jfrog.com/shownotes
A. obvious / obvious
B. obvious / NullPointerException
C. NullPointerException / obvious
D. NullPointerException / NullPointerException
Optional.of("obvious").orElseGet(null);
Optional.empty().map(null).orElse("obvious");
@jbaruch										@gamussa #devnexus http://jfrog.com/shownotes
@jbaruch										@gamussa #devnexus http://jfrog.com/shownotes
Identical?
@jbaruch										@gamussa #devnexus http://jfrog.com/shownotes
A. All
B. 3 and 4
C. Only 3
D. Other
1. Consumer<String> agentA = s -> System.out.println(s);
Consumer<String> agentB = s -> System.out.println(s);
2. Consumer<String> agentA = System.out::println;
Consumer<String> agentB = System.out::println;
3. Supplier<Consumer<String>> supplier = () -> s -> System.out.println(s);
Consumer<String> agentA = supplier.get();
Consumer<String> agentB = supplier.get();
4. Supplier<Consumer<String>> supplier = () -> System.out::println;
Consumer<String> agentA = supplier.get();
Consumer<String> agentB = supplier.get();
When agentA == agentB?
@jbaruch										@gamussa #devnexus http://jfrog.com/shownotes
A. All
B. 3 and 4
C. Only 3
D. Other
1. Consumer<String> agentA = s -> System.out.println(s);
Consumer<String> agentB = s -> System.out.println(s);
2. Consumer<String> agentA = System.out::println;
Consumer<String> agentB = System.out::println;
3. Supplier<Consumer<String>> supplier = () -> s -> System.out.println(s);
Consumer<String> agentA = supplier.get();
Consumer<String> agentB = supplier.get();
4. Supplier<Consumer<String>> supplier = () -> System.out::println;
Consumer<String> agentA = supplier.get();
Consumer<String> agentB = supplier.get();
When agentA == agentB?
Reuse is only possible for pure functions
•Consumers accept parameters == have
state
•Supplier in 4 has state –the resolved
method reference
@jbaruch										@gamussa #devnexus http://jfrog.com/shownotes
Conclusions
@jbaruch										@gamussa #devnexus http://jfrog.com/shownotes
-Write readable code!
-Comment all the tricks
-Sometimes it’s just a bug
-Static code analysis FTW -
IntelliJ IDEA!
-RTFM!
-Don’t abuse lambdas and
streams!
-Trust us, we have much
more where those came
from.
-Puzzlers? Gotchas? Fetal
position inducing behavior?
-puzzlers@jfrog.com
-Shownotes!
-http://jfrog.com/shownotes
-Slides
-Video in 24 hours
-Links
-Ratings
-Raffle! (come early)
-Did you like it?
-Praise us on twitter!
-#javapuzzlersng #devnexus
-@gamussa
-@jbaruch
-Didn’t like it?
-/dev/null

Contenu connexe

En vedette

Building a private CI/CD pipeline with Java and Docker in the Cloud as presen...
Building a private CI/CD pipeline with Java and Docker in the Cloud as presen...Building a private CI/CD pipeline with Java and Docker in the Cloud as presen...
Building a private CI/CD pipeline with Java and Docker in the Cloud as presen...Baruch Sadogursky
 
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at DevNexus 2017
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at DevNexus 2017DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at DevNexus 2017
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at DevNexus 2017Baruch Sadogursky
 
Agile Metrics : Velocity is NOT the Goal - NDC Oslo 2014
Agile Metrics : Velocity is NOT the Goal - NDC Oslo 2014Agile Metrics : Velocity is NOT the Goal - NDC Oslo 2014
Agile Metrics : Velocity is NOT the Goal - NDC Oslo 2014Doc Norton
 
Intro to Microsoft Cognitive Services
Intro to Microsoft Cognitive ServicesIntro to Microsoft Cognitive Services
Intro to Microsoft Cognitive ServicesAmanda Lange
 
The Technical Debt Trap
The Technical Debt TrapThe Technical Debt Trap
The Technical Debt TrapDoc Norton
 
Generics and Lambda survival guide - DevNexus 2017
Generics and Lambda survival guide - DevNexus 2017Generics and Lambda survival guide - DevNexus 2017
Generics and Lambda survival guide - DevNexus 2017Henri Tremblay
 
Practical tipsmakemobilefaster oscon2016
Practical tipsmakemobilefaster oscon2016Practical tipsmakemobilefaster oscon2016
Practical tipsmakemobilefaster oscon2016Doris Chen
 
Weekly lecture appsterdam_19mar2014
Weekly lecture appsterdam_19mar2014Weekly lecture appsterdam_19mar2014
Weekly lecture appsterdam_19mar2014Microsoft
 
CI/CD Pipeline with Docker
CI/CD Pipeline with DockerCI/CD Pipeline with Docker
CI/CD Pipeline with Dockerkushalsingh007
 
Developing Android applications with Ceylon
Developing Android applications with Ceylon Developing Android applications with Ceylon
Developing Android applications with Ceylon Enrique Zamudio López
 
Post-Modern CSS: Start learning CSS Grid, Flexbox and other new properties
Post-Modern CSS: Start learning CSS Grid, Flexbox and other new propertiesPost-Modern CSS: Start learning CSS Grid, Flexbox and other new properties
Post-Modern CSS: Start learning CSS Grid, Flexbox and other new propertiesBryan Robinson
 
This stuff is cool, but...HOW CAN I GET MY COMPANY TO DO IT?
This stuff is cool, but...HOW CAN I GET MY COMPANY TO DO IT?This stuff is cool, but...HOW CAN I GET MY COMPANY TO DO IT?
This stuff is cool, but...HOW CAN I GET MY COMPANY TO DO IT?Mark Heckler
 
A Practical Guide to Cynefin
A Practical Guide to CynefinA Practical Guide to Cynefin
A Practical Guide to CynefinDoc Norton
 
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at QCon London 2017
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at QCon London 2017DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at QCon London 2017
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at QCon London 2017Baruch Sadogursky
 
Introduction to Machine Learning
Introduction to Machine LearningIntroduction to Machine Learning
Introduction to Machine LearningJames Ward
 
Unleash software architecture leveraging on docker
Unleash software architecture leveraging on dockerUnleash software architecture leveraging on docker
Unleash software architecture leveraging on dockerAdrien Blind
 
Patterns and antipatterns in Docker image lifecycle @ DevOpsDays Charlotte 2017
Patterns and antipatterns in Docker image lifecycle @ DevOpsDays Charlotte 2017Patterns and antipatterns in Docker image lifecycle @ DevOpsDays Charlotte 2017
Patterns and antipatterns in Docker image lifecycle @ DevOpsDays Charlotte 2017Baruch Sadogursky
 
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at Oracle Code Au...
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at Oracle Code Au...DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at Oracle Code Au...
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at Oracle Code Au...Baruch Sadogursky
 
Reactive programming in Angular 2
Reactive programming in Angular 2Reactive programming in Angular 2
Reactive programming in Angular 2Yakov Fain
 

En vedette (20)

Building a private CI/CD pipeline with Java and Docker in the Cloud as presen...
Building a private CI/CD pipeline with Java and Docker in the Cloud as presen...Building a private CI/CD pipeline with Java and Docker in the Cloud as presen...
Building a private CI/CD pipeline with Java and Docker in the Cloud as presen...
 
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at DevNexus 2017
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at DevNexus 2017DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at DevNexus 2017
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at DevNexus 2017
 
Agile Metrics : Velocity is NOT the Goal - NDC Oslo 2014
Agile Metrics : Velocity is NOT the Goal - NDC Oslo 2014Agile Metrics : Velocity is NOT the Goal - NDC Oslo 2014
Agile Metrics : Velocity is NOT the Goal - NDC Oslo 2014
 
Intro to Microsoft Cognitive Services
Intro to Microsoft Cognitive ServicesIntro to Microsoft Cognitive Services
Intro to Microsoft Cognitive Services
 
The Technical Debt Trap
The Technical Debt TrapThe Technical Debt Trap
The Technical Debt Trap
 
Generics and Lambda survival guide - DevNexus 2017
Generics and Lambda survival guide - DevNexus 2017Generics and Lambda survival guide - DevNexus 2017
Generics and Lambda survival guide - DevNexus 2017
 
Practical tipsmakemobilefaster oscon2016
Practical tipsmakemobilefaster oscon2016Practical tipsmakemobilefaster oscon2016
Practical tipsmakemobilefaster oscon2016
 
Weekly lecture appsterdam_19mar2014
Weekly lecture appsterdam_19mar2014Weekly lecture appsterdam_19mar2014
Weekly lecture appsterdam_19mar2014
 
CI/CD Pipeline with Docker
CI/CD Pipeline with DockerCI/CD Pipeline with Docker
CI/CD Pipeline with Docker
 
Developing Android applications with Ceylon
Developing Android applications with Ceylon Developing Android applications with Ceylon
Developing Android applications with Ceylon
 
Post-Modern CSS: Start learning CSS Grid, Flexbox and other new properties
Post-Modern CSS: Start learning CSS Grid, Flexbox and other new propertiesPost-Modern CSS: Start learning CSS Grid, Flexbox and other new properties
Post-Modern CSS: Start learning CSS Grid, Flexbox and other new properties
 
This stuff is cool, but...HOW CAN I GET MY COMPANY TO DO IT?
This stuff is cool, but...HOW CAN I GET MY COMPANY TO DO IT?This stuff is cool, but...HOW CAN I GET MY COMPANY TO DO IT?
This stuff is cool, but...HOW CAN I GET MY COMPANY TO DO IT?
 
How Docker simplifies CI/CD
How Docker simplifies CI/CDHow Docker simplifies CI/CD
How Docker simplifies CI/CD
 
A Practical Guide to Cynefin
A Practical Guide to CynefinA Practical Guide to Cynefin
A Practical Guide to Cynefin
 
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at QCon London 2017
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at QCon London 2017DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at QCon London 2017
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at QCon London 2017
 
Introduction to Machine Learning
Introduction to Machine LearningIntroduction to Machine Learning
Introduction to Machine Learning
 
Unleash software architecture leveraging on docker
Unleash software architecture leveraging on dockerUnleash software architecture leveraging on docker
Unleash software architecture leveraging on docker
 
Patterns and antipatterns in Docker image lifecycle @ DevOpsDays Charlotte 2017
Patterns and antipatterns in Docker image lifecycle @ DevOpsDays Charlotte 2017Patterns and antipatterns in Docker image lifecycle @ DevOpsDays Charlotte 2017
Patterns and antipatterns in Docker image lifecycle @ DevOpsDays Charlotte 2017
 
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at Oracle Code Au...
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at Oracle Code Au...DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at Oracle Code Au...
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at Oracle Code Au...
 
Reactive programming in Angular 2
Reactive programming in Angular 2Reactive programming in Angular 2
Reactive programming in Angular 2
 

Similaire à Java Puzzlers NG S02: Down the Rabbit Hole as presented at DevNexus 2017

Java Puzzlers NG as it was presented at Detroit Java User Group
Java Puzzlers NG as it was presented at Detroit Java User GroupJava Puzzlers NG as it was presented at Detroit Java User Group
Java Puzzlers NG as it was presented at Detroit Java User GroupBaruch Sadogursky
 
Django Introduction Osscamp Delhi September 08 09 2007 Mir Nazim
Django Introduction Osscamp Delhi September 08 09 2007 Mir NazimDjango Introduction Osscamp Delhi September 08 09 2007 Mir Nazim
Django Introduction Osscamp Delhi September 08 09 2007 Mir NazimMir Nazim
 
Professional JavaScript: AntiPatterns
Professional JavaScript: AntiPatternsProfessional JavaScript: AntiPatterns
Professional JavaScript: AntiPatternsMike Wilcox
 
Django O/R Mapper
Django O/R MapperDjango O/R Mapper
Django O/R MapperIan Lewis
 
ActiveWeb: Chicago Java User Group Presentation
ActiveWeb: Chicago Java User Group PresentationActiveWeb: Chicago Java User Group Presentation
ActiveWeb: Chicago Java User Group Presentationipolevoy
 
computer notes - Data Structures - 1
computer notes - Data Structures - 1computer notes - Data Structures - 1
computer notes - Data Structures - 1ecomputernotes
 
course slides -- powerpoint
course slides -- powerpointcourse slides -- powerpoint
course slides -- powerpointwebhostingguy
 
Meetup django common_problems(1)
Meetup django common_problems(1)Meetup django common_problems(1)
Meetup django common_problems(1)Eric Satterwhite
 
ABCs of Programming_eBook Contents
ABCs of Programming_eBook ContentsABCs of Programming_eBook Contents
ABCs of Programming_eBook ContentsAshley Menhennett
 
JavaOne 2008 - TS-5793 - Groovy and Grails, changing the landscape of Java EE...
JavaOne 2008 - TS-5793 - Groovy and Grails, changing the landscape of Java EE...JavaOne 2008 - TS-5793 - Groovy and Grails, changing the landscape of Java EE...
JavaOne 2008 - TS-5793 - Groovy and Grails, changing the landscape of Java EE...Guillaume Laforge
 
Data visualization in python/Django
Data visualization in python/DjangoData visualization in python/Django
Data visualization in python/Djangokenluck2001
 
An Introduction To jQuery
An Introduction To jQueryAn Introduction To jQuery
An Introduction To jQueryAndy Gibson
 
Computer notes - data structures
Computer notes - data structuresComputer notes - data structures
Computer notes - data structuresecomputernotes
 

Similaire à Java Puzzlers NG S02: Down the Rabbit Hole as presented at DevNexus 2017 (20)

Rails OO views
Rails OO viewsRails OO views
Rails OO views
 
Having Fun with Play
Having Fun with PlayHaving Fun with Play
Having Fun with Play
 
Java Puzzlers NG as it was presented at Detroit Java User Group
Java Puzzlers NG as it was presented at Detroit Java User GroupJava Puzzlers NG as it was presented at Detroit Java User Group
Java Puzzlers NG as it was presented at Detroit Java User Group
 
Django Introduction Osscamp Delhi September 08 09 2007 Mir Nazim
Django Introduction Osscamp Delhi September 08 09 2007 Mir NazimDjango Introduction Osscamp Delhi September 08 09 2007 Mir Nazim
Django Introduction Osscamp Delhi September 08 09 2007 Mir Nazim
 
Professional JavaScript: AntiPatterns
Professional JavaScript: AntiPatternsProfessional JavaScript: AntiPatterns
Professional JavaScript: AntiPatterns
 
Django O/R Mapper
Django O/R MapperDjango O/R Mapper
Django O/R Mapper
 
What is Swagger?
What is Swagger?What is Swagger?
What is Swagger?
 
ActiveWeb: Chicago Java User Group Presentation
ActiveWeb: Chicago Java User Group PresentationActiveWeb: Chicago Java User Group Presentation
ActiveWeb: Chicago Java User Group Presentation
 
Fewd week6 slides
Fewd week6 slidesFewd week6 slides
Fewd week6 slides
 
Meerut Golden.pdf
Meerut Golden.pdfMeerut Golden.pdf
Meerut Golden.pdf
 
computer notes - Data Structures - 1
computer notes - Data Structures - 1computer notes - Data Structures - 1
computer notes - Data Structures - 1
 
course slides -- powerpoint
course slides -- powerpointcourse slides -- powerpoint
course slides -- powerpoint
 
Meetup django common_problems(1)
Meetup django common_problems(1)Meetup django common_problems(1)
Meetup django common_problems(1)
 
ABCs of Programming_eBook Contents
ABCs of Programming_eBook ContentsABCs of Programming_eBook Contents
ABCs of Programming_eBook Contents
 
Tao Showed Me The Way
Tao Showed Me The WayTao Showed Me The Way
Tao Showed Me The Way
 
Core Java - Quiz Questions - Bug Hunt
Core Java - Quiz Questions - Bug HuntCore Java - Quiz Questions - Bug Hunt
Core Java - Quiz Questions - Bug Hunt
 
JavaOne 2008 - TS-5793 - Groovy and Grails, changing the landscape of Java EE...
JavaOne 2008 - TS-5793 - Groovy and Grails, changing the landscape of Java EE...JavaOne 2008 - TS-5793 - Groovy and Grails, changing the landscape of Java EE...
JavaOne 2008 - TS-5793 - Groovy and Grails, changing the landscape of Java EE...
 
Data visualization in python/Django
Data visualization in python/DjangoData visualization in python/Django
Data visualization in python/Django
 
An Introduction To jQuery
An Introduction To jQueryAn Introduction To jQuery
An Introduction To jQuery
 
Computer notes - data structures
Computer notes - data structuresComputer notes - data structures
Computer notes - data structures
 

Plus de Baruch Sadogursky

DevOps Patterns & Antipatterns for Continuous Software Updates @ NADOG April ...
DevOps Patterns & Antipatterns for Continuous Software Updates @ NADOG April ...DevOps Patterns & Antipatterns for Continuous Software Updates @ NADOG April ...
DevOps Patterns & Antipatterns for Continuous Software Updates @ NADOG April ...Baruch Sadogursky
 
DevOps Patterns & Antipatterns for Continuous Software Updates @ DevOps.com A...
DevOps Patterns & Antipatterns for Continuous Software Updates @ DevOps.com A...DevOps Patterns & Antipatterns for Continuous Software Updates @ DevOps.com A...
DevOps Patterns & Antipatterns for Continuous Software Updates @ DevOps.com A...Baruch Sadogursky
 
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at Oracle Code NY...
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at Oracle Code NY...DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at Oracle Code NY...
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at Oracle Code NY...Baruch Sadogursky
 
Data driven devops as presented at QCon London 2018
Data driven devops as presented at QCon London 2018Data driven devops as presented at QCon London 2018
Data driven devops as presented at QCon London 2018Baruch Sadogursky
 
A Research Study Into DevOps Bottlenecks as presented at Oracle Code LA 2018
A Research Study Into DevOps Bottlenecks as presented at Oracle Code LA 2018A Research Study Into DevOps Bottlenecks as presented at Oracle Code LA 2018
A Research Study Into DevOps Bottlenecks as presented at Oracle Code LA 2018Baruch Sadogursky
 
Java Puzzlers NG S03 a DevNexus 2018
Java Puzzlers NG S03 a DevNexus 2018Java Puzzlers NG S03 a DevNexus 2018
Java Puzzlers NG S03 a DevNexus 2018Baruch Sadogursky
 
Where the Helm are your binaries? as presented at Canada Kubernetes Meetups
Where the Helm are your binaries? as presented at Canada Kubernetes MeetupsWhere the Helm are your binaries? as presented at Canada Kubernetes Meetups
Where the Helm are your binaries? as presented at Canada Kubernetes MeetupsBaruch Sadogursky
 
Data driven devops as presented at Codemash 2018
Data driven devops as presented at Codemash 2018Data driven devops as presented at Codemash 2018
Data driven devops as presented at Codemash 2018Baruch Sadogursky
 
A Research Study into DevOps Bottlenecks as presented at Codemash 2018
A Research Study into DevOps Bottlenecks as presented at Codemash 2018A Research Study into DevOps Bottlenecks as presented at Codemash 2018
A Research Study into DevOps Bottlenecks as presented at Codemash 2018Baruch Sadogursky
 
Best Practices for Managing Docker Versions as presented at JavaOne 2017
Best Practices for Managing Docker Versions as presented at JavaOne 2017Best Practices for Managing Docker Versions as presented at JavaOne 2017
Best Practices for Managing Docker Versions as presented at JavaOne 2017Baruch Sadogursky
 
Troubleshooting & Debugging Production Microservices in Kubernetes as present...
Troubleshooting & Debugging Production Microservices in Kubernetes as present...Troubleshooting & Debugging Production Microservices in Kubernetes as present...
Troubleshooting & Debugging Production Microservices in Kubernetes as present...Baruch Sadogursky
 
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at Devoxx 2017
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at Devoxx 2017DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at Devoxx 2017
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at Devoxx 2017Baruch Sadogursky
 
Amazon Alexa Skills vs Google Home Actions, the Big Java VUI Faceoff as prese...
Amazon Alexa Skills vs Google Home Actions, the Big Java VUI Faceoff as prese...Amazon Alexa Skills vs Google Home Actions, the Big Java VUI Faceoff as prese...
Amazon Alexa Skills vs Google Home Actions, the Big Java VUI Faceoff as prese...Baruch Sadogursky
 
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at DevOps Days Be...
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at DevOps Days Be...DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at DevOps Days Be...
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at DevOps Days Be...Baruch Sadogursky
 
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at The Pittsburgh...
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at The Pittsburgh...DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at The Pittsburgh...
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at The Pittsburgh...Baruch Sadogursky
 
Let’s Wing It: A Study in DevRel Strategy
 Let’s Wing It: A Study in DevRel Strategy Let’s Wing It: A Study in DevRel Strategy
Let’s Wing It: A Study in DevRel StrategyBaruch Sadogursky
 
Log Driven First Class Customer Support at Scale
Log Driven First Class Customer Support at ScaleLog Driven First Class Customer Support at Scale
Log Driven First Class Customer Support at ScaleBaruch Sadogursky
 
[Webinar] The Frog And The Butler: CI Pipelines For Modern DevOps
[Webinar] The Frog And The Butler: CI Pipelines For Modern DevOps[Webinar] The Frog And The Butler: CI Pipelines For Modern DevOps
[Webinar] The Frog And The Butler: CI Pipelines For Modern DevOpsBaruch Sadogursky
 
Patterns and antipatterns in Docker image lifecycle as was presented at DC Do...
Patterns and antipatterns in Docker image lifecycle as was presented at DC Do...Patterns and antipatterns in Docker image lifecycle as was presented at DC Do...
Patterns and antipatterns in Docker image lifecycle as was presented at DC Do...Baruch Sadogursky
 
Groovy Puzzlers S04: The Bytecode Bites Back at Gr8Conf US 2017
Groovy Puzzlers S04: The Bytecode Bites Back at Gr8Conf US 2017Groovy Puzzlers S04: The Bytecode Bites Back at Gr8Conf US 2017
Groovy Puzzlers S04: The Bytecode Bites Back at Gr8Conf US 2017Baruch Sadogursky
 

Plus de Baruch Sadogursky (20)

DevOps Patterns & Antipatterns for Continuous Software Updates @ NADOG April ...
DevOps Patterns & Antipatterns for Continuous Software Updates @ NADOG April ...DevOps Patterns & Antipatterns for Continuous Software Updates @ NADOG April ...
DevOps Patterns & Antipatterns for Continuous Software Updates @ NADOG April ...
 
DevOps Patterns & Antipatterns for Continuous Software Updates @ DevOps.com A...
DevOps Patterns & Antipatterns for Continuous Software Updates @ DevOps.com A...DevOps Patterns & Antipatterns for Continuous Software Updates @ DevOps.com A...
DevOps Patterns & Antipatterns for Continuous Software Updates @ DevOps.com A...
 
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at Oracle Code NY...
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at Oracle Code NY...DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at Oracle Code NY...
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at Oracle Code NY...
 
Data driven devops as presented at QCon London 2018
Data driven devops as presented at QCon London 2018Data driven devops as presented at QCon London 2018
Data driven devops as presented at QCon London 2018
 
A Research Study Into DevOps Bottlenecks as presented at Oracle Code LA 2018
A Research Study Into DevOps Bottlenecks as presented at Oracle Code LA 2018A Research Study Into DevOps Bottlenecks as presented at Oracle Code LA 2018
A Research Study Into DevOps Bottlenecks as presented at Oracle Code LA 2018
 
Java Puzzlers NG S03 a DevNexus 2018
Java Puzzlers NG S03 a DevNexus 2018Java Puzzlers NG S03 a DevNexus 2018
Java Puzzlers NG S03 a DevNexus 2018
 
Where the Helm are your binaries? as presented at Canada Kubernetes Meetups
Where the Helm are your binaries? as presented at Canada Kubernetes MeetupsWhere the Helm are your binaries? as presented at Canada Kubernetes Meetups
Where the Helm are your binaries? as presented at Canada Kubernetes Meetups
 
Data driven devops as presented at Codemash 2018
Data driven devops as presented at Codemash 2018Data driven devops as presented at Codemash 2018
Data driven devops as presented at Codemash 2018
 
A Research Study into DevOps Bottlenecks as presented at Codemash 2018
A Research Study into DevOps Bottlenecks as presented at Codemash 2018A Research Study into DevOps Bottlenecks as presented at Codemash 2018
A Research Study into DevOps Bottlenecks as presented at Codemash 2018
 
Best Practices for Managing Docker Versions as presented at JavaOne 2017
Best Practices for Managing Docker Versions as presented at JavaOne 2017Best Practices for Managing Docker Versions as presented at JavaOne 2017
Best Practices for Managing Docker Versions as presented at JavaOne 2017
 
Troubleshooting & Debugging Production Microservices in Kubernetes as present...
Troubleshooting & Debugging Production Microservices in Kubernetes as present...Troubleshooting & Debugging Production Microservices in Kubernetes as present...
Troubleshooting & Debugging Production Microservices in Kubernetes as present...
 
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at Devoxx 2017
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at Devoxx 2017DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at Devoxx 2017
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at Devoxx 2017
 
Amazon Alexa Skills vs Google Home Actions, the Big Java VUI Faceoff as prese...
Amazon Alexa Skills vs Google Home Actions, the Big Java VUI Faceoff as prese...Amazon Alexa Skills vs Google Home Actions, the Big Java VUI Faceoff as prese...
Amazon Alexa Skills vs Google Home Actions, the Big Java VUI Faceoff as prese...
 
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at DevOps Days Be...
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at DevOps Days Be...DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at DevOps Days Be...
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at DevOps Days Be...
 
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at The Pittsburgh...
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at The Pittsburgh...DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at The Pittsburgh...
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at The Pittsburgh...
 
Let’s Wing It: A Study in DevRel Strategy
 Let’s Wing It: A Study in DevRel Strategy Let’s Wing It: A Study in DevRel Strategy
Let’s Wing It: A Study in DevRel Strategy
 
Log Driven First Class Customer Support at Scale
Log Driven First Class Customer Support at ScaleLog Driven First Class Customer Support at Scale
Log Driven First Class Customer Support at Scale
 
[Webinar] The Frog And The Butler: CI Pipelines For Modern DevOps
[Webinar] The Frog And The Butler: CI Pipelines For Modern DevOps[Webinar] The Frog And The Butler: CI Pipelines For Modern DevOps
[Webinar] The Frog And The Butler: CI Pipelines For Modern DevOps
 
Patterns and antipatterns in Docker image lifecycle as was presented at DC Do...
Patterns and antipatterns in Docker image lifecycle as was presented at DC Do...Patterns and antipatterns in Docker image lifecycle as was presented at DC Do...
Patterns and antipatterns in Docker image lifecycle as was presented at DC Do...
 
Groovy Puzzlers S04: The Bytecode Bites Back at Gr8Conf US 2017
Groovy Puzzlers S04: The Bytecode Bites Back at Gr8Conf US 2017Groovy Puzzlers S04: The Bytecode Bites Back at Gr8Conf US 2017
Groovy Puzzlers S04: The Bytecode Bites Back at Gr8Conf US 2017
 

Dernier

Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAnitaRaj43
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxRemote DBA Services
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 

Dernier (20)

Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by Anitaraj
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 

Java Puzzlers NG S02: Down the Rabbit Hole as presented at DevNexus 2017

  • 1. This slide is intentionally left blank
  • 2.
  • 3.
  • 4. Developer Advocate @JFrog @jbaruch on the internetz Developer Advocate @Hazelcast @gAmUssA on the internetz
  • 5.
  • 10. 1. Two entertaining guys on the stage 2. Funny puzzling questions 3. You think and vote 4.T-shirts are airborne 5. Official twitter hashtags: #javapuzzlersng #devnexus
  • 11.
  • 12. Which Java version are you on? A. Java 7 B. Java 8 C. Java 9 D. Java 6 E. Java 5 F. Java 2 @jbaruch @gamussa #devnexus http://jfrog.com/shownotes
  • 13. Watching the puzzlers like… #dafaq @jbaruch @gamussa #devnexus http://jfrog.com/shownotes
  • 14. Everything works (or doesn't) in the latest Java 8 and/or 9 update @jbaruch @gamussa #devnexus http://jfrog.com/shownotes
  • 15.
  • 16.
  • 17. public class PerfectRobbery { private Semaphore bankAccount = new Semaphore(-42); public static void main(String[] args) { PerfectRobbery perfectRobbery = new PerfectRobbery(); perfectRobbery.takeAllMoney(); perfectRobbery.checkBalance(); } public void takeAllMoney(){ bankAccount.drainPermits(); } public void checkBalance(){ System.out.println(bankAccount.availablePermits()); } } A. IllegalArgumentException –can’t create semaphore with negative B. UnsupportedOperationException –can’t drain when negative C. 0 D. -42
  • 19. A. IllegalArgumentException –can’t create semaphore with negative B. UnsupportedOperationException –can’t drain when negative C. 0 D. -42 public class PerfectRobbery { private Semaphore bankAccount = new Semaphore(-42); public static void main(String[] args) { PerfectRobbery perfectRobbery = new PerfectRobbery(); perfectRobbery.takeAllMoney(); perfectRobbery.checkBalance(); } public void takeAllMoney(){ bankAccount.drainPermits(); } public void checkBalance(){ System.out.println(bankAccount.availablePermits()); } }
  • 23. A. true/true B. true/false C. false/true D. false/false Collections.emptyList() == Collections.emptyList(); Collections.emptyIterator() == Collections.emptyIterator(); @jbaruch @gamussa #devnexus http://jfrog.com/shownotes
  • 25. A. true/true B. true/false C. false/true D. false/false Spliterators.emptySpliterator() == Spliterators.emptySpliterator(); Stream.empty() == Stream.empty();
  • 26. Singleton Strikes Back! @jbaruch @gamussa #devnexus http://jfrog.com/shownotes
  • 27. A. true/true B. true/false C. false/true D. false/false Spliterators.emptySpliterator() == Spliterators.emptySpliterator(); Stream.empty() == Stream.empty(); @jbaruch @gamussa #devnexus http://jfrog.com/shownotes
  • 28. Even empty Stream has state! @jbaruch @gamussa #devnexus http://jfrog.com/shownotes
  • 29.
  • 30. ”Identical” 1. Has the same state 2. Not related to “equals and hashcode”contract 3. Not related to references to objects in memory @jbaruch @gamussa #devnexus http://jfrog.com/shownotes
  • 31. List[] twins = new List[2]; Arrays.setAll(twins, ArrayList::new); A. Absolutely identical empty lists B. Absolutely identical non-empty lists C. Non-identical empty lists D. Non-identical non-empty lists @jbaruch @gamussa #devnexus http://jfrog.com/shownotes
  • 33. List[] twins = new List[2]; Arrays.setAll(twins, ArrayList::new); A. Absolutely identical empty lists B. Absolutely identical non-empty lists C. Non-identical empty lists D. Non-identical non-empty lists @jbaruch @gamussa #devnexus http://jfrog.com/shownotes
  • 35. How single is a Single Abstract Method Interface? @jbaruch @gamussa #devnexus http://jfrog.com/shownotes
  • 36. A. WTF?! ’Single’means one,not three! B. Problem is with partyHard(T),remove it and it will work C. Problem is the drinkIn methods,removing one of them and it will work D. It will work fine! Both partyHard() and drinkIn() are merged in SingleAndHappy,leaving one abstract method public interface Single<T> { default void partyHard(String songName) { System.out.println(songName); } void partyHard(T songName); void drinkIn(T drinkName); void drinkIn(String dringName); } @FunctionalInterface public interface SingleAndHappy extends Single<String> { } @jbaruch @gamussa #devnexus http://jfrog.com/shownotes
  • 37.
  • 38. A. WTF?! ’Single’means one,not three! B. Problem is with partyHard(T),remove it and it will work C. Problem are the drinkIn methods,removing it will leave one abstract method D. Yes! Both partyHard() and drinkIn() are merged in SingleAndHappy, leaving one abstract method public interface Single<T> { default void partyHard(String songName) { System.out.println(songName); } void partyHard(T songName); void drinkIn(T drinkName); void drinkIn(String dringName); } @FunctionalInterface public interface SingleAndHappy extends Single<String> { } @jbaruch @gamussa #devnexus http://jfrog.com/shownotes
  • 40.
  • 41. Hacking the bank ☑Bank software written in Java ☑Hack into it ☑Analyze the accounts @jbaruch @gamussa #devnexus http://jfrog.com/shownotes
  • 42. Given the code above,which statement is wrong: A. The Set is ordered by hashcode B. The order is predictable across multiple runs of the JVM on the same machine C. The order of elements in Set is not predictable D. Statements A & B are correct Set<String> accounts= new HashSet<>(Arrays.asList("Gates", "Buffett", "Bezos", "Zuckerberg")); System.out.println(”accounts= " + accounts); @jbaruch @gamussa #devnexus http://jfrog.com/shownotes
  • 43.
  • 44. Given the code above,which statement is wrong: A. The Set is ordered B. The order is predictable across multiple runs of the JVM on the same machine C. The order of elements in Set is not predictable D. Statements A & B are correct Set<String> accounts= new HashSet<>(Arrays.asList("Gates", "Buffett", "Bezos", "Zuckerberg")); System.out.println(”accounts= " + accounts); @jbaruch @gamussa #devnexus http://jfrog.com/shownotes
  • 45. public boolean add(E e) { return map.put(e, PRESENT)==null; } @jbaruch @gamussa #devnexus http://jfrog.com/shownotes
  • 46. Your turn,FBI @jbaruch @gamussa #devnexus http://jfrog.com/shownotes
  • 47.
  • 48. Given the code above,which statement is wrong: A. The Set is ordered B. The order is predictable across multiple runs of the JVM on the same machine C. The order of elements in Set is not predictable D. Statements A & B are correct Set<String> accounts = Set.of("Gates", "Buffett", "Bezos", "Zuckerberg"); System.out.println(”accounts= " + accounts); @jbaruch @gamussa #devnexus http://jfrog.com/shownotes
  • 51. Given the code above,which statement is wrong: A. The Set is ordered B. The order is predictable across multiple runs of the JVM on the same machine C. The order of elements in Set is not predictable D. Statements A & B are correct Set<String> accounts = Set.of("Gates", "Buffett", "Bezos", "Zuckerberg"); System.out.println(”accounts= " + accounts); @jbaruch @gamussa #devnexus http://jfrog.com/shownotes
  • 52. private int probe(Object pe) { int idx = Math.floorMod(pe.hashCode() ^ SALT, elements.length); while (true) { E ee = elements[idx]; if (ee == null) { return -idx - 1; } else if (pe.equals(ee)) { return idx; } else if (++idx == elements.length) { idx = 0; } } } @jbaruch @gamussa #devnexus http://jfrog.com/shownotes
  • 54. What’s correct? A. If you convert your application to module,classpath dependencies will still be resolved correctly B. If one of the dependencies was converted to a module,you have to declare it in module-info in order to use C. Once you added the module-info to your project you have to declare the dependencies twice,in classpath and in module- info D. None of the above @jbaruch @gamussa #devnexus http://jfrog.com/shownotes
  • 55.
  • 56. What’s correct? A. If you convert your application to module,classpath dependencies will still be resolved correctly B. If one of the dependencies was converted to a module,you have to declare it in module-info in order to use C. Once you added the module-info to your project you have to declare the dependencies twice,in classpath and in module- info D. None of the above @jbaruch @gamussa #devnexus http://jfrog.com/shownotes
  • 58.
  • 59. A. You killed them all B. You killed only even ones C. They all survived D. You killed only odd ones E. All answers are correct static void killThemAll(Collection<Hero> expendables) { Iterator<Hero> heroes = expendables.iterator(); heroes.forEachRemaining(e -> { if (heroes.hasNext()) { heroes.next(); heroes.remove(); } }); System.out.println(expendables); }
  • 61. A. You killed them all B. You killed only even ones C. They all survived D. You killed only odd ones E. All answers are correct static void killThemAll(Collection<Hero> expendables) { Iterator<Hero> heroes = expendables.iterator(); heroes.forEachRemaining(e -> { if (heroes.hasNext()) { heroes.next(); heroes.remove(); } }); System.out.println(expendables); }
  • 62. Don’t do that.Really,don’t. killThemAll(new ArrayList<String>(Arrays.asList("N","S","W","S","L","S","L","V"))); [] killThemAll(new LinkedList<String>(Arrays.asList("N","S","W","S","L","S","L","V"))); [S,S,S,V] killThemAll(new ArrayDeque<String>(Arrays.asList("N","S","W","S","L","S","L","V"))); [N,S,W,S,L,S,L,V] killThemAll(new TreeSet<String>(Arrays.asList("N","S","W","S","L","S","L","V"))); [N,W,L,L] @jbaruch @gamussa #devnexus http://jfrog.com/shownotes
  • 63. Subtle Difference @jbaruch @gamussa #devnexus http://jfrog.com/shownotes
  • 64. A. Both work just fine B. Lambda works,method ref fails C. Method ref works,lambda fails D. Won’t compile @FunctionalInterface public interface OriginalPredicate<T> { boolean test(T t); } OriginalPredicate<Object> lambda = (Object obj) -> ”adidas".equals(obj); OriginalPredicate<Object> methodRef = ”adidas"::equals;
  • 65.
  • 66. A. Both work just fine B. Lambda works,method ref fails C. Method ref works,lambda fails D. Not a functional interface,will fail on annotation processing @FunctionalInterface Public interface CopyCatPredicate { <T> boolean test(T t); } CopyCatPredicate lambda = (Object obj) -> " adadas".equals(obj); CopyCatPredicate methodRef = " adadas"::equals;
  • 67.
  • 70.
  • 71. A.[Data, Kirk, Spock] B.[Spock, Kirk, Data, Data, Kirk] C.[Spock, Kirk, Data] D.[Data, Data, Kirk, Kirk, Spock, Spock] E.Are you nuts? Won’t compile! Data with Kirk?! List<String> list = Stream.of("Spock", "Kirk", "Data", "Data", "Kirk", "Spock").sequential() .filter(new TreeSet<>()::add).collect(Collectors.toList()); System.out.println(list); @jbaruch @gamussa #devnexus http://jfrog.com/shownotes
  • 72.
  • 73. A.[Data, Kirk, Spock] B.[Spock, Kirk, Data, Data, Kirk] C.[Spock, Kirk, Data] D.[Data, Data, Kirk, Kirk, Spock, Spock] E.Are you nuts? Won’t compile! Data with Kirk?! List<String> list = Stream.of("Spock", "Kirk", "Data", "Data", "Kirk", "Spock").sequential() .filter(new TreeSet<>()::add).collect(Collectors.toList()); System.out.println(list); @jbaruch @gamussa #devnexus http://jfrog.com/shownotes
  • 74.
  • 75. A.[Data, Kirk, Spock] B.[Spock, Kirk, Data, Data, Kirk] C.[Spock, Kirk, Data] D.[Data, Data, Kirk, Kirk, Spock, Spock] E.Are you nuts? Won’t compile! Data with Kirk?! List<String> list = Stream.of("Spock", "Kirk", "Data", "Data", "Kirk", "Spock").sequential() .filter(new TreeSet<>()::add).collect(Collectors.toList()); System.out.println(list); @jbaruch @gamussa #devnexus http://jfrog.com/shownotes
  • 76. filter(new TreeSet<>()::add) filter(i -> new TreeSet<>().add(i))!= New instance is created every time! Instance method is created once! @jbaruch @gamussa #devnexus http://jfrog.com/shownotes
  • 78. A. obvious / obvious B. obvious / NullPointerException C. NullPointerException / obvious D. NullPointerException / NullPointerException Optional.of("obvious").orElseGet(null); Optional.empty().map(null).orElse("obvious"); @jbaruch @gamussa #devnexus http://jfrog.com/shownotes
  • 80. A. obvious / obvious B. obvious / NullPointerException C. NullPointerException / obvious D. NullPointerException / NullPointerException Optional.of("obvious").orElseGet(null); Optional.empty().map(null).orElse("obvious"); Will never happen Will never happen @jbaruch @gamussa #devnexus http://jfrog.com/shownotes
  • 82. A. obvious / obvious B. obvious / NullPointerException C. NullPointerException / obvious D. NullPointerException / NullPointerException Optional.of("obvious").orElseGet(null); Optional.empty().map(null).orElse("obvious"); @jbaruch @gamussa #devnexus http://jfrog.com/shownotes
  • 85. A. All B. 3 and 4 C. Only 3 D. Other 1. Consumer<String> agentA = s -> System.out.println(s); Consumer<String> agentB = s -> System.out.println(s); 2. Consumer<String> agentA = System.out::println; Consumer<String> agentB = System.out::println; 3. Supplier<Consumer<String>> supplier = () -> s -> System.out.println(s); Consumer<String> agentA = supplier.get(); Consumer<String> agentB = supplier.get(); 4. Supplier<Consumer<String>> supplier = () -> System.out::println; Consumer<String> agentA = supplier.get(); Consumer<String> agentB = supplier.get(); When agentA == agentB?
  • 87. A. All B. 3 and 4 C. Only 3 D. Other 1. Consumer<String> agentA = s -> System.out.println(s); Consumer<String> agentB = s -> System.out.println(s); 2. Consumer<String> agentA = System.out::println; Consumer<String> agentB = System.out::println; 3. Supplier<Consumer<String>> supplier = () -> s -> System.out.println(s); Consumer<String> agentA = supplier.get(); Consumer<String> agentB = supplier.get(); 4. Supplier<Consumer<String>> supplier = () -> System.out::println; Consumer<String> agentA = supplier.get(); Consumer<String> agentB = supplier.get(); When agentA == agentB?
  • 88. Reuse is only possible for pure functions •Consumers accept parameters == have state •Supplier in 4 has state –the resolved method reference @jbaruch @gamussa #devnexus http://jfrog.com/shownotes
  • 90. -Write readable code! -Comment all the tricks -Sometimes it’s just a bug -Static code analysis FTW - IntelliJ IDEA! -RTFM! -Don’t abuse lambdas and streams!
  • 91. -Trust us, we have much more where those came from. -Puzzlers? Gotchas? Fetal position inducing behavior? -puzzlers@jfrog.com
  • 92. -Shownotes! -http://jfrog.com/shownotes -Slides -Video in 24 hours -Links -Ratings -Raffle! (come early)
  • 93. -Did you like it? -Praise us on twitter! -#javapuzzlersng #devnexus -@gamussa -@jbaruch -Didn’t like it? -/dev/null