SlideShare a Scribd company logo
1 of 142
Spreadsheets for developers 
Felienne Hermans
So you are a developer? Why 
should you bother to learn 
spreadsheets? 
In this deck, I explain you why.
So you are a developer? Why 
should you bother to learn 
spreadsheets? 
In this deck, I explain you why. 
People often think about 
spreadsheets as data, but that is a 
gross misslabeling.
Spreadsheets are code
Spreadsheets are code 
I have made it my life’s work to 
spread the happy word 
“Spreadsheets are code!”
Spreadsheets are code 
I have made it my life’s work to 
spread the happy word 
“Spreadsheets are code!” 
If you don’t immediately believe 
me, I have three reasons* 
* If you do believe me, skip the next 10 slides ;)
Spreadsheets are code
1) Used for similar problems
This tool (for stock price 
computation) could have been 
built in any language. C, 
JavaScript, COBOL, or Excel. 
The problems Excel is used for are 
often (not always) similar to 
problems solved in different 
languages.
I go to great lengths to make my 
point. To such great lengths that I 
built a Turing machine in Excel, 
using formulas only.
Here you see it in action. Every row 
is an consecutive step of the tape. 
This makes it, in addition to a proof 
that formulas are Turing complete, 
Also a nice visualization of a Turing 
machine.
Here you see it in action. Every row 
is an consecutive step of the tape. 
This makes it, in addition to a proof 
that formulas are Turing complete, 
Also a nice visualization of a Turing 
machine. 
Many people liked it :) 
2) Formulas are Turing complete
Finally, spreadsheets suffer from 
typicial ‘software’ problems like 
lack of documentation and a long 
lifespan during which many 
different users are involved. 
3) They suffer from the same problems
Spreadsheets are code 
In summary: both the activities, 
complexity and problems are the same
And not just a programming 
language!
Resistance is futile!
Stukje Bret Victor hier Spreadsheet are ‘live 
programming’ avant la lettre. 
What Bret Victor is been 
advocating for lately, we had that 
since VisiCalc! 
Just type up your formula and you 
will get the result immediately.
You love pure functional 
languages?
You love pure functional 
languages? 
We’ve got you covered. All a 
formula can do is take input and 
do something with it. 
No side effects possible.
Finally, spreadsheets are the lingua 
franca of computing. You 
grandfather probably knows how 
to put a spreadsheet together for 
his savings. Your next door 
neighbour? Uses it for his fantasy 
football league. That history major 
you are helping out with his math 
work? I am sure he out-pivot tables 
you! 
Everyone knows this, expect for 
developers! 
That’s just crazy!
I am just going to assume you are 
convinced and you want to learn 
spreadsheets. Therefore, I’ll 
implement selection sort in a 
spreadsheet to show you their 
power.
I am just going to assume you are 
convinced and you want to learn 
spreadsheets. Therefore, I’ll 
implement selection sort in a 
spreadsheet to show you their 
power. 
To refresh your memory: selection 
sort sorts a list by repeatedly 
selecting the smallest value and 
putting it in the front:
I am just going to assume you are 
convinced and you want to learn 
spreadsheets. Therefore, I’ll 
implement selection sort in a 
spreadsheet to show you their 
power. 
To refresh your memory: selection 
sort sorts a list by repeatedly 
selecting the smallest value and 
putting it in the front: 
7-8-3-1-12-15
I am just going to assume you are 
convinced and you want to learn 
spreadsheets. Therefore, I’ll 
implement selection sort in a 
spreadsheet to show you their 
power. 
To refresh your memory: selection 
sort sorts a list by repeatedly 
selecting the smallest value and 
putting it in the front: 
7-8-3-1-12-15 
| 
1 is the minimum, swap it with 7
I am just going to assume you are 
convinced and you want to learn 
spreadsheets. Therefore, I’ll 
implement selection sort in a 
spreadsheet to show you their 
power. 
To refresh your memory: selection 
sort sorts a list by repeatedly 
selecting the smallest value and 
putting it in the front: 
1-8-3-7-12-15 
| 
1 is the minimum, swap it with 7
I am just going to assume you are 
convinced and you want to learn 
spreadsheets. Therefore, I’ll 
implement selection sort in a 
spreadsheet to show you their 
power. 
To refresh your memory: selection 
sort sorts a list by repeatedly 
selecting the smallest value and 
putting it in the front: 
1-8-3-7-12-15 
| 
Now 3 is the minimum, swap it with 
8
I am just going to assume you are 
convinced and you want to learn 
spreadsheets. Therefore, I’ll 
implement selection sort in a 
spreadsheet to show you their 
power. 
To refresh your memory: selection 
sort sorts a list by repeatedly 
selecting the smallest value and 
putting it in the front: 
1-3-8-7-12-15 
| 
Rinse and repeat
MATCH takes as 
arguments: the search 
value, the range to 
search in and the type 
of match (exact or 
bigger/smaller)
MATCH results in 10: 
the minimum is 
found on index 10
Let’s start small and 
make a formula 
that places an “X" 
in the swap spots
So: if our index is 
equal to the index 
of the minimum, 
we swap (X) 
otherwise we do 
nothing (_) 
Let’s start small and 
make a formula 
that places an “X" 
in the swap spots
So: if our index is 
equal to the index 
of the minimum, 
we swap (X) 
otherwise we do 
nothing (_) 
That looks cool, 
let’s drag it right
Awww... Something 
went wrong!
By default, Excel 
transforms formulas 
by location, so this 
one is changed 
incorrectly
If we do not want 
that, we add a $ 
before a reference 
to fix it. Now, only 
the row is updated
If we do not want 
that, we add a $ 
before a reference 
to fix it. Now, only 
the row is updated 
Let’s try dragging again
Let’s also fix the index row 
here, because we are 
dragging all this down later
We will swap 
based on the 
index, starting at 1
INDEX takes as 
arguments: the range 
to locate a value in, 
followed by the row 
and column
INDEX takes as 
arguments: the range 
to locate a value in, 
followed by the row 
and column 
We use row 1 (as we 
are looking in only one 
row) and the column in 
B4 (the index of the 
swap)
With this, we can 
edit the second 
branch of the if, to 
add the second 
swap situation
With this, we can 
edit the second 
branch of the if, to 
add the second 
swap situation 
We also swap is the 
index is equal to 
the ‘swap index’
Let’s fill in the easiest 
blank first, the _ 
In case we do not 
swap, we can just 
use the value above
Let’s fill in the easiest 
blank first, the _ 
In case we do not 
swap, we can just 
use the value above
So what goes on this 
spot? If the index is 
equal to the swap spot...
So what goes on this 
spot? If the index is 
equal to the swap spot, 
we output the minimum
And if the index 
is swap, 
we output the 
swap value
Looks like we 
are ready to 
draw all 
formulas down
1 is picked as 
minimum 
everywhere
1 is picked as 
minimum 
everywhere 
This range 
needs to shift 
right every step
We can use the 
OFFSET function 
for that
We can use the 
OFFSET function 
for that 
OFFSET takes as 
arguments: the range 
you want to shift, 
followed by number of 
rows and number of 
columns
We can use the 
OFFSET function 
for that 
OFFSET takes as 
arguments: the range 
you want to shift, 
followed by number of 
rows and number of 
columns
= Range1 Range2 
results in a referece to 
the intersection of the 
two ranges. In this 
case C5 with value 3.
= Range1 Range2 
results in a referece to 
the intersection of the 
two ranges. In this 
case C5 with value 3.
A2:B7
But we can 
also name:
But we can 
also name: 
strings
But we can name 
funkier stuff, let’s 
stick with the 
love theme!
This too can be 
expressed with a 
named range
Named ranges 
got you covered 
again!
What we want 
now, is to refer to 
the cell in C4, 
and then 
increase its value
ROW(cell) results in the 
row of a cell, for 
example ROW(A8) = 8 
Without arguments 
ROW returns the 
current row. 
What we want 
now, is to refer to 
the cell in C4, 
and then 
increase its value 
We can use the 
ROW for that
ROW(cell) results in the 
row of a cell, for 
example ROW(A8) = 8 
Without arguments 
ROW returns the 
current row. 
3 in this case 
What we want 
now, is to refer to 
the cell in C4, 
and then 
increase its value 
We can use the 
ROW for that
INDIRECT turns a string 
into a reference, and 
is in that sense similar 
to the ‘eval’ of 
JavaScript
For comparison, I 
have written selection 
sort in Python
Because SE methods transfer so 
well, after my graduation, I built a 
spreadsheet refactoring tool called 
BumbleBee.
Because SE methods transfer so 
well, after my graduation, I built a 
spreadsheet refactoring tool called 
BumbleBee. 
Here you see the user interface in 
Excel 2010.
And of course, if you say 
refactoring...
And of course, if you say 
refactoring, you say testing! 
When users modify their 
spreadsheet, theywant to be sure 
the fuinctionality of their 
spreadsheets remains the same. 
But how to get end-users to test? 
This is already hard for 
professional developers!
And of course, if you say 
refactoring, you say testing! 
When users modify their 
spreadsheet, theywant to be sure 
the fuinctionality of their 
spreadsheets remains the same. 
But how to get end-users to test? 
This is already hard for 
professional developers! 
But spreadsheet users are already 
good testers!
Also available: 
felienne.com/Expector
That’s all folks! Thanks for watching my 
talk on SlideShare! 
Don’t forget that: 
More info? 
• www.felienne.com 
• www.spreadsheetlab.org 
Want to connect? 
• @felienne 
• mail@felienne.com

