Ce diaporama a bien été signalé.
Nous utilisons votre profil LinkedIn et vos données d’activité pour vous proposer des publicités personnalisées et pertinentes. Vous pouvez changer vos préférences de publicités à tout moment.

Functional Programming in Excel

This talk is about the world's most popular programming language... Java? Python? COBOL?

No... Excel!

Excel somehow hits the sweet spot between being powerful enough to run entire domains like finance and insurance, but also easy enough to attract a huge audience. Why is that?

In this talk we'll explore some of the mechanisms that make spreadsheets so powerful, while implementing a few interesting mathematical problems in spreadsheets. While doing that, you might learn some (functional) programming concepts too, as we'll talk about sorting, dynamic programming and lambdas.

  • Identifiez-vous pour voir les commentaires

Functional Programming in Excel

  1. 1. Functional programming in Excel Felienne Hermans @Felienne
  2. 2. Spreadsheets are code
  3. 3. 1) Used for similar problems
  4. 4. But why in a spreadsheet?
  5. 5. 2) Formulas are Turing complete
  6. 6. In summary: both the activities, complexity and problems are the same
  7. 7. Spreadsheets are code In summary: both the activities, complexity and problems are the same
  8. 8. And not just a programming language!
  9. 9. The next language to learn Resistance is futile!
  10. 10. Stukje Bret Victor hier live programming
  11. 11. pure functional
  12. 12. pure functional
  13. 13. Lingua franca of computing
  14. 14. Let’s go! Lego Adventure by Austin Kirk CC-BY-2.0
  15. 15. Functionalprogramming isprogrammingwithout assignmentstatements
  16. 16. Functionalprogramming isprogrammingwithout assignmentstatements Example: Squares of integers
  17. 17. List of inputs
  18. 18. List of inputs Function definition
  19. 19. List of inputs Function definition Map
  20. 20. A bit more exciting
  21. 21. Sum of all squares over 30
  22. 22. I’d like to directly multiply two ranges!
  23. 23. L This is not that, it first intersects and then multiplies
  24. 24. Ctrl-shift-entercreates “array formula”
  25. 25. Ctrl-shift-entercreates “array formula”
  26. 26. Ctrl-shift-entercreates “array formula” This cell now holds an entire array It just shows 1 element
  27. 27. If I give the formula space, we get the whole array
  28. 28. Hit ctrl-shirt- enter to make an array formula
  29. 29. The first 5 elements of the array Input * Input
  30. 30. We can reduce the array too!
  31. 31. And filter
  32. 32. What is the datatype of DangerZone?
  33. 33. What is the datatype of DangerZone? It is a Maybe Int!
  34. 34. + is lifted and applied to only the ints
  35. 35. Let’s do some real programming!
  36. 36. Money in a maze
  37. 37. Money in a maze Recursive solution:
  38. 38. Money in a maze Recursive solution: V(O15)=
  39. 39. Money in a maze Recursive solution: V(O15)=
  40. 40. Money in a maze Recursive solution: V(O15)=
  41. 41. Recursive solution: V(O15)= MAX( V(O14),V(N15) ) + 33 Money in a maze
  42. 42. Money in a maze Any problems?
  43. 43. Any problems? Money in a maze
  44. 44. Works, but is expensive Money in a maze
  45. 45. We can use ‘dynamic programming’ Money in a maze
  46. 46. We save the maximum value possible at a field
  47. 47. Symbols will represent path direction
  48. 48. Only if the cell below is “^” Otherwise “”
  49. 49. Spreadsheets are code
  50. 50. So if spreadsheets are code, can we apply software engineering methods?
  51. 51. In software, tools have been created to help programmers understand code
  52. 52. Because spreadsheets are so similar to code, users can benefit from SE methods
  53. 53. Like “code smells” for spreadsheet formulas
  54. 54. “Long method”
  55. 55. “Too many parameters”
  56. 56. Conditional complexity
  57. 57. Code clones
  58. 58. Code clones
  59. 59. If you say smells, you say…
  60. 60. If you say smells, you say refactoring
  61. 61. So, we built BumbleBee: a refactoring tool for spreadsheets
  62. 62. So, we built BumbleBee: a refactoring tool for spreadsheets
  63. 63. The transformations are entirely programmable, with a small language
  64. 64. Available from my website: felienne.com/bumblebee
  65. 65. And of course, if you say refactoring, you say …
  66. 66. And of course, if you say refactoring, you say testing
  67. 67. These test formulas can be exploited
  68. 68. Available from my website: felienne.com/expector
  69. 69. More info? •  www.perfectxl.com •  www.felienne.com •  www.spreadsheetlab.org Want to connect? •  @felienne / mail@felienne.com

×