Advanced FP Training

| Lake District UK
Introduction

Advanced Functional Programming in Scala is an intensive, two-day workshop that teaches attendees to effectively use advanced features of Scala to develop large-scale, purely-functional programs. Taught by John A. De Goes, a CTO whose company is built on functional programming in Scala, attendees will gain mastery of the advanced features of Scala, and learn how to use functional programming to develop software that is correct-by-construction, easier to reason about, easier to test, easier to compose, and easier to change safely.

If you are struggling with the advanced features of Scala, or want to know how to scale functional programming techniques to very large programs, then this is the workshop for you.

Relevancy

Adoption of the Scala programming language has grown tremendously in recent years, partially because of the number and quality of libraries written in Scala (including Spark, Akka, Play, Shapeless, scodec, and many others). Yet, the language is broad and complex, containing many features not present in many other common programming languages (implicits, higher-kinded types, declaration-site variance, type lambdas). In addition, most developers quickly learn the basics of functional programming (pattern matching, recursion) and then hit a wall when trying to build whole programs using the techniques.

This course is designed to help Scala developers master some of the language’s more esoteric parts and show them how to use this newfound mastery to incorporate advanced techniques from functional programming.

Benefits

After attending this workshop, attendees will be able to read even the most complex type signatures, and will gain an ability to reason about code through types and substitution. Attendees will see how to scale functional programming techniques to real-world programs — programs that are highly-stateful, perform numerous effects, and which interact with messy external systems. Attendees will develop a newfound appreciation for how to write simpler code that is correct-by-construction.

Companies whose Scala teams are struggling to adopt the complex language, or who have yet to attain the mastery required to reduce defects and increase productivity, are encouraged to send their developers to this workshop. Functional programming in Scala can be a key competitive advantage, but only with proper support.

Concepts & Skills

Attendees will learn the following concepts:

  • Algebraic data types, higher-kinded types, universals & existentials
  • Type lambdas
  • Higher-order functions, function combinators, polymorphic functions
  • Type classes, polymorphic constraints
  • Data, recursion, recursion schemes, fixed-point data
  • Options, eithers, validations
  • Semigroups, monoids
  • Functors, applicatives, monads
  • Foldables, traversables
  • Optics
  • Reified computation, free monads
  • Compositional interpreters, purely-functional mocking

Attendees will develop the following skills:

  • How to use ADTs to model the business domain
  • How to reduce defects by making illegal states unrepresentable
  • How to use higher-kinded types to abstract over similar patterns
  • How to use type-classes to make code and reasoning generic
  • How to process immutable data using recursion schemes
  • How to make it harder to write incorrect implementations through parametric polymorphism
  • How to compose computations involving optionality, and sequential/parallel failure
  • How to apply abstract algebra to common problems
  • How to use monads to model sequential computation
  • How to cleanly and composable update nested structures without boilerplate
  • How to model effects in a purely-functional way that provides flexibility to the business
  • How to leverage purely-functional techniques for mocking, security, & other concerns
Table of Contents

Mastering Types

  • Type Theory 101
  • Product types & Sum types
  • Supertypes & Subtypes
  • Universals & Existentials
  • Higher-Kinded Types
  • Type Lambdas

Mastering Functions

  • Higher-Order Functions
  • Combinators
  • Polymorphic Functions

Mastering Typeclasses

  • Classes & Instances
  • Tricks with Implicits
  • Polymorphic Constraints

Mastering Functional Data

  • Immutable Data & Recursion
  • Catamorphisms & Church Encoding
  • Fixed-Point Data
  • Recursion Schemes

Mastering Functional Patterns

  • Options, Eithers & Validations
  • Semigroups & Monoids
  • Functors
  • Applicatives
  • Monads
  • Foldables & Traversables
  • Lenses

Mastering Functional Architecture

  • Modern Architecture for FP
  • Reified Computation & Deferred Evaluation
  • Compositional Evaluators
  • Optimization Techniques
  • Purely Functional Mocking
Instructor Bio

John A. De Goes has been writing Scala software for more than seven years at multiple companies, and has assembled world-renowned Scala engineering teams, trained new developers in Scala, and developed several successful open source Scala projects. Known for his ability to take very complex concepts and explain them simply, John has taught numerous workshops and classes, including several highly-regarded workshops on Scala. John moonlights as an instructor for LambdaConf, but his primary job is Chief Technology Officer of SlamData, an open source software company using pure functional programming to redefine analytics for modern data.