SlideShare ist ein Scribd-Unternehmen logo
1 von 50
Copyright © 2014 SolutionsIQ Inc. All rights reserved.
6801 185th Ave NE, Suite 200
Redmond, WA 98052
solutionsiq.com
1.800.235.4091
λ the eχtreme
test-driving a functional language
07/30/2014
PREPARED BY
Tim Myer
Programmer
tmyer@solutionsiq.com
SolutionsIQ
Λ Join a great team of developers, consultants
and Agile experts at a company that is Agile
through and through.
Λ We are hiring XP developers and coaches.
Λ Swing by our booth or talk to me afterwards
for more information.
λ the eχtreme: test-driving a functional language 2
“
”
λ the eχtreme: test-driving a functional language 3
Scala: you stare at your foot for 3
days without any sleep, you then
figrue [sic] out how to shoot
yourself in the foot with one line of
code… recursively.
Comment from Roberto Leibman on
How to Shoot Yourself in the Foot in Any Programming Language
by Mike Walker
λ the eχtreme: test-driving a functional language 4
Agenda
Λ Tools of the Trade
Λ First test
Λ A synchronicity
Λ Network independence
Λ More of the same
Λ Changing Station
Λ And so on and so forth and so on….
λ the eχtreme: test-driving a functional language 5
Prelude
The Little Schemer
6λ the eχtreme: test-driving a functional language
“
”
λ the eχtreme: test-driving a functional language 7
if you look at the features Scala provides, it is substantially a
functional language, but on the surface it does not always look
like one, and it does not force you to adopt the functional style.
For many of its users, the functional programming constructs in
Scala are the most important set of tools it has to offer but they
are not the only tools. In fact, great care has been spent in the
Scala design to make functional constructs, imperative
constructs, and objects all play well together. I think
postfunctional is a good term for that blend.
- Martin Odersky
A Postfunctional Language
λ the eχtreme: test-driving a functional language 8
Tools
Λ Git
Λ Maven
Λ Scala IDE
Λ A Dropbox account
TheBeginning
9
Where do we start?
We can start at
TheBeginning.
λ the eχtreme: test-driving a functional language
How can we do
that?
Check it out!
λ the eχtreme: test-driving a functional language 10
$ git clone
https://github.com/timezra/LambdaTheEx
treme.git && cd LambdaTheExtreme
$ git checkout tags/TheBeginning
TheBeginning
11
We got git, now do
we get an
elephant?
We get a canary
instead.
λ the eχtreme: test-driving a functional language
λ the eχtreme: test-driving a functional language 12
Canary
Canary
13
What does a canary
have to do with
this?
It’s an early
indication that
something has
gone very wrong.
λ the eχtreme: test-driving a functional language
λ the eχtreme: test-driving a functional language 14
$ git checkout tags/Canary
λ the eχtreme: test-driving a functional language 15
Interlude
λ the eχtreme: test-driving a functional language 16
Recap
Λ A Case Class
Λ An Object
Λ A FeatureSpec
Λ A FunSpec!
Canary
17
Can our canary get
account info?
Only with a
Dropbox account.
λ the eχtreme: test-driving a functional language
λ the eχtreme: test-driving a functional language 18
Actors
Actors
19
What happens
when our account
info changes?
Our expectation is
wrong.
λ the eχtreme: test-driving a functional language
What happens
when we change
our expectation?
Our test fails.
Actors
20
Why does it fail?
Our
implementation is
wrong.
λ the eχtreme: test-driving a functional language
Where do we find
the right
implementation?
Look in the upper
left.
λ the eχtreme: test-driving a functional language 21
$ git checkout tags/Actors
Actors
22
How can we call
Dropbox?
Using HTTP
λ the eχtreme: test-driving a functional language
How will Dropbox
know us?
We’ll give it a
token.
Actors
23
When will we get
our account info?
In the future!
λ the eχtreme: test-driving a functional language
λ the eχtreme: test-driving a functional language 24
Interlude
λ the eχtreme: test-driving a functional language 25
Recap
Λ Configuration Management
Λ Implicit conversions
Λ An Actor
Λ An Actor Testkit
Λ The Future!
λ the eχtreme: test-driving a functional language 26
Care and
Feeding
MinedReading
27
What happens if we
fail?
You tell me!
λ the eχtreme: test-driving a functional language
Do we catch an
exception?
We intercept it.
MinedReading
28
Sprechen Sie
Deutsch?
Wenn Sie möchten
λ the eχtreme: test-driving a functional language
λ the eχtreme: test-driving a functional language 29
$ git checkout tags/MinedReading
λ the eχtreme: test-driving a functional language 30
Etude
λ the eχtreme: test-driving a functional language 31
Recap
Λ Stubbing a probe’s return value
Λ Intercepting an expected exception
Λ Iterating over an optional value
<Footer Content: Presentation Title, Partner Name, Other> 32
Putting it out there
Zed
33
May I share
something with
you?
Of course!
λ the eχtreme: test-driving a functional language
I would rather you
put than post.
Zed
34
What if I don’t have
a file lying around?
You can share
anything you like
over the web.
λ the eχtreme: test-driving a functional language
But how will you
know what it
should look like on
the other side?
Zed
35
Who’s Zed?
Maybe Zed can
help.
λ the eχtreme: test-driving a functional language
Scalaz!
λ the eχtreme: test-driving a functional language 36
$ git checkout tags/Zed
λ the eχtreme: test-driving a functional language 37
Interlude
Zed
38
Of course!
Does Zed use
Monads?
λ the eχtreme: test-driving a functional language
Where’s a good
definition of what
a Monad is?
Anywhere but
urbandictionary.com
Zed
39
This one is pretty good:
You Could Have Invented Monads!
λ the eχtreme: test-driving a functional language
The original is still the best:
Monads for functional programming
For today, we can look at them as a way
of chaining operations.
λ the eχtreme: test-driving a functional language 40
Recap
Λ Implicit transformation from a File to an
abstract representation of its contents
λ the eχtreme: test-driving a functional language 41
Birds of a
feather
Bof
42
We just need a little
coordination.
What if I want to
share all my
pictures of
canaries with
friends at once?
λ the eχtreme: test-driving a functional language
Bof
43
Recursive
traversal fits a tree
like a glove.
How about a little
recursion?
λ the eχtreme: test-driving a functional language
λ the eχtreme: test-driving a functional language 44
$ git checkout tags/Bof
λ the eχtreme: test-driving a functional language 45
Interlude
CallCC
46
And on and on?
But what happens
if the recursion
goes on and on?
λ the eχtreme: test-driving a functional language
CallCC
47
And on and on and on and on and on and
on and on and on and on and on and on
and on and on and on and on and on and
on and on and on and on and on and on
and on and on and on and on and on and on
and on and on and on and on and on and on
and on and on and on and on and on and on and on
and on and on and on and on and on and on and on
and on and on and on and on and on and on and on and on
and on and on and on and on and on and on and on and on
and on and on and on and on and on and on and on and on and on
and on and on and on and on and on and on and on and on and on and on
and on and on and on and on and on and on and on and on and on and on and on
and on and on and on and on and on and on and on and on and on and on and on and on
λ the eχtreme: test-driving a functional language
λ the eχtreme: test-driving a functional language 48
Recap
Λ Changing recursive traversal to iterative
using continuations
<Footer Content: Presentation Title, Partner Name, Other> 49
To be continued….
<Footer Content: Presentation Title, Partner Name, Other> 50
Thank you!
solutionsiq.com / 1.800.235.4091

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

JavaScript for pupils
JavaScript  for pupilsJavaScript  for pupils
JavaScript for pupils
 
PL Lecture 02 - Binding and Scope
PL Lecture 02 - Binding and ScopePL Lecture 02 - Binding and Scope
PL Lecture 02 - Binding and Scope
 
PL Lecture 01 - preliminaries
PL Lecture 01 - preliminariesPL Lecture 01 - preliminaries
PL Lecture 01 - preliminaries
 
Jariko - A JVM interpreter for RPG written in kotlin
Jariko - A JVM interpreter for RPG written in kotlinJariko - A JVM interpreter for RPG written in kotlin
Jariko - A JVM interpreter for RPG written in kotlin
 
A First Look at Google's Go Programming Language
A First Look at Google's Go Programming LanguageA First Look at Google's Go Programming Language
A First Look at Google's Go Programming Language
 
So you think you can pdb?
So you think you can pdb?So you think you can pdb?
So you think you can pdb?
 
Presentation
PresentationPresentation
Presentation
 
Lets Go - An introduction to Google's Go Programming Language
Lets Go - An introduction to Google's Go Programming Language Lets Go - An introduction to Google's Go Programming Language
Lets Go - An introduction to Google's Go Programming Language
 
Architecting Domain-Specific Languages
Architecting Domain-Specific LanguagesArchitecting Domain-Specific Languages
Architecting Domain-Specific Languages
 
