Scala for the Impatient

Video description

4+ Hours of Video Instruction


In Scala for the Impatient LiveLessons, best-selling author and professor Cay S. Horstmann builds upon your knowledge of Java and introduces Scala as a “better Java.” You will see how Scala blends object-oriented and functional programming and gives you the choice of when and how to use each paradigm.


Scala is a modern programming language for the Java Virtual Machine (JVM) and combines the best features of object-oriented and functional programming. Scala has quickly risen in popularity because it allows developers to write programs more concisely than in Java, as well as to leverage the full power of concurrency. Since Scala runs on the JVM, it can access any Java library and is interoperable with Java frameworks.

Scala for the Impatient LiveLessons begins by covering the basics you need to know when learning a new programming language: values and types, branches and loops, functions, and data structures for collecting elements. The course then turns to the object-oriented features of Scala in lessons 4 and 5. At this point, you are ready to put Scala to work as a better Java. But to go beyond that point, the final two lessons teach you how to take advantage of the functional part of Scala. When you have completed this course, you will know enough Scala to effectively use Scala frameworks such as Play or Apache Spark.

Throughout the course, lab exercises are included in the lessons for hands-on practice. Learning a programming language is not a spectator sport. You will only learn by doing. For each lab, Cay introduces the exercise and then it is your turn to practice. It’s recommended that you pause the video, bring up your development environment, and get to work! When you are done, compare your solution against the solution presented in the video.

Includes lab exercises: If you already have Scala for the Impatient book or eBook and are looking for more hands-on learning, you will find a number of new exercises in these video lessons.

Related Content

Scala for the Impatient

About the Instructor

Cay S. Horstmann is a professor of computer science at San Jose State University and a Java Champion. He is also the author of Core Java , Volume I Fundamentals, Tenth Edition (Prentice Hall, 2016), Core Java for the Impatient (Addison-Wesley, 2015), Java SE 8 for the Really Impatient (Addison-Wesley, 2014), and Scala for the Impatient (Addison-Wesley, 2012). He has written more than a dozen other books for professional programmers and computer science students.

Who Should Take This Course

Java programmers who would like to turbo-charge their development experience on the Java Virtual Machine

Skill Level


After this course, you will be able to:

  • Understand core language features: values and types, control structures, and functions
  • Use arrays, maps, and tuples for collecting elements
  • Comprehend object-oriented programming in Scala: classes, objects, packages, inheritance, and traits
  • Understand functional programming in Scala and how to work with higher-order functions
  • Leverage Scala’s powerful pattern matching and case classes
  • Know enough Scala to use frameworks such as Apache Spark, Play, Akka, and Spray

Course Requirements

Experience with the Java programming language

Lesson 1: Basic Scala starts by telling you the story behind Scala, and then you dive in and get to work. This lesson shows you how to use Scala worksheets for interactive evaluation of Scala code and how to work with values, variables, types, and functions. Then you will see how to navigate Scaladoc, the Scala documentation system. In the lab, you will plunge right in and explore the rich Scala library.

Lesson 2: Control Structures and Functions covers how to implement branches and loops and how to loop over the elements of a collection. Then it turns to implementing your own functions and the conveniences that Scala provides, such as default and named arguments. The lesson ends with a lab in which you implement a useful function in many different ways. The answers section points out the pros and cons of the implementations and gives you tips when to choose each approach.

Lesson 3: Arrays, Maps, and Tuples explains how to collect elements in data structures. In particular, you learn the equivalent of the Java collections such as arrays and maps. It shows you how to traverse and transform collections, and how to apply common algorithms to them. It then looks at tuples, a convenient mechanism for grouping values of different types that has no analog in Java. In the lab, you put the data structures and algorithms to work, solving common problems such as feature counting and clustering.

Lesson 4: OOP1 Classes and Objects discusses object-oriented programming in Scala. Scala is a hybrid language, and object-orientation is one of its cornerstones. If you dislike the boilerplate and ceremony that you need with classes and methods in Java, you are going to love what you see in this lesson: classes without the pain. You learn how to define classes and implement methods. In the lab, you explore how classes can evolve, while preserving a convenient interface for class users.

Lesson 5: OOP2 Packages, Inheritance, and Traits covers advanced topics in object-oriented programming. You learn how the Scala syntax for packages and imports is more consistent and more convenient than the equivalent in Java. Then the lesson turns to inheritance and to traits, the Scala analog of interfaces. Like interfaces in Java 8, Scala traits can have methods, but they are even more dynamic than in Java. You explore some of their power in the lab.

Lesson 6: Functional Programming explains the fundamental concepts of functional programming. You learn how higher-order functions can consume and produce other functions, and why this is very useful. The lesson demonstrates how to process data with the map, filter, and reduce methods and how to build your own control structures. In the lab, you experience life without loops and analyze a complex data set entirely with higher-order functions. Then you build your own loop structure as a higher-order function.

