SlideShare une entreprise Scribd logo
1  sur  169
Télécharger pour lire hors ligne
Functional programming in Excel
Felienne Hermans
@Felienne
Spreadsheets are code
1) Used for similar problems
But why in a spreadsheet?
2) Formulas are Turing complete
In summary: both the activities,
complexity and problems are the same
Spreadsheets are code
In summary: both the activities,
complexity and problems are the same
And not just a programming
language!
The next language
to learn
Resistance is futile!
Stukje Bret Victor hier
live programming
pure functional
pure functional
Lingua franca
of computing
Let’s
go!
Lego Adventure by Austin Kirk CC-BY-2.0
Functionalprogramming isprogrammingwithout assignmentstatements
Functionalprogramming isprogrammingwithout assignmentstatements
Example:
Squares
of
integers
List
of
inputs
List
of
inputs
Function definition
List
of
inputs
Function definition
Map
A bit more
exciting
Sum of all
squares
over 30
I’d like to
directly multiply
two ranges!
L This is not that,
it first intersects
and then
multiplies
Ctrl-shift-entercreates “array formula”
Ctrl-shift-entercreates “array formula”
Ctrl-shift-entercreates “array formula”
This cell now
holds an
entire array
It just shows
1 element
If I give the
formula space,
we get the
whole array
Hit ctrl-shirt-
enter to make
an array
formula
The first 5
elements of
the array
Input * Input
We can
reduce the
array too!
And filter
What is the
datatype of
DangerZone?
What is the
datatype of
DangerZone?
It is a
Maybe Int!
+ is lifted and
applied to
only the ints
Let’s do some
real
programming!
Money in
a maze
Money in
a maze
Recursive
solution:
Money in
a maze
Recursive
solution:
V(O15)=
Money in
a maze
Recursive
solution:
V(O15)=
Money in
a maze
Recursive
solution:
V(O15)=
Recursive
solution:
V(O15)=
MAX( V(O14),V(N15) )
+ 33
Money in
a maze
Money in
a maze
Any
problems?
Any
problems?
Money in
a maze
Works,
but is
expensive
Money in
a maze
We can use
‘dynamic
programming’
Money in
a maze
We save the
maximum
value possible
at a field
Symbols will
represent path
direction
Only if the cell
below is “^”
Otherwise “”
Spreadsheets are code
So if spreadsheets are code, can we
apply software engineering methods?
In software, tools have been created to
help programmers understand code
Because spreadsheets are so similar to
code, users can benefit from SE methods
Like “code smells”
for spreadsheet
formulas
“Long method”
“Too many
parameters”
Conditional
complexity
Code
clones
Code
clones
If you say smells, you say…
If you say smells, you say refactoring
So, we built BumbleBee:
a refactoring tool for spreadsheets
So, we built BumbleBee:
a refactoring tool for spreadsheets
The transformations are entirely
programmable, with a small language
Available from my website:
felienne.com/bumblebee
And of course, if you say refactoring,
you say …
And of course, if you say refactoring,
you say testing
These test formulas can be exploited
Available from my website:
felienne.com/expector
More info?
•  www.perfectxl.com
•  www.felienne.com
•  www.spreadsheetlab.org
Want to connect?
•  @felienne / mail@felienne.com
Functional Programming in Excel
Functional Programming in Excel
Functional Programming in Excel

Contenu connexe

Similaire à Functional Programming in Excel

Real World Haskell: Lecture 1
Real World Haskell: Lecture 1Real World Haskell: Lecture 1
Real World Haskell: Lecture 1Bryan O'Sullivan
 
6. spreadsheet are code
6. spreadsheet are code6. spreadsheet are code
6. spreadsheet are codein4400
 
Mastering Python lesson3b_for_loops
Mastering Python lesson3b_for_loopsMastering Python lesson3b_for_loops
Mastering Python lesson3b_for_loopsRuth Marvin
 
ISTA 130 Lab 21 Turtle ReviewHere are all of the turt.docx
ISTA 130 Lab 21 Turtle ReviewHere are all of the turt.docxISTA 130 Lab 21 Turtle ReviewHere are all of the turt.docx
ISTA 130 Lab 21 Turtle ReviewHere are all of the turt.docxpriestmanmable
 
CMIS 102 Hands-On Lab Week 4OverviewThis hands-on lab all.docx
CMIS 102 Hands-On Lab Week 4OverviewThis hands-on lab all.docxCMIS 102 Hands-On Lab Week 4OverviewThis hands-on lab all.docx
CMIS 102 Hands-On Lab Week 4OverviewThis hands-on lab all.docxmonicafrancis71118
 
