Elixir

Elixir




What's in this preview?

We want you to get the feel for typical Groxio content and the reasons we provide each type of content. Each Groxio module comes in four scheduled releases consisting of the central PDF, videos, and resource links. Later releases have projects as well. You can see part of the first release here.

Productive |> Reliable |> Fast



Buy Course Today!



Preview PDF!




Release Schedule: 2020-03-16 through 2020-05-01

Version: June 1, 2023


Just $140.00, A La Carte
(other options available)




Programmer Passport Elixir






Why a book?

The scientific teaching method we follow is the Dreyfus learning model. Books provide the metaphors experts need to build context, step-by-step instructions for beginners, and the exercises that intermediates need to learn.

Itinerary


About Elixir

Basics

Organization and Control

Lists and Recursion

Character Data

Coding With Mix

Key-Value Data

Next to be Released: Lists, Maps, Structs, Mix

From Previous Course

Why an itinerary?

The itinerary is a virtual guide. This optional list describes the highlights of each release to maximize your learning time.

Description

Elixir is a rapidly growing FP language. With a syntax borrowing heavily from Ruby, a runtime that is on the Erlang BEAM, a macro system like that in Lisp and a streaming library like you might find in Haskell, Elixir borrows the best features from many environments. It’s no wonder that Elixir is one of the best paid languages in the world.


Elixir borrows from Erlang’s Let It Crash philosophy, and adds in significant improvements with structs, first-class hygenic macros, and abstractions such as protocols. Elixir remains approachable because of it’s fantastic documentation, clear error messages, and excellent tooling.


History

In 2011, José Valim was working on a research project for Plataformatec. The long-time Ruby core team member wanted to build a language that was better at solving the problems he was solving at his consultancy. In 2014, the movement began to pick up steam, and the first ElixirConf was held in Austin, Texas.


In 2015, the Phoenix web server began to pick up speed with the publishing of Programming Phoenix, and several shocking benchmarks showing Elixir’s incredible scalability.


As Elixir continued to grow, more libraries and frameworks were added to the platform. The Nerves platform allowed Elixir on embedded systems. The Scenic framework allowed a native user interface.


Today, Elixir is among the more popular functional languages, with many deployments from successful commercial companies such as Bleacher Report and Cars.com.

Videos

Public & Private




Why videos?

Groxio language modules have two kinds of videos. Our overview videos set the history and context of a language, or wrap up the work we've done, and are free to support language ecosystems. Our coding instruction videos, mostly starting with the second release, are paid content, and each one offers a live coding project.

Every learning level benefits from pair programming. Our videos are professional, but do not scrub away every tiny mistake. That way, you can see how experienced programmers deal with errors and changes in code organization.

Video

Elixir Motivation

Elixir is a hot language right now, but it's more than a series of buzzwords. In this video, we talk about the features in the language that are fueling it's rapid growth and expansion. We'll take you through features you will learn in Groxio courses as they unfold. When you've seen it, you'll have a better understanding of the features that make Elixir such an important emerging programming language.
Subscriber content

Elixir Documentary

Not a Groxio video, but a good one. José says it better than we can. This documentary tells the story of what Elixir is all about. It talks about abstractions and practical applications, and the things that get programming language people excited. When you're done, you'll have a better appreciation of the problems Elixir was built to solve, and why it's taking off.

Video

Elixir Expressions

Elixir's most basic building blocks are terms. In this short video, we walk through how expressions and operators work. As always, we'll let you look under the hood so you can see how the actual language is built and how to use your tools to help you find out more. When you're done with it, you'll know the fundamental building block for Elixir code and have a better appreciation for where these building blocks come from.
Subscriber content

Video

Elixir Bindings

In other languages like Java or Python, variables are like containers that hold changing values. In Elixir, they are bindings that are like sticky notes that point to individual values in memory. In this video, we dispel the notion that variables are mutable. When you're done, you'll have an intuition for how Elixir variables are different from those provided by other languages such as Python or Ruby.
Subscriber content

Video

Calling Elixir Functions

In this video, we look at functions and Elixir's tool for organizing them, modules. We'll show you the core conventions Elixir developers follow in respect to capitalization and distinguishing between words. We'll also show you tools to learn more. When you've viewed it, you'll know how to call any named function in Elixir.
Subscriber content

