SlideShare une entreprise Scribd logo
1  sur  65
Cargo Culting
and Memes
Nicolas Fränkel
JEE Conf, Kiev, May 2014
Me, myself and I
Developer & Architect as consultant
 Wide range of businesses & customers
Teacher & Trainer
Blogger
 blog.frankel.ch
 morevaadin.com
@nicolas_frankel 2
Also an author
3
E-commerce company
Rocks
Sends employees to Oktoberfest
4@nicolas_frankel
Cargo culting vs memes
@nicolas_frankel 5
Cargo culting
Reproducing outer form in order to
get some benefits regardless of
contexts
@nicolas_frankel 6
Memes
Widespread ideas
 With no (or shallow) scientific proof behind
@nicolas_frankel 7
Disclaimer
“All characters appearing in this
work are fictitious. Any
resemblance to real persons, living
or dead, is purely coincidental.”
@nicolas_frankel 8
Do not believe me!
You are not getting sleepy!
I do not want to spread more cargo
culting & memes
 Try…
@nicolas_frankel 9
Cargo culting
@nicolas_frankel 10
Imagine living on a paradise island
Free from daily world contingencies
@nicolas_frankel 11
Then come some white people in
birds of steel
They build some stuff, and bigger
birds of steel come, with bunches
of people inside
@nicolas_frankel 12
And the birds of steel have plenty
of good food inside
With no need to go fishing…
@nicolas_frankel 13
When they all go away, what’s the
smart thing to do:
 Go fishing again?
 Or build the same stuff and hope to attract
more birds of steel?
Very crude summary of Cargo
Culting during WWII (in the Pacific)
@nicolas_frankel 14
The devil is in the detail
Once upon a time, there was a
young developer
He started using Java 1.3
And was taught that local variable
declaration was heavy on
performance
@nicolas_frankel 15
Some years later, he became an
« expert »
And wrote some good practices
guidelines
Including declaring local variables
outside loops
int nb = 0;
for (int i = 0;
i<n; i++) {
...
}
He was very happy
And all developers happily followed
his rules
@nicolas_frankel 17
Until… a new developer came in
town
And threw the gauntlet by claiming:
 « You shall declare your variables in the
narrowest scope possible »
This meant inside the loop
@nicolas_frankel 18
The « expert » accepted the
challenge
And coded a small snippet to assert
his claims
It failed miserably…
JDK 1.4 was smart enough to
produce the exact same bytecode
regardless where the variable was
declared
@nicolas_frankel 19
The « expert » was sorely
disappointed
But realized a very important fact
« There’s no universal truth, it all
depends on the context »
@nicolas_frankel 20
Also applies to:
 Food
 Religion
 Sports
 You name it
@nicolas_frankel 21
Facts
At this time, I don’t know if that was
ever true
 I suppose it was
I found nothing supporting this (or
the opposite) on the Internet
 Downloading and installing Java 1.3 sucks
@nicolas_frankel 22
Data Transfer Object
Once upon a time, there was
platform called J2EE
Which provided a bunch of API
@nicolas_frankel 23
EJB Entity - a real heavyweight
object, was bound to the container
So Sun crafted a magical artifact,
the DTO
To allow for data to go outside the
container
@nicolas_frankel 24
The birth of EJB 3 brought a new
Golden Age
And freed people of the tyranny of
the EJB Container
Sadly, many developers still flock to
the banner of the DTO
@nicolas_frankel 25
Alternatives
1. When no association required
 Use the entity directly
2. Use eager associations
3. Use the OpenSessionInView
filter
 …
4. Call getters to force load
5. Use JOIN FETCH
@nicolas_frankel 26
Data Access Object
Among other J2EE weapons of
power was the DAO
It was mighty indeed
As it could decouple your
application from persistence stores
of that time
 JDBC
 JDO
 EJB Entity
@nicolas_frankel 27
Agility was at your fingertips!
Change from JDBC to JDO
 And back again (?)
@nicolas_frankel 28
Back then, DAO had its uses
 Try JDO
 Then rollback if when something went wrong
@nicolas_frankel 29
The fall of the DAO
Nowadays, heroes use JPA!
 Already an abstraction
Or a concrete implementation
 For good reasons
But some fallen knights lies to
themselves in thinking they will
change their data store
 Or it will require such a major rework DAO
cannot insulate them from
 SQL to NoSQL
@nicolas_frankel 30
Alternatives
JPA makes the EntityManager the
DAO
Spring Data has a different
abstraction
 Repository
Only when using implementations
one might need DAO
 To migrate from one document-based
NoSQL store to another document-based
@nicolas_frankel 31
XML is BAD
10 years ago, it was all XML
 Can be validated against a schema
XML became evil with the coming of
annotations in Java 5
@nicolas_frankel 32
Critics against XML
Verbose
Are not compiled
 Errors (beyond grammar) are discovered at
runtime
@nicolas_frankel 33
Self-annotated classes
@Service
@Scope("prototype")
public class MyBean {
@Autowired
private MyRepository myRepo;
...
}
@nicolas_frankel 34
Pros Cons
Everything in the same place Couples code to Spring
Compiled Prevents reusability
Allows bad design
@nicolas_frankel 35
Alternatives
XML
JavaConfig
 Compiled
 With no con of self-annotated classes
@nicolas_frankel 36
Javaconfig Example
@Configuration
public class JavaConfig {
@Bean
@Scope(SCOPE_PROTOTYPE)
public class myBean() {
return new MyBean(myRepo());
}
@Bean
public class myRepo() {
return new MyRepository();
}
}
@nicolas_frankel 37
Related to Cargo Culting
Copy-Paste Driven Programming
Reverse Cargo Culting:
 Forget the form because the context is
different
@nicolas_frankel 38
Spotting Cargo Culting
“We’ve always done like that”
“It’s always been working”
@nicolas_frankel 39
How not to Cargo Cult
Question reasons behind decisions
You cannot always be up-to-date
 Listen to others and their arguments
 Admit you’re wrong (when you are)
Yes, it’s hard and time-consuming!
@nicolas_frankel 40
Memes
@nicolas_frankel 41
Memes
Cargo Culting can be remedied if
the cultist is rational and willing to
listen
Memes are way more pervasive
Based on faith
And you never can convince a
faithful to renounce his faith
 Only if he’s not a true faithful
@nicolas_frankel 42
My Illumination
The Leprechauns of Software
Engineering
@nicolas_frankel 43
The 10X productivity rule
“A good programmer can be as 10X
times more productive than a
mediocre one”
@nicolas_frankel 44
Sackman & al. 1968
“exploratory experiments (...) to
compare debugging performances
of programmers working under
conditions of online and offline
access to a computer”
Ratio of 28:1
 Subject 7 required 170 hours to program the
algebra program in a batch environment in
machine language
 Subject 3 required 6 hours to program the
same problem in ALGOL in a time-shared
environment
@nicolas_frankel 45
Ref. Direct? Task
type
Sample
size
Pop. Measure Variation
Curtis 1981 N Debug 27 Pros Time-to-
compile
22:1
8:1
Mills 1983 Y ? ? ? ? 10:1
DeMarco &
Lister 1985
Y Program
to spec
166 Pros Time-to-
complete
5,6:1
Curtis & al.
1986
N N/A N/A N/A N/A Various
Card 1987 N Project ? Pros LOC per staff
hour
Not
claimed
Boehm &
Pappacio
1988
N N/A N/A N/A N/A Various
Valet &
McGarry
1989
N Project 150 Pros LOC per staff
hour
Not
claimed
Boehm 2000 Y Project 161
projects
Pros Manager’s
evaluation
Not
claimed@nicolas_frankel 46
Productivity in software
Which metrics?
 LOC?
 Any is trivial to game...
Which task?
 Must be the same in order to compare
Which population?
 Pros have other things to do
@nicolas_frankel 47
My experience
There’s a difference in productivity
 But I never could quantify
I can only say if one developer is
more productive than another in a
specific area
Software is a team effort!
@nicolas_frankel 48
But rejoice!
Other domains are not free of
memes either
 Project Management
 Graphical Design
@nicolas_frankel 49
@nicolas_frankel 50
The source of “truth”
Software Engineering Economics –
Boehm, 1981
Made famous in Rapid Development
– McConnell, 1996
@nicolas_frankel 51
It makes sense that uncertainty
decreases with time passing...
Does it make sense that:
 It is symmetric?
 It follows f(x) = -a/x?
@nicolas_frankel 52
My experience
@nicolas_frankel 53
Images are read LTR
When I was younger (a long time
ago), I was told that images should
be designed to be read left-to-right
 And right-to-left for native Arab / Hebrew
speakers
@nicolas_frankel 54
Then came a device to follow eyes
movements
And they made an experience on
the TV
@nicolas_frankel 55
@nicolas_frankel 56
RELATED TO MEMES
“No True Scotsman” Logical fallacy
Ideology
@nicolas_frankel 57
No true Scotsman
“Scotsmen do not put sugar on
their porridge
- I’m a Scotsman and I put sugar on
my porridge
- No true Scotsman sugars his
porridge”
@nicolas_frankel 58
Code is self-documenting
“Yet I cannot make this code clear
without comments.
- Then it’s bad code!”
@nicolas_frankel 59
Agile delivers
“Yet my last Agile project went
wrong.
- Then it must not have been truly
Agile”
@nicolas_frankel 60
Ideology
Memes and ideologies are based on
faith
 Memes are largely shared
 Ideologies are more restricted
 Counter-ideologies
