Stairway to Scala Applied, Part 3

Part 3 of Stairway to Scala, covering Scala's core libraries
4.3 (3 ratings) Instead of using a simple lifetime average, Udemy calculates a
course's star rating by considering a number of different factors
such as the number of ratings, the age of ratings, and the
likelihood of fraudulent ratings.
23 students enrolled
$50
Take This Course
  • Lectures 144
  • Length 13 hours
  • Skill Level Intermediate Level
  • Languages English
  • Includes Lifetime access
    30 day money back guarantee!
    Available on iOS and Android
    Certificate of Completion
Wishlisted Wishlist

How taking a course works

Discover

Find online courses made by experts from around the world.

Learn

Take your courses with you and learn anywhere, anytime.

Master

Learn and practice real-world skills and achieve your goals.

About This Course

Published 4/2016 English

Course Description

Stairway to Scala Applied, part 3 is the final part of this Scala programming language course. The course in its entirety is aimed at giving you a full, day-to-day working knowledge of Scala programming, including some of the most common core library APIs.

This part starts with a final language feature for Scala (continuing from the other language features covered in parts 1 and 2). Pattern matching, partial functions and case classes are examined, how they can be used together, and how partial functions can help you avoid certain runtime errors by validating input to a function before you call it.

Following that we look at the Futures api in the core libraries and Actors using the Akka library. Then we delve into the collections API in the core libraries (a very in-depth 2 module examination of the capabilities and performance tradeoffs of the various collection options), and finish up with a look at using Scala on Java projects, using Java libraries from Scala and how to harness build tools (particularly SBT) to build your project and even write custom settings and tasks.

This course is also a good lead-in to the Stairway to Scala Advanced 3 part course which concentrates on in-depth language features, higher level functional abstractions, common patterns and idioms, type theory and other more advanced Scala concepts that will be particularly helpful for anyone writing their own libraries and APIs in Scala.

What are the requirements?

  • Students should follow and complete the Stairway to Scala Setup Instructions, available for free on Udemy, before starting this course
  • Students should have completed parts 1 and 2 of Stairway to Scala Applied, or have equivalent skills to having completed those two parts before starting this course
  • Students will need a laptop or desktop computer with sufficient performance and resources to compile and run the coding exercises

What am I going to get from this course?

  • Use case classes to get lots of free, best practice functionality
  • Contruct pattern matches like a Scala pro
  • Create and use PartialFunctions
  • Use Akka to create and use Actors
  • Create, and manipulate Futures to avoid blocking and write reactive code
  • Obtain an in-depth grounding in the Scala collections and examine the enormous potential and power in the collections API
  • Know which collections to use in different circumstances to get desired performance
  • Use Option types instead of nulls to virtually eliminate NullPointerExceptions
  • Harness Java libraries effectively and safely, and even improve them in Scala
  • Know how to mix Java and Scala on a project, if you need to
  • Build your project using sbt and/or activator
  • Write custom tasks and settings in sbt

What is the target audience?

  • Anyone wanting to learn the Scala programming language
  • This is part 3 of a 3 part course, please check you have skills equivalent to parts 1 and 2 before taking this course
  • We do assume the student has some programming knowledge in a modern programming language other than Scala

What you get with this course?

Not for you? No problem.
30 day money back guarantee.

Forever yours.
Lifetime access.

Learn on the go.
Desktop, iOS and Android.

Get rewarded.
Certificate of completion.

Curriculum

Section 1: Course Introduction and Exercises
01:44

Please download the exercises attached to this lecture and unzip them somewhere on your machine where you can find them later. Also, if you have not already done so, please follow the free course instructions at https://www.udemy.com/stairway-to-scala-setup-instructions/learn/#/ so that you are ready to run both the Scala REPL and the exercises.

Thanks and enjoy the course. This is part three of a three part course, the first part covers converting to Scala from other programming languages and part two covers Scala language features that might be different from other languages or perhaps even unique. This part three finishes the tour of powerful language features with case classes and pattern matching, then moves on to the most important core library features, like collections, futures, actors and also covers building and working with Java.