Video

Elixir Base Datatypes

In all functional languages like Elixir, data determines approach. Elixir is no different. This video walks you through Elixir's built-in datatypes. We also show you how to get more information about them and when you might want to use them. When you've seen it, you will have seen Elixir's most common datatypes and be able to use them in programs.
Subscriber content

Video

Elixir and LiveBook

In this Elixir video, we move away from IEx and into LiveBook. This tool will let us pursue Elixir challenges like writing programs and make notes along side our work. It is an ideal tool for teaching and taking notes along side your work and recording insights. When you've viewed this video, you'll have another tool in your belt for learning Elixir and taking notes as you do.
Subscriber content

Video

Pattern Matching

Elixir's pattern matching is a defining characteristic of the language. It leads to some surprising results with the `=` operator, but it also produces statements that are both easy to understand and quite powerful. This video walks through pattern matching basics. This concept is one of the most central ones in all of Elixir, and this video will begin your journey of understanding.
Subscriber content

Video

Keywords

Elixir keywords aren't really their own datatype per se. Instead, they are are a combination of lists and tuples. Still, this structure has a rich history in Erlang and has an outsized impact on Elixir including some formatting sugar in function calls. When you're done, you'll know keywords, and also understand a few of Elixir's syntactic idiosyncrasies
Subscriber content

Video

Truth and Control

Since the C programming language, most programming languages have adopted a convention of so-called truthy expressions. These expressions are convenient but also a source of confusion. This video shows how truth is expressed in the Elixir language. When you've seen it, you'll have a better appreciation of control structures for making decisions, and how those structures work with booleans or truthy values.
Subscriber content

Video

Geeky If

What do :if, keyword lists, functions, macros, tuples, and Kernel have to do with each other? In this advanced video, we show how the Elixir `if` statement maps onto a function. Because Elixir has optional else clauses, the problem is trickier than you might think. After watching this video, you'll understand how Elixir provides certain expressions and handles them internally.
Subscriber content

Video

Lists

Elixir's lists are sequential data structures. They're built and accessed head first, and they typically contain homogeneous types, though these conventions are sometimes broken. In this video, we walk through how to express lists, how to match against them, and use lists in various settings. We also look at ways to nest matching expressions, a technique you'll use frequently in Elixir. When you're done, you'll know how typical Elixir developers use lists.
Subscriber content

Video

List Intuition with Tuples

Behind the scenes, lists are actually made up of links like chains in a charm bracelet. On one side of the link is some value. On the other side of the link is another list. In this video, you'll get a chance to build your own list from scratch with tuples. We'll code this solution in LiveBook. When you're done, you'll have a better understanding of how Elixir lists work and why they are built the way they are. We also introduce the recursion pattern, the predominant way to iterate over lists in functional languages.
Subscriber content

Video

Tail Recursive Algorithms

Working with Elixir lists demands that we loop over data structures recursively. Tail recursive algorithms have a special property. The very last operation in the function is a tail-recursive call. That means the compiler can optimize the program by rewriting it using something like a GOTO statement. In this way, list operations in Elixir can be quite efficient. When you're done, you won't be a recursion expert but you'll have seen the way Elixir's higher order functions deal with iteration and looping.
Subscriber content

Video

Character Data

Because Elixir is based on a language with a thirty year history, character data in Elixir is not as clean-cut as it is in other languages. Elixir has two datatypes for sequences of character data. The first is a string, based on a binary. The second is a charlist, based on a list. Learning when and how to use both, and the difference between them, will make you a much better Elixir programmer.
Subscriber content

Video

IO Lists

Functional programming languages sometimes have problems dealing with long sequences that must be stitched together. If you think about it, a web page is just such a problem. Long bits of static unchanged text must be merged with user data. Elixir solves this problem the way several other languages do using a concept called IO Lists. This video shows you how. After you've viewed it, you'll have a better understanding of how to make your programs faster by letting Elixir weave your character data together rather than merging it yourself.
Subscriber content

Video

Working With Mix

Elixir's Mix tools provides support for development tasks such as running tests, working with other libraries called dependencies, and compiling code. This video will walk you through what you need to know as you work with this diverse and powerful tool, including generating projects and where compiled code goes.
Subscriber content

