SlideShare une entreprise Scribd logo
1  sur  73
Télécharger pour lire hors ligne
THE STORY OF A RAFFLER
Extracting wisdom from stupidity
About me
Ramon de la Fuente
Future500 B.V.
@f_u_e_n_t_e
SweetlakePHP
–Edward de Bono
“The purpose of the book has been to shift
attention from the problems themselves to the
way the mind tackles them”
Stupidity
The words "stupid" and "stupidity" entered the
English language in 1541. Since then, stupidity
has taken place along with "fool," "idiot,"
"dumb," "moron," and related concepts as a
pejorative appellation for human misdeeds,
whether purposeful or accidental, due to absence
of mental capacity.
Stupidity is a quality or state of being stupid, or
an act or idea that exhibits properties of being
stupid.
Code experiment
• 1. Write throw-away code
• 2. That performs some function
• 3. Wait, what??
Domcode Raffler Rules
• 1. Accept a filename as the first CLI argument.
• 2. The file will contain a n delimited list of names
• 3. Echo a single random name from the list
–Johnny Appleseed
“Type a quote here.”
Code experiment
• 1. Write a raffler
• 2. Using every “array_” function in PHP
• 3. Exactly once
Insight
Sequential
Strategic
Logical Thinking Lateral Thinking
Logical Thinking Lateral Thinking
A
B
C
A
B
C
Y
Logical Thinking Lateral Thinking
A
B…Y
Z
A
Z
C
Y
Evolution
Evolution
Evolution
Evolution
–Matt Groening
The Six Stages of Debugging
1. That can't happen.
2. That doesn't happen on my machine.
3. That shouldn't happen.
4. Why is that happening?
5. Oh, I see
6. How did that ever work?
The Six Stages of Debugging
1. That can't happen.
2. That doesn't happen on my machine.
3. That shouldn't happen.
4. Why is that happening?
5. Oh, I see
6. How did that ever work?
• It forces you to plan before you code.
• It virtually eliminates coder's block.
• Writing Unit tests will improve the design.
Test Driven Development?
Scenario: Starting a game
Given the dictionary provides "coconut"
When I start a game using the dictionary
Then there should be 11 guesses available
And the revealed word should be "_______"
Test Driven Development?
Scenario: Starting a game
Given the dictionary provides "coconut"
When I start a game using the dictionary
Then there should be 11 guesses available
And the revealed word should be "_______"
Test Driven Development?
Scenario: Starting a game
Given the dictionary provides "coconut"
When I start a game using the dictionary
Then there should be 11 guesses available
And the revealed word should be "_______"
Test Driven Development?
Problem Solving
Problem Solving
Problem Solving
Better solution
Problem Solving
Barely working solution
Problem Solving
Better solution
Problem Solving
Barely working solution
Problem Solving
Problem Solving
✓ ✗✓
Problem Solving
Problem Solving
Problem Solving
Problem Solving
SINGLETONS
GOTO
SERVICE LOCATOR
Problem Solving
SINGLETONS
GOTO
SERVICE LOCATOR
Problem Solving
Problem Solving
Problem Solving
Problem Solving
Problem Solving
–Edward de Bono
“Excellent thinking is of no use if based on an
incorrect assumption”
Problem Solving
You solve a Rubik’s Cube layer by layer,
by applying fixed sequences of moves,
leaving previously solved layers intact.
Problem Solving
You solve a Rubik’s Cube layer by layer,
by applying fixed sequences of moves,
leaving previously solved layers intact.
a programming problem
general patterns
Building a Raffler
Building a Raffler
Building a Raffler
Building a Raffler
• Separate by return value
• Add complexity score
• Group similar functions together
• Create composable blocks
Building a Raffler
Building a Raffler
Building a Raffler
/* returns original array */
.
Building a Raffler
Building a Raffler
Building a Raffler
Building a Raffler
Building a Raffler
Relevance?
Relevance?
“…do I use this interface, or not?”
– Senior developer
Relevance?
“…do I use this interface, or not?”
– Junior developer
Relevance?
“…I don’t understand how this can happen”
“…how could I make this happen??”
Further reading
“Experience is a museum for mistakes”
– Edward de Bono
Feedback on Joind.in: 17796
@f_u_e_n_t_e

