Video description
Anyone starting a project in Scala, expanding a Scala project, or looking to establish coding standards as a means for helping junior Scala programmers come up to speed, will value this overview of Scala best practices by Scala expert Joshua Backfield.
Backfield's extensive experience in both object-oriented programming and functional programming make him a Scala authority. He has ported multiple native C applications to Scala, introduced many coworkers to Scala, and taught them the underlying functional programming concepts. He uses that experience to offer a set of Scala guidelines that should make your Scala code base as great as it can be.
- Review and master the coding standards used by expert Scala programmers
- Learn methods for ensuring that junior level programmers adhere to coding standards
- Understand the norms for var and val usages and functions as objects
- Review standards for immutable vs. mutable data structures and for pattern matching
- Master axioms in OOP for use cases, instance methods, and mixing vs. deep inheritance
- Learn standards for advanced features like avoiding postfix notation and dynamic typing
- Understand best practices for syntax, concurrency, and self-documenting code
Table of contents
-
Introduction
- Welcome To The Course 00:01:50
- About The Author 00:00:45
-
Using Val And Var
- Overview Of Val And Var 00:01:08
- Common Usages Of Val 00:05:45
- Common Usages Of Var 00:05:28
- Using Var Vs. Mutable Datatypes 00:07:18
- Using Var In Loop Contexts 00:05:53
-
Functions As Objects
- Storing Defs Inside Of Vars 00:04:01
- Storing Functions In Lists And Maps 00:05:26
- Abstract Function Bodies When Possible 00:06:21
- Functions Should Be Testable 00:04:45
-
Immutable Vs. Mutable
- Using Mutable Data Structures 00:05:14
- Using Immutable Data Structures 00:04:48
- Pattern Matching
-
Lazy Val
- Cost Of A Lazy Val 00:05:51
- Common Usages Of Lazy Val 00:05:12
- Using A Factory And Lazy Val Pattern 00:03:19
-
Oop
- Useless Traits 00:04:19
- Using Case Classes Effectively 00:02:47
- Instance Methods Invoking Static Methods 00:03:32
- No Classes Inside Of Package Objects 00:03:27
- Prefer Mixing Over Deep Inheritance 00:07:48
-
Syntax
- Do Not Use The Return Keyword 00:05:29
- Do Not Use Exceptions For Validation And Flow Of Control 00:08:56
- Do Not Use Null 00:04:07
- Do Not Use Option.Get 00:03:36
- Explicit Return Types 00:04:27
-
Concurrency
- Prefer The Actor Model Over Manual Runnable/Thread 00:05:44
- Always Prefer A Single Producer 00:05:22
- Thread Safety Of Public Apis 00:04:31
- Blocking I/O On A Separate Thread Pool 00:09:46
- Futures Are Not The End Answer 00:04:56
- Prefer An Ask Over Exposing Internal Actor Workings 00:05:39
- Actors Should Only Accept Data 00:06:36
-
Advanced Language Features
- Avoid Postfix Notation 00:05:41
- Avoid Implicit 00:09:44
- Avoid Complex Structural Typing 00:06:17
- Avoid Dynamic Typing 00:07:11
-
General Programming
- Proper Naming Of Variables And Functions 00:04:07
- Long Line Splitting 00:07:48
- Return Types For Methods 00:03:04
- Catch Exceptions When Possible 00:03:15
- Self-Documenting Code 00:04:43
-
Conclusion
- Wrap Up And Thank You 00:01:04
Product information
- Title: Best Practices in Scala Programming
- Author(s):
- Release date: June 2016
- Publisher(s): Infinite Skills
- ISBN: 9781491959268
You might also like
video
Beginning Scala Programming
In this Beginning Scala Programming training course, expert author Daniel Hinojosa will teach you everything you …
video
Learning Scala Programming
In this Scala training course, expert author Mark Lewis teaches you everything you need to know …
book
Learning Scala Programming
Learn how to write scalable and concurrent programs in Scala, a language that grows with you. …
book
Scala Programming Projects
Discover unique features and powerful capabilities of Scala Programming as you build projects in a wide …