O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Learning Path: Scala Fundamentals

Video Description

You’re a software developer with a basic understanding of Java, but you want to write concise and expressive code in a purely functional style. This learning path covers the fundamentals of Scala, a dynamic, general-purpose programming language for the Java Virtual Machine (JVM) used in everything from data science to distributed computing. You’ll dive into such topics as methods, classes, objects, and functions, and master best practices so you can be on your way to writing Scala code that is elegant, scalable, and fully interoperable with Java. Once you’ve added the skills in this learning path to your programming tool belt, you’ll be ready to move on to more advanced Scala development challenges.

Table of Contents

  1. Introduction
    1. What Is Scala? 00:00:56
    2. What Are The Positives Of Scala? 00:01:10
    3. What Are The Negatives Of Scala? 00:02:40
    4. About The Author 00:00:49
  2. Setup
    1. Downloading Scala 00:03:39
    2. Installing Scala - Windows 00:05:26
    3. Installing Scala - Mac 00:03:56
    4. Installing Scala - Linux 00:04:32
    5. Creating A Script In Scala 00:04:58
    6. Creating An Application In Scala 00:06:42
  3. Scala Basics
    1. val And var 00:04:01
    2. Lazy val 00:04:13
    3. Bending Variables And Values To Your Will 00:04:17
    4. byte, short, int, long, Floats, Booleans, And Doubles 00:07:38
    5. if, else if, else 00:04:06
    6. while, do while 00:05:18
    7. For Loops 00:08:26
    8. Strings 00:01:46
    9. Smart Strings 00:07:19
    10. String Formatting 00:12:12
    11. String Interpolation 00:09:19
  4. Scala Methods
    1. Basic Methods 00:07:44
    2. Any, AnyVal, AnyRef 00:08:48
    3. Different Return Types 00:02:29
    4. Unit And Unit Conventions 00:10:45
    5. Recursion 00:05:20
    6. Tail Optimized Recursion 00:06:52
    7. Methods In Methods 00:02:09
    8. Bending Method Names To Your Will 00:04:44
    9. Operator Overloading 00:05:14
    10. Method Overloading 00:04:42
    11. Named And Default Arguments 00:06:01
    12. AsInstanceOf And IsInstanceOf 00:07:28
    13. Parameterized Types On Methods 00:10:45
  5. Scala Classes
    1. Classes 00:10:01
    2. Java Getters And Java Setters 00:05:02
    3. Constructors 00:08:53
    4. Constructor Named And Default Arguments 00:03:09
    5. Methods In Classes 00:09:52
    6. Preconditions, Exceptions, And Exception Handling 00:10:42
    7. Subclassing 00:09:53
    8. Overriding Methods 00:09:18
    9. equals, hashCode, toString 00:12:24
    10. Case Classes 00:08:22
    11. Abstract Classes 00:05:15
    12. Parameterized Types On Classes 00:08:29
    13. Parameterized Methods In Classes 00:06:43
  6. Scala Object
    1. Singleton Objects 00:11:20
    2. Companion Objects 00:12:48
  7. Magical Methods
    1. The Magic Apply Method 00:05:51
    2. Infix Operators 00:05:09
    3. Right-Associative Colons 00:04:07
  8. Scala Option
    1. Scala Option - Part 1 00:07:21
    2. Scala Option - Part 2 00:05:53
  9. Scala Tuples
    1. Scala Tuples - Part 1 00:03:53
    2. Scala Tuples - Part 2 00:02:58
  10. Higher Order Functions
    1. Creating A Function - Part 1 00:03:45
    2. Creating A Function - Part 2 00:04:59
    3. Creating A Function - Part 3 00:02:50
    4. Is It A Method Or Is It A Function? 00:03:43
    5. Converting A Method To A Function - Part 1 00:06:13
    6. Converting A Method To A Function - Part 2 00:04:13
    7. Closures 00:04:03
    8. Functions With Functions 00:05:51
    9. Currying 00:03:34
    10. Curried Method Parameters 00:04:36
    11. By-Name Parameters - Part 1 00:06:12
    12. By-Name Parameters - Part 2 00:02:58
  11. Collection Basics
    1. The Importance Of A Language With A Clean API 00:02:57
    2. Lists 00:09:11
    3. Sets 00:08:41
    4. Maps And Symbols 00:10:05
    5. Arrays And Repeated Parameters 00:06:28
    6. Ranges 00:05:39
  12. Collections With Functions
    1. map 00:12:30
    2. filter, filterNot, And exists 00:06:40
    3. forEach 00:03:45
    4. flatMap 00:15:13
    5. For Comprehensions 00:14:28
    6. fold And reduce 00:07:00
    7. zip 00:02:31
    8. Finding Your Method In The API 00:06:35
    9. Solving Functionally With Scala 00:05:41
  13. Conclusion
    1. Wrap Up 00:00:31
  14. Introduction
    1. Welcome To The Course 00:01:50
    2. About The Author 00:00:45
  15. Using Val And Var
    1. Overview Of Val And Var 00:01:08
    2. Common Usages Of Val 00:05:45
    3. Common Usages Of Var 00:05:28
    4. Using Var Vs. Mutable Datatypes 00:07:18
    5. Using Var In Loop Contexts 00:05:53
  16. Functions As Objects
    1. Storing Defs Inside Of Vars 00:04:01
    2. Storing Functions In Lists And Maps 00:05:26
    3. Abstract Function Bodies When Possible 00:06:21
    4. Functions Should Be Testable 00:04:45
  17. Immutable Vs. Mutable
    1. Using Mutable Data Structures 00:05:14
    2. Using Immutable Data Structures 00:04:48
  18. Pattern Matching
    1. Do Not Pattern Match For All Statements 00:03:09
    2. Cover All Outcomes Of A Pattern Match 00:05:07
    3. Prefer Value Matches Over Guards When Possible 00:05:16
    4. Prefer To Map/Filter Over An Option Rather Than Pattern Matching 00:06:38
    5. Prefer Pattern Matching To Type Casting 00:04:41
  19. Lazy Val
    1. Cost Of A Lazy Val 00:05:51
    2. Common Usages Of Lazy Val 00:05:12
    3. Using A Factory And Lazy Val Pattern 00:03:19
  20. Oop
    1. Useless Traits 00:04:19
    2. Using Case Classes Effectively 00:02:47
    3. Instance Methods Invoking Static Methods 00:03:32
    4. No Classes Inside Of Package Objects 00:03:27
    5. Prefer Mixing Over Deep Inheritance 00:07:48
  21. Syntax
    1. Do Not Use The Return Keyword 00:05:29
    2. Do Not Use Exceptions For Validation And Flow Of Control 00:08:56
    3. Do Not Use Null 00:04:07
    4. Do Not Use Option.Get 00:03:36
    5. Explicit Return Types 00:04:27
  22. Concurrency
    1. Prefer The Actor Model Over Manual Runnable/Thread 00:05:44
    2. Always Prefer A Single Producer 00:05:22
    3. Thread Safety Of Public Apis 00:04:31
    4. Blocking I/O On A Separate Thread Pool 00:09:46
    5. Futures Are Not The End Answer 00:04:56
    6. Prefer An Ask Over Exposing Internal Actor Workings 00:05:39
    7. Actors Should Only Accept Data 00:06:36
  23. Advanced Language Features
    1. Avoid Postfix Notation 00:05:41
    2. Avoid Implicit 00:09:44
    3. Avoid Complex Structural Typing 00:06:17
    4. Avoid Dynamic Typing 00:07:11
  24. General Programming
    1. Proper Naming Of Variables And Functions 00:04:07
    2. Long Line Splitting 00:07:48
    3. Return Types For Methods 00:03:04
    4. Catch Exceptions When Possible 00:03:15
    5. Self-Documenting Code 00:04:43
  25. Conclusion
    1. Wrap Up And Thank You 00:01:04