Code Flow Introduction
The Code Flow course deals with “control flow”. This includes branching logic, looping, and error handling. These form the foundation of most application code. This is how you actually make your code do stuff. As a developer, your initial thought may be, “I already understand control flow!”
The following 3 factors impact a lot more than you may realize:
- Pattern matching
- Immutable data
- Functional programming
Each factor above has a huge impact on how you control the flow of your Elixir applications. Pattern matching opens up new coding patterns that did not exist for you before. Language features like the Pipe Operator and the with
statement create new opportunities. Immutable data means the way you make changes is different.
Contents
Changing your thinking
When I was learning Elixir, I learned the mechanics of the new features quickly, but it took me longer to change my thinking. It took longer to figure why I would want to use approach A over B. This course is going to save you so much time by helping you understand the when and why up front.
We learn best by doing. A downloadable project gives you a place to play, problems to solve, and tests to help you know you’re getting it. This saves you time and avoids struggle.
Prerequisites
- Elixir is installed
- Code editor setup for Elixir – Need a recommendation?
- Comfortable using IEx (Interactive Elixir shell)
- Understand the basic Elixir data types
- Familiarity with pattern matching in Elixir
If you can’t check-off all of the prerequisites then you risk having a hard time following in this course. Please review and complete the Free Pattern Matching course which covers all of this. Then come back!
Our goals
You know how to use existing functions in Elixir and how to write your own. Now, it’s time to figure out how to put the pieces together to solve actual problems.
- Solve problems that requires multiple steps
- Learn how to “flow” code together in an elegant way
- Learn a new way to loop in your code
- Get you productive and creating or contributing more quickly
What we cover
To reach our goals, we will cover the following topics.
- The pipe operator
|>
and creating pipelines - The Railway Pattern
- Writing
with
statements - Branching with a
case
statement - How to loop without a “for” loop or a “while” statement.
- Exception handling
- The
if
andcond
statements
Of course, we’ll also pick up a lot more as we go!
Download reference
After completing the course you can download most of the course content as a PDF. The PDF is a ready, portable reference you can easily search and refer back to as needed.
Let’s go!
This is going to be fun and challenging! I’m excited to share these things with you and help you become productive faster.
Let’s get started!
3 Comments
Leave a Comment
You must be logged in to post a comment.
Really guys, get this course. Bought this immediately after pattern-matching, no thinking. Worth it 200%. Pattern matching course was the best i found so far (about pattern matching). If you don’t believe me just try it, it’s huge work Mark made and it is free.
totally agree. Mark’s courses are the best source for learning Elixir.
It’s the best way of tutoring && learning I’ve ever seen 💯🔥
Thanks Mark!