More Related Content

Similar to Spreadsheets for developers

Software fundamentals
Software fundamentalsSoftware fundamentals
Software fundamentalsSusan Winters
 
Questions4
Questions4Questions4
Questions4hccit
 
Mastering Python lesson3b_for_loops
Mastering Python lesson3b_for_loopsMastering Python lesson3b_for_loops
Mastering Python lesson3b_for_loopsRuth Marvin
 
5 structured programming
5 structured programming 5 structured programming
5 structured programming hccit
 
Basics of Programming - A Review Guide
Basics of Programming - A Review GuideBasics of Programming - A Review Guide
Basics of Programming - A Review GuideBenjamin Kissinger
 
1 CS110 - Introduction to Computers and Applications .docx
1  CS110 - Introduction to Computers and Applications .docx1  CS110 - Introduction to Computers and Applications .docx
1 CS110 - Introduction to Computers and Applications .docxhoney725342
 
Mastering Python : 100+ Solved and Commented Exercises to Accelerate Your Lea...
Mastering Python : 100+ Solved and Commented Exercises to Accelerate Your Lea...Mastering Python : 100+ Solved and Commented Exercises to Accelerate Your Lea...
Mastering Python : 100+ Solved and Commented Exercises to Accelerate Your Lea...Lucky Gods
 