Data Structures- Part1 overview and review
Data Structures- Part1 overview and reviewData Structures- Part1 overview and review
Data Structures- Part1 overview and reviewAbdullah Al-hazmy
 
Word2vec slide(lab seminar)
Word2vec slide(lab seminar)Word2vec slide(lab seminar)
Word2vec slide(lab seminar)Jinpyo Lee
 
Anything but simple Mathematica
Anything but simple MathematicaAnything but simple Mathematica
Anything but simple MathematicaSergeiPronkevich
 
Functional programming and Elm
Functional programming and ElmFunctional programming and Elm
Functional programming and ElmFangda Wang
 
Introduction to programming - class 11
Introduction to programming - class 11Introduction to programming - class 11
Introduction to programming - class 11Paul Brebner
 
Basics of Programming - A Review Guide
Basics of Programming - A Review GuideBasics of Programming - A Review Guide
Basics of Programming - A Review GuideBenjamin Kissinger
 
Notes1
Notes1Notes1
Notes1hccit
 
Software fundamentals
Software fundamentalsSoftware fundamentals
Software fundamentalsSusan Winters
 

Similaire à Functional Programming in Excel (20)

Real World Haskell: Lecture 1
Real World Haskell: Lecture 1Real World Haskell: Lecture 1
Real World Haskell: Lecture 1
 
6. spreadsheet are code
6. spreadsheet are code6. spreadsheet are code
6. spreadsheet are code
 
Mastering Python lesson3b_for_loops
Mastering Python lesson3b_for_loopsMastering Python lesson3b_for_loops
Mastering Python lesson3b_for_loops
 
ForLoops.pptx
ForLoops.pptxForLoops.pptx
ForLoops.pptx
 
ISTA 130 Lab 21 Turtle ReviewHere are all of the turt.docx
ISTA 130 Lab 21 Turtle ReviewHere are all of the turt.docxISTA 130 Lab 21 Turtle ReviewHere are all of the turt.docx
ISTA 130 Lab 21 Turtle ReviewHere are all of the turt.docx
 
CMIS 102 Hands-On Lab Week 4OverviewThis hands-on lab all.docx
CMIS 102 Hands-On Lab Week 4OverviewThis hands-on lab all.docxCMIS 102 Hands-On Lab Week 4OverviewThis hands-on lab all.docx
CMIS 102 Hands-On Lab Week 4OverviewThis hands-on lab all.docx
 
Python Math Concepts Book
Python Math Concepts BookPython Math Concepts Book
Python Math Concepts Book
 
Data Structures- Part1 overview and review
Data Structures- Part1 overview and reviewData Structures- Part1 overview and review
Data Structures- Part1 overview and review
 
Loops_in_Rv1.2b
Loops_in_Rv1.2bLoops_in_Rv1.2b
Loops_in_Rv1.2b
 
Logo tutorial
Logo tutorialLogo tutorial
Logo tutorial
 
Word2vec slide(lab seminar)
Word2vec slide(lab seminar)Word2vec slide(lab seminar)
Word2vec slide(lab seminar)
 
Unit 1.pptx
Unit 1.pptxUnit 1.pptx
Unit 1.pptx
 
Anything but simple Mathematica
Anything but simple MathematicaAnything but simple Mathematica
Anything but simple Mathematica
 
Functional programming and Elm
Functional programming and ElmFunctional programming and Elm
Functional programming and Elm
 
Introduction to programming - class 11
Introduction to programming - class 11Introduction to programming - class 11
Introduction to programming - class 11
 
Basics of Programming - A Review Guide
Basics of Programming - A Review GuideBasics of Programming - A Review Guide
Basics of Programming - A Review Guide
 
Notes1
Notes1Notes1
Notes1
 
lecture 2.pptx
lecture 2.pptxlecture 2.pptx
lecture 2.pptx
 
Software fundamentals
Software fundamentalsSoftware fundamentals
Software fundamentals
 
L&NDeltaTalk
L&NDeltaTalkL&NDeltaTalk
L&NDeltaTalk
 

Plus de Felienne Hermans

Using F# and genetic programming to play computer bridge
Using F# and genetic programming to play computer bridgeUsing F# and genetic programming to play computer bridge
Using F# and genetic programming to play computer bridgeFelienne Hermans
 