Section 2: Case Classes and Pattern Matching
Flight 12 Introduction
Preview
00:06
Flight 12 Goals
Preview
00:14
Defining case classes
Preview
01:57
What you get: 1. A factory method
Preview
02:12
What you get: 2. Parametric fields
Preview
03:02
What you get: 3. equals/hashCode/toString
Preview
01:19
What you get: 4. copy
Preview
02:01
Simplifying expressions
08:50
Wildcard patterns
01:33
Constant patterns
02:29
Variable patterns
01:25
Lower case variables, upper case constants
03:42
Constructor patterns
01:41
Sequence patterns
01:59
Sequence patterns, :: style
02:11
Tuple patterns
02:31
Typed patterns
02:14
Type check and cast (poor style)
02:24
Type erasure means more matches
03:01
Variable binding
03:46
Pattern guards
03:40
Pattern guard examples
01:24
Sealed classes
03:08
The Option type
05:09
Deconstructing Option
01:22
Patterns in variable definitions
01:14
Patterns in for expressions
01:31
Exercises for Flight 12
00:34
Case Classes and Pattern Matching
7 questions
Section 3: Partial Functions and Actors
Flight 13 Introduction
00:05
Flight 13 Goals
00:12
Partial functions
00:32
Conceptual partial function
02:27
Actual partial functions
02:26
Partial function literals
01:21
It really is a partial function
01:40
3-element list works, empty list does not
02:46
isDefinedAt
02:03
How it's compiled
01:13
An actor's act method
01:49
Start an actor with start()
00:42
Each actor runs independently
00:19
Independent actors
00:33
The actor method
00:30
Sending a message
03:20
An actor has an "inbox"
06:08
Including/Importing Akka
02:58
Creating an Akka Actor
02:58
Using the Actor
04:36
Back to the Future!
03:10
In the Future, everything will be better
03:25
I Never Promised You A Perfect Future
02:06
Exercises for Flight 13
00:16
Partial Functions and Actors
5 questions
Section 4: Working with Lists
Flight 14 Introduction
00:05
Flight 14 Goals
01:36
List literals
03:17
Lists are homogeneous and covariant
05:34
Constructing lists
01:27
Basic operations on lists
04:02
Insertion sort with head, tail, isEmpty
03:06
List patterns
01:36
Insertion sort with pattern matching
03:50
First-order methods on List
03:38
length, init, last
03:37
reverse, take, drop
02:06
apply, indices
01:15
zip, zipWithIndex, unzip
04:54
toString, mkString
01:37
Higher-order functions: map
03:06
flatMap
03:00
foreach
01:24
filter, partition, exists
02:52
find, takeWhile, dropWhile
01:17
Fold left concept
07:09
Fold left code
03:00
Fold right
01:03
sortWith
05:20
Exercises for Flight 14
00:42
Working with Lists
5 questions
Section 5: Scala's Collections Library
Flight 15 Introduction
00:05
Flight 15 Goal
00:22
Collections hierarchy
02:13
Mutability modeled with types
02:40
Consistent construction
02:49
Consistent equality
03:22
Consistent equality continued
01:40
Consistent toString
02:09
Consistent return types
01:10
Traversable: easy conversion
00:30
Traversable: easy conversion continued
00:54
Traversable : easy concatenation
01:00
Traversable: How do I collect elements mapped by a *partial* function?
01:03
Traversable: How do you partition into two collections according to a predicate?
01:07

Students Who Viewed This Course Also Viewed

  • Loading
  • Loading
  • Loading

Instructor Biography

Dick Wall, Scala Developer

Dick is a Scala Developer with over 8 years of Scala development experience, and over 6 years of Scala training experience. As well as consulting in Scala, Dick contributes to a number of open source Scala projects, libraries and tools, and is very active in the Scala developer community. He is also one of the Scalawags, a video podcast about the Scala language. Along with Bill Venners he runs Escalate Software which provides Scala training services.

Ready to start learning?
Take This Course