SlideShare a Scribd company logo
Intentional Code
@LlewellynFalco
Native Tongue
Haskell
bottles 0 = "no more bottles"
bottles 1 = "1 bottle"
bottles n = show n ++ " bottles"
verse 0 = "No more bottles of beer on the wall, no more bottles of beer.n"
++ "Go to the store and buy some more, 99 bottles of beer on the wall."
verse n = bottles n ++ " of beer on the wall, " ++ bottles n ++ " of beer.n"
++ "Take one down and pass it around, " ++ bottles (n-1)
++ " of beer on the wall.n"
main = mapM (putStrLn . verse) [99,98..0]
99 Bottles of Beer
Ruby
class Integer # The bottles
def drink; self - 1; end
end
class << song = nil
attr_accessor :wall
def bottles
(@bottles.zero? ? "no more" : @bottles).to_s <<
" bottle" << ("s" unless @bottles == 1).to_s
end
def of(bottles)
@bottles = bottles
(class << self; self; end).module_eval do
define_method(:buy) { bottles }
end
self
end
def sing(&step)
puts "#{bottles.capitalize} of beer on the wall,
#{bottles} of beer."
if @bottles.zero?
print "Go to the store buy some more, "
step = method :buy
else
print "Take one down and pass it around, "
end
@bottles = step[@bottles]
puts "#{bottles} of beer on the wall."
puts "" or wall.call unless step.kind_of? Method
end
end
callcc { |song.wall| song.of(99) }.sing { |beer| beer.drink
}
Ruby - Alternative
bottles = lambda {|n| n == 1 ? "#{n} bottle" : "#{n} bottles"}
99.downto 1 do |n|
puts "#{bottles[n]} of beer on the wall
#{bottles[n]} of beer
Take one down, pass it around
#{bottles[n - 1]} of beer on the wall"
end
puts "n No more beer on the wall :-("
Java
(see word document)
Java
private void sing(){
for (int i = 99; i >= 1; i--){
System.out.println(singMainVerse(i));
}
System.out.println(singClosingVerse());
}
private String singMainVerse(int n){
return String.format(
"%s of beer on the wall, %s of beer.n” +
"Take one down and pass it around,” +
” %s of beer on the wall.n",
bottles(n), bottles(n),
bottles(n- 1));
}
private String bottles(int number) {
switch (number) {
case 0 : return "No bottles";
case 1 : return "1 bottle";
default : return number + " bottles";
}
}
private String singClosingVerse() {
return "No more bottles of beer on the wall,"+
" no more bottles of beer.n" +
"Go to the store and buy some more,"+
"99 bottles of beer on the wall.n";
}
SmallBasic
' Move the turtle 50 pixels
Turtle.Move(50)
WRAP UNINTENTIONAL CODE
Lesson 1:
Long != Clear
RECOGNIZE OBSCURED INTENTION
Lesson 2:
Example without intention
Mastery
0
5,000
10,000
15,000
Hours
Code
Code
Mastery
0
100,000
200,000
300,000
Hours
Code
English
4 years old
7H15 M3554G3
53RV35 7O PR0V3
H0W 0UR M1ND5 C4N D0
4M4Z1NG 7H1NG5! 1MPR3551V3 7H1NG5!
1N 7H3 B3G1NN1NG 17 WA5 H4RD BU7
N0W, 0N 7H15 LIN3
Y0UR M1ND 1S R34D1NG 17
4U70M471C4LLY W17H 0U7 3V3N
7H1NK1NG 4B0U7 17,
B3 PROUD! 0NLY C3R741N P30PL3 C4N
R3AD 7H15.
U C4N R35D 7H15!!!
Triangle
Chapters
Titles
Paragraph length
Sentence length
Word choice
Punctuation
Subtitles
Nouns
Verbs
Adverbs
Plot
Metaphors
Slang/lingo
Method Length
Class size
Namespaces
Level of abstraction
Cyclometric complexity
Line Length
Objects
Methods
Parameters
Interfaces
Inheritance
Domain Specific Language
Resources
Intro To TDD Class (4 Day)
Resources
www.ApprovalTests.com
(.net, java, php, ruby)
20 episode youtube series
TeachingKidsProgramming.org
Do a Recipe  Teach a Kid (Ages 10 ++)
Microsoft SmallBasic  Free Courseware (recipes)
Contact Information
@LlewellynFalco
http://LlewellynFalco.Blogspot.com
http://www.approvaltests.com