Programming is logical reasoning?
Programming is logical reasoning?Programming is logical reasoning?
Programming is logical reasoning?Felienne Hermans
 
Small, simple and smelly: What we can learn from examining end-user artifacts?
Small, simple and smelly: What we can learn from examining end-user artifacts?Small, simple and smelly: What we can learn from examining end-user artifacts?
Small, simple and smelly: What we can learn from examining end-user artifacts?Felienne Hermans
 
Do Code Smell Hamper Novice Programmers?
Do Code Smell Hamper Novice Programmers?Do Code Smell Hamper Novice Programmers?
Do Code Smell Hamper Novice Programmers?Felienne Hermans
 
Programming by Calculation
Programming by CalculationProgramming by Calculation
Programming by CalculationFelienne Hermans
 
A board game night with geeks: attacking Quarto ties with SAT solvers
A board game night with geeks: attacking Quarto ties with SAT solversA board game night with geeks: attacking Quarto ties with SAT solvers
A board game night with geeks: attacking Quarto ties with SAT solversFelienne Hermans
 
Improving Spreadsheet Test Practices
Improving Spreadsheet Test PracticesImproving Spreadsheet Test Practices
Improving Spreadsheet Test PracticesFelienne Hermans
 
Putting the science in computer science
Putting the science in computer sciencePutting the science in computer science
Putting the science in computer scienceFelienne Hermans
 
Social media for the busy scientist
Social media for the busy scientistSocial media for the busy scientist
Social media for the busy scientistFelienne Hermans
 
An overview of my PhD research
An overview of my PhD researchAn overview of my PhD research
An overview of my PhD researchFelienne Hermans
 
Detecting and Visualizing Inter-worksheet Smells in Spreadsheets
Detecting and Visualizing Inter-worksheet Smells in Spreadsheets Detecting and Visualizing Inter-worksheet Smells in Spreadsheets
Detecting and Visualizing Inter-worksheet Smells in Spreadsheets Felienne Hermans
 

Plus de Felienne Hermans (15)

Using F# and genetic programming to play computer bridge
Using F# and genetic programming to play computer bridgeUsing F# and genetic programming to play computer bridge
Using F# and genetic programming to play computer bridge
 
How does code sound?
How does code sound?How does code sound?
How does code sound?
 
Programming is logical reasoning?
Programming is logical reasoning?Programming is logical reasoning?
Programming is logical reasoning?
 
Small, simple and smelly: What we can learn from examining end-user artifacts?
Small, simple and smelly: What we can learn from examining end-user artifacts?Small, simple and smelly: What we can learn from examining end-user artifacts?
Small, simple and smelly: What we can learn from examining end-user artifacts?
 
Do Code Smell Hamper Novice Programmers?
Do Code Smell Hamper Novice Programmers?Do Code Smell Hamper Novice Programmers?
Do Code Smell Hamper Novice Programmers?
 
Programming by Calculation
Programming by CalculationProgramming by Calculation
Programming by Calculation
 
A board game night with geeks: attacking Quarto ties with SAT solvers
A board game night with geeks: attacking Quarto ties with SAT solversA board game night with geeks: attacking Quarto ties with SAT solvers
A board game night with geeks: attacking Quarto ties with SAT solvers
 
Improving Spreadsheet Test Practices
Improving Spreadsheet Test PracticesImproving Spreadsheet Test Practices
Improving Spreadsheet Test Practices
 
Putting the science in computer science
Putting the science in computer sciencePutting the science in computer science
Putting the science in computer science
 
Social media for the busy scientist
Social media for the busy scientistSocial media for the busy scientist
Social media for the busy scientist
 
An overview of my PhD research
An overview of my PhD researchAn overview of my PhD research
An overview of my PhD research
 
Detecting and Visualizing Inter-worksheet Smells in Spreadsheets
Detecting and Visualizing Inter-worksheet Smells in Spreadsheets Detecting and Visualizing Inter-worksheet Smells in Spreadsheets
Detecting and Visualizing Inter-worksheet Smells in Spreadsheets
 
Spreadsheet Testing
Spreadsheet TestingSpreadsheet Testing
Spreadsheet Testing
 
TEDxDelft
TEDxDelftTEDxDelft
TEDxDelft
 
The power of symmetry
The power of symmetryThe power of symmetry
The power of symmetry
 

Dernier

Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 

Dernier (20)

Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 

Functional Programming in Excel