Effective Programming in Scala (Coursera)

Effective Programming in Scala (Coursera)

Scala is an expressive, versatile, and safe programming language. In this course, you will learn how to get the most out of Scala to solve common programming tasks such as modeling business domains, breaking down complex problems into simpler problems, manipulating data, or running parallel tasks. Along the journey, you will also learn the best practices for writing high-quality code that scales to large applications, how to handle errors, how to write tests, and how to leverage a productive development environment.

Class Deals by MOOC List - Click here and see Coursera's Active Discounts, Deals, and Promo Codes.

This comprehensive, hands-on, course aims at leveling up your programming skills by embracing both functional programming and object-oriented programming. You will become familiar with the standard library and the common patterns of code used in the real world.
Each week contains about 1h30 of video lectures. Each lecture is a ~10 min video focused on a specific skill or concept. We always start by looking at concrete problems, and then explain how language features or libraries make you more productive to solve these problems in general.
Lectures are generally followed by a quiz to assess your progress. At the end of each week, a graded assignment inspired by real-world applications will give you an opportunity to put things in practice.
The course covers Scala 3, and it mentions the differences with Scala 2.

What You Will Learn

  • Leverage Scala idioms to model business domains and implement business logic
  • Fundamental concepts of the language, allowing you to read and understand Scala codebases
  • Best practices and common patterns used in the real world
  • Be comfortable working with asynchronous computations, handling failures, and manipulating recursive data structures

Syllabus

WEEK 1
Getting Started, Basics, Domain Modeling
First, get up and running with Scala on your computer. Then, learn how to write and evaluate basic expressions and definitions. Last, learn how to model a business domain by defining case classes and sealed traits.

WEEK 2
Standard Library, Loops
Manipulate collections of values by using the generic List data type from the standard library. Then, learn about the other generic data structures provided by the standard library (sets, sequences, and maps), and their respective use cases. All the collection classes have a comprehensive set of high-level operations to transform, filter, and iterate over their elements. Last, you will learn a couple of techniques to implement loops in Scala, and their tradeoffs.

WEEK 3
Build Tools, Modules
How to write Scala projects larger than a worksheet? Learn how to define an entry point for a Scala project, and discover the tools you can leverage to write, compile, run, and debug your code. Then, use object-oriented programming techniques to break down a complex project into small modular components. Finally, we discuss when to use case classes versus simple classes.

WEEK 4
Reasoning About Code
The default recommendation in Scala is to use immutable data types. Indeed, they have desirable properties such as being thread-safe and allowing local reasoning. However, in some cases, mutable variables lead to simpler code, as you will see in the lectures. We then dive into different testing techniques such as unit testing, property-based testing, integration testing, and mocking.

WEEK 5
Type-Directed Programming
Programs automate repetitive tasks. Sometimes, writing a program is a repetitive task. We look into a unique feature of Scala that lets the compiler write some (repetitive) parts of your programs for you! Based on the expected type of a parameter, the compiler can provide a value for this parameter if it finds an unambiguous candidate value. This technique is often used to automatically generate the serializer and deserializer of a data type, solely based on its definition, for instance.

WEEK 6
Error Handling, Concurrent Programming
Scala supports a simple low-level mechanism for error handling: exceptions. We discuss the pros and cons of this mechanism, and we show alternative approaches that you can apply when you want to make it explicit in a method signature that it can fail with an error. We then move to a similar topic, input data validation, where we want to construct nice-looking error messages listing all the errors that the user needs to fix. We conclude with a couple of lectures showing how to work with asynchronous computations, and how to leverage the multiple CPUs of a computer by running tasks in parallel. You will see that the same idioms we used for writing data validation rules can also be used to write graphs of parallel computations.

Go to Class
MOOC List is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

Related Courses

Uso de bases de datos con Python (Coursera) Coursera
University of Michigan

Uso de bases de datos con Python (Coursera)

Este curso presentará a los estudiantes los conceptos básicos del lenguaje de consulta estructurado (Structured Query Language, SQL), así como el diseño básico de bases de datos para almacenar datos como parte de una iniciativa de varios pasos para recopilar, analizar y procesar datos. El curso utilizará SQLite3 como base de datos. También crearemos rastreadores web y procesos de visualización y recopilación de datos de varios pasos. Utilizaremos la biblioteca D3.js para realizar la visualización básica de datos.