Video

Write a Mix Program

Writing a program using other tools like LiveBook is useful, but most of a developer's work will usually happen within the context of a Mix project. In this video, we build a Mix program from the beginning. We build a Homer Simpson simulation. Like Homer, our program isn't very smart, but writing it gives us the opportunity to show how you can use Elixir to work side by side with this tool.
Subscriber content

Video

Write a Boundary Layer

Most functional programmers strive to maintain a separation between a core, sometimes called a pure functional layer, and a boundary layer, sometimes called an imperative shell. In this video, we take on this design consideration. Along the way, we introduce some key concepts related to software layering.
Subscriber content

Video

Maps

Elixir has several different data structures for dealing with key-value data. The most important is the map. Elixir maps allow the storage of key-value data. Unlike the keyword list we implemented earlier, they support rapid random access, making them a workhorse of the programming language.
Subscriber content

Video

Structs

Maps are an effective way of managing diverse key-value data, but sometimes that diversity can give us trouble. Structs allow programmers to specify specific keys. In this way, programmers can specify data structures that support specifically shaped maps. Many of Elixir's core data structures are in fact structs under the hood.
Subscriber content

Video

Mapsets

Elixir programmers don't usually work with sets, but when they do, the MapSet is the go-to data structure. In this video, we walk through how to use them and how they are implemented under the hood.
Subscriber content

v1: Build a Mix task

In this video, we build a Mix task. We use IEx to explore the Mix.Task API, and then put it to use by crafting our own Mix task, complete with command line arguments. As we do so, we look at the arguments that will choose environments, create documentation, and recursively call umbrella projects.

v1: Strings, Binaries, Charlists, and Lists

A typical blindspot of Elixir developers is the string vs charlist. In this video, we look at the data structures underneath these two, and how to look at binaries.

Video

v1: It's All Reduce!

Elixir is all reduce! This intermediate video tells you why. Reducers form the foundation of APIs throughout the language, and in this example, we move a point around through a two dimensional space, and eventually reduce over a list of English commands to show a more natural API. Along the way, we'll show you how to navigate the differences between reducers that work with Enum and reducers that work with pipes.
Subscriber content

Video

v1: Bob: Elixir Protocols and Design

In this session, we code the iconic Exercism "Bob" problem, the surly teenager. Then, we put our own twist on it. We separate responsibilities between interpreting the input and providing an appropriate response. Then, we use Elixir protocols to add a second personality to the teen-bot. When you're done, you'll have a better understanding of Elixir protocols, and how to build effective APIs in layers.
Subscriber content

Video

v1: Elixir Processes and Message Loops

One of Elixir's most powerful features is the process. When you start to use them, the language begins to click for many people. The message passing, pattern matching, and lightweight processes all work together in a natural way. In this video, we build a simple application, a key-value store.
Subscriber content

Video

v1: Elixir Streams

A quick review of streams and the tools we use to create and transform them. We'll stay in IEx for this session, and look at techniques to understand the Stream module, the constructors, and the transformers you'll find therein.
Subscriber content

Video

v1: Working with Sigils

This Elixir video demystifies that beautiful but cryptic bit of syntax, the sigil. A sigil provides a tiny bit of sugar for representing complex types concisely, like characters and strings with quotes, dates and times, and compact lists of strings or atoms. We'll even code our own sigil.
Subscriber content

v1: Putting It All Together

In this Elixir Capstone video, we work with several concepts for a single project. We implement a protocol, import files with a `__using__` macro, work with sigils, and more. We use several different datatypes to establish a final pleasing API in our project, an API to work with points in geometry.

Community Resources

Cool quick trips for Elixir




Why resource links?

Each new chapter has a set of links, separated into three categories. The categories reflect different competency levels and resources that match that stage of learning, for each Groxio release.

Projects

Longer Excursions (chapters 3 and 4)






Why projects?

The Dreyfus model is originally instruction for pilots. A typical pilot course is based on reading material to understand context, and then flying a plane. Our videos and PDFs are important, but in the end, programmers need to program in order to learn. Our projects offer different levels of assistance, from "give me the answer" to "make this test pass".