We may earn an affiliate commission when you visit our partners.
Leandro Galvan

When we start our journey as a Scala developer, our first impression of the language may be that of 'a better Java'. We learn about classes, traits, pattern matching and some other constructs that make our life easier. At some point we come across the amazing higher-order methods such as map, filter and fold. These serve as a great first taste of functional programming.

But what if I told you that there is much more than that? In this course I will show you how standard functional programming practices can help you write code that is more generic, robust and testable.

This course is divided into 3 main sections.

Read more

When we start our journey as a Scala developer, our first impression of the language may be that of 'a better Java'. We learn about classes, traits, pattern matching and some other constructs that make our life easier. At some point we come across the amazing higher-order methods such as map, filter and fold. These serve as a great first taste of functional programming.

But what if I told you that there is much more than that? In this course I will show you how standard functional programming practices can help you write code that is more generic, robust and testable.

This course is divided into 3 main sections.

In the first section, we will learn about typeclasses. We will use as a driving example the problem of encoding and decoding objects into and from bytes. By the end of this section you will be able to create your own typeclasses and use the typeclass pattern to write polymorphic code.

In the second section, we will take a look at some of the most common typeclasses in functional programming, including Monads, Applicatives, Functors and many more. We will use the famous Cats library to provide us with their implementations, and we will use Discipline along with ScalaCheck and ScalaTest to test their laws. By the end of this section, you will be able to write lawful instances of these typeclasses for any of your types, and test their validity in an automated manner.

In the third and final section, we will learn to perform many common programming tasks with functional structures. These tasks include:- Validations via the Validated datatype

- Dependency injection with the Reader monad

- Tracking data in our computations with the Writer monad

- Managing state with the State monad

- Writing stack safe computations with Trampolines

- Making computations lazy with the Eval monad

- Composing monad stacks via monad transformers such as ReaderT and OptionT

- Suspending effects with a simple but useful implementation of the IO monad

I'm a big believer of learning by doing so I've included a lot of in-video exercises, along with quizzes and assignments at the end of each section. I hope you enjoy doing them as much as I enjoyed putting them together.

Without further ado, I want to give you a big welcome to the course and the thrilling world of functional programming.

Enroll now

Here's a deal for you

We found an offer that may be relevant to this course.
Save money when you learn. All coupon codes, vouchers, and discounts are applied automatically unless otherwise noted.

What's inside

Syllabus

Get the most out of this course
Introduction
Project Setup
Course files
Read more

Lets see how much you remember about creating typeclasses!

Let's see how much you remember about the different typeclasses and their properties!

Traffic lights

Read about what's good
what should give you pause
and possible dealbreakers
Uses the Cats library, which provides well-known, ready-made implementations of functional programming typeclasses, saving developers time and effort
Explores monad transformers such as ReaderT and OptionT, which are essential for composing complex monadic operations in a structured way
Covers dependency injection with the Reader monad, which promotes modularity and testability in functional applications
Requires familiarity with Scala, as it builds upon existing knowledge of classes, traits, and pattern matching
Employs Discipline along with ScalaCheck and ScalaTest to test the laws of typeclasses, ensuring code correctness and reliability
Teaches suspending effects with a simple implementation of the IO monad, which is useful for managing side effects in a purely functional way

Save this course

Create your own learning path. Save this course to your list so you can find it easily later.
Save

Reviews summary

Functional programming with scala cats

According to learners, a complete picture of the 'Functional Programming with Scala Cats' course requires reviewing student feedback. Were reviews available, this summary would cover the perceived value of topics like Typeclasses and Monads from the Cats library, the clarity of lectures and usefulness of assignments. It would note if students found concepts difficult or prerequisite heavy, and assess overall sentiment - whether the course was found highly effective for writing generic, robust code or faced specific criticisms. Without review data, specific student experiences cannot be detailed.
Covers many topics with exercises.
"The course syllabus is comprehensive, covering a wide range of functional patterns."
"I found the in-video exercises and assignments useful for practicing the concepts."
"The division into sections on Typeclasses, common Typeclasses, and applications works well."
Focuses on applying FP via Cats library.
"Seeing how to apply Monads and Applicatives using the Cats library was very practical."
"The examples using Cats for validations and state management were helpful."
"This course provided concrete ways to use Cats in real-world Scala code."
Advanced FP topics can be challenging.
"This course covers advanced topics that might require significant prior FP knowledge to grasp fully."
"Understanding Monad Transformers like ReaderT was quite difficult for me."
"Some sections felt very dense and required rewatching lectures multiple times."

Activities

