Take Off With Elixir

Learn the high-powered, scalable, functional language that is taking the programming world by storm. Elixir will change the way you write code!

Take Off With Elixir

I created this online course back in 2016 when interest in Elixir was heating up. The language has changed a bit and some of the videos needed an update... but I found that it was pretty minor. The biggest change was moving data handling from an external library (Timex) to Elixir's built-in stuff, which is documented below.

Learn Elixir By Doing Elixir

Our science team needs an astrophysics library, and you're going to build it. We need to:

  • Calculate equations for our prototype orbiter, including Escape Velocity for the Earth, Moon and Mars, Orbital Term, and Orbital Acceleration.
  • Track Solar Flare Activity using Ecto and PostgreSQL
  • Store Planet information with Mnesia
  • Use OTP to DDoS our PostgreSQL database so we can oust our new CTO

This is not a tutorial where you get to sit back and watch us code - you're on the hot seat!

Course Updates: 2022

I finally took the time to upgrade the code for the books and videos, and I'm happy to share that the differences are extremely minor so I didn't change the videos at all, though I might if there's interest.

Here are the main syntax and demo changes...

Ecto Config

Ecto is now up to 3.6.9 and there are a few slight changes as to how to create the repo. Nothing major, you just need to be sure you specify your adapter. I also changed the dependency reference to :ecto_sql.

Dates

I removed the Timex library entirely as date and time functonality is now part of Elixir core. The main difference that you'll see in the code is that Date.from is now Date.from_erl which I think is so nice.

The Use of Parentheses

The Elixir compiler throws a warning if you don't call a method with (), which I think I'm happy about. Functions in Elixir are first class citizens, which means they can be called or used as a value. I see the need to make sure that you know what's happening here - are you trying to pass a reference to a function or invoke it? The compiler always assumed this stuff but I'm happy to see it's being worked out.

Warnings For Unused Variables

There were a few warnings in the code about unused variables and I went and corrected them.

Skip the Amnesia Stuff

It looks like the meg/amnesia library is done - so I'm just going to suggest that you don't watch it. None of the code works and, honestly, Mnesia is overkill for the most part.

Right then - that's about it! Have fun!

The Code

I updated the codebase to work with the latest versions of Elixir and Ecto. The biggest change is that I ditched Timex for the built-in Date stuff.