Aug 17th 2026
5-12 Weeks
Basic Modeling for Discrete Optimization (Coursera) Coursera
University of Melbourne,The Chinese University of Hong Kong

Basic Modeling for Discrete Optimization (Coursera)

Optimization is a common form of decision making, and is ubiquitous in our society. Its applications range from solving Sudoku puzzles to arranging seating in a wedding banquet. The same technology can schedule planes and their crews, coordinate the production of steel, and organize the transportation of iron ore from the mines to the ports. Good decisions in manpower and material resources management also allow corporations to improve profit by millions of dollars.

Aug 17th 2026
4 Weeks
Laboratório de Programação Orientada a Objetos - Parte 2 (Coursera) Coursera
Universidade de São Paulo, Brasil

Laboratório de Programação Orientada a Objetos - Parte 2 (Coursera)

Esta é a segunda parte do curso avançado de Programação Orientada a Objetos oferecido pelo Departamento de Ciência da Computação do IME-USP. O curso é voltado para profissionais ou estudantes interessados em Desenvolvimento de Software Avançado e que já dominam uma linguagem de programação e já conhecem os fundamentos básicos da orientação a objetos.

Aug 17th 2026
5-12 Weeks
Computer Science: Algorithms, Theory, and Machines (Coursera) Coursera
Princeton University

Computer Science: Algorithms, Theory, and Machines (Coursera)

This course introduces the broader discipline of computer science to people having basic familiarity with Java programming. It covers the second half of our book Computer Science: An Interdisciplinary Approach (the first half is covered in our Coursera course Computer Science: Programming with a Purpose, to be released in the fall of 2018). Our intent is to demystify computation and to build awareness about the substantial intellectual underpinnings and rich history of the field of computer science.

Aug 10th 2026
5-12 Weeks
Principles of Computing (Part 2) (Coursera) Coursera
Rice University

Principles of Computing (Part 2) (Coursera)

This two-part course introduces the basic mathematical and programming principles that underlie much of Computer Science. Understanding these principles is crucial to the process of creating efficient and well-structured solutions for computational problems. To get hands-on experience working with these concepts, we will use the Python programming language. The main focus of the class will be weekly mini-projects that build upon the mathematical and programming principles that are taught in the class.

Aug 10th 2026
4 Weeks
Introduction à la programmation orientée objet (en Java) (Coursera) Coursera
École Polytechnique Fédérale de Lausanne

Introduction à la programmation orientée objet (en Java) (Coursera)

Ce cours introduit la programmation orientée objet (encapsulation, abstration, héritage, polymorphisme) en l'illustrant en langage Java. Il présuppose connues les bases de la programmation (variables, types, boucles, fonctions, ...). Il est conçu comme la suite du cours « Initiation à la programmation (en Java) ».

Aug 16th 2026
5-12 Weeks
Computer Science: Programming with a Purpose (Coursera) Coursera
Princeton University

Computer Science: Programming with a Purpose (Coursera)

The basis for education in the last millennium was “reading, writing, and arithmetic;” now it is reading, writing, and computing. Learning to program is an essential part of the education of every student, not just in the sciences and engineering, but in the arts, social sciences, and humanities, as well. Beyond direct applications, it is the first step in understanding the nature of computer science’s undeniable impact on the modern world.

Aug 10th 2026
5-12 Weeks
Problem Solving Using Computational Thinking (Coursera) Coursera
University of Michigan

Problem Solving Using Computational Thinking (Coursera)

Have you ever heard that computers "think"? Believe it or not, computers really do not think. Instead, they do exactly what we tell them to do. Programming is, "telling the computer what to do and how to do it." Before you can think about programming a computer, you need to work out exactly what it is you want to tell the computer to do. Thinking through problems this way is Computational Thinking. Computational Thinking allows us to take complex problems, understand what the problem is, and develop solutions. We can present these solutions in a way that both computers and people can understand.

Aug 17th 2026
5-12 Weeks
Introduction to Open Source Application Development (Coursera) Coursera
Illinois Tech

Introduction to Open Source Application Development (Coursera)

This course introduces basic concepts of systems programming using a modern open source language. You will learn to apply basic programming concepts toward solving problems, writing pseudocode, working with and effectively using basic data types, abstract data types, control structures, code modularization and arrays. You will learn to detect errors, work with variables and loops, and discover how functions, methods, and operators work with different data types. You will also be introduced to the object paradigm including classes, inheritance, and polymorphism.

Aug 17th 2026
5-12 Weeks