Andres Jaimes

Scala Lectures

By Andres Jaimes

A curated list of Scala lectures on functional programming and design patterns.

Functional programming design patterns

In object-oriented development, we are all familiar with design patterns such as the Strategy pattern and Decorator pattern, and design principles such as SOLID. The functional programming community has design patterns and principles as well. This talk will provide an overview of some of these, and present some demonstrations of FP design in practice.

Domain Modeling Made Functional

  • Wlaschin, Scott. “Domain Modeling Made Functional.” KanDDDinsky 2019, 6 Dec 2019, youtu.be/2JB1_e5wZmU.

Statically typed functional programming languages encourage a very different way of thinking about types. The type system is your friend, not an annoyance, and can be used in many ways that might not be familiar to OO programmers. Types can be used to represent the domain in a fine-grained, self documenting way. And in many cases, types can even be used to encode business rules so that you literally cannot create incorrect code. You can then use the static type checking almost as an instant unit test — making sure that your code is correct at compile time. In this talk, we’ll look at some of the ways you can use types as part of a domain driven design process, with some simple real world examples in F#. No jargon, no maths, and no prior F# experience necessary.

Let’s Code Real World App Using Purely Functional Techniques

  • Parmer, Jordan. “Let’s Code Real World App Using Purely Functional Techniques.” 12 Apr 2018, youtu.be/m40YOZr1nxQ

We will create a small, real-world data transformation program that demonstrates how functional techniques address issues such as control flow, type construction, data validation, etc. Through demonstrate-by-example, we’ll explore the railway pattern, monadic chaining, disjunctions, applicatives, and currying.

Functional Programming with Effects

  • Norris, Rob. “Functional Programming with Effects.” Scala Days Conferences, 22 Sep 2018, youtu.be/30q6BkBv5MY

The foundation of functional programming is values, pure functions, and function composition; but this lean model of computation seems to abandon real-world concerns such as partiality, exceptions, logging, mutable state, and so on. This talk introduces FP from first principles and demonstrates how we recover the expressiveness of imperative programming without sacrificing the benefits of equational reasoning, via effects.

Functional Programming in 40 Minutes

  • Olsen, Russ. “Functional Programming in 40 Minutes.” GOTO 2018, 9 Nov 2018, youtu.be/0if71HOyVjY

Functional programming has finally escaped from academia. These days developers are building real systems in functional programming languages like Clojure, Scala, Elixir and F#. Functional techniques are also seeping into more traditional languages like Java and Ruby. Unfortunately somewhere along the way functional programming has also developed a reputation for being deep and mysterious: Good programs achieve the Zen-like state of being functional which somehow involves immutability, higher order functions…

Typeclasses in Scala

In this video tutorial, I’ll go over the “typeclass” design pattern in Scala, a very powerful technique for keeping your software architectures modular, decoupled and open to extension. Originally implemented as a Haskell language feature, the typeclass pattern in Scala leverages implicits to achieve additional flexibility and control.

This video is aimed at developers with some basic experience in Scala and assumes a bit of background with algebraic data types (sealed traits and case classes), implicits and general object-oriented design.

Serverless Scala - Functions as SuperDuperMicroServices

  • Suereth, Josh and James Ward. “Serverless Scala - Functions as SuperDuperMicroServices.” Scala Days Conferences, 11 Jul 2019, youtu.be/YS98ropk_yk

Serverless is all the rage but what does it mean for Scala developers? Can we take a plain ol’ Scala function and run it on the cloud with infinite scalability? This talk will explore how to build and deploy serverless Scala and how to avoid startup overhead. We will use Google Cloud as a reference serverless implementation but the concepts are applicable with any provider.

Intro to Cats-Effect

Cats Effect is a functional side effect library - Gavin Bisesi explains what that means, what it gives you, how to use it, and why you should care.

Teikametrics adopted this library last year, and in this talk Gavin discusses how they approach application design using it, both from a green field perspective as well as the techniques used to migrate a living codebase away from akka-streams without “the big rewrite”.

The Making of an IO

All applications, eventually, come down to IO. Well, unless you have uncontrolled side-effects, which would be weird and horrible. This talk explores not only why you want the IO monad in Scala (i.e. why side-effects are weird and horrible), but also how it works. Specifically, we’ll be looking at the new cats-effect project, which introduces not only a production-viable IO type for the cats framework, but also a set of typeclasses and rigorous laws for characterizing what an effect type is and how it should behave.