@nicolas_frankel 61
This is crap
It’s not proper:
 Object-Oriented Programming
 Functional Programming
 You name yours
@nicolas_frankel 62
Those are ways!
My goal is to achieve those
properties:
 Readability
 Testability
 Maintainability
So long as I get them, I don’t care
 Better to have a unique paradigm in an
application
@nicolas_frankel 63
Spotting Memes
@nicolas_frankel 64
Thank you for your interest
@nicolas_frankel
@learnvaadin
@itfromtrenches
http://blog.frankel.ch/
http://morevaadin.com/

Contenu connexe

Similaire à Cargo Culting and Memes

7 lessons learned building high availability / performance systems - CM2015
7 lessons learned building high availability / performance systems - CM20157 lessons learned building high availability / performance systems - CM2015
7 lessons learned building high availability / performance systems - CM2015Francesco Degrassi
 
Java Dominicano - Mutation testing
Java Dominicano - Mutation testingJava Dominicano - Mutation testing
Java Dominicano - Mutation testingNicolas Fränkel
 
Codemotion Berlin - Improve your tests with Mutation Testing
Codemotion Berlin - Improve your tests with Mutation TestingCodemotion Berlin - Improve your tests with Mutation Testing
Codemotion Berlin - Improve your tests with Mutation TestingNicolas Fränkel
 
Codemash - Mutation testing to the rescue of your tests
Codemash - Mutation testing to the rescue of your testsCodemash - Mutation testing to the rescue of your tests
Codemash - Mutation testing to the rescue of your testsNicolas Fränkel
 
A look inside Babelfy: Examining the bubble
A look inside Babelfy: Examining the bubbleA look inside Babelfy: Examining the bubble
A look inside Babelfy: Examining the bubbleFilip Ilievski
 
OSCONF Jaipur - A Hitchhiker's Tour to Containerizing a Java application
OSCONF Jaipur - A Hitchhiker's Tour to Containerizing a Java applicationOSCONF Jaipur - A Hitchhiker's Tour to Containerizing a Java application
OSCONF Jaipur - A Hitchhiker's Tour to Containerizing a Java applicationNicolas Fränkel
 
Software Carpentry and the Hydrological Sciences @ AGU 2013
Software Carpentry and the Hydrological Sciences @ AGU 2013Software Carpentry and the Hydrological Sciences @ AGU 2013
Software Carpentry and the Hydrological Sciences @ AGU 2013Aron Ahmadia
 
Clean code in Jupyter notebooks
Clean code in Jupyter notebooksClean code in Jupyter notebooks
Clean code in Jupyter notebooksKaterina Nerush
 
Got Myth? Myths in Software Engineering
Got Myth? Myths in Software EngineeringGot Myth? Myths in Software Engineering
Got Myth? Myths in Software EngineeringThomas Zimmermann
 
DEF CON 27 - workshop - EIGENTOURIST - hacking with monads
DEF CON 27 - workshop - EIGENTOURIST - hacking with monadsDEF CON 27 - workshop - EIGENTOURIST - hacking with monads
DEF CON 27 - workshop - EIGENTOURIST - hacking with monadsFelipe Prado
 
Kim Solez DALL-E and Kidney Pathology Machine Fantasies Give Hint About What...
Kim Solez DALL-E  and Kidney Pathology Machine Fantasies Give Hint About What...Kim Solez DALL-E  and Kidney Pathology Machine Fantasies Give Hint About What...
Kim Solez DALL-E and Kidney Pathology Machine Fantasies Give Hint About What...Kim Solez ,
 
Core Methods In Educational Data Mining
Core Methods In Educational Data MiningCore Methods In Educational Data Mining
Core Methods In Educational Data Miningebelani
 
The road from good software engineering to good science...is a two way street
The road from good software engineering to good science...is a two way streetThe road from good software engineering to good science...is a two way street
The road from good software engineering to good science...is a two way streetUniversity of Minnesota, Duluth
 
Four Patterns at the Heart of Good Programming Style
Four Patterns at the Heart of Good Programming StyleFour Patterns at the Heart of Good Programming Style
Four Patterns at the Heart of Good Programming StylePhilip Schwarz
 
GeeCon - Starting on Ethereum
GeeCon - Starting on EthereumGeeCon - Starting on Ethereum
GeeCon - Starting on EthereumNicolas Fränkel
 
Riga Dev Days - Starting on Ethereum, a developer's perspective
Riga Dev Days - Starting on Ethereum, a developer's perspectiveRiga Dev Days - Starting on Ethereum, a developer's perspective
Riga Dev Days - Starting on Ethereum, a developer's perspectiveNicolas Fränkel
 

Similaire à Cargo Culting and Memes (18)