More Related Content

Viewers also liked

Mob testing
Mob testingMob testing
Mob testing
Maaret Pyhäjärvi
 
The curse of knowledge
The curse of knowledgeThe curse of knowledge
The curse of knowledge
Llewellyn Falco
 
Approval testing from basic to advanced
Approval testing   from basic to advancedApproval testing   from basic to advanced
Approval testing from basic to advanced
Llewellyn Falco
 
Strategy agile games 2015
Strategy   agile games 2015Strategy   agile games 2015
Strategy agile games 2015
Llewellyn Falco
 
Thread base theory test
Thread base theory testThread base theory test
Thread base theory test
Llewellyn Falco
 
Increase testability with code seams
Increase testability with code seamsIncrease testability with code seams
Increase testability with code seams
Llewellyn Falco
 
Advanced unit testing
Advanced unit testingAdvanced unit testing
Advanced unit testing
Llewellyn Falco
 
Exploratory and Unit Testing
Exploratory and Unit TestingExploratory and Unit Testing
Exploratory and Unit Testing
Llewellyn Falco
 
Mob Testing
Mob TestingMob Testing
Mob Testing
Maaret Pyhäjärvi
 
The curse of knowledge
The curse of knowledgeThe curse of knowledge
The curse of knowledge
Llewellyn Falco
 
TestWorksConf: Exploratory Testing an API in Mob
TestWorksConf: Exploratory Testing an API in Mob TestWorksConf: Exploratory Testing an API in Mob
TestWorksConf: Exploratory Testing an API in Mob
Maaret Pyhäjärvi
 
Mob testing
Mob testingMob testing
Mob testing
Llewellyn Falco
 
Testbash Philly: A Mob Testing Experience
Testbash Philly: A Mob Testing ExperienceTestbash Philly: A Mob Testing Experience
Testbash Philly: A Mob Testing Experience
Maaret Pyhäjärvi
 

Viewers also liked (14)

Mob testing
Mob testingMob testing
Mob testing
 
The curse of knowledge
The curse of knowledgeThe curse of knowledge
The curse of knowledge
 
Approval testing from basic to advanced
Approval testing   from basic to advancedApproval testing   from basic to advanced
Approval testing from basic to advanced
 
Strategy agile games 2015
Strategy   agile games 2015Strategy   agile games 2015
Strategy agile games 2015
 
Lean coffee
Lean coffeeLean coffee
Lean coffee
 
Thread base theory test
Thread base theory testThread base theory test
Thread base theory test
 
Increase testability with code seams
Increase testability with code seamsIncrease testability with code seams
Increase testability with code seams
 
Advanced unit testing
Advanced unit testingAdvanced unit testing
Advanced unit testing
 
Exploratory and Unit Testing
Exploratory and Unit TestingExploratory and Unit Testing
Exploratory and Unit Testing
 
Mob Testing
Mob TestingMob Testing
Mob Testing
 
The curse of knowledge
The curse of knowledgeThe curse of knowledge
The curse of knowledge
 
TestWorksConf: Exploratory Testing an API in Mob
TestWorksConf: Exploratory Testing an API in Mob TestWorksConf: Exploratory Testing an API in Mob
TestWorksConf: Exploratory Testing an API in Mob
 
Mob testing
Mob testingMob testing
Mob testing
 
Testbash Philly: A Mob Testing Experience
Testbash Philly: A Mob Testing ExperienceTestbash Philly: A Mob Testing Experience
Testbash Philly: A Mob Testing Experience
 

More from Llewellyn Falco

Lets connect linked_in
Lets connect linked_inLets connect linked_in
Lets connect linked_in
Llewellyn Falco
 
Test driven development done well
Test driven development done wellTest driven development done well
Test driven development done well
Llewellyn Falco
 
Do not use the greater than sign in programming
Do not use the greater than sign in programmingDo not use the greater than sign in programming
Do not use the greater than sign in programming
Llewellyn Falco
 
