Programming in Scala 1000-2M25SCA
After completing the course, students should be able to use Scala to create simple but practical applications, such as a web application that accepts user data, saves it, displays it, and allows for its modification and deletion (other possible examples: a desktop application, an Android
application, a video game). They should know Scala syntax, basic concepts of functional programming and their implementation in Scala, as well as be able to plan and configure a Scala project and develop it as a programmer working in a team.
The following topics will be discussed during the classes:
1. Scala syntax: val vs var, immutable vs mutable collections, case class, case object, companion object, sealed trait, enum, apply and unapply, pattern matching.
2. Main concepts of functional programming: functions as data, immutability, laziness (lazy evaluation), type system.
3. Main methods for operations on data collections: filter, map, collect, find, collectFirst, flatMap, fold.
4. Version control system using git as an example. Commands: init, clone, checkout, branch, commit, push. Resolving conflicts using merge and rebase.
5. Futures, async/await, event streams, actor model, Akka/Pekko.
6. Recursion: tail recursion (tailrec), trampolines.
7. Introduction to the debugger and other IntelliJ IDEA features helpful for refactoring, code completion, testing, etc.
8. Monads: Theory, error handling using Option/Either/Try, IO monad in Cats Effect.
9. Implicit parameters and capabilities.
Course coordinators
Type of course
Mode
Classroom
Prerequisites (description)
Learning outcomes
1. Knowledge of syntax and feature of the Scala programming language.
2. Knowledge of Functional Programming rules.
3. Experience in work in a team over a complex software development project.
Assessment criteria
Form: Programming project.
Students will be tasked with forming 3-5 person programming teams, then selecting a project, setting up a repository on the GitHub platform, and implementing a multi-level application (e.g., a web application that accepts user data, saves it, displays it, and allows for its modification and
deletion, a desktop application with a similar structure, a mobile application for the Android system, a simple computer game, etc.).
The assessment will not only consider the final result but also teamwork (task division, communication among team members), code quality, and the presence and quality of tests. Mid-semester and during the last classes, students will have the opportunity to present their project.
Bibliography
1. “Functional Programming in Scala, Second Edition”, 2023, Michael Pilquist, Rúnar
Bjarnason, and Paul Chiusano (https://www.manning.com/books/functional-programming- in-scala-second-edition)
2. Interactive course “Functional Programming in Scala”, JetBrains
(https://plugins.jetbrains.com/plugin/23833-functional-programming-in-scala)