7 lessons learned building high availability / performance systems - CM2015
7 lessons learned building high availability / performance systems - CM20157 lessons learned building high availability / performance systems - CM2015
7 lessons learned building high availability / performance systems - CM2015
 
Java Dominicano - Mutation testing
Java Dominicano - Mutation testingJava Dominicano - Mutation testing
Java Dominicano - Mutation testing
 
Codemotion Berlin - Improve your tests with Mutation Testing
Codemotion Berlin - Improve your tests with Mutation TestingCodemotion Berlin - Improve your tests with Mutation Testing
Codemotion Berlin - Improve your tests with Mutation Testing
 
Codemash - Mutation testing to the rescue of your tests
Codemash - Mutation testing to the rescue of your testsCodemash - Mutation testing to the rescue of your tests
Codemash - Mutation testing to the rescue of your tests
 
A look inside Babelfy: Examining the bubble
A look inside Babelfy: Examining the bubbleA look inside Babelfy: Examining the bubble
A look inside Babelfy: Examining the bubble
 
OSCONF Jaipur - A Hitchhiker's Tour to Containerizing a Java application
OSCONF Jaipur - A Hitchhiker's Tour to Containerizing a Java applicationOSCONF Jaipur - A Hitchhiker's Tour to Containerizing a Java application
OSCONF Jaipur - A Hitchhiker's Tour to Containerizing a Java application
 
Software Carpentry and the Hydrological Sciences @ AGU 2013
Software Carpentry and the Hydrological Sciences @ AGU 2013Software Carpentry and the Hydrological Sciences @ AGU 2013
Software Carpentry and the Hydrological Sciences @ AGU 2013
 
Clean code in Jupyter notebooks
Clean code in Jupyter notebooksClean code in Jupyter notebooks
Clean code in Jupyter notebooks
 
Got Myth? Myths in Software Engineering
Got Myth? Myths in Software EngineeringGot Myth? Myths in Software Engineering
Got Myth? Myths in Software Engineering
 
DEF CON 27 - workshop - EIGENTOURIST - hacking with monads
DEF CON 27 - workshop - EIGENTOURIST - hacking with monadsDEF CON 27 - workshop - EIGENTOURIST - hacking with monads
DEF CON 27 - workshop - EIGENTOURIST - hacking with monads
 
Kim Solez DALL-E and Kidney Pathology Machine Fantasies Give Hint About What...
Kim Solez DALL-E  and Kidney Pathology Machine Fantasies Give Hint About What...Kim Solez DALL-E  and Kidney Pathology Machine Fantasies Give Hint About What...
Kim Solez DALL-E and Kidney Pathology Machine Fantasies Give Hint About What...
 
Clean Code in Jupyter notebook
Clean Code in Jupyter notebookClean Code in Jupyter notebook
Clean Code in Jupyter notebook
 
Kraken '16 It quiz final
Kraken '16 It quiz finalKraken '16 It quiz final
Kraken '16 It quiz final
 
Core Methods In Educational Data Mining
Core Methods In Educational Data MiningCore Methods In Educational Data Mining
Core Methods In Educational Data Mining
 
The road from good software engineering to good science...is a two way street
The road from good software engineering to good science...is a two way streetThe road from good software engineering to good science...is a two way street
The road from good software engineering to good science...is a two way street
 
Four Patterns at the Heart of Good Programming Style
Four Patterns at the Heart of Good Programming StyleFour Patterns at the Heart of Good Programming Style
Four Patterns at the Heart of Good Programming Style
 
GeeCon - Starting on Ethereum
GeeCon - Starting on EthereumGeeCon - Starting on Ethereum
GeeCon - Starting on Ethereum
 
Riga Dev Days - Starting on Ethereum, a developer's perspective
Riga Dev Days - Starting on Ethereum, a developer's perspectiveRiga Dev Days - Starting on Ethereum, a developer's perspective
Riga Dev Days - Starting on Ethereum, a developer's perspective
 

Plus de Nicolas Fränkel

SnowCamp - Adding search to a legacy application
SnowCamp - Adding search to a legacy applicationSnowCamp - Adding search to a legacy application
SnowCamp - Adding search to a legacy applicationNicolas Fränkel
 
Un CV de dévelopeur toujours a jour
Un CV de dévelopeur toujours a jourUn CV de dévelopeur toujours a jour
Un CV de dévelopeur toujours a jourNicolas Fränkel
 
Zero-downtime deployment on Kubernetes with Hazelcast
Zero-downtime deployment on Kubernetes with HazelcastZero-downtime deployment on Kubernetes with Hazelcast
Zero-downtime deployment on Kubernetes with HazelcastNicolas Fränkel
 
jLove - A Change-Data-Capture use-case: designing an evergreen cache
jLove - A Change-Data-Capture use-case: designing an evergreen cachejLove - A Change-Data-Capture use-case: designing an evergreen cache
jLove - A Change-Data-Capture use-case: designing an evergreen cacheNicolas Fränkel
 