Cutting code quickly
Cutting code quicklyCutting code quickly
Cutting code quickly
Llewellyn Falco
 
The falco technical coaching framework
The falco technical coaching frameworkThe falco technical coaching framework
The falco technical coaching framework
Llewellyn Falco
 
Expressive objects
Expressive objectsExpressive objects
Expressive objects
Llewellyn Falco
 
Roi on learning hour
Roi on learning hourRoi on learning hour
Roi on learning hour
Llewellyn Falco
 
Mob programming
Mob programmingMob programming
Mob programming
Llewellyn Falco
 
Developing design sense of code smells
Developing design sense of code smellsDeveloping design sense of code smells
Developing design sense of code smells
Llewellyn Falco
 
Exceptional exceptions
Exceptional exceptionsExceptional exceptions
Exceptional exceptions
Llewellyn Falco
 
Koans randori role cards
Koans randori role cardsKoans randori role cards
Koans randori role cardsLlewellyn Falco
 
Teaching kids programming with the Intentional Method
Teaching kids programming with the Intentional MethodTeaching kids programming with the Intentional Method
Teaching kids programming with the Intentional MethodLlewellyn Falco
 
Some Helpful Observations for successful Mob Programming
Some Helpful Observations for successful Mob ProgrammingSome Helpful Observations for successful Mob Programming
Some Helpful Observations for successful Mob Programming
Llewellyn Falco
 
State of teaching in video games
State of teaching in video gamesState of teaching in video games
State of teaching in video games
Llewellyn Falco
 
Do it yourself Code Report (blank)
Do it yourself Code Report (blank) Do it yourself Code Report (blank)
Do it yourself Code Report (blank)
Llewellyn Falco
 
The code report (v1)
The code report (v1)The code report (v1)
The code report (v1)
Llewellyn Falco
 

More from Llewellyn Falco (17)

Lets connect linked_in
Lets connect linked_inLets connect linked_in
Lets connect linked_in
 
Test driven development done well
Test driven development done wellTest driven development done well
Test driven development done well
 
Do not use the greater than sign in programming
Do not use the greater than sign in programmingDo not use the greater than sign in programming
Do not use the greater than sign in programming
 
Cutting code quickly
Cutting code quicklyCutting code quickly
Cutting code quickly
 
The falco technical coaching framework
The falco technical coaching frameworkThe falco technical coaching framework
The falco technical coaching framework
 
Expressive objects
Expressive objectsExpressive objects
Expressive objects
 
Roi on learning hour
Roi on learning hourRoi on learning hour
Roi on learning hour
 
Mob programming
Mob programmingMob programming
Mob programming
 
Developing design sense of code smells
Developing design sense of code smellsDeveloping design sense of code smells
Developing design sense of code smells
 
Exceptional exceptions
Exceptional exceptionsExceptional exceptions
Exceptional exceptions
 
Koans randori role cards
Koans randori role cardsKoans randori role cards
Koans randori role cards
 
Teaching kids programming with the Intentional Method
Teaching kids programming with the Intentional MethodTeaching kids programming with the Intentional Method
Teaching kids programming with the Intentional Method
 
How Games Teach
How Games TeachHow Games Teach
How Games Teach
 
Some Helpful Observations for successful Mob Programming
Some Helpful Observations for successful Mob ProgrammingSome Helpful Observations for successful Mob Programming
Some Helpful Observations for successful Mob Programming
 
State of teaching in video games
State of teaching in video gamesState of teaching in video games
State of teaching in video games
 
Do it yourself Code Report (blank)
Do it yourself Code Report (blank) Do it yourself Code Report (blank)
Do it yourself Code Report (blank)
 
The code report (v1)
The code report (v1)The code report (v1)
The code report (v1)
 

Recently uploaded

Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
 

Recently uploaded (20)

Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 

Intentional code

Editor's Notes

  1. Both
  2. Both
  3. Both
  4. Both
  5. Both
  6. Both
  7. Both
  8. Both
  9. Both
  10. Both
  11. Both
  12. Both
  13. Both
  14. Both
  15. Both
  16. I add this slide at the end of EVERY presentation.
  17. Both