Skip to content

muzhawir/learn_elixir_from_documentation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Learn Elixir from the Official Documentation

Elixir CI

This repository shows my journey learning Elixir by following the official documentation, especially the "Getting Started" section. Instead of using IEx or livebook.dev, I decided to go right into a Mix project. This lets me get used to the real workflow of an Elixir project and start coding right away.

For each chapter, I make a module to follow the examples in the documentation and then recreate them using my own functions, keeping them close to the original examples. This practice helps me get familiar with writing production-quality code. I’m also learning to add @moduledoc, @doc, and @spec comments and practice TDD with ExUnit. My goal is to understand Elixir basics well before moving on to learning Phoenix.

Other Learning References

I also use the book Elixir in Action , which is a recommended resource for learning Elixir. I purchased the 3rd edition, which is based on Elixir version 1.15.

Installation

Install Erlang and Elixir. This project uses Erlang v27.1.1 and Elixir v1.17.3. To manage multiple versions of Erlang and Elixir, try the vfox version manager.

Clone this project to your local machine:

# Using HTTPS
git clone https://github.com/muzhawir/learn_elixir_from_documentation.git

# Using GitHub CLI
gh repo clone muzhawir/learn_elixir_from_documentation

Then go to the project directory and install dependencies:

cd learn_elixir_from_documentation
mix deps.get

Packages

This repository uses these packages:

  • credo: A static analysis tool that helps write better Elixir code by pointing out common mistakes and inconsistencies. It’s a great tool for beginners who want to learn to code well in Elixir.
  • styler: A formatting tool for Elixir. Styler combines the functions of mix format and mix credo to fix code style automatically. I use both Credo and Styler to see how they work together, though for beginners, I recommend starting with Credo.
  • dialyxir: Since each function has @spec, I use Dialyxir to check type specifications with Dialyzer. Dialyzer finds issues like type errors, unreachable code, and unnecessary tests. Dialyxir makes Dialyzer easier to use in Elixir projects.

Todo List

About

Learn Elixir through the official documentation

Topics

Resources

Stars

Watchers

Forks

Languages