- Level Professional
- Duration 34 hours
- Course by École Polytechnique Fédérale de Lausanne
-
Offered by
About
In this course you will learn how to apply the functional programming style in the design of larger Scala applications. You'll get to know important new functional programming concepts, from lazy evaluation to structuring your libraries using monads. We'll work on larger and more involved examples, from state space exploration to random testing to discrete circuit simulators. You’ll also learn some best practices on how to write good Scala code in the real world. Finally, you will learn how to leverage the ability of the compiler to infer values from types. Several parts of this course deal with the question how functional programming interacts with mutable state. We will explore the consequences of combining functions and state. We will also look at purely functional alternatives to mutable state, using infinite data structures or functional reactive programming. Recommended background: You should have at least one year programming experience. Proficiency with Java or C# is ideal, but experience with other languages such as C/C++, Python, Javascript or Ruby is also sufficient. You should have some familiarity with using the command line. This course is intended to be taken after Functional Programming Principles in Scala: https://www.coursera.org/learn/scala2-functional-programming.Modules
Recap: Getting Started with Tools
- Example Assignment
4
Videos
- Tools Setup for Linux
- Tools Setup for Mac OS X
- Tools for Setup for Windows
- Tutorial: Working on the Programming Assignments
10
Readings
- Tools Setup (Please read)
- Troubleshooting
- Grading Policy
- Sbt Tutorial
- IntelliJ IDEA Tutorial
- Scala Tutorial
- Cheat Sheet
- Reactive Cheat Sheet
- Scala Style Guide
- Learning Resources
Week 1: For Expressions and Monads
- Quickcheck
- Quickcheck
6
Videos
- Recap: Functions and Pattern Matching
- Recap: Collections
- Lecture 1.1 - Queries with For
- Lecture 1.2 - Translation of For
- Lecture 1.3 - Functional Random Generators
- Lecture 1.4 - Monads
Week 2: Lazy Evaluation
- Bloxorz
- Bloxorz
5
Videos
- Lecture 2.1 - Structural Induction on Trees
- Lecture 2.2 - Streams
- Lecture 2.3 - Lazy Evaluation
- Lecture 2.4 - Computing with Infinite Sequences
- Lecture 2.5 - Case Study: the Water Pouring Problem
Week 3: Type-Directed Programming
- JSON Codecs
- JSON Codecs
3
Assignment
- Type-Directed Programming
- Conditional Implicit Definitions
- Implicit Conversions
5
Readings
- Motivating Example
- Type-Directed Programming
- Type Classes
- Conditional Implicit Definitions
- Implicit Conversions
Week 4: Functions and State
6
Videos
- Lecture 4.1 - Functions and State
- Lecture 4.2 - Identity and Change
- Lecture 4.3 - Loops
- Lecture 4.4 - Extended Example: Discrete Event Simulation
- Lecture 4.5 - Discrete Event Simulation: API and Usage
- Lecture 4.6 - Discrete Event Simulation: Implementation and Test
Week 5: Timely Effects
- Calculator
- Calculator
4
Videos
- Lecture 5.1 - Imperative Event Handling: The Observer Pattern
- Lecture 5.2 - Functional Reactive Programming
- Lecture 5.3 - A Simple FRP Implementation
- Conclusion
Auto Summary
Enhance your Scala skills with the "Functional Program Design in Scala (Scala 2 version)" course, tailored for IT and Computer Science enthusiasts. This professional-level course, brought to you by Coursera, delves deep into the functional programming style, emphasizing the design of substantial Scala applications. Guided by expert instructors, you'll explore advanced functional programming concepts such as lazy evaluation and the use of monads for structuring libraries. The curriculum includes hands-on projects ranging from state space exploration and random testing to building discrete circuit simulators. Additionally, you'll uncover best practices for writing efficient Scala code and learn to utilize the compiler's type inference capabilities. A significant portion of the course investigates the interplay between functional programming and mutable state, offering insights into combining functions with state management and exploring purely functional alternatives using infinite data structures or functional reactive programming. Ideal for those with at least a year of programming experience, proficiency in languages like Java or C# is recommended, although familiarity with C/C++, Python, Javascript, or Ruby is also sufficient. Prior completion of "Functional Programming Principles in Scala" is advised for a smoother learning experience. The course spans a substantial duration of 2040 minutes and offers flexible subscription options, including Starter and Professional tiers, to accommodate your learning needs. Perfect for experienced programmers looking to master functional program design in Scala, this course promises to elevate your coding prowess to new heights.

Martin Odersky