Be better prepared before your course. Deepen your understanding during and after it. Supplement your coursework and achieve mastery of the topics covered in Functional Programming with Scala Cats with these activities:
Review Scala Implicits
Solidify your understanding of Scala implicits, as they are fundamental to understanding typeclasses and the Cats library.
Show steps
  • Read the official Scala documentation on implicits.
  • Work through examples of implicit conversions and parameters.
  • Practice defining and using implicit classes.
Read 'Scala with Cats'
Supplement your learning with a dedicated guide to Scala Cats, covering typeclasses and functional programming concepts.
Show steps
  • Read the book cover to cover.
  • Work through the examples in the book.
  • Compare the book's explanations to the course material.
Read 'Functional and Reactive Domain Modeling'
Gain a deeper understanding of functional programming principles and how they apply to domain modeling.
Show steps
  • Read the book cover to cover.
  • Work through the examples in the book.
  • Relate the concepts in the book to the course material.
Four other activities
Expand to see all activities and additional details
Show all seven activities
Implement Typeclass Instances
Reinforce your understanding of typeclasses by implementing instances for various data types.
Show steps
  • Choose a set of common data types (e.g., `Int`, `String`, `List`).
  • Implement instances of `Eq`, `Order`, and `Show` for each type.
  • Implement instances of `Monoid` for types where it makes sense.
  • Test your implementations thoroughly.
Contribute to Cats Library
Deepen your understanding by contributing to the Cats library, fixing bugs, or improving documentation.
Show steps
  • Explore the Cats library on GitHub.
  • Identify a bug or documentation issue to address.
  • Submit a pull request with your fix or improvement.
Blog Post: Monad Transformers Explained
Solidify your understanding of monad transformers by explaining them in a blog post.
Show steps
  • Research monad transformers and their use cases.
  • Write a clear and concise explanation of monad transformers.
  • Include examples of how to use monad transformers in Scala Cats.
  • Publish your blog post online.
Build a Functional Application
Apply your knowledge of functional programming and Scala Cats to build a complete application.
Show steps
  • Choose a problem domain for your application.
  • Design the application using functional principles.
  • Implement the application using Scala Cats.
  • Write unit tests to ensure the application is working correctly.
  • Deploy your application to a production environment.

Career center