Lesson 7: Case Classes and Pattern Matching covers the powerful concept of pattern matching. Pattern matching enables you to write complex branches in an intuitive and concise way. You learn about case classes classes with special features that make pattern matching work. As an example of case classes, you are introduced to the Option type, a better alternative to null values. The lesson ends by contrasting pattern matching with inheritance and polymorphism. In the lab, you put pattern matching and the Option type to work.

About LiveLessons Video Training

LiveLessons Video Training series publishes hundreds of hands-on, expert-led video tutorials covering a wide selection of technology topics designed to teach you the skills you need to succeed. This professional and personal technology video series features world-leading author instructors published by your trusted technology brands: Addison-Wesley, Cisco Press, IBM Press, Pearson IT Certification, Prentice Hall, Sams, and Que. Topics include: IT Certification, Programming, Web Development, Mobile Development, Home and Office Technologies, Business and Management, and more. View all LiveLessons on InformIT at:

Publisher resources

Download Example Code

Table of contents

  1. Introduction
    1. Scala for the Impatient: Introduction
  2. Lesson 1: Scala Basics
    1. Learning objectives
    2. 1.1 Know the story behind Scala
    3. 1.2 Use Scala worksheets
    4. 1.3 Work with values, variables and fundamental data types
    5. 1.4 Invoke functions and methods
    6. 1.5 Work with Scaladoc
    7. Lab Exercise—Part 1: The Scala Worksheet
    8. Lab Exercise—Part 2: Functions
    9. Lab Exercise—Part 3: Scaladoc
  3. Lesson 2: Control Structures and Functions
    1. Learning objectives
    2. 2.1 Understand conditional and block expressions
    3. 2.2 Use the “for each” and “for comprehension” control structures
    4. 2.3 Define functions
    5. 2.4 Understand named, default, and variable function arguments
    6. Lab Exercise—Vowels
  4. Lesson 3: Arrays, Maps, and Tuples
    1. Learning objectives
    2. 3.1 Work with arrays and array buffers
    3. 3.2 Transform arrays
    4. 3.3 Use common array algorithms
    5. 3.4 Work with maps and tuples
    6. Lab Exercise—Part 1: Removing All but the First Negative Number
    7. Lab Exercise—Part 2: Word Counts
    8. Lab Exercise—Part 3: Grouping
    9. Lab Exercise—Part 4: Partitions and Zips
  5. Lesson 4: OOP1—Classes and Objects
    1. Learning objectives
    2. 4.1 Declare classes, instance variables, and methods
    3. 4.2 Appreciate the benefit of immutabilty
    4. 4.3 Understand object construction and class parameters
    5. 4.4 Understand the uniform access principle
    6. 4.5 Use the operator notation for binary methods
    7. 4.6 Understand objects and the role of companion objects
    8. Lab Exercise—Part 1: It’s About Time
    9. Lab Exercise—Part 2: Uniform Access
    10. Lab Exercise—Part 3: Operators
  6. Lesson 5: OOP2—Packages, Inheritance, and Traits
    1. Learning objectives
    2. 5.1 Understand packages and package nesting
    3. 5.2 Work with import statements
    4. 5.3 Declare subclasses and traits
    5. 5.4 Understand mixins and layered traits
    6. Lab Exercise—Part 1: Mixing in Missing Methods
    7. Lab Exercise—Part 2: Reversing the Mixin Order
    8. Lab Exercise—Part 3: Buffering
  7. Lesson 6: Functional Programming
    1. Learning objectives
    2. 6.1 Understand the concept of functional programming
    3. 6.2 Work with higher-order functions
    4. 6.3 Apply the map, filter, and reduce methods
    5. 6.4 Understand the concepts of closures and currying
    6. 6.5 Develop control abstractions
    7. Lab Exercise—Part 1: Life Without Loops
    8. Lab Exercise—Part 2: Reductions
    9. Lab Exercise—Part 3: Do-It-Yourself while
  8. Lesson 7: Case Classes and Pattern Matching
    1. Learning objectives
    2. 7.1 Understand the match statement
    3. 7.2 Appreciate the similarity between the match statement and exception catching
    4. 7.3 Work with extractors
    5. 7.4 Design and use case classes
    6. 7.5 Work with the Option type
    7. 7.6 Know how to choose between case classes and polymorphism
    8. Lab Exercise—Part 1: Pattern Matching
    9. Lab Exercise—Part 2: Articles and Bundles
    10. Lab Exercise—Part 3: The Option Type
  9. Epilogue
    1. What didn’t we cover?
  10. Summary
    1. Scala for the Impatient: Summary

Product information

  • Title: Scala for the Impatient
  • Author(s):
  • Release date: April 2016
  • Publisher(s): Pearson
  • ISBN: 0134510615