BigData conference - Introduction to stream processing
BigData conference - Introduction to stream processingBigData conference - Introduction to stream processing
BigData conference - Introduction to stream processingNicolas Fränkel
 
ADDO - Your own Kubernetes controller, not only in Go
ADDO - Your own Kubernetes controller, not only in GoADDO - Your own Kubernetes controller, not only in Go
ADDO - Your own Kubernetes controller, not only in GoNicolas Fränkel
 
GeekcampSG 2020 - A Change-Data-Capture use-case: designing an evergreen cache
GeekcampSG 2020 - A Change-Data-Capture use-case: designing an evergreen cacheGeekcampSG 2020 - A Change-Data-Capture use-case: designing an evergreen cache
GeekcampSG 2020 - A Change-Data-Capture use-case: designing an evergreen cacheNicolas Fränkel
 
JavaDay Istanbul - 3 improvements in your microservices architecture
JavaDay Istanbul - 3 improvements in your microservices architectureJavaDay Istanbul - 3 improvements in your microservices architecture
JavaDay Istanbul - 3 improvements in your microservices architecture Nicolas Fränkel
 
OSCONF Hyderabad - Shorten all URLs!
OSCONF Hyderabad - Shorten all URLs!OSCONF Hyderabad - Shorten all URLs!
OSCONF Hyderabad - Shorten all URLs!Nicolas Fränkel
 
Devclub.lv - Introduction to stream processing
Devclub.lv - Introduction to stream processingDevclub.lv - Introduction to stream processing
Devclub.lv - Introduction to stream processingNicolas Fränkel
 
OSCONF Koshi - Zero downtime deployment with Kubernetes, Flyway and Spring Boot
OSCONF Koshi - Zero downtime deployment with Kubernetes, Flyway and Spring BootOSCONF Koshi - Zero downtime deployment with Kubernetes, Flyway and Spring Boot
OSCONF Koshi - Zero downtime deployment with Kubernetes, Flyway and Spring BootNicolas Fränkel
 
JOnConf - A CDC use-case: designing an Evergreen Cache
JOnConf - A CDC use-case: designing an Evergreen CacheJOnConf - A CDC use-case: designing an Evergreen Cache
JOnConf - A CDC use-case: designing an Evergreen CacheNicolas Fränkel
 
London In-Memory Computing Meetup - A Change-Data-Capture use-case: designing...
London In-Memory Computing Meetup - A Change-Data-Capture use-case: designing...London In-Memory Computing Meetup - A Change-Data-Capture use-case: designing...
London In-Memory Computing Meetup - A Change-Data-Capture use-case: designing...Nicolas Fränkel
 
JUG Tirana - Introduction to data streaming
JUG Tirana - Introduction to data streamingJUG Tirana - Introduction to data streaming
JUG Tirana - Introduction to data streamingNicolas Fränkel
 
Java.IL - Your own Kubernetes controller, not only in Go!
Java.IL - Your own Kubernetes controller, not only in Go!Java.IL - Your own Kubernetes controller, not only in Go!
Java.IL - Your own Kubernetes controller, not only in Go!Nicolas Fränkel
 
vJUG - Introduction to data streaming
vJUG - Introduction to data streamingvJUG - Introduction to data streaming
vJUG - Introduction to data streamingNicolas Fränkel
 
London Java Community - An Experiment in Continuous Deployment of JVM applica...
London Java Community - An Experiment in Continuous Deployment of JVM applica...London Java Community - An Experiment in Continuous Deployment of JVM applica...
London Java Community - An Experiment in Continuous Deployment of JVM applica...Nicolas Fränkel
 
OSCONF - Your own Kubernetes controller: not only in Go
OSCONF - Your own Kubernetes controller: not only in GoOSCONF - Your own Kubernetes controller: not only in Go
OSCONF - Your own Kubernetes controller: not only in GoNicolas Fränkel
 
vKUG - Migrating Spring Boot apps from annotation-based config to Functional
vKUG - Migrating Spring Boot apps from annotation-based config to FunctionalvKUG - Migrating Spring Boot apps from annotation-based config to Functional
vKUG - Migrating Spring Boot apps from annotation-based config to FunctionalNicolas Fränkel
 
Tech talks - 3 performance improvements
Tech talks - 3 performance improvementsTech talks - 3 performance improvements
Tech talks - 3 performance improvementsNicolas Fränkel
 

Plus de Nicolas Fränkel (20)

SnowCamp - Adding search to a legacy application
SnowCamp - Adding search to a legacy applicationSnowCamp - Adding search to a legacy application
SnowCamp - Adding search to a legacy application
 
Un CV de dévelopeur toujours a jour
Un CV de dévelopeur toujours a jourUn CV de dévelopeur toujours a jour
Un CV de dévelopeur toujours a jour
 