Poster: Generate ATS interface from C code, and introduce linear type
Poster: Generate ATS interface from C code, and introduce linear typePoster: Generate ATS interface from C code, and introduce linear type
Poster: Generate ATS interface from C code, and introduce linear type
 
Let's contribute, HTML5Rocks/ko!
Let's contribute, HTML5Rocks/ko!Let's contribute, HTML5Rocks/ko!
Let's contribute, HTML5Rocks/ko!
 
Oops
OopsOops
Oops
 
A simple way for polymorphism and structured programming - Go interfaces
A simple way for polymorphism and structured programming - Go interfacesA simple way for polymorphism and structured programming - Go interfaces
A simple way for polymorphism and structured programming - Go interfaces
 
Groovy
GroovyGroovy
Groovy
 
Introduction to python programming
Introduction to python programmingIntroduction to python programming
Introduction to python programming
 
DeepPavlov 2019
DeepPavlov 2019DeepPavlov 2019
DeepPavlov 2019
 
ICDM 2019 Tutorial: Speech and Language Processing: New Tools and Applications
ICDM 2019 Tutorial: Speech and Language Processing: New Tools and ApplicationsICDM 2019 Tutorial: Speech and Language Processing: New Tools and Applications
ICDM 2019 Tutorial: Speech and Language Processing: New Tools and Applications
 
CS152 Programming Paradigm
CS152 Programming Paradigm CS152 Programming Paradigm
CS152 Programming Paradigm
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
Spring, CDI, Jakarta EE good parts
Spring, CDI, Jakarta EE good partsSpring, CDI, Jakarta EE good parts
Spring, CDI, Jakarta EE good parts
 

Ähnlich wie Lambda The Extreme: Test-Driving a Functional Language

Programming Paradigms
Programming ParadigmsProgramming Paradigms
Programming Paradigms
Janeve George
 
Os Worthington
Os WorthingtonOs Worthington
Os Worthington
oscon2007
 
Douglas Crockford Presentation Goodparts
Douglas Crockford Presentation GoodpartsDouglas Crockford Presentation Goodparts
Douglas Crockford Presentation Goodparts
Ajax Experience 2009
 

Ähnlich wie Lambda The Extreme: Test-Driving a Functional Language (20)

Claudia Doppioslash - Time Travel for game development with Elm
Claudia Doppioslash - Time Travel for game development with ElmClaudia Doppioslash - Time Travel for game development with Elm
Claudia Doppioslash - Time Travel for game development with Elm
 
Lean Engineering: Engineering for Learning & Experimentation in the Enterpris...
Lean Engineering: Engineering for Learning & Experimentation in the Enterpris...Lean Engineering: Engineering for Learning & Experimentation in the Enterpris...
Lean Engineering: Engineering for Learning & Experimentation in the Enterpris...
 
Paris Web - Javascript as a programming language
Paris Web - Javascript as a programming languageParis Web - Javascript as a programming language
Paris Web - Javascript as a programming language
 
Dear compiler please don't be my nanny v2
Dear compiler  please don't be my nanny v2Dear compiler  please don't be my nanny v2
Dear compiler please don't be my nanny v2
 
