Avanscoperta
Applied Functional Programming

Applied Functional Programming

Using pure functional programming techniques to solve real-world problems

«Functional Programming is just programming with functions.
Functions are: Total, Deterministic and Pure. The rest is just composition you can learn over time.»

John De Goes

Applied Functional Programming workshop by Matteo Baglini is aimed at teaching you how to put functional programming into practice.
It is aimed at software developers who already know this paradigm and want to make a jump forward in its adoption.

We’ll be doing a lot of coding sessions in order to learn how to use the mathematical theories needed to build the right abstractions, including the famous Monads.

The goal of the workshop: learning how to apply pure functional programming straight after the workshop.

Target audience

Professional software developers with a medium/advanced level of experience programming with mainstream languages (such as Java/C#/JavaScript/PHP) and not new to the functional world (e.g. high-order functions, Option/Stream type, list comprehension combinators).

During the workshop we’ll be constantly referring to some advanced topics from the most used programming languages (such as generics and subtype polymorphism), meaning that this workshop is not suitable for beginners.

Topics

The ingredients we need to reach our goal are:

  • understanding what’s the impact of working with referential transparency
  • design big systems as if they were small composable units
  • express constraints and interactions through the type system
  • model behaviours and data of the domain through modules, functions and algebraic data types
  • modularise the responsibilities through type classes
  • get an in-depth knowledge of the main functional structures: Functor, Applicative, Monad, Foldable e Traversable
  • choose the right Monad for the actual problem
  • how to survive in a world full of side effects.

Agenda

Day 1 – Let’s cover the basics:

  • A refresh of scala: case classes, object, trait and implicit parameter
  • Model date through algebraic data types (ADT)
  • Use the basic effects: Option, Try, Either and Future
  • Master the key combinators: map, flatMap and fold
  • Abstract the effect and type class pattern.

Day 2 – Let’s build an application from scratch (part 1):

  • Hexagonal architecture
  • Model date and domain’s behavious
  • Use the signatures of the functions to drive the design
  • A monad for each occasion.

Day 3 – Let’s build an application from scratch (part 3):

  • Let’s introduce the infrastructure: persistence, configuration, logging
  • Manage the different monads (Monad stack)
  • Test of the different applicative levels.

Why should I buy a ticket?

Join this workshop to get a throughout knowledge of the basic principles, and have a direct experience of what it means to do software development with functional programming.

Matteo will provide you with the tools so that you’ll be able to evaluate this programming style in the most objective way: whether you’re ready for the jump it’s up you!

Expect to get your hands dirty

“Practice” is the keyword of this workshop: there will only be few and essential moments of theory.

Let’s say 30% theory and 70% practice.

Let’s use a metaphor: we won’t be using a “catalogue” approach, where you get to know all the bricks before you start building the house.
We’ll start by building the house and learn how to transform the difficulties faced in the process to introduce and learn more on each new brick.

Tech stack

Scala is the programming language we’ll be using in this workshop.
Scala didn’t start off as a pure functional language, but a vast community of developers slowly “transformed it” in a functional language thanks to the versatility of its type-system and due to the fact that it works on JVM.
Furthermore, the hybrid nature of Scala will allow us to introduce concepts gradually.
A basic knowledge of Scala is required in order to join this workshop.

The following concept and topics will be considered as “given”:

  • the use of classes, objects and traits
  • the use of methods, functions, values and variables
  • the use of collections such as: Seq, List, Map, etc
  • the use of companion object, implicit parameters and uniform access principle.

If you don’t know Scala, we recommend you

The idea is to get a sufficient knowledge on Scala so that you can follow along without getting lost on the syntax of the language.

F.A.Q.

Pre-requisites: Are there any minimum requirements to join this workshop? Is there anything I need to install?
You will need a basic knowledge of Scala. In the Tech stack section you’ll find some useful resources to get you started.

Please make sure the following tools are installed in your laptop prior to joining the workshop:

Level of experience: Is it a workshop for beginners or experts?
This workshop is mainly aimed at software developers with a medium/advanced level of experience.
You’ll also need a good knowledge of the language and of concepts of OOP such as polymorphism, interfaces and inheritance, as well as a basic level of Scala.

I develop software in Java/Kotlin/C#/JavaScript/PHP/ecc, how can I benefit from this workshop?
There’s not a single language that doesn’t have some constructs derived from functional programming.
Once you have first-class functions or constructs such as Future/Promise you’re already fully within a functional paradigm.

You’ll need a basic knowledge of Scala in order to join the workshop (check out the Tech Stack section of this web page).

Testimonials

Durante questo corso Matteo mi ha finalmente dimostrato che i concetti alla base della programmazione funzionale non sono “puramente teorici”, ma possono essere applicati nel lavoro di tutti i giorni.
Con esempi mirati, il corso è un tour “da zero a cento” nel mondo funzionale.
Alessandro Melchiori – Software Architect Codice Plastico

Matteo non delude mai e anche questa volta ha preparato un corso denso di concetti della programmazione funzionale accompagnati da numerosi esempi “real-life”.
Tre giorni in un crescendo continuo! Partendo dai piccoli mattoncini di funzioni fino ad arrivare a interi programmi in cui prevale l’armonia: tutto cio’ che vale per il piccolo vale anche per l’intera applicazione senza eccezioni (nel vero senso della parola :-)).
Insomma se vuoi davvero, una volta per tutte, capire il pensiero funzionale non puoi perderti questo corso.
Emanuele DelBono – Software Engineer

 

Matteo Baglini

He’s always focused on simplicity and cost of change to create codebases that better adapt to the ever evolving business world. Matteo has gained experience in multiple domains and environments (web, desktop, embedded, mobile) with a strong focus on clean code, design and architecture.

Curiosity and a constant desire to improve has brought him on a long journey of study, practicing better ways of developing software. The desire to share what learned led him to become a Coach helping other developers to sharpen their skills.

Finally, the passion and enthusiasm for his work led him to found developer communities, participating as speaker and organize conferences.

Approfondimenti

Video

Onion Architecture with Functional Programming sauce, talk di Matteo Baglini

Refactoring Legacy Code, intervista a Matteo Baglini con Alberto Brandolini.

Articoli

Let’s Get Functional (Programming)!: Gabriele Lana intervista Matteo Baglini.

I don’t like complicated codeintervista di Matteo Baglini a Michael Feathers.

Come e perché riprendere il controllo di Legacy Code, intervista a Matteo Baglini sul nostro blog.

Chi siamo, in breve :)

Avanscoperta è un ecosistema in espansione fatto di professionisti con una grande passione per l’apprendimento: ci piace imparare cose nuove e scambiare esperienze e idee, esplorando territori finora inesplorati in ambito software, nella sua accezione più ampia possibile.

Selezioniamo con attenzione gli argomenti più rilevanti e i migliori docenti da tutto il mondo, e diamo particolare importanza alle tecniche di insegnamento, preferendo approcci pratici e coinvolgenti.
Unisciti a noi! 🙂

Are you interested in this course?

If you have any specific questions, or if you want to receive more information on dates, content or offers about this course, drop us a line. We'll gladly get back to you!







NEWSLETTER

Get exclusive content from experts in software development, technology, business and design!

SUBSCRIBE TO OUR NEWSLETTER! :-)

Subscribe to our newsletter!