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
English
Curiosity Sale
Current price: $10 Original price: $50 Discount: 80% off
30-Day Money-Back Guarantee
Includes:
  • 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
Requirements
  • Basic knowledge of programming, ideally in Java or C#
  • The course will cover the installation of Scala - no worries on that front!
Description

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
06:51:23
+
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
09:43


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

Example 3 - Mutable and Immutable ‘variables’
05:16

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
06:34

Type Inference
1 question

Example 5 - String Operations
04:29

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
05:28

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

Preview 05:39

Example 8 - Type Operations
03:53
+
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
05:57

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
04:33

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
05:39

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

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

Example 16 - match expressions: down casting with Pattern Variables
07:00

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
03:17

Example 19 - for loops with if conditions: Pattern Guards
02:38

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
03:33

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
06:05

Example 22 - Functions are named, reusable expressions
06:06

Example 23 - Assigning Methods to Values
08:59

Example 24 - Invoking Functions with Tuples as Parameters
05:57

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

Example 25 - Named Function Parameters
03:38

Yet another mechanism to encourage code re-use

Example 26 - Parameter Default Values
03:59

Parameter Default Values
1 question

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

Example 27 - Type Parameters: Parametric Polymorphism
07:13

Example 28 - Vararg Parameters
04:57

Example 29 - Procedures are named, reusable statements
05:30

Example 30 - Functions with No Inputs
03:40

Example 31 - Nested Functions
04:04

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

Example 32 - Higher Order Functions
07:37

Higher Order Functions
1 question

Example 33 - Anonymous Functions (aka Function Literals)
02:44


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
07:22

Partially Applied Functions
1 question


Parameter Groups
1 question

Example 37 - By-Name Parameters
09:01

By-Name Parameters
1 question

Example 38 - Closures
10:11
+
Collections
13 Lectures 01:34:16

Example 39 - Tuples
10:31

Tuples
1 question

Example 40 - Creating Lists
08:53

Example 41 - Simple List Operations
07:48

Lists
1 question

Example 42 - Higher Order Functions Introduced
12:49

Simple Higher Order Methods
1 question


Example 44 - Fold, FoldLeft, FoldRight
02:28

Example 45 - Reduce,ReduceLeft,ReduceRight
05:21

Example 46 - Other, Simpler Reduce Operations
02:39

Scan
2 questions

Fold
1 question

Reduce
1 question


Maps
1 question

Example 48 - Mutable Collections, and Arrays
10:03

Mutable Collections and Arrays
1 question

Example 49 - Option Collections
05:55

Example 50 - Error handling with util.Try
04:07

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


Example 52 - Primary v Auxiliary Constructors
03:59

Primary Constructors
1 question

Example 53 - Inheritance from Classes
06:03

Example 54 - Abstract Classes
02:49

Example 55 - Anonymous Classes
02:59

Example 56 - Type Parameters
03:14

Example 57 - Lazy Values
04:27

Example 58 - Default Methods with apply
04:19

Example 59 - Operators
04:30

Example 60 - Access Modifiers
05:25

Example 61 - Singleton Objects
05:33

Example 62 - Companion Objects
09:10

Example 63 - Traits
06:10

Traits
1 question

Example 64 - Case Classes
03:25

Example 65 - Self Types
07:19
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 :-)