kornev.pdf
kornev.pdfkornev.pdf
kornev.pdf
 
What`s New in Java 8
What`s New in Java 8What`s New in Java 8
What`s New in Java 8
 
Beyond design patterns phpnw14
Beyond design patterns   phpnw14Beyond design patterns   phpnw14
Beyond design patterns phpnw14
 
Build your own Language - Why and How?
Build your own Language - Why and How?Build your own Language - Why and How?
Build your own Language - Why and How?
 
Programming Paradigms
Programming ParadigmsProgramming Paradigms
Programming Paradigms
 
Os Goodger
Os GoodgerOs Goodger
Os Goodger
 
TDC 2020 - Implementing a Mini-Language
TDC 2020 - Implementing a Mini-LanguageTDC 2020 - Implementing a Mini-Language
TDC 2020 - Implementing a Mini-Language
 
The NLP Muppets revolution!
The NLP Muppets revolution!The NLP Muppets revolution!
The NLP Muppets revolution!
 
Os Worthington
Os WorthingtonOs Worthington
Os Worthington
 
Programming Paradigms
Programming ParadigmsProgramming Paradigms
Programming Paradigms
 
Extracting Archival-Quality Information from Software-Related Chats
Extracting Archival-Quality Information from Software-Related ChatsExtracting Archival-Quality Information from Software-Related Chats
Extracting Archival-Quality Information from Software-Related Chats
 
Nautral Langauge Processing - Basics / Non Technical
Nautral Langauge Processing - Basics / Non Technical Nautral Langauge Processing - Basics / Non Technical
Nautral Langauge Processing - Basics / Non Technical
 
Tales About Scala Performance
Tales About Scala PerformanceTales About Scala Performance
Tales About Scala Performance
 
Better problem solving through scripting: How to think through your #eprdctn ...
Better problem solving through scripting: How to think through your #eprdctn ...Better problem solving through scripting: How to think through your #eprdctn ...
Better problem solving through scripting: How to think through your #eprdctn ...
 
Douglas Crockford Presentation Goodparts
Douglas Crockford Presentation GoodpartsDouglas Crockford Presentation Goodparts
Douglas Crockford Presentation Goodparts
 
F# and the DLR
F# and the DLRF# and the DLR
F# and the DLR
 

Mehr von Accenture | SolutionsIQ

PIMped Papyrus - A Language Workbench for UML DSLs
PIMped Papyrus - A Language Workbench for UML DSLsPIMped Papyrus - A Language Workbench for UML DSLs
PIMped Papyrus - A Language Workbench for UML DSLs
Accenture | SolutionsIQ
 

Mehr von Accenture | SolutionsIQ (12)

The Product Wall Release Planning Workshop by Alan Dayley
The Product Wall Release Planning Workshop by Alan DayleyThe Product Wall Release Planning Workshop by Alan Dayley
The Product Wall Release Planning Workshop by Alan Dayley
 
The DNA of an Innovative Product Owner by Anu Smalley
The DNA of an Innovative Product Owner by Anu SmalleyThe DNA of an Innovative Product Owner by Anu Smalley
The DNA of an Innovative Product Owner by Anu Smalley
 
Who Killed Agile?
Who Killed Agile?Who Killed Agile?
Who Killed Agile?
 
Active Portfolio Management
Active Portfolio ManagementActive Portfolio Management
Active Portfolio Management
 
Agile2014 Briefing Deck
Agile2014 Briefing DeckAgile2014 Briefing Deck
Agile2014 Briefing Deck
 
It's OK to Fail: Creating a Safe Space to Learn from Failure
It's OK to Fail: Creating a Safe Space to Learn from FailureIt's OK to Fail: Creating a Safe Space to Learn from Failure
It's OK to Fail: Creating a Safe Space to Learn from Failure
 
Active Portfolio Management
Active Portfolio ManagementActive Portfolio Management
Active Portfolio Management
 
PIMped Papyrus - A Language Workbench for UML DSLs
PIMped Papyrus - A Language Workbench for UML DSLsPIMped Papyrus - A Language Workbench for UML DSLs
PIMped Papyrus - A Language Workbench for UML DSLs
 