Contenu connexe

En vedette

Debi misir ali --by-humayun_ahmed
Debi misir ali  --by-humayun_ahmedDebi misir ali  --by-humayun_ahmed
Debi misir ali --by-humayun_ahmedHasan Bdboy
 
Ai megh rodro chaya1
Ai megh rodro chaya1Ai megh rodro chaya1
Ai megh rodro chaya1Hasan Bdboy
 
Is Your Relationship #1?
Is Your Relationship #1?Is Your Relationship #1?
Is Your Relationship #1?MichelleGFans
 
SIGNIFICANCE OF CONTINOUS EDUCATION IN HEALTH CARE
SIGNIFICANCE OF CONTINOUS EDUCATION IN HEALTH CARESIGNIFICANCE OF CONTINOUS EDUCATION IN HEALTH CARE
SIGNIFICANCE OF CONTINOUS EDUCATION IN HEALTH CAREChinju Joji Vaniyappurayil
 
Parent curriculum night team c
Parent curriculum night  team cParent curriculum night  team c
Parent curriculum night team cRachael Cruz
 
Narradores de Javé Histórias de Minas
Narradores de Javé   Histórias de MinasNarradores de Javé   Histórias de Minas
Narradores de Javé Histórias de MinasAdélia Nicolete
 
SweetlakePHP.1 year-aniversary
SweetlakePHP.1 year-aniversarySweetlakePHP.1 year-aniversary
SweetlakePHP.1 year-aniversaryRamon de la Fuente
 

En vedette (11)

Debi misir ali --by-humayun_ahmed
Debi misir ali  --by-humayun_ahmedDebi misir ali  --by-humayun_ahmed
Debi misir ali --by-humayun_ahmed
 
Ai megh rodro chaya1
Ai megh rodro chaya1Ai megh rodro chaya1
Ai megh rodro chaya1
 
Lilua batash01
Lilua batash01Lilua batash01
Lilua batash01
 
Is Your Relationship #1?
Is Your Relationship #1?Is Your Relationship #1?
Is Your Relationship #1?
 
seminrio x
seminrio xseminrio x
seminrio x
 
SIGNIFICANCE OF CONTINOUS EDUCATION IN HEALTH CARE
SIGNIFICANCE OF CONTINOUS EDUCATION IN HEALTH CARESIGNIFICANCE OF CONTINOUS EDUCATION IN HEALTH CARE
SIGNIFICANCE OF CONTINOUS EDUCATION IN HEALTH CARE
 
Parent curriculum night team c
Parent curriculum night  team cParent curriculum night  team c
Parent curriculum night team c
 
Gouripur
GouripurGouripur
Gouripur
 
Narradores de Javé Histórias de Minas
Narradores de Javé   Histórias de MinasNarradores de Javé   Histórias de Minas
Narradores de Javé Histórias de Minas
 
Bashor ha
Bashor haBashor ha
Bashor ha
 
SweetlakePHP.1 year-aniversary
SweetlakePHP.1 year-aniversarySweetlakePHP.1 year-aniversary
SweetlakePHP.1 year-aniversary
 

Similaire à Extracting wisdom from stupidity

Letshavesomepun 140616032650-phpapp01
Letshavesomepun 140616032650-phpapp01Letshavesomepun 140616032650-phpapp01
Letshavesomepun 140616032650-phpapp01Chris Yukna
 
Observation & Inference
Observation & InferenceObservation & Inference
Observation & Inferencetreothe
 
Writing for TAKS and STAAR
Writing for TAKS and STAARWriting for TAKS and STAAR
Writing for TAKS and STAARccaviness
 
Creating a narrative for ESOL level 2
Creating a narrative for ESOL level 2Creating a narrative for ESOL level 2
Creating a narrative for ESOL level 2aliah1981
 
Parent night in the classroom 2014
Parent night in the classroom 2014Parent night in the classroom 2014
Parent night in the classroom 2014TaraKatz
 
Sample online english lesson (for teacher r1)
Sample online english lesson (for teacher r1)Sample online english lesson (for teacher r1)
Sample online english lesson (for teacher r1)Mary Constant
 