Learners who complete Functional Programming with Scala Cats will develop knowledge and skills that may be useful to these careers:
Software Engineer
A software engineer designs, develops, and tests software applications. This course on Functional Programming with Scala Cats is designed to help software engineers write more generic, robust, and testable code. Software engineers often tackle complex problems, and this course may help them tackle those problems with functional structures, validations, dependency injection, and state management. One who wishes to become a software engineer may find this course quite helpful, especially the section on using common typeclasses in functional programming and writing lawful instances of these typeclasses.
Backend Developer
Backend developers are responsible for server side logic and databases. This course may help backend developers become more effective. Backend systems often need to handle validations, manage state, and handle side effects. A backend developer may find the sections on validations via the Validated datatype, dependency injection with the Reader monad, and suspending effects particularly relevant to their everyday work. This course, with its hands-on approach, can help one who wishes to become a backend developer deepen their understanding of these concepts in a practical way.
Application Developer
Application developers create software applications. This course explores functional programming practices that help create generic, robust, and testable code. The course's focus on typeclasses and the Cats library may help an application developer write more modular and maintainable code. The sections on validations, state management, and dependency injection may provide application developers with tools and techniques to build better applications. One who wishes to become an application developer may find this course particularly helpful due to its emphasis on practical application through in-video exercises and assignments.
Data Engineer
Data engineers build and maintain the infrastructure that allows data scientists to analyze information. Data engineers need to manage data flow and data transformation. Learning about monads, applicatives, functors and other typeclasses, as covered in this course, may help one who wishes to become a data engineer manage complexity. Managing state, tracking data, and suspending effects, topics covered in the latter part of the course, can be useful when one is creating robust and reliable data pipelines as a data engineer.
Test Automation Engineer
Test automation engineers design and implement automated tests for software. This course, with its emphasis on writing lawful instances of typeclasses and testing their validity in an automated manner, may be valuable for test automation engineers. The course's sections on Discipline, ScalaCheck, and ScalaTest provide practical tools and techniques for writing effective automated tests. The course's overall focus on robust and testable code may significantly benefit those working in test automation. One who wishes to be a test automation engineer should find this course helpful.
Software Architect
Software architects design the high-level structure of software systems. This course, focusing on functional programming principles, may help a software architect make informed decisions about system design. The course's coverage of typeclasses, monads, and other functional constructs may assist in creating modular, scalable, and maintainable architectures. The course may also help a software architect understand how to use functional structures to manage complexity and ensure the robustness of their designs. Someone who wants to be a software architect may want to take this course.
Systems Programmer
Systems programmers develop and maintain operating systems and system software. This course, with its in-depth exploration of functional programming concepts such as monads, applicatives, and functors, may enhance a systems programmer's ability to write robust and efficient code. In particular, the sections on managing state, handling side effects, and writing stack safe computations may be valuable for systems programming tasks. The course's emphasis on testing laws and ensuring code validity may also benefit those working on critical system components. Someone interested in being a systems programmer may find this course useful.
Firmware Engineer
Firmware engineers work on the software embedded in hardware devices. This course focuses on the use of functional programming practices to write more generic, robust, and testable code. The sections on typeclasses, monads, and the Cats library may help a firmware engineer write more modular and maintainable code. One who wishes to become a firmware engineer may find the course valuable, especially the sections on managing state and handling side effects, as these are common challenges in embedded systems development.
DevOps Engineer
DevOps engineers automate and streamline software development and deployment processes. This course may provide DevOps engineers with valuable insights into functional programming techniques that enhance code quality and reliability. The sections on dependency injection, managing state, and handling side effects may be particularly relevant to building robust and maintainable infrastructure automation scripts and tools. The course's focus on testing and validation may also help DevOps engineers ensure the stability and correctness of their deployments. This course may be helpful to someone who wants to become a DevOps engineer.
Machine Learning Engineer
Machine Learning Engineers develop, train, and deploy machine learning models. While this course does not directly cover machine learning algorithms, it may help machine learning engineers write more robust and maintainable code for data processing and model deployment. The course's sections on typeclasses, monads, and functional data structures may be valuable for building scalable and reliable machine learning pipelines. One who wishes to become a machine learning engineer may find this course useful for improving their software engineering skills.
Quantitative Analyst
Quantitative analysts, often requiring an advanced degree, develop mathematical models for financial markets. While this course does not focus on finance, it explores functional programming techniques beneficial for building robust and testable software. Topics like typeclasses, monads, and state management may enhance a quantitative analyst's ability to develop and maintain complex financial models. This can further the goal to write high-quality code, ensuring the accuracy and reliability of financial analyses. Therefore, one who wishes to become a quantitative analyst may find this course valuable.
Game Developer
Game developers create video games for various platforms. This course teaches functional programming concepts, which may help game developers design game logic and manage game state effectively. In particular, the sections on state management with the State monad and writing stack safe computations with Trampolines may be useful for creating complex game mechanics and simulations. One who wishes to become a game developer may find this course useful.
Financial Engineer
Financial engineers develop and implement financial models and strategies. The goal is to use quantitative methods to solve financial problems. Functional programming, as covered in this course, may help financial engineers build more reliable and testable models. The sections on validations, dependency injection, and managing state may be particularly useful for managing the complexity of financial systems. Someone who wishes to become a financial engineer may find this course useful.
Researcher
Researchers investigate and experiment to expand knowledge in a specific field. This course on Functional Programming with Scala Cats may provide a researcher with tools to write more robust and testable code in their research projects. The course's emphasis on typeclasses, monads, and functional structures can help manage the complexity of research computations. Someone who wishes to become a researcher may find this course useful.
Technical Writer
A technical writer creates documentation for technical products and services. While not directly related, understanding functional programming concepts may help a technical writer better communicate with developers and understand the underlying technology they are documenting. This course may help a technical writer gain a deeper understanding of functional programming principles. Thus, they can improve the quality and accuracy of their documentation. Someone who wishes to become a technical writer may find this course useful.

Reading list

We've selected two books that we think will supplement your learning. Use these to develop background knowledge, enrich your coursework, and gain a deeper understanding of the topics covered in Functional Programming with Scala Cats.
Fantastic introduction to functional programming using the Cats library in Scala. It covers all the major typeclasses and concepts used in the course, with clear explanations and practical examples. It is highly recommended as a companion to the course, providing additional depth and breadth. This book is commonly used as a textbook at academic institutions.
Provides a comprehensive guide to applying functional and reactive principles to domain modeling. It covers many of the concepts used in the course, such as typeclasses and monads, in the context of building real-world applications. While not strictly necessary for the course, it provides valuable context and deeper understanding. It useful reference for those looking to apply functional programming in practice.

Share

Help others find this course page by sharing it with your friends and followers:

Similar courses

Similar courses are unavailable at this time. Please try again later.
Our mission

OpenCourser helps millions of learners each year. People visit us to learn workspace skills, ace their exams, and nurture their curiosity.

Our extensive catalog contains over 50,000 courses and twice as many books. Browse by search, by topic, or even by career interests. We'll match you to the right resources quickly.

Find this site helpful? Tell a friend about us.

Affiliate disclosure

We're supported by our community of learners. When you purchase or subscribe to courses and programs or purchase books, we may earn a commission from our partners.

Your purchases help us maintain our catalog and keep our servers humming without ads.

Thank you for supporting OpenCourser.

© 2016 - 2025 OpenCourser