Zero-downtime deployment on Kubernetes with Hazelcast
Zero-downtime deployment on Kubernetes with HazelcastZero-downtime deployment on Kubernetes with Hazelcast
Zero-downtime deployment on Kubernetes with Hazelcast
 
jLove - A Change-Data-Capture use-case: designing an evergreen cache
jLove - A Change-Data-Capture use-case: designing an evergreen cachejLove - A Change-Data-Capture use-case: designing an evergreen cache
jLove - A Change-Data-Capture use-case: designing an evergreen cache
 
BigData conference - Introduction to stream processing
BigData conference - Introduction to stream processingBigData conference - Introduction to stream processing
BigData conference - Introduction to stream processing
 
ADDO - Your own Kubernetes controller, not only in Go
ADDO - Your own Kubernetes controller, not only in GoADDO - Your own Kubernetes controller, not only in Go
ADDO - Your own Kubernetes controller, not only in Go
 
GeekcampSG 2020 - A Change-Data-Capture use-case: designing an evergreen cache
GeekcampSG 2020 - A Change-Data-Capture use-case: designing an evergreen cacheGeekcampSG 2020 - A Change-Data-Capture use-case: designing an evergreen cache
GeekcampSG 2020 - A Change-Data-Capture use-case: designing an evergreen cache
 
JavaDay Istanbul - 3 improvements in your microservices architecture
JavaDay Istanbul - 3 improvements in your microservices architectureJavaDay Istanbul - 3 improvements in your microservices architecture
JavaDay Istanbul - 3 improvements in your microservices architecture
 
OSCONF Hyderabad - Shorten all URLs!
OSCONF Hyderabad - Shorten all URLs!OSCONF Hyderabad - Shorten all URLs!
OSCONF Hyderabad - Shorten all URLs!
 
Devclub.lv - Introduction to stream processing
Devclub.lv - Introduction to stream processingDevclub.lv - Introduction to stream processing
Devclub.lv - Introduction to stream processing
 
OSCONF Koshi - Zero downtime deployment with Kubernetes, Flyway and Spring Boot
OSCONF Koshi - Zero downtime deployment with Kubernetes, Flyway and Spring BootOSCONF Koshi - Zero downtime deployment with Kubernetes, Flyway and Spring Boot
OSCONF Koshi - Zero downtime deployment with Kubernetes, Flyway and Spring Boot
 
JOnConf - A CDC use-case: designing an Evergreen Cache
JOnConf - A CDC use-case: designing an Evergreen CacheJOnConf - A CDC use-case: designing an Evergreen Cache
JOnConf - A CDC use-case: designing an Evergreen Cache
 
London In-Memory Computing Meetup - A Change-Data-Capture use-case: designing...
London In-Memory Computing Meetup - A Change-Data-Capture use-case: designing...London In-Memory Computing Meetup - A Change-Data-Capture use-case: designing...
London In-Memory Computing Meetup - A Change-Data-Capture use-case: designing...
 
JUG Tirana - Introduction to data streaming
JUG Tirana - Introduction to data streamingJUG Tirana - Introduction to data streaming
JUG Tirana - Introduction to data streaming
 
Java.IL - Your own Kubernetes controller, not only in Go!
Java.IL - Your own Kubernetes controller, not only in Go!Java.IL - Your own Kubernetes controller, not only in Go!
Java.IL - Your own Kubernetes controller, not only in Go!
 
vJUG - Introduction to data streaming
vJUG - Introduction to data streamingvJUG - Introduction to data streaming
vJUG - Introduction to data streaming
 
London Java Community - An Experiment in Continuous Deployment of JVM applica...
London Java Community - An Experiment in Continuous Deployment of JVM applica...London Java Community - An Experiment in Continuous Deployment of JVM applica...
London Java Community - An Experiment in Continuous Deployment of JVM applica...
 
OSCONF - Your own Kubernetes controller: not only in Go
OSCONF - Your own Kubernetes controller: not only in GoOSCONF - Your own Kubernetes controller: not only in Go
OSCONF - Your own Kubernetes controller: not only in Go
 
vKUG - Migrating Spring Boot apps from annotation-based config to Functional
vKUG - Migrating Spring Boot apps from annotation-based config to FunctionalvKUG - Migrating Spring Boot apps from annotation-based config to Functional
vKUG - Migrating Spring Boot apps from annotation-based config to Functional
 
Tech talks - 3 performance improvements
Tech talks - 3 performance improvementsTech talks - 3 performance improvements
Tech talks - 3 performance improvements
 

Dernier

Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfCionsystems
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 

Dernier (20)

Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdf
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 

