#### Course Summary :

**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.

**What am I going to get from this course?**

- 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

#### Pre-Requisites :

- Basic knowledge of programming, ideally in Java or C#
- The course will cover the installation of Scala - no worries on that front!

#### 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

#### Curriculum :

**Section 1 - ** You, This Course and Us

**1 :**You, this course and Us02:21

**Section 2 - ** Introducing Scala

**2 :**Introducing Scala: Java's Cool Cousin10:13

**3 :**Installing Scala09:43

**4 :**Examples 1 and 2 - Hello world05:05

**5 :**Example 3 - Mutable and Immutable â€˜variablesâ€™05:16

**6 :**Example 4 - Type Inference06:34

**7 :**Example 5 - String Operations04:29

**8 :**Example 6 - A Unified Type System05:28

**9 :**Example 7 - Emptiness in Scala05:39

**10 :**Example 8 - Type Operations03:53

**11 :**Download for sec 2

**Section 3 - ** Expressions or Statements?

**12 :**Example 9 - Statements v Expressions05:57

**13 :**Example 10 - Defining Values and Variables via Expressions02:29

**14 :**Example 11 - Nested Scopes in Expression Blocks04:33

**15 :**Example 12 - If/Else expression blocks05:21

**16 :**Example 13 - match expressions05:39

**17 :**Example 14 - match expressions: Pattern guards & OR-ed expressions04:26

**18 :**Example 15 - match expressions: catch-all to match-all06:14

**19 :**Example 16 - match expressions: down casting with Pattern Variables07:00

**20 :**Example 17 - for loops can be expressions OR statements 07:48

**21 :**Example 18 - for loops: 2 types of iterators03:17

**22 :**Example 19 - for loops with if conditions: Pattern Guards02:39

**23 :**Example 21 - while/do-while Loops: Pure Statements03:33

**24 :**Download for sec 3

**Section 4 - ** First Class Functions

**25 :**First Class Functions07:30

**26 :**Example 22 - Functions are named, reusable expressions08:51

**27 :**Example 23 - Procedures are named, reusable statements04:45

**28 :**Example 24 - Functions with No Inputs02:40

**29 :**Example 25 - Invoking Functions with Expression Blocks07:31

**30 :**Example 26 - Nested Functions02:59

**31 :**Example 27 - Named Function Parameters 03:14

**32 :**Example 28 - Parameter Default Values04:42

**33 :**Example 29 - Type Parameters: Parametric Polymorphism05:11

**34 :**Example 30 - Vararg Parameters02:45

**35 :**Example 31 - Assigning Functions to Values09:33

**36 :**Example 32 - Higher Order Functions06:25

**37 :**Example 33 - Anonymous Functions (aka Function Literals)05:43

**38 :**Example 34 - Placeholder Syntax09:02

**39 :**Example 35 - Partially Applied Functions07:03

**40 :**Example 36 - Currying06:24

**41 :**Example 37 - By-Name Parameters05:43

**42 :**Example 38 - Closures09:51

**43 :**Download for sec 4

**Section 5 - ** Collections

**44 :**Example 39 - Tuples09:48

**45 :**Example 40 - Creating Lists09:27

**46 :**Example 41 - Simple List Operations07:19

**47 :**Example 42 - Higher Order Functions Introduced11:33

**48 :**Example 43 - Scan, ScanFold,ScanReduce10:30

**49 :**Example 44 - Fold, FoldLeft, FoldRight02:28

**50 :**Example 45 - Reduce,ReduceLeft,ReduceRight05:22

**51 :**Example 46 - Other, Simpler Reduce Operations02:39

**52 :**Example 47 - Sets and Maps11:23

**53 :**Example 48 - Mutable Collections, and Arrays10:03

**54 :**Example 49 - Option Collections05:55

**55 :**Example 50 - Error handling with util.Try04:07

**56 :**Download for sec 5

**Section 6 - ** Classes and Objects

**57 :**Example 51 - Classes08:12

**58 :**Example 52 - Primary v Auxiliary Constructors03:59

**59 :**Example 53 - Inheritance from Classes04:17

**60 :**Example 54 - Abstract Classes03:16

**61 :**Example 55 - Anonymous Classes02:57

**62 :**Example 56 - Type Parameters03:08

**63 :**Example 57 - Lazy Values04:16

**64 :**Example 58 - Default Methods with apply03:21

**65 :**Example 59 - Operators04:09

**66 :**Example 60 - Access Modifiers04:33

**67 :**Example 61 - Singleton Objects03:55

**68 :**Example 62 - Companion Objects06:54

**69 :**Example 63 - Traits06:01

**70 :**Example 64 - Case Classes03:16

**71 :**Example 65 - Self Types07:19

**72 :**Download for sec 6

#### Reviews

#### Instructor :

#### Loonycorn A 4-ppl team;ex-Google.

#### Biography

Loonycorn is us, Janani Ravi, Vitthal Srinivasan, Swetha Kolalapudi and Navdeep Singh. Between the four of us, we have studied at Stanford, IIM Ahmedabad, the IITs and have spent years (decades, actually) 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 Swetha: Early Flipkart employee, IIM Ahmedabad and IIT Madras alum Navdeep: longtime Flipkart employee too, and IIT Guwahati alum 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 Unanth! We hope you will try our offerings, and think you'll like them :-)