Learn By Example: Scala
4.1 (273 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.
2,899 students enrolled
Wishlisted Wishlist

Please confirm that you want to add Learn By Example: Scala to your Wishlist.

Add to Wishlist

Learn By Example: Scala

65 examples that will bring Scala to life for you
4.1 (273 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.
2,899 students enrolled
Created by Loony Corn
Last updated 1/2017
Curiosity Sale
Current price: $10 Original price: $50 Discount: 80% off
30-Day Money-Back Guarantee
  • 7 hours on-demand video
  • 127 Supplemental Resources
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
What Will I Learn?
  • Use Scala with an intermediate level of proficiency
  • Read and understand Scala programs - including those with highly functional forms - written by others
  • Identify the similarities and differences between Java and Scala, and use both to their advantage
View Curriculum
  • Basic knowledge of programming, ideally in Java or C#
  • The course will cover the installation of Scala - no worries on that front!

These 65 examples will make this cool-new-kid-on-the-block your steady, reliable friend

Let's parse that.

  • Scala is cool because its all the rage for big data applications, and because it manages to be more sophisticated and elegant than Java.
  • That said, Java is a steady, reliable friend - a language you can depend upon, and in which you can express yourself. 
  • These 65 examples will help you trust Scala the way you trust Java. Each is self-contained, has its source code attached, and gets across a specific Scala use-case. Each example is simple, but not simplistic.

What's Included:

  • The Big Ideas: Before we get to the how, we better understand the why - this course will help clarify why we even need Scala when Java serves us so well
  • The Little Details That Matter: Pattern Matching, If Expressions, For Loops & Yield: Java has if-statements, while Scala has if-expressions. Differences like these matter, this course will cover them.  
  • First Class Functions are perhaps the most dramatically new feature of Scala - the foundation of functional programming support.
  • Collections - Lists, Options, the Details of fold/reduce/shift in Scala  are yet another bit of the language that differs significantly from other traditional object-oriented languages. We will spend a lot of time on these topics too.
  • Classes, Companion Objects, Traits, Self Types and Dependency Injection are Scala's way of providing Object Oriented support. Some of these concepts are similar to Java - those we will skim over. Others are quite different - we will be sure to cover these in detail. 

Using discussion forums

Please use the discussion forums on this course to engage with other students and to help each other out. Unfortunately, much as we would like to, it is not possible for us at Loonycorn to respond to individual questions from students:-(

We're super small and self-funded with only 2 people developing technical video content. Our mission is to make high-quality courses available at super low prices.

The only way to keep our prices this low is to *NOT offer additional technical support over email or in-person*. The truth is, direct support is hugely expensive and just does not scale.

We understand that this is not ideal and that a lot of students might benefit from this additional support. Hiring resources for additional support would make our offering much more expensive, thus defeating our original purpose.

It is a hard trade-off.

Thank you for your patience and understanding!

Who is the target audience?
  • Nope! Please don't enroll for this course if you are entirely new to programming
  • Yep! Please DO enroll for this course if you know Java and are now looking to learn Scala from first principles
  • Yep! Please DO enroll for this course if you are interested in learning functional programming concepts as embodied in Scala
Students Who Viewed This Course Also Viewed
Curriculum For This Course
72 Lectures
You, This Course and Us
1 Lecture 02:21
Introducing Scala
9 Lectures 56:20

A quick run-through of the reasons why people are so excited about Scala

Preview 10:13

Let's plunge in! Setting up Scala is surprisingly simple. You do need Java though.

Installing Scala

Immutable variables are a big part of Scala - understand why.

Example 3 - Mutable and Immutable ‘variables’

Scala aims to achieve the best of both worlds: rapid prototyping like Python, type safety like Java, C++ and other statically typed languages.

Example 4 - Type Inference

Type Inference
1 question

Example 5 - String Operations

Scala has 3 types that unify the type system: Any (literally anything!), AnyRef (supertype to all reference types) and AnyVal (supertype to all value types)

Example 6 - A Unified Type System

Nil, null, Null, Nothing, Unit..Scala has many ways to skin a non-existent cat!

Preview 05:39

Example 8 - Type Operations
Expressions or Statements?
13 Lectures 59:25

This is an important semantic difference - statements don't return a value, while expressions do. Scala converts many familiar constructs into expressions - which allows them to be composed.

Example 9 - Statements v Expressions

Expression blocks are prototypical "r-values", i.e. they sit on the right of assignment statements.

Preview 02:29

Example 11 - Nested Scopes in Expression Blocks

Scala has if-else expressions (not if-else statements). This is a fine point, and an important one.

Preview 05:21

Pattern matching is very easy in Scala - this is a more popular language construct than if/else expressions

Example 13 - match expressions

Example 14 - match expressions: Pattern guards & OR-ed expressions

Example 15 - match expressions: catch-all to match-all

Example 16 - match expressions: down casting with Pattern Variables

Pattern Matching
2 questions

Scala has a way to convert for loop statements into for loop expressions - using 'yield'

Preview 07:48

Example 18 - for loops: 2 types of iterators

Example 19 - for loops with if conditions: Pattern Guards

While loops are pure statements, and are rather clunky. See why they are not the most popular construct in town.

Example 21 - while/do-while Loops: Pure Statements

For Loops
2 questions
First Class Functions
20 Lectures 01:59:02

Functions are 'first class citizens' in Scala - this actually has a technical term!

Preview 07:30

Functions v Methods

Example 22 - Functions are named, reusable expressions

Example 23 - Assigning Methods to Values

Example 24 - Invoking Functions with Tuples as Parameters

Scala allows parameters to be specified out of order - using their names

Example 25 - Named Function Parameters

Yet another mechanism to encourage code re-use

Example 26 - Parameter Default Values

Parameter Default Values
1 question

Scala loves using formidable terms for everyday concepts:-) Think generics in Java.

Example 27 - Type Parameters: Parametric Polymorphism

Example 28 - Vararg Parameters

Example 29 - Procedures are named, reusable statements

Example 30 - Functions with No Inputs

Example 31 - Nested Functions

Functions that take in other functions as parameters, or return function objects, are called Higher Order Functions

Example 32 - Higher Order Functions

Higher Order Functions
1 question

Example 33 - Anonymous Functions (aka Function Literals)

Partially Applied Functions are a really cool code re-use trick: fix some (but not all) parameters of a function and you have a new function!

Example 35 - Partially Applied Functions

Partially Applied Functions
1 question

Parameter Groups
1 question

Example 37 - By-Name Parameters

By-Name Parameters
1 question

Example 38 - Closures
13 Lectures 01:34:16

Example 39 - Tuples

1 question

Example 40 - Creating Lists

Example 41 - Simple List Operations

1 question

Example 42 - Higher Order Functions Introduced

Simple Higher Order Methods
1 question

Example 44 - Fold, FoldLeft, FoldRight

Example 45 - Reduce,ReduceLeft,ReduceRight

Example 46 - Other, Simpler Reduce Operations

2 questions

1 question

1 question

1 question

Example 48 - Mutable Collections, and Arrays

Mutable Collections and Arrays
1 question

Example 49 - Option Collections

Example 50 - Error handling with util.Try

1 question
Classes and Objects
16 Lectures 01:19:59

Example 52 - Primary v Auxiliary Constructors

Primary Constructors
1 question

Example 53 - Inheritance from Classes

Example 54 - Abstract Classes

Example 55 - Anonymous Classes

Example 56 - Type Parameters

Example 57 - Lazy Values

Example 58 - Default Methods with apply

Example 59 - Operators

Example 60 - Access Modifiers

Example 61 - Singleton Objects

Example 62 - Companion Objects

Example 63 - Traits

1 question

Example 64 - Case Classes

Example 65 - Self Types
About the Instructor
Loony Corn
4.3 Average rating
5,034 Reviews
39,226 Students
76 Courses
An ex-Google, Stanford and Flipkart team

Loonycorn is us, Janani Ravi and Vitthal Srinivasan. Between us, we have studied at Stanford, been admitted to IIM Ahmedabad and have spent years  working in tech, in the Bay Area, New York, Singapore and Bangalore.

Janani: 7 years at Google (New York, Singapore); Studied at Stanford; also worked at Flipkart and Microsoft

Vitthal: Also Google (Singapore) and studied at Stanford; Flipkart, Credit Suisse and INSEAD too

We think we might have hit upon a neat way of teaching complicated tech courses in a funny, practical, engaging way, which is why we are so excited to be here on Udemy!

We hope you will try our offerings, and think you'll like them :-)