Bavpwjs1113
Bavpwjs1113Bavpwjs1113
Bavpwjs1113Thinkful
 
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
 
Cucci_-Excel_for_beginners_.pptx
Cucci_-Excel_for_beginners_.pptxCucci_-Excel_for_beginners_.pptx
Cucci_-Excel_for_beginners_.pptxHamid458506
 
Cucci_-Excel_for_beginners_ (1).pptx
Cucci_-Excel_for_beginners_ (1).pptxCucci_-Excel_for_beginners_ (1).pptx
Cucci_-Excel_for_beginners_ (1).pptxkokila60
 
Excel Training.pptx
Excel Training.pptxExcel Training.pptx
Excel Training.pptxssuser5cc925
 
Simulating data to gain insights into power and p-hacking
Simulating data to gain insights intopower and p-hackingSimulating data to gain insights intopower and p-hacking
Simulating data to gain insights into power and p-hackingDorothy Bishop
 
Learning R while exploring statistics
Learning R while exploring statisticsLearning R while exploring statistics
Learning R while exploring statisticsDorothy Bishop
 
Advanced VB: Review of the basics
Advanced VB: Review of the basicsAdvanced VB: Review of the basics
Advanced VB: Review of the basicsrobertbenard
 
Advanced VB: Review of the basics
Advanced VB: Review of the basicsAdvanced VB: Review of the basics
Advanced VB: Review of the basicsrobertbenard
 

Similar to Spreadsheets for developers (20)

R Programming
R ProgrammingR Programming
R Programming
 
Software fundamentals
Software fundamentalsSoftware fundamentals
Software fundamentals
 
Questions4
Questions4Questions4
Questions4
 
Mastering Python lesson3b_for_loops
Mastering Python lesson3b_for_loopsMastering Python lesson3b_for_loops
Mastering Python lesson3b_for_loops
 
Excel intermediate
Excel intermediateExcel intermediate
Excel intermediate
 
5 structured programming
5 structured programming 5 structured programming
5 structured programming
 
Basics of Programming - A Review Guide
Basics of Programming - A Review GuideBasics of Programming - A Review Guide
Basics of Programming - A Review Guide
 
Arrays in c++
Arrays in c++Arrays in c++
Arrays in c++
 
1 CS110 - Introduction to Computers and Applications .docx
1  CS110 - Introduction to Computers and Applications .docx1  CS110 - Introduction to Computers and Applications .docx
1 CS110 - Introduction to Computers and Applications .docx
 
Mastering Python : 100+ Solved and Commented Exercises to Accelerate Your Lea...
Mastering Python : 100+ Solved and Commented Exercises to Accelerate Your Lea...Mastering Python : 100+ Solved and Commented Exercises to Accelerate Your Lea...
Mastering Python : 100+ Solved and Commented Exercises to Accelerate Your Lea...
 
Bavpwjs1113
Bavpwjs1113Bavpwjs1113
Bavpwjs1113
 
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
 
Cucci_-Excel_for_beginners_.pptx
Cucci_-Excel_for_beginners_.pptxCucci_-Excel_for_beginners_.pptx
Cucci_-Excel_for_beginners_.pptx
 
Cucci_-Excel_for_beginners_ (1).pptx
Cucci_-Excel_for_beginners_ (1).pptxCucci_-Excel_for_beginners_ (1).pptx
Cucci_-Excel_for_beginners_ (1).pptx
 
Excel Training.pptx
Excel Training.pptxExcel Training.pptx
Excel Training.pptx
 
Simulating data to gain insights into power and p-hacking
Simulating data to gain insights intopower and p-hackingSimulating data to gain insights intopower and p-hacking
Simulating data to gain insights into power and p-hacking
 
Learning R while exploring statistics
Learning R while exploring statisticsLearning R while exploring statistics
Learning R while exploring statistics
 
Advanced VB: Review of the basics
Advanced VB: Review of the basicsAdvanced VB: Review of the basics
Advanced VB: Review of the basics
 
Advanced VB: Review of the basics
Advanced VB: Review of the basicsAdvanced VB: Review of the basics
Advanced VB: Review of the basics
 

More from 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
 
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
 

More from Felienne Hermans (12)

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
 
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
 
Spreadsheet Testing
Spreadsheet TestingSpreadsheet Testing
Spreadsheet Testing
 
The power of symmetry
The power of symmetryThe power of symmetry
The power of symmetry
 

Recently uploaded

Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsyncWhy does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsyncssuser2ae721
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEroselinkalist12
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerAnamika Sarkar
 
US Department of Education FAFSA Week of Action
US Department of Education FAFSA Week of ActionUS Department of Education FAFSA Week of Action
US Department of Education FAFSA Week of ActionMebane Rash
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionDr.Costas Sachpazis
 
8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitter8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitterShivangiSharma879191
 
lifi-technology with integration of IOT.pptx
lifi-technology with integration of IOT.pptxlifi-technology with integration of IOT.pptx
lifi-technology with integration of IOT.pptxsomshekarkn64
 
welding defects observed during the welding
welding defects observed during the weldingwelding defects observed during the welding
welding defects observed during the weldingMuhammadUzairLiaqat
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfAsst.prof M.Gokilavani
 
An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...Chandu841456
 
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfCCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfAsst.prof M.Gokilavani
 
Class 1 | NFPA 72 | Overview Fire Alarm System
Class 1 | NFPA 72 | Overview Fire Alarm SystemClass 1 | NFPA 72 | Overview Fire Alarm System
Class 1 | NFPA 72 | Overview Fire Alarm Systemirfanmechengr
 
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor CatchersTechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catcherssdickerson1
 
Risk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfRisk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfROCENODodongVILLACER
 

Recently uploaded (20)

Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsyncWhy does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
Design and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdfDesign and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdf
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
 
US Department of Education FAFSA Week of Action
US Department of Education FAFSA Week of ActionUS Department of Education FAFSA Week of Action
US Department of Education FAFSA Week of Action
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
young call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Serviceyoung call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Service
 
8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitter8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitter
 
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
 
lifi-technology with integration of IOT.pptx
lifi-technology with integration of IOT.pptxlifi-technology with integration of IOT.pptx
lifi-technology with integration of IOT.pptx
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
welding defects observed during the welding
welding defects observed during the weldingwelding defects observed during the welding
welding defects observed during the welding
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
 
An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...
 
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfCCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
 
Class 1 | NFPA 72 | Overview Fire Alarm System
Class 1 | NFPA 72 | Overview Fire Alarm SystemClass 1 | NFPA 72 | Overview Fire Alarm System
Class 1 | NFPA 72 | Overview Fire Alarm System
 
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor CatchersTechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
 
Risk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfRisk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdf
 

Spreadsheets for developers

  • 1. Spreadsheets for developers Felienne Hermans
  • 2. So you are a developer? Why should you bother to learn spreadsheets? In this deck, I explain you why.
  • 3. So you are a developer? Why should you bother to learn spreadsheets? In this deck, I explain you why. People often think about spreadsheets as data, but that is a gross misslabeling.
  • 5. Spreadsheets are code I have made it my life’s work to spread the happy word “Spreadsheets are code!”
  • 6. Spreadsheets are code I have made it my life’s work to spread the happy word “Spreadsheets are code!” If you don’t immediately believe me, I have three reasons* * If you do believe me, skip the next 10 slides ;)
  • 8. 1) Used for similar problems
  • 9. This tool (for stock price computation) could have been built in any language. C, JavaScript, COBOL, or Excel. The problems Excel is used for are often (not always) similar to problems solved in different languages.
  • 10. I go to great lengths to make my point. To such great lengths that I built a Turing machine in Excel, using formulas only.
  • 11. Here you see it in action. Every row is an consecutive step of the tape. This makes it, in addition to a proof that formulas are Turing complete, Also a nice visualization of a Turing machine.
  • 12. Here you see it in action. Every row is an consecutive step of the tape. This makes it, in addition to a proof that formulas are Turing complete, Also a nice visualization of a Turing machine. Many people liked it :) 2) Formulas are Turing complete
  • 13. Finally, spreadsheets suffer from typicial ‘software’ problems like lack of documentation and a long lifespan during which many different users are involved. 3) They suffer from the same problems
  • 14. Spreadsheets are code In summary: both the activities, complexity and problems are the same
  • 15. And not just a programming language!
  • 17. Stukje Bret Victor hier Spreadsheet are ‘live programming’ avant la lettre. What Bret Victor is been advocating for lately, we had that since VisiCalc! Just type up your formula and you will get the result immediately.
  • 18. You love pure functional languages?
  • 19. You love pure functional languages? We’ve got you covered. All a formula can do is take input and do something with it. No side effects possible.
  • 20. Finally, spreadsheets are the lingua franca of computing. You grandfather probably knows how to put a spreadsheet together for his savings. Your next door neighbour? Uses it for his fantasy football league. That history major you are helping out with his math work? I am sure he out-pivot tables you! Everyone knows this, expect for developers! That’s just crazy!
  • 21. I am just going to assume you are convinced and you want to learn spreadsheets. Therefore, I’ll implement selection sort in a spreadsheet to show you their power.
  • 22. I am just going to assume you are convinced and you want to learn spreadsheets. Therefore, I’ll implement selection sort in a spreadsheet to show you their power. To refresh your memory: selection sort sorts a list by repeatedly selecting the smallest value and putting it in the front:
  • 23. I am just going to assume you are convinced and you want to learn spreadsheets. Therefore, I’ll implement selection sort in a spreadsheet to show you their power. To refresh your memory: selection sort sorts a list by repeatedly selecting the smallest value and putting it in the front: 7-8-3-1-12-15
  • 24. I am just going to assume you are convinced and you want to learn spreadsheets. Therefore, I’ll implement selection sort in a spreadsheet to show you their power. To refresh your memory: selection sort sorts a list by repeatedly selecting the smallest value and putting it in the front: 7-8-3-1-12-15 | 1 is the minimum, swap it with 7
  • 25. I am just going to assume you are convinced and you want to learn spreadsheets. Therefore, I’ll implement selection sort in a spreadsheet to show you their power. To refresh your memory: selection sort sorts a list by repeatedly selecting the smallest value and putting it in the front: 1-8-3-7-12-15 | 1 is the minimum, swap it with 7
  • 26. I am just going to assume you are convinced and you want to learn spreadsheets. Therefore, I’ll implement selection sort in a spreadsheet to show you their power. To refresh your memory: selection sort sorts a list by repeatedly selecting the smallest value and putting it in the front: 1-8-3-7-12-15 | Now 3 is the minimum, swap it with 8
  • 27. I am just going to assume you are convinced and you want to learn spreadsheets. Therefore, I’ll implement selection sort in a spreadsheet to show you their power. To refresh your memory: selection sort sorts a list by repeatedly selecting the smallest value and putting it in the front: 1-3-8-7-12-15 | Rinse and repeat
  • 28.
  • 29.
  • 30.
  • 31.
  • 32. MATCH takes as arguments: the search value, the range to search in and the type of match (exact or bigger/smaller)
  • 33. MATCH results in 10: the minimum is found on index 10
  • 34. Let’s start small and make a formula that places an “X" in the swap spots
  • 35. So: if our index is equal to the index of the minimum, we swap (X) otherwise we do nothing (_) Let’s start small and make a formula that places an “X" in the swap spots
  • 36. So: if our index is equal to the index of the minimum, we swap (X) otherwise we do nothing (_) That looks cool, let’s drag it right
  • 38. By default, Excel transforms formulas by location, so this one is changed incorrectly
  • 39. If we do not want that, we add a $ before a reference to fix it. Now, only the row is updated
  • 40. If we do not want that, we add a $ before a reference to fix it. Now, only the row is updated Let’s try dragging again
  • 41.
  • 42. Let’s also fix the index row here, because we are dragging all this down later
  • 43. We will swap based on the index, starting at 1
  • 44.
  • 45. INDEX takes as arguments: the range to locate a value in, followed by the row and column
  • 46. INDEX takes as arguments: the range to locate a value in, followed by the row and column We use row 1 (as we are looking in only one row) and the column in B4 (the index of the swap)
  • 47. With this, we can edit the second branch of the if, to add the second swap situation
  • 48. With this, we can edit the second branch of the if, to add the second swap situation We also swap is the index is equal to the ‘swap index’
  • 49.
  • 50. Let’s fill in the easiest blank first, the _ In case we do not swap, we can just use the value above
  • 51. Let’s fill in the easiest blank first, the _ In case we do not swap, we can just use the value above
  • 52.
  • 53. So what goes on this spot? If the index is equal to the swap spot...
  • 54. So what goes on this spot? If the index is equal to the swap spot, we output the minimum
  • 55. And if the index is swap, we output the swap value
  • 56.
  • 57. Looks like we are ready to draw all formulas down
  • 58.
  • 59.
  • 60. 1 is picked as minimum everywhere
  • 61. 1 is picked as minimum everywhere This range needs to shift right every step
  • 62. We can use the OFFSET function for that
  • 63. We can use the OFFSET function for that OFFSET takes as arguments: the range you want to shift, followed by number of rows and number of columns
  • 64. We can use the OFFSET function for that OFFSET takes as arguments: the range you want to shift, followed by number of rows and number of columns
  • 65.
  • 66.
  • 67.
  • 68.
  • 69. = Range1 Range2 results in a referece to the intersection of the two ranges. In this case C5 with value 3.
  • 70. = Range1 Range2 results in a referece to the intersection of the two ranges. In this case C5 with value 3.
  • 71.
  • 72.
  • 73.
  • 74.
  • 75.
  • 76.
  • 77.
  • 78.
  • 79.
  • 80.
  • 81.
  • 82. A2:B7
  • 83.
  • 84. But we can also name:
  • 85. But we can also name: strings
  • 86.
  • 87.
  • 88. But we can name funkier stuff, let’s stick with the love theme!
  • 89.
  • 90. This too can be expressed with a named range
  • 91.
  • 92.
  • 93.
  • 94.
  • 95.
  • 96. Named ranges got you covered again!
  • 97. What we want now, is to refer to the cell in C4, and then increase its value
  • 98. ROW(cell) results in the row of a cell, for example ROW(A8) = 8 Without arguments ROW returns the current row. What we want now, is to refer to the cell in C4, and then increase its value We can use the ROW for that
  • 99. ROW(cell) results in the row of a cell, for example ROW(A8) = 8 Without arguments ROW returns the current row. 3 in this case What we want now, is to refer to the cell in C4, and then increase its value We can use the ROW for that
  • 100.
  • 101.
  • 102.
  • 103.
  • 104. INDIRECT turns a string into a reference, and is in that sense similar to the ‘eval’ of JavaScript
  • 105.
  • 106.
  • 107.
  • 108.
  • 109.
  • 110.
  • 111.
  • 112.
  • 113.
  • 114.
  • 115.
  • 116. For comparison, I have written selection sort in Python
  • 117.
  • 118.
  • 119.
  • 120.
  • 121. Because SE methods transfer so well, after my graduation, I built a spreadsheet refactoring tool called BumbleBee.
  • 122. Because SE methods transfer so well, after my graduation, I built a spreadsheet refactoring tool called BumbleBee. Here you see the user interface in Excel 2010.
  • 123.
  • 124.
  • 125.
  • 126.
  • 127.
  • 128.
  • 129.
  • 130.
  • 131. And of course, if you say refactoring...
  • 132. And of course, if you say refactoring, you say testing! When users modify their spreadsheet, theywant to be sure the fuinctionality of their spreadsheets remains the same. But how to get end-users to test? This is already hard for professional developers!
  • 133. And of course, if you say refactoring, you say testing! When users modify their spreadsheet, theywant to be sure the fuinctionality of their spreadsheets remains the same. But how to get end-users to test? This is already hard for professional developers! But spreadsheet users are already good testers!
  • 134.
  • 135.
  • 136.
  • 137.
  • 138.
  • 139.
  • 140.
  • 142. That’s all folks! Thanks for watching my talk on SlideShare! Don’t forget that: More info? • www.felienne.com • www.spreadsheetlab.org Want to connect? • @felienne • mail@felienne.com