Skip to content

scalasummerschool/lectures

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

License: CC BY-NC 4.0

Scala Summer School

This repository contains the course materials we used for a five days workshop on Functional Programming in Scala. You find lecture slides, exercises, and projects here. Taking a look at the Table of Contents shows you the range of topics you will cover. The workshop starts with a basic introduction into Scala and Functional Programming and continues into more advanced concepts like type-classes and how to handle side-effects.

Since all lecture slides are based on reveal.js you have to use your arrow keys to navigate. And you have to navigate in two dimensions. Chapters are organized in columns, slides in rows. To get an overview of all slides within a lecture press ESC.

Table of Contents

  1. Introduction
  2. Scala 101
  3. Functional Programming 101
  4. Standard Library
  5. Midterm Project
  6. Type Classes
  7. Type Class Incarnations
  8. Side Effects
  9. IO
  10. Final Project

Follow-Up Materials

This workshop will give you a first introduction to Scala and the Functional Programming paradigm. If you want to go into greater details you might be interested in the free books provided by underscore.

Preparations

Mandatory

Before you can start you have to install the following tools:

  1. JDK 8 or newer (I think the latest stable version is 10)
  2. Scala
  3. SBT - it is the build-tool we will use
  4. git clone this repository

You have to install it in that order because each tool relies on the tools installed before.

Optional

  • Ammonite - this is an enhanced REPL which makes it easier to fiddle around with some code. But you don't need it. Scala comes already with a REPL. But it isn't that great :).

SBT

Here, you find a list of useful SBT commands:

# start SBT in the repo root and keep it running
sbt

# show all sub-projects
sbt> projects

# switch to a sub-project
sbt> project <name of sub-project>

# compile
sbt> compile

# compile on every file change
sbt> ~compile

# run test
sbt> test

# run a certain test
sbt> test:testOnly <name of test>

If you need some more information take a look into the introduction slides.

Build the Lectures

To build a lecture go through the following steps:

$> cd /path/to/repo
$> sbt
# select one of the shown lecture
sbt> projects
sbt> project scala101-lecture

# minimum JS optimizations
sbt> fastCompile

# maximum JS optimizations (Github page)
sbt> fullCompile
sbt> exit

# opens lecture in the default browser
$> open lecture1_scala_101/index.html

License

As stated in the License file all lecture slides are provided under Creative Commons BY-NC 4.0. The exercise code is released under an MIT license.

The following people are authors of the content in this repository:

  • Paul Heymann
  • David Krentzlin
  • Christian Stein
  • Florian Sachse