Fsd Getting Your Point Across Pdg
Fsd Getting Your Point Across PdgFsd Getting Your Point Across Pdg
Fsd Getting Your Point Across PdgMichael Barker
 
10 ways to build your vocabulary
10 ways to build your vocabulary10 ways to build your vocabulary
10 ways to build your vocabularyPrince Tayyab
 
Scientific english
Scientific englishScientific english
Scientific englishTrần Long
 
Natural Language Processing
Natural Language ProcessingNatural Language Processing
Natural Language ProcessingYasir Khan
 
Midton college ppt
Midton college pptMidton college ppt
Midton college pptAshok Idnani
 
Critical ThinkingThe Art of ArgumentPower Point Presentat.docx
Critical ThinkingThe Art of ArgumentPower Point Presentat.docxCritical ThinkingThe Art of ArgumentPower Point Presentat.docx
Critical ThinkingThe Art of ArgumentPower Point Presentat.docxmydrynan
 
Chapter 8 Psych 1 Online Stud
Chapter 8 Psych 1 Online StudChapter 8 Psych 1 Online Stud
Chapter 8 Psych 1 Online StudMosslera
 
Greene county etymology and morphology january 15
Greene county etymology and morphology january 15Greene county etymology and morphology january 15
Greene county etymology and morphology january 15branzburg
 
English101 Short Refresher on Grammar.pptx
English101 Short Refresher on Grammar.pptxEnglish101 Short Refresher on Grammar.pptx
English101 Short Refresher on Grammar.pptxeleanor baguio
 

Similaire à Extracting wisdom from stupidity (20)

Letshavesomepun 140616032650-phpapp01
Letshavesomepun 140616032650-phpapp01Letshavesomepun 140616032650-phpapp01
Letshavesomepun 140616032650-phpapp01
 
Observation & Inference
Observation & InferenceObservation & Inference
Observation & Inference
 
Writing for TAKS and STAAR
Writing for TAKS and STAARWriting for TAKS and STAAR
Writing for TAKS and STAAR
 
Idiomatic expressions
Idiomatic expressionsIdiomatic expressions
Idiomatic expressions
 
Dramathink 2015
Dramathink 2015Dramathink 2015
Dramathink 2015
 
Creating a narrative for ESOL level 2
Creating a narrative for ESOL level 2Creating a narrative for ESOL level 2
Creating a narrative for ESOL level 2
 
Uxhk2015v5
Uxhk2015v5Uxhk2015v5
Uxhk2015v5
 
Parent night in the classroom 2014
Parent night in the classroom 2014Parent night in the classroom 2014
Parent night in the classroom 2014
 
Essential 55
Essential 55Essential 55
Essential 55
 
Sample online english lesson (for teacher r1)
Sample online english lesson (for teacher r1)Sample online english lesson (for teacher r1)
Sample online english lesson (for teacher r1)
 
Fsd Getting Your Point Across Pdg
Fsd Getting Your Point Across PdgFsd Getting Your Point Across Pdg
Fsd Getting Your Point Across Pdg
 
10 ways to build your vocabulary
10 ways to build your vocabulary10 ways to build your vocabulary
10 ways to build your vocabulary
 
Scientific english
Scientific englishScientific english
Scientific english
 
Natural Language Processing
Natural Language ProcessingNatural Language Processing
Natural Language Processing
 
Midton college ppt
Midton college pptMidton college ppt
Midton college ppt
 
Critical ThinkingThe Art of ArgumentPower Point Presentat.docx
Critical ThinkingThe Art of ArgumentPower Point Presentat.docxCritical ThinkingThe Art of ArgumentPower Point Presentat.docx
Critical ThinkingThe Art of ArgumentPower Point Presentat.docx
 
My Family Tree
My Family Tree My Family Tree
My Family Tree
 
Chapter 8 Psych 1 Online Stud
Chapter 8 Psych 1 Online StudChapter 8 Psych 1 Online Stud
Chapter 8 Psych 1 Online Stud
 
Greene county etymology and morphology january 15
Greene county etymology and morphology january 15Greene county etymology and morphology january 15
Greene county etymology and morphology january 15
 