Cargo Culting and Memes

  • 1. Cargo Culting and Memes Nicolas Fränkel JEE Conf, Kiev, May 2014
  • 2. Me, myself and I Developer & Architect as consultant  Wide range of businesses & customers Teacher & Trainer Blogger  blog.frankel.ch  morevaadin.com @nicolas_frankel 2
  • 4. E-commerce company Rocks Sends employees to Oktoberfest 4@nicolas_frankel
  • 5. Cargo culting vs memes @nicolas_frankel 5
  • 6. Cargo culting Reproducing outer form in order to get some benefits regardless of contexts @nicolas_frankel 6
  • 7. Memes Widespread ideas  With no (or shallow) scientific proof behind @nicolas_frankel 7
  • 8. Disclaimer “All characters appearing in this work are fictitious. Any resemblance to real persons, living or dead, is purely coincidental.” @nicolas_frankel 8
  • 9. Do not believe me! You are not getting sleepy! I do not want to spread more cargo culting & memes  Try… @nicolas_frankel 9
  • 11. Imagine living on a paradise island Free from daily world contingencies @nicolas_frankel 11
  • 12. Then come some white people in birds of steel They build some stuff, and bigger birds of steel come, with bunches of people inside @nicolas_frankel 12
  • 13. And the birds of steel have plenty of good food inside With no need to go fishing… @nicolas_frankel 13
  • 14. When they all go away, what’s the smart thing to do:  Go fishing again?  Or build the same stuff and hope to attract more birds of steel? Very crude summary of Cargo Culting during WWII (in the Pacific) @nicolas_frankel 14
  • 15. The devil is in the detail Once upon a time, there was a young developer He started using Java 1.3 And was taught that local variable declaration was heavy on performance @nicolas_frankel 15
  • 16. Some years later, he became an « expert » And wrote some good practices guidelines Including declaring local variables outside loops int nb = 0; for (int i = 0; i<n; i++) { ... }
  • 17. He was very happy And all developers happily followed his rules @nicolas_frankel 17
  • 18. Until… a new developer came in town And threw the gauntlet by claiming:  « You shall declare your variables in the narrowest scope possible » This meant inside the loop @nicolas_frankel 18
  • 19. The « expert » accepted the challenge And coded a small snippet to assert his claims It failed miserably… JDK 1.4 was smart enough to produce the exact same bytecode regardless where the variable was declared @nicolas_frankel 19
  • 20. The « expert » was sorely disappointed But realized a very important fact « There’s no universal truth, it all depends on the context » @nicolas_frankel 20
  • 21. Also applies to:  Food  Religion  Sports  You name it @nicolas_frankel 21
  • 22. Facts At this time, I don’t know if that was ever true  I suppose it was I found nothing supporting this (or the opposite) on the Internet  Downloading and installing Java 1.3 sucks @nicolas_frankel 22
  • 23. Data Transfer Object Once upon a time, there was platform called J2EE Which provided a bunch of API @nicolas_frankel 23
  • 24. EJB Entity - a real heavyweight object, was bound to the container So Sun crafted a magical artifact, the DTO To allow for data to go outside the container @nicolas_frankel 24
  • 25. The birth of EJB 3 brought a new Golden Age And freed people of the tyranny of the EJB Container Sadly, many developers still flock to the banner of the DTO @nicolas_frankel 25
  • 26. Alternatives 1. When no association required  Use the entity directly 2. Use eager associations 3. Use the OpenSessionInView filter  … 4. Call getters to force load 5. Use JOIN FETCH @nicolas_frankel 26
  • 27. Data Access Object Among other J2EE weapons of power was the DAO It was mighty indeed As it could decouple your application from persistence stores of that time  JDBC  JDO  EJB Entity @nicolas_frankel 27
  • 28. Agility was at your fingertips! Change from JDBC to JDO  And back again (?) @nicolas_frankel 28
  • 29. Back then, DAO had its uses  Try JDO  Then rollback if when something went wrong @nicolas_frankel 29
  • 30. The fall of the DAO Nowadays, heroes use JPA!  Already an abstraction Or a concrete implementation  For good reasons But some fallen knights lies to themselves in thinking they will change their data store  Or it will require such a major rework DAO cannot insulate them from  SQL to NoSQL @nicolas_frankel 30
  • 31. Alternatives JPA makes the EntityManager the DAO Spring Data has a different abstraction  Repository Only when using implementations one might need DAO  To migrate from one document-based NoSQL store to another document-based @nicolas_frankel 31
  • 32. XML is BAD 10 years ago, it was all XML  Can be validated against a schema XML became evil with the coming of annotations in Java 5 @nicolas_frankel 32
  • 33. Critics against XML Verbose Are not compiled  Errors (beyond grammar) are discovered at runtime @nicolas_frankel 33
  • 34. Self-annotated classes @Service @Scope("prototype") public class MyBean { @Autowired private MyRepository myRepo; ... } @nicolas_frankel 34
  • 35. Pros Cons Everything in the same place Couples code to Spring Compiled Prevents reusability Allows bad design @nicolas_frankel 35
  • 36. Alternatives XML JavaConfig  Compiled  With no con of self-annotated classes @nicolas_frankel 36
  • 37. Javaconfig Example @Configuration public class JavaConfig { @Bean @Scope(SCOPE_PROTOTYPE) public class myBean() { return new MyBean(myRepo()); } @Bean public class myRepo() { return new MyRepository(); } } @nicolas_frankel 37
  • 38. Related to Cargo Culting Copy-Paste Driven Programming Reverse Cargo Culting:  Forget the form because the context is different @nicolas_frankel 38
  • 39. Spotting Cargo Culting “We’ve always done like that” “It’s always been working” @nicolas_frankel 39
  • 40. How not to Cargo Cult Question reasons behind decisions You cannot always be up-to-date  Listen to others and their arguments  Admit you’re wrong (when you are) Yes, it’s hard and time-consuming! @nicolas_frankel 40
  • 42. Memes Cargo Culting can be remedied if the cultist is rational and willing to listen Memes are way more pervasive Based on faith And you never can convince a faithful to renounce his faith  Only if he’s not a true faithful @nicolas_frankel 42
  • 43. My Illumination The Leprechauns of Software Engineering @nicolas_frankel 43
  • 44. The 10X productivity rule “A good programmer can be as 10X times more productive than a mediocre one” @nicolas_frankel 44
  • 45. Sackman & al. 1968 “exploratory experiments (...) to compare debugging performances of programmers working under conditions of online and offline access to a computer” Ratio of 28:1  Subject 7 required 170 hours to program the algebra program in a batch environment in machine language  Subject 3 required 6 hours to program the same problem in ALGOL in a time-shared environment @nicolas_frankel 45
  • 46. Ref. Direct? Task type Sample size Pop. Measure Variation Curtis 1981 N Debug 27 Pros Time-to- compile 22:1 8:1 Mills 1983 Y ? ? ? ? 10:1 DeMarco & Lister 1985 Y Program to spec 166 Pros Time-to- complete 5,6:1 Curtis & al. 1986 N N/A N/A N/A N/A Various Card 1987 N Project ? Pros LOC per staff hour Not claimed Boehm & Pappacio 1988 N N/A N/A N/A N/A Various Valet & McGarry 1989 N Project 150 Pros LOC per staff hour Not claimed Boehm 2000 Y Project 161 projects Pros Manager’s evaluation Not claimed@nicolas_frankel 46
  • 47. Productivity in software Which metrics?  LOC?  Any is trivial to game... Which task?  Must be the same in order to compare Which population?  Pros have other things to do @nicolas_frankel 47
  • 48. My experience There’s a difference in productivity  But I never could quantify I can only say if one developer is more productive than another in a specific area Software is a team effort! @nicolas_frankel 48
  • 49. But rejoice! Other domains are not free of memes either  Project Management  Graphical Design @nicolas_frankel 49
  • 51. The source of “truth” Software Engineering Economics – Boehm, 1981 Made famous in Rapid Development – McConnell, 1996 @nicolas_frankel 51
  • 52. It makes sense that uncertainty decreases with time passing... Does it make sense that:  It is symmetric?  It follows f(x) = -a/x? @nicolas_frankel 52
  • 54. Images are read LTR When I was younger (a long time ago), I was told that images should be designed to be read left-to-right  And right-to-left for native Arab / Hebrew speakers @nicolas_frankel 54
  • 55. Then came a device to follow eyes movements And they made an experience on the TV @nicolas_frankel 55
  • 57. RELATED TO MEMES “No True Scotsman” Logical fallacy Ideology @nicolas_frankel 57
  • 58. No true Scotsman “Scotsmen do not put sugar on their porridge - I’m a Scotsman and I put sugar on my porridge - No true Scotsman sugars his porridge” @nicolas_frankel 58
  • 59. Code is self-documenting “Yet I cannot make this code clear without comments. - Then it’s bad code!” @nicolas_frankel 59
  • 60. Agile delivers “Yet my last Agile project went wrong. - Then it must not have been truly Agile” @nicolas_frankel 60
  • 61. Ideology Memes and ideologies are based on faith  Memes are largely shared  Ideologies are more restricted  Counter-ideologies @nicolas_frankel 61
  • 62. This is crap It’s not proper:  Object-Oriented Programming  Functional Programming  You name yours @nicolas_frankel 62
  • 63. Those are ways! My goal is to achieve those properties:  Readability  Testability  Maintainability So long as I get them, I don’t care  Better to have a unique paradigm in an application @nicolas_frankel 63
  • 65. Thank you for your interest @nicolas_frankel @learnvaadin @itfromtrenches http://blog.frankel.ch/ http://morevaadin.com/