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 course 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 …
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 course 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 course to your programming tool belt, you’ll be ready to move on to more advanced Scala development challenges.
byte, short, int, long, Floats, Booleans, And Doubles
if, else if, else
while, do while
For Loops
Strings
Smart Strings
String Formatting
String Interpolation
Scala Methods
Basic Methods
Any, AnyVal, AnyRef
Different Return Types
Unit And Unit Conventions
Recursion
Tail Optimized Recursion
Methods In Methods
Bending Method Names To Your Will
Operator Overloading
Method Overloading
Named And Default Arguments
AsInstanceOf And IsInstanceOf
Parameterized Types On Methods
Scala Classes
Classes
Java Getters And Java Setters
Constructors
Constructor Named And Default Arguments
Methods In Classes
Preconditions, Exceptions, And Exception Handling
Subclassing
Overriding Methods
equals, hashCode, toString
Case Classes
Abstract Classes
Parameterized Types On Classes
Parameterized Methods In Classes
Scala Object
Singleton Objects
Companion Objects
Magical Methods
The Magic Apply Method
Infix Operators
Right-Associative Colons
Scala Option
Scala Option - Part 1
Scala Option - Part 2
Scala Tuples
Scala Tuples - Part 1
Scala Tuples - Part 2
Higher Order Functions
Creating A Function - Part 1
Creating A Function - Part 2
Creating A Function - Part 3
Is It A Method Or Is It A Function?
Converting A Method To A Function - Part 1
Converting A Method To A Function - Part 2
Closures
Functions With Functions
Currying
Curried Method Parameters
By-Name Parameters - Part 1
By-Name Parameters - Part 2
Collection Basics
The Importance Of A Language With A Clean API
Lists
Sets
Maps And Symbols
Arrays And Repeated Parameters
Ranges
Collections With Functions
map
filter, filterNot, And exists
forEach
flatMap
For Comprehensions
fold And reduce
zip
Finding Your Method In The API
Solving Functionally With Scala
Conclusion
Wrap Up
Introduction
Welcome To The Course
About The Author
Using Val And Var
Overview Of Val And Var
Common Usages Of Val
Common Usages Of Var
Using Var Vs. Mutable Datatypes
Using Var In Loop Contexts
Functions As Objects
Storing Defs Inside Of Vars
Storing Functions In Lists And Maps
Abstract Function Bodies When Possible
Functions Should Be Testable
Immutable Vs. Mutable
Using Mutable Data Structures
Using Immutable Data Structures
Pattern Matching
Do Not Pattern Match For All Statements
Cover All Outcomes Of A Pattern Match
Prefer Value Matches Over Guards When Possible
Prefer To Map/Filter Over An Option Rather Than Pattern Matching
Prefer Pattern Matching To Type Casting
Lazy Val
Cost Of A Lazy Val
Common Usages Of Lazy Val
Using A Factory And Lazy Val Pattern
Oop
Useless Traits
Using Case Classes Effectively
Instance Methods Invoking Static Methods
No Classes Inside Of Package Objects
Prefer Mixing Over Deep Inheritance
Syntax
Do Not Use The Return Keyword
Do Not Use Exceptions For Validation And Flow Of Control
Do Not Use Null
Do Not Use Option.Get
Explicit Return Types
Concurrency
Prefer The Actor Model Over Manual Runnable/Thread
Always Prefer A Single Producer
Thread Safety Of Public Apis
Blocking I/O On A Separate Thread Pool
Futures Are Not The End Answer
Prefer An Ask Over Exposing Internal Actor Workings
Actors Should Only Accept Data
Advanced Language Features
Avoid Postfix Notation
Avoid Implicit
Avoid Complex Structural Typing
Avoid Dynamic Typing
General Programming
Proper Naming Of Variables And Functions
Long Line Splitting
Return Types For Methods
Catch Exceptions When Possible
Self-Documenting Code
Conclusion
Wrap Up And Thank You
Start your Free Trial Self paced Go to the Course We have partnered with providers to bring you collection of courses, When you buy through links on our site, we may earn an affiliate commission from provider.
This site uses cookies. By continuing to use this website, you agree to their use.I Accept