English101 Short Refresher on Grammar.pptx
English101 Short Refresher on Grammar.pptxEnglish101 Short Refresher on Grammar.pptx
English101 Short Refresher on Grammar.pptx
 

Dernier

The Selfspace Journal Preview by Mindbrush
The Selfspace Journal Preview by MindbrushThe Selfspace Journal Preview by Mindbrush
The Selfspace Journal Preview by MindbrushShivain97
 
2k Shots ≽ 9205541914 ≼ Call Girls In Mukherjee Nagar (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Mukherjee Nagar (Delhi)2k Shots ≽ 9205541914 ≼ Call Girls In Mukherjee Nagar (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Mukherjee Nagar (Delhi)Delhi Call girls
 
8377087607 Full Enjoy @24/7-CLEAN-Call Girls In Chhatarpur,
8377087607 Full Enjoy @24/7-CLEAN-Call Girls In Chhatarpur,8377087607 Full Enjoy @24/7-CLEAN-Call Girls In Chhatarpur,
8377087607 Full Enjoy @24/7-CLEAN-Call Girls In Chhatarpur,dollysharma2066
 
Top Rated Pune Call Girls Tingre Nagar ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Tingre Nagar ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Tingre Nagar ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Tingre Nagar ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
2k Shots ≽ 9205541914 ≼ Call Girls In Palam (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Palam (Delhi)2k Shots ≽ 9205541914 ≼ Call Girls In Palam (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Palam (Delhi)Delhi Call girls
 
2k Shots ≽ 9205541914 ≼ Call Girls In Dashrath Puri (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Dashrath Puri (Delhi)2k Shots ≽ 9205541914 ≼ Call Girls In Dashrath Puri (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Dashrath Puri (Delhi)Delhi Call girls
 
$ Love Spells^ 💎 (310) 882-6330 in West Virginia, WV | Psychic Reading Best B...
$ Love Spells^ 💎 (310) 882-6330 in West Virginia, WV | Psychic Reading Best B...$ Love Spells^ 💎 (310) 882-6330 in West Virginia, WV | Psychic Reading Best B...
$ Love Spells^ 💎 (310) 882-6330 in West Virginia, WV | Psychic Reading Best B...PsychicRuben LoveSpells
 
Pokemon Go... Unraveling the Conspiracy Theory
Pokemon Go... Unraveling the Conspiracy TheoryPokemon Go... Unraveling the Conspiracy Theory
Pokemon Go... Unraveling the Conspiracy Theorydrae5
 
WOMEN EMPOWERMENT women empowerment.pptx
WOMEN EMPOWERMENT women empowerment.pptxWOMEN EMPOWERMENT women empowerment.pptx
WOMEN EMPOWERMENT women empowerment.pptxpadhand000
 
LC_YouSaidYes_NewBelieverBookletDone.pdf
LC_YouSaidYes_NewBelieverBookletDone.pdfLC_YouSaidYes_NewBelieverBookletDone.pdf
LC_YouSaidYes_NewBelieverBookletDone.pdfpastor83
 
9892124323, Call Girls in mumbai, Vashi Call Girls , Kurla Call girls
9892124323, Call Girls in mumbai, Vashi Call Girls , Kurla Call girls9892124323, Call Girls in mumbai, Vashi Call Girls , Kurla Call girls
9892124323, Call Girls in mumbai, Vashi Call Girls , Kurla Call girlsPooja Nehwal
 
call Now 9811711561 Cash Payment乂 Call Girls in Dwarka Mor
call Now 9811711561 Cash Payment乂 Call Girls in Dwarka Morcall Now 9811711561 Cash Payment乂 Call Girls in Dwarka Mor
call Now 9811711561 Cash Payment乂 Call Girls in Dwarka Morvikas rana
 
2k Shots ≽ 9205541914 ≼ Call Girls In Jasola (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Jasola (Delhi)2k Shots ≽ 9205541914 ≼ Call Girls In Jasola (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Jasola (Delhi)Delhi Call girls
 

Dernier (15)

The Selfspace Journal Preview by Mindbrush
The Selfspace Journal Preview by MindbrushThe Selfspace Journal Preview by Mindbrush
The Selfspace Journal Preview by Mindbrush
 
2k Shots ≽ 9205541914 ≼ Call Girls In Mukherjee Nagar (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Mukherjee Nagar (Delhi)2k Shots ≽ 9205541914 ≼ Call Girls In Mukherjee Nagar (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Mukherjee Nagar (Delhi)
 
8377087607 Full Enjoy @24/7-CLEAN-Call Girls In Chhatarpur,
8377087607 Full Enjoy @24/7-CLEAN-Call Girls In Chhatarpur,8377087607 Full Enjoy @24/7-CLEAN-Call Girls In Chhatarpur,
8377087607 Full Enjoy @24/7-CLEAN-Call Girls In Chhatarpur,
 
Top Rated Pune Call Girls Tingre Nagar ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Tingre Nagar ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Tingre Nagar ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Tingre Nagar ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
2k Shots ≽ 9205541914 ≼ Call Girls In Palam (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Palam (Delhi)2k Shots ≽ 9205541914 ≼ Call Girls In Palam (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Palam (Delhi)
 
2k Shots ≽ 9205541914 ≼ Call Girls In Dashrath Puri (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Dashrath Puri (Delhi)2k Shots ≽ 9205541914 ≼ Call Girls In Dashrath Puri (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Dashrath Puri (Delhi)
 
(Anamika) VIP Call Girls Navi Mumbai Call Now 8250077686 Navi Mumbai Escorts ...
(Anamika) VIP Call Girls Navi Mumbai Call Now 8250077686 Navi Mumbai Escorts ...(Anamika) VIP Call Girls Navi Mumbai Call Now 8250077686 Navi Mumbai Escorts ...
(Anamika) VIP Call Girls Navi Mumbai Call Now 8250077686 Navi Mumbai Escorts ...
 
$ Love Spells^ 💎 (310) 882-6330 in West Virginia, WV | Psychic Reading Best B...
$ Love Spells^ 💎 (310) 882-6330 in West Virginia, WV | Psychic Reading Best B...$ Love Spells^ 💎 (310) 882-6330 in West Virginia, WV | Psychic Reading Best B...
$ Love Spells^ 💎 (310) 882-6330 in West Virginia, WV | Psychic Reading Best B...
 
Pokemon Go... Unraveling the Conspiracy Theory
Pokemon Go... Unraveling the Conspiracy TheoryPokemon Go... Unraveling the Conspiracy Theory
Pokemon Go... Unraveling the Conspiracy Theory
 
WOMEN EMPOWERMENT women empowerment.pptx
WOMEN EMPOWERMENT women empowerment.pptxWOMEN EMPOWERMENT women empowerment.pptx
WOMEN EMPOWERMENT women empowerment.pptx
 
LC_YouSaidYes_NewBelieverBookletDone.pdf
LC_YouSaidYes_NewBelieverBookletDone.pdfLC_YouSaidYes_NewBelieverBookletDone.pdf
LC_YouSaidYes_NewBelieverBookletDone.pdf
 
(Aarini) Russian Call Girls Surat Call Now 8250077686 Surat Escorts 24x7
(Aarini) Russian Call Girls Surat Call Now 8250077686 Surat Escorts 24x7(Aarini) Russian Call Girls Surat Call Now 8250077686 Surat Escorts 24x7
(Aarini) Russian Call Girls Surat Call Now 8250077686 Surat Escorts 24x7
 
9892124323, Call Girls in mumbai, Vashi Call Girls , Kurla Call girls
9892124323, Call Girls in mumbai, Vashi Call Girls , Kurla Call girls9892124323, Call Girls in mumbai, Vashi Call Girls , Kurla Call girls
9892124323, Call Girls in mumbai, Vashi Call Girls , Kurla Call girls
 
call Now 9811711561 Cash Payment乂 Call Girls in Dwarka Mor
call Now 9811711561 Cash Payment乂 Call Girls in Dwarka Morcall Now 9811711561 Cash Payment乂 Call Girls in Dwarka Mor
call Now 9811711561 Cash Payment乂 Call Girls in Dwarka Mor
 
2k Shots ≽ 9205541914 ≼ Call Girls In Jasola (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Jasola (Delhi)2k Shots ≽ 9205541914 ≼ Call Girls In Jasola (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Jasola (Delhi)
 

Extracting wisdom from stupidity