Exercism is an open-source platform for learning programming through self-directed problem solving. Elixir is a programming language for fault-tolerant, distributed computing that makes it easy to mix web and blockchain programming.
In this task, we want you to learn Elixir through Exercism, and will even pay you $100 in crypto for solving three Elixir problems yourself with full source code. But why Exercism and Elixir?
Exercism: open-source education
Exercism is a collection of programming exercises sorted by language and difficulty. The cool thing about Exercism is that it doesn’t just provide questions or answers — it provides a tool that you can use to score your source code against the correct answer. Here are some screenshots from exercism.io:
Why is this interesting? Well, several reasons:
- It’s completely open source and anyone can add to its open question bank in a defined format
- It’s broad in scope and covers many languages, like PLEAC
- It turns unit testing on its head. Normally programmers write many small tests to test a program, but here the programs are tests of the programmer
- It has bite-size lessons, similar to Brilliant or Project Euler
- It allows people to self-score themselves and their progress, as a complement to higher-commitment MOOCs like Coursera and Udacity
- And it offers primitives that could be the basis for a proof-of-skill, underpinning a new digital diploma and eventually resume
We’ll go further into Exercism in later tasks, but go set up an account and try it out. Then do the tasks at the bottom to solve your first three Exercism problems using Elixir.
Elixir: coding a decentralized future
That tells us why Exercism is interesting. Why Elixir?
If you want to get deeper in crypto, there are then two more directions to go. If you want to actually write new decentralized protocols, you should learn how to write low-level systems code via C, C++, or something newer like Rust. Rust in particular is worth learning because it teaches new concepts while letting you write high performance code, and is also practical for real applications. For example, Parity Ethereum (now OpenEthereum) was one of the two early Ethereum clients and was written in Rust.
Elixir is somewhat different. It's higher up the stack, more optimized for building web apps and coordinating events (on-chain or off) than coding a new blockchain from scratch. WhatsApp scaled to a billion users on top of Erlang, and Elixir is built on the Erlang VM. You can think of Elixir as a more usable version of Erlang that makes real-time, decentralized computing easy. Elixir is also the software underpinning Mozilla Hubs, an underrated open source VR platform that we'll return to later, so it's versatile.
Showing is telling, though, so check this out:
You can see that Elixir makes it easy to write Twitter-like things. But in many ways, a blockchain is like a Twitter feed but with cryptographic guarantees on individual events. Go take a look at blockchain.info and watch the blocks stream onto the page to get a sense of this.
Visualize all the feeds in the world like this, and then add in all the APIs, data stores, bots, and humans we now have online. As the number of endpoints increases, something like Elixir becomes a useful thing to know.
✅ Task: Earn $100 in BTC
Solve the GigaSecond, Diffie Hellman, and Parallel Letter Frequency Elixir problems via Exercism
Above are screenshots of what those problems look like. Note that Exercism makes it hard to permalink to individual exercises for some reason, but those are anchor tags that should get you close to the right exercise on the page.
Once you have finished a problem, you'll be able to generate a permalink to your solution, like this. Submit permalinks to all three solutions below, along with some commentary. We'll award the first ten correct and well-written submissions $100 in BTC; please make sure that your code is entirely your own work!
🏆 Winners: Best Elixir Solutions
The following ten submissions received $100 in Bitcoin for their Exercism solutions to Elixir exercises. Go check them out!