Fear and Loathing in Agility: Long Live the Accounting Department
Fear and Loathing in Agility: Long Live the Accounting DepartmentFear and Loathing in Agility: Long Live the Accounting Department
Fear and Loathing in Agility: Long Live the Accounting Department
 
Active portfolio management
Active portfolio managementActive portfolio management
Active portfolio management
 
Agile DevOps: Environment Automation
Agile DevOps: Environment AutomationAgile DevOps: Environment Automation
Agile DevOps: Environment Automation
 
Agile2013 Briefing Deck
Agile2013 Briefing DeckAgile2013 Briefing Deck
Agile2013 Briefing Deck
 

Kürzlich hochgeladen

introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
VishalKumarJha10
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
VictorSzoltysek
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 

Kürzlich hochgeladen (20)

The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
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
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
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
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
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
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
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 ...
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 

Lambda The Extreme: Test-Driving a Functional Language

  • 1. Copyright © 2014 SolutionsIQ Inc. All rights reserved. 6801 185th Ave NE, Suite 200 Redmond, WA 98052 solutionsiq.com 1.800.235.4091 λ the eχtreme test-driving a functional language 07/30/2014 PREPARED BY Tim Myer Programmer tmyer@solutionsiq.com
  • 2. SolutionsIQ Λ Join a great team of developers, consultants and Agile experts at a company that is Agile through and through. Λ We are hiring XP developers and coaches. Λ Swing by our booth or talk to me afterwards for more information. λ the eχtreme: test-driving a functional language 2
  • 3. “ ” λ the eχtreme: test-driving a functional language 3 Scala: you stare at your foot for 3 days without any sleep, you then figrue [sic] out how to shoot yourself in the foot with one line of code… recursively. Comment from Roberto Leibman on How to Shoot Yourself in the Foot in Any Programming Language by Mike Walker
  • 4. λ the eχtreme: test-driving a functional language 4 Agenda Λ Tools of the Trade Λ First test Λ A synchronicity Λ Network independence Λ More of the same Λ Changing Station Λ And so on and so forth and so on….
  • 5. λ the eχtreme: test-driving a functional language 5 Prelude
  • 6. The Little Schemer 6λ the eχtreme: test-driving a functional language
  • 7. “ ” λ the eχtreme: test-driving a functional language 7 if you look at the features Scala provides, it is substantially a functional language, but on the surface it does not always look like one, and it does not force you to adopt the functional style. For many of its users, the functional programming constructs in Scala are the most important set of tools it has to offer but they are not the only tools. In fact, great care has been spent in the Scala design to make functional constructs, imperative constructs, and objects all play well together. I think postfunctional is a good term for that blend. - Martin Odersky A Postfunctional Language
  • 8. λ the eχtreme: test-driving a functional language 8 Tools Λ Git Λ Maven Λ Scala IDE Λ A Dropbox account
  • 9. TheBeginning 9 Where do we start? We can start at TheBeginning. λ the eχtreme: test-driving a functional language How can we do that? Check it out!
  • 10. λ the eχtreme: test-driving a functional language 10 $ git clone https://github.com/timezra/LambdaTheEx treme.git && cd LambdaTheExtreme $ git checkout tags/TheBeginning
  • 11. TheBeginning 11 We got git, now do we get an elephant? We get a canary instead. λ the eχtreme: test-driving a functional language
  • 12. λ the eχtreme: test-driving a functional language 12 Canary
  • 13. Canary 13 What does a canary have to do with this? It’s an early indication that something has gone very wrong. λ the eχtreme: test-driving a functional language
  • 14. λ the eχtreme: test-driving a functional language 14 $ git checkout tags/Canary
  • 15. λ the eχtreme: test-driving a functional language 15 Interlude
  • 16. λ the eχtreme: test-driving a functional language 16 Recap Λ A Case Class Λ An Object Λ A FeatureSpec Λ A FunSpec!
  • 17. Canary 17 Can our canary get account info? Only with a Dropbox account. λ the eχtreme: test-driving a functional language
  • 18. λ the eχtreme: test-driving a functional language 18 Actors
  • 19. Actors 19 What happens when our account info changes? Our expectation is wrong. λ the eχtreme: test-driving a functional language What happens when we change our expectation? Our test fails.
  • 20. Actors 20 Why does it fail? Our implementation is wrong. λ the eχtreme: test-driving a functional language Where do we find the right implementation? Look in the upper left.
  • 21. λ the eχtreme: test-driving a functional language 21 $ git checkout tags/Actors
  • 22. Actors 22 How can we call Dropbox? Using HTTP λ the eχtreme: test-driving a functional language How will Dropbox know us? We’ll give it a token.
  • 23. Actors 23 When will we get our account info? In the future! λ the eχtreme: test-driving a functional language
  • 24. λ the eχtreme: test-driving a functional language 24 Interlude
  • 25. λ the eχtreme: test-driving a functional language 25 Recap Λ Configuration Management Λ Implicit conversions Λ An Actor Λ An Actor Testkit Λ The Future!
  • 26. λ the eχtreme: test-driving a functional language 26 Care and Feeding
  • 27. MinedReading 27 What happens if we fail? You tell me! λ the eχtreme: test-driving a functional language Do we catch an exception? We intercept it.
  • 28. MinedReading 28 Sprechen Sie Deutsch? Wenn Sie möchten λ the eχtreme: test-driving a functional language
  • 29. λ the eχtreme: test-driving a functional language 29 $ git checkout tags/MinedReading
  • 30. λ the eχtreme: test-driving a functional language 30 Etude
  • 31. λ the eχtreme: test-driving a functional language 31 Recap Λ Stubbing a probe’s return value Λ Intercepting an expected exception Λ Iterating over an optional value
  • 32. <Footer Content: Presentation Title, Partner Name, Other> 32 Putting it out there
  • 33. Zed 33 May I share something with you? Of course! λ the eχtreme: test-driving a functional language I would rather you put than post.
  • 34. Zed 34 What if I don’t have a file lying around? You can share anything you like over the web. λ the eχtreme: test-driving a functional language But how will you know what it should look like on the other side?
  • 35. Zed 35 Who’s Zed? Maybe Zed can help. λ the eχtreme: test-driving a functional language Scalaz!
  • 36. λ the eχtreme: test-driving a functional language 36 $ git checkout tags/Zed
  • 37. λ the eχtreme: test-driving a functional language 37 Interlude
  • 38. Zed 38 Of course! Does Zed use Monads? λ the eχtreme: test-driving a functional language Where’s a good definition of what a Monad is? Anywhere but urbandictionary.com
  • 39. Zed 39 This one is pretty good: You Could Have Invented Monads! λ the eχtreme: test-driving a functional language The original is still the best: Monads for functional programming For today, we can look at them as a way of chaining operations.
  • 40. λ the eχtreme: test-driving a functional language 40 Recap Λ Implicit transformation from a File to an abstract representation of its contents
  • 41. λ the eχtreme: test-driving a functional language 41 Birds of a feather
  • 42. Bof 42 We just need a little coordination. What if I want to share all my pictures of canaries with friends at once? λ the eχtreme: test-driving a functional language
  • 43. Bof 43 Recursive traversal fits a tree like a glove. How about a little recursion? λ the eχtreme: test-driving a functional language
  • 44. λ the eχtreme: test-driving a functional language 44 $ git checkout tags/Bof
  • 45. λ the eχtreme: test-driving a functional language 45 Interlude
  • 46. CallCC 46 And on and on? But what happens if the recursion goes on and on? λ the eχtreme: test-driving a functional language
  • 47. CallCC 47 And on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on λ the eχtreme: test-driving a functional language
  • 48. λ the eχtreme: test-driving a functional language 48 Recap Λ Changing recursive traversal to iterative using continuations
  • 49. <Footer Content: Presentation Title, Partner Name, Other> 49 To be continued….
  • 50. <Footer Content: Presentation Title, Partner Name, Other> 50 Thank you! solutionsiq.com / 1.800.235.4091