Skip to content

miciek/fp-beginners-workshop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Functional Programming beginners workshop

If you have ever found yourself late at night debugging some impossible bug that "shouldn't have happened", only to find out that it was all about some obscure global state change, come join us and see what FP has to offer.

During this workshop, you will learn how to deal with your worst enemies: shared mutable state and code you can't trust. You will do a set of exercises that focus on dealing with these problems using Java whenever possible and Scala in more advanced cases. You will learn the two fundamental tools of functional programming: pure functions and immutable values.

This event is open for all programmers that know the basics of OOP in Java. Scala knowledge is not required. We will introduce & use only the very basic syntax constructs.

Agenda

  1. What is a function? code
  2. Exercise: Imperative vs Declarative code
  3. Functions in Scala (def, return type, last expression, REPL) code
  4. Exercise: Functions in Scala code
  5. Coding imperatively (live coding) code
  6. Pure function: imperative vs functional
  7. Exercise: Refactoring to a pure function code
  8. The Pure Function
  9. Exercise: Pure or impure?
  10. Using Scala to write pure functions (live coding) code
  11. Exercise: pure functions in Scala code
  12. Testing pure functions code
  13. Exercise: Testing pure functions code
  14. Exercise: Getting burnt by mutability code
  15. Mutability is dangerous (Itinerary live coding)
  16. Shared mutable state
  17. Dealing with the moving parts (OOP Itinerary live coding)
  18. Building our intuitions about immutability
  19. Exercise: Immutable String API
  20. Purely functional approach to the shared mutable state (FP Itinerary live coding)
  21. Exercise: Practicing immutable slicing and appending
  22. Exercise: Purely functional approach to the shared mutable state (FP LapTimes)

About

Materials for Scala/FP beginners workshop

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published