Skip to content

Instantly share code, notes, and snippets.

@rylev
Last active December 25, 2015 17:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rylev/7014151 to your computer and use it in GitHub Desktop.
Save rylev/7014151 to your computer and use it in GitHub Desktop.
Plan proposal for the next Elixir Users Group.

Intro to FP and Elixir

##Targeted Audience

The targeted audience are both beginners to functional programming who have experience in programming with at least one imperative style language. The content may also be appealing to those who have programmed in other functional programming languages (e.g. Haskell, Clojure, F#, etc.) or even Erlang programmers, but the content will not be specifically geared towards them.

##Goal

The goal of the session is to give attendees an idea of what functional programming is, why they should care, and why Elixir is a great choice for their first FPL. The attendees will learn what makes programming in the BEAM ecosystem so exciting and worth their while.

##Schedule (~ 1 hour 20 minutes)

  • As people come in, help them get set up
  • What is functional programming? (4 minutes)
    • Explanation of the "fuzziness" of the term
    • First class functions
    • Immutable data
  • Why is everyone so high on FP? (3 minutes)
    • Easier concurrency
    • Easier to reason about
    • Imperative OO is only one way to think. Expand our minds!
  • Intro to Elixir(5 minutes)
    • Jose Valim
    • Erlang (brief history)
    • hype (quote Dave Thomas)
    • What is Elixir good at and what does it aim to solve?
  • Immutable data (5 minutes)
    • Show data types (e.g. string, list, tuple, atom)
    • Show some examples (e.g. list concatenation returns new list)
    • Hint at how this makes concurrent programming easier
  • First class functions (5 minutes)
    • Show lambdas
    • Using lambdas with the Enum module
  • Pattern matching(5 minutes)
    • There is no assignment in Elixir :-)
    • easy example: a = 1
    • deconstructed tuple and list
  • named functions(10 minutes)
    • difference with lambdas
    • defined by name and arity
    • function overloading
    • deconstructed parameters
    • guards
  • Control flow(10 minutes)
    • Elixir has if-statement.
    • pattern matching is more important
    • recursion not loops
    • Complex example of if statement being replaced by guard, recurision deconstructed parameters, method overloading, pattern matching
  • Code organization(5 minutes)
    • modules not classes
    • brief intro to mix
  • Concurrency(20 minutes)
    • The actor model
    • message passing
    • receive blocks
    • how light weight is all this?
    • "Let it Crash"
    • Distributed programming
  • More cool things(5-10 minutes)
    • This section will just offer a taste of the following:
    • OTP
    • metaprogramming
    • testing with ExUnit
    • polymorphism
  • Resources(5 minutes)
    • Docs
    • Books
    • Talks
    • Tutorials
    • Blog posts
  • Questions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment