Mike Slinn

Introduction to Scala

Published 2012-12-14. Last modified 2024-07-13.

About
Course Outline

Whether you want to learn Scala in order to work with Apache Spark, or an industrial-strength Scala program, this course is the logical starting point.

This Introduction to Scala course covers the fundamentals and is designed to give you a variety of hands-on experiences with Scala. The unique features of Scala are introduced, including object-oriented and functional aspects. Software tools are discussed in detail, including SBT, IntelliJ IDEA, and options for programming Scala without an IDE. Exercises are provided throughout that reinforce the lecture material.

The material builds from lecture to lecture, so be sure to go through the material from start to finish. This course is based on lots of code examples that can be pasted into the Scala REPL, and that code is also provided in the the courseNotes/ directory. The course consists of over 450 pages of lecture notes (if printed as an O’Reilly-sized book), more than five-dozen sample programs, and about a dozen exercises. The discussions of upcoming versions of Scala also have working code examples, as appropriate.

First Things First

We suggest that everyone take this course before moving on to the follow-on course, Intermediate Scala. Many students enroll in Intermediate Scala straight away after having spent time experimenting with Scala. Although you can spend a lot of time trying to learn Scala from the Internet and by reading books, this leads to an uneven and often incorrect understanding of Scala. We find that most students who enroll in Intermediate Scala without enrolling in this course first soon enroll in this course as well.

The overview video on the front page of this web site discusses how ScalaCourses.com works.

Prerequisites

Familiarity with Java, Ruby, Python or another object-oriented programming language is recommended.

These lectures were designed to be worked through in order. You will know Scala well if you follow this advice:

  1. Click on the lecture titles below to view them.
  2. Work from top to bottom.
  3. Do all the exercises that you encouter along the way.

Installing and Running Scala

This course has 59 lectures.

About This Course
Some Cold Water to Slake Your Thirst
Scala Overview and Philosophy
Mini-Series: Installing Tools
Installing Windows Subsystem for Linux
Windows Terminal
Installing Scala Prerequisites
Installing Coursier
Scala CLI
Installing Scala Only
Scala Runner
Learning Scala Using The REPL 1/3
Learning Scala Using The REPL 2/3
Learning Scala Using The REPL 3/3
UTF-8 and Scala
Scala and Shell Scripts
SBT Global Setup
SBT Project Setup
SBT Tasks and Settings
Installing Scala for Visual Studio Code
JetBrains Toolbox
Setting Up IntelliJ IDEA
Working With IntelliJ IDEA
Scala Worksheets
Scala Imports and Packages
Ammonite
Almond - a Scala kernel for Jupyter
tmux
Scala 3 Major Features
Polynote - a Polyglot Notebook with First-Class Scala Support
Type Hierarchy and Equality
Classes Part 1
Classes Part 2
Classes Part 3
Setters, Getters and the Uniform Access Principle
Deceptively Familiar: Access Modifiers
Objects
Reading Scaladoc
Auxiliary Constructors
Scala Traits
Self Types vs Inheritance
Stackable Traits and Abstract Override
Case Classes
Scala Tuples
Option, Some and None
Pattern Matching
Unapply
Sealed Classes and Extractors
Try and try/catch/finally
Functions are First Class
Either, Left and Right
Closures
More Fun With Functions
Lambda Review & Drill
Algebraic Data Types
Unit testing With ScalaTest and Specs2
Recursion and Functional Programming
Enumerations
* indicates a required field.

Please select the following to receive Mike Slinn’s newsletter:

You can unsubscribe at any time by clicking the link in the footer of emails.

Mike Slinn uses Mailchimp as his marketing platform. By clicking below to subscribe, you acknowledge that your information will be transferred to Mailchimp for processing. Learn more about Mailchimp’s privacy practices.