Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Functional Programming in an Imperitive World

2,025 views

Published on

From FPX 2015, video at: https://skillsmatter.com/skillscasts/6417-functional-programming-in-an-imperative-world#video

Once upon a time there was a small company with a large codebase. That codebase had been written in the well understood languages of "VeeBeeDotNet" and "CeeSharp". After a while, more people starting working for the small company, and while they all knew some CeeSharp and VeeBeeDotNet, some of them also spoke strange foreign languages like "Erlang" and "EffSharp". They liked these languages, and were unwilling to give up what they saw as their powerful magical properties of pureness. So they hatched a plan..

This talk is a completely anecdotal review of how a group of developers (not managers) introduced functional techniques and languages into a company with an existing imperative code base - and existing imperative coders! Learn how we convinced management it wasn't insane. How we picked low risk, high impact tasks to illustrate language advantages. And how we spread the joy to others who hadn't used functional programming languages before.

Published in: Software
  • Be the first to comment

  • Be the first to like this

Functional Programming in an Imperitive World

  1. 1. Once upon a time there was a small company with a large codebase. That codebase had been written in the well understood languages of "VeeBeeDotNet" and "CeeSharp". After a while, more people started working for the small company, and while they all knew some “CeeSharp” and “VeeBeeDotNet”, some of them also spoke strange foreign languages like "Erlang" and "EffSharp". They liked these languages, and were unwilling to give up what they saw as their powerful magical properties of purity. So they hatched a plan…
  2. 2. etting the scene "Alphabet-Golden-Bible-letter-S" by SVG Perhelion (Original unknown) - Own work; Shaw, Henry: “Alphabets & Numbers of the Middle Ages” (1845) FROM THE GOLDEN BIBLE, printed at Augsburg[1] http://www.archive.org/details/handbookofmediae00shawrich. Licensed under CC BY 3.0 via Wikimedia Commons- http://commons.wikimedia.org/wiki/File:Alphabet-Golden-Bible-letter-S.svg#/media/File:Alphabet-Golden-Bible-letter-S.svg
  3. 3. https://www.flickr.com/photos/donkeyhotey/16339664626 CC licensed - http://creativecommons.org/licenses/by-nc-sa/2.0/
  4. 4. ear is the mind killer "Alphabet-Golden-Bible-letter-F" by SVG Perhelion (Original unknown) - Own work; Shaw, Henry: “Alphabets & Numbers of the Middle Ages” (1845) FROM THE GOLDEN BIBLE, Printed at Augsburg[1] http://www.archive.org/details/handbookofmediae00shawrich. Licensed under CC BY 3.0 via Wikimedia Commons - http://commons.wikimedia.org/wiki/File:Alphabet-Golden-Bible-letter-F.svg#/media/File:Alphabet-Golden-Bible-letter-F.svg
  5. 5. •Change is hard – and risky •Need to convince: •Management •Your peers Fear is the mind killer
  6. 6. [Dan Luu’s] post “The Empirical Evidence That Types Affect Productivity and Correctness” summarizes a large set of papers and goes through each one in order to describe what it is trying to measure and how well it does it. In almost every paper, he has valid critique of the experiment, methodology and approach. https://medium.com/@jlouis666/proglang-design-with-evidence-1444213f3902
  7. 7. ilute the risk "Alphabet-Golden-Bible-letter-D" by SVG Perhelion (Original unknown) - Own work; Shaw, Henry: “Alphabets & Numbers of the Middle Ages” (1845) FROM THE GOLDEN BIBLE, Printed at Augsburg[1] http://www.archive.org/details/handbookofmediae00shawrich. Licensed under CC BY 3.0 via Wikimedia Commons - http://commons.wikimedia.org/wiki/File:Alphabet-Golden-Bible-letter-F.svg#/media/File:Alphabet-Golden-Bible-letter-D.svg
  8. 8. •Fix the badly broken Dilute the risk
  9. 9. <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="12.0" DefaultTar <Import Project="$(MSBuildExtensions <PropertyGroup> <Configuration Condition=" '$(Conf <Platform Condition=" '$(Platform) <SchemaVersion>2.0</SchemaVersi <ProjectGuid>023b9a33-3d12-4878 <OutputType>Library</OutputType>
  10. 10. •Fix the badly broken •Pick an interoperable language Dilute the risk
  11. 11. o the impossible "Alphabet-Golden-Bible-letter-D" by SVG Perhelion (Original unknown) - Own work; Shaw, Henry: “Alphabets & Numbers of the Middle Ages” (1845) FROM THE GOLDEN BIBLE, Printed at Augsburg[1] http://www.archive.org/details/handbookofmediae00shawrich. Licensed under CC BY 3.0 via Wikimedia Commons - http://commons.wikimedia.org/wiki/File:Alphabet-Golden-Bible-letter-F.svg#/media/File:Alphabet-Golden-Bible-letter-D.svg
  12. 12. •What’s so risky it’s never been done? •Can a functional language help? Do the impossible
  13. 13. “Ripper 5” Storn Cook, http://www.enworld.org/forum/showthread.php?161795-Storn-s-art-for-swipin-!/page12 CC licensed - http://creativecommons.org/licenses/by-nc-sa/2.5/ The Heroes
  14. 14. Type Providers
  15. 15. Pattern Matching
  16. 16. Concurrency
  17. 17. Currying
  18. 18. Metaprogramming
  19. 19. teal from the best "Alphabet-Golden-Bible-letter-S" by SVG Perhelion (Original unknown) - Own work; Shaw, Henry: “Alphabets & Numbers of the Middle Ages” (1845) FROM THE GOLDEN BIBLE, printed at Augsburg[1] http://www.archive.org/details/handbookofmediae00shawrich. Licensed under CC BY 3.0 via Wikimedia Commons- http://commons.wikimedia.org/wiki/File:Alphabet-Golden-Bible-letter-S.svg#/media/File:Alphabet-Golden-Bible-letter-S.svg
  20. 20. •If you can’t go to the functional language… •…bring the functional concepts to yours •And then tell people where they came from! Steal from the best
  21. 21. Actors
  22. 22. Property Based Testing
  23. 23. inally "Alphabet-Golden-Bible-letter-F" by SVG Perhelion (Original unknown) - Own work; Shaw, Henry: “Alphabets & Numbers of the Middle Ages” (1845) FROM THE GOLDEN BIBLE, Printed at Augsburg[1] http://www.archive.org/details/handbookofmediae00shawrich. Licensed under CC BY 3.0 via Wikimedia Commons - http://commons.wikimedia.org/wiki/File:Alphabet-Golden-Bible-letter-F.svg#/media/File:Alphabet-Golden-Bible-letter-F.svg
  24. 24. Teach https://www.flickr.com/photos/vancouver-archives/6345489958 CC licensed - http://creativecommons.org/licenses/by-nc-sa/2.0/
  25. 25. “Old Paper” background courtesy of http://www.pieceofeight.com/ https://www.flickr.com/photos/67779350@N00/167159577/ Attribution 2.0 Generic (CC BY 2.0) Questions? @mavnn http://blog.mavnn.co.uk @15below_tech http://www.15below.com

×