Log In
Join
for free
Back To Course Home
Mastering the Art of Programming in Elixir
0% completed
Getting Started
Why You Should Take This Course
Transforming the Data
Running Elixir
Quiz Yourself: Introduction to Elixir
Pattern Matching
Assignments with the Match Operator
Lists
Quiz Yourself: Pattern Matching
Immutability
Immutable Data
Performance Implications of Immutability
Quiz Yourself: Immutability
Elixir Basics
Data Types
Operators
Elixir Scope
The with Expression
Quiz Yourself: Elixir Basics
Anonymous Functions
Simple Functions
Returning a Function
Passing Functions as Arguments
Exercise: Join Two Strings
Solution Review: Join Two Strings
Modules and Named Functions
Compiling a Module
Function Calls and Pattern Matching
Guard Clauses
Default Parameters
Private Functions
Modules
Quiz Yourself: Modules and Named Functions
Lists and Recursion
Heads and Tails
Creating a Map Function
Reducing a List to a Single Value
More Complex List Patterns
Quiz Yourself: List and Recursion
Maps, Keyword Lists, Sets, and Structs
How to Choose Between Maps, Structs, and Keyword Lists
Keyword Lists and Maps
Pattern Matching and Updating Maps
Structs
Nested Dictionary Structures
Sets
Quiz Yourself: Maps, Keyword Lists, Sets, and Structs
Processing Collections: Enum and Stream
Enum: Processing Collections
Streams: Lazy Enumerables
Creating Our Own Streams
The Collectable Protocol
Comprehensions
Quiz Yourself: Processing Collections: Enum and Stream
Strings and Binaries
String Literals
Strings and Character Lists
Binaries
Double-quoted Strings Are Binaries
Binaries and Pattern Matching
Quiz Yourself: Strings and Binaries
Control Flow
Use of the if and unless Keywords
Use of the cond Keyword
Use of the case Keyword
Exceptions
Quiz Yourself: Control Flow
Organizing a Project
Fetch Issues from GitHub
Step 1: Use Mix to Create Our New Project
Write Some Basic Tests
Refactor: Big Function Alert
Transformation: Fetch from GitHub
Step 2: Use Libraries
Transformation: Convert Response
Transformation: Sort Data
Transformation: Format the Table
Step 3: Make a Command-Line Executable
Step 4: Add Some Logging
Step 5: Create Project Documentation
Quiz Yourself: Organizing a Project.
Tooling
Debugging with IEx
Testing
Code Dependencies
Server Monitoring
Source-Code Formatting
Quiz Yourself: Tooling
Working with Multiple Processes
A Simple Process
Process Overhead
When Processes Die
Parallel Map: The “Hello, World” of Erlang
A Fibonacci Server
Agents
Quiz Yourself: Working With Multiple Processes
Nodes—The Key to Distributing Services
Naming Nodes
Naming Our Processes
Input, Output, PIDs, and Nodes
Quiz Yourself: Nodes - The Key to Distributing Services
OTP: Servers
Some OTP Definitions
An OTP Server
GenServer Callbacks
Naming a Process
Tidying up the Interface
Making Our Server into a Component
Quiz Yourself: OTP Servers
OTP: Supervisors
Supervisors and Workers
Worker Restart Options
Supervisors Are the Heart of Reliability
Quiz Yourself: OTP Supervisors
A More Complex Example
Introduction to Duper
The Duper Application
But Does It Work?
Quiz Yourself: A More Complex Example
OTP: Applications
The Application Specification File
Turning Our Sequence Program into an OTP Application
Releasing Our Code
Quiz Yourself: OTP Applications
Tasks and Agents
Tasks
Agents
A Bigger Example
Choosing Between Agents and Tasks or GenServer
Quiz Yourself: Tasks and Agents
Macros and Code Evaluation
Implementing an if Statement
Macros Inject Code
Using the Representation as Code
Using Bindings to Inject Values
Macros Are Hygienic
Other Ways to Run Code Fragments
Macros and Operators
Digging Deeper
Quiz Yourself: Macros and Code Evaluation
Linking Modules: Behaviours and use
Behaviours
use and __using__
Quiz Yourself: Linking Modules - Behaviours and use
Protocols—Polymorphic Functions
Protocols
The Available Types
Protocols and Structs
Built-in Protocols
Enumerable
Collectable
Inspect
List.Chars and String.Chars
Quiz Yourself: Protocols - Polymorphic Functions
More Cool Stuff
Writing Our Own Sigils
Multi-application Umbrella Projects
Quiz Yourself: Write Sigils and Create Umbrella Projects
Appendix
Raising an Exception
catch, exit, and throw
Defining Our Own Exceptions
Quiz Yourself: Exceptions
When Specifications Are Used?
Specifying a Type
Defining New Types
Specifications for Functions and Callbacks
Using Dialyzer
Quiz Yourself: Specifications and Dialyzer
Quiz Yourself: Pattern Matching
Quiz yourself on pattern matching in Elixir.
Get hands-on with 1400+ tech skills courses.
Start Free Trial