28 days - How I learned Elixir

I recently had a request to consider more beginner focused content in this 28 days series. This goes really well with one of my goals, which is to get more people excited about Elixir and wanting to try it out. Helping out beginners to the language is a great way to achieve this goal. I have been reflecting on my learning process and considering what worked well and didn’t work so well. I do recognize that everyone learns differently and values different goals. This is my perspective, but another person’s might be very different.

When I first started Elixir, I had extensive programming experience, but no real experiences with functional programming, nor any BEAM languages. Thus, my first goal became just to understand the syntax of the language and learn how the basic constructs of the language work (think variables, function definition / usage, etc.) I found that the best place for this is in the Elixir documentation itself, namely the getting started guide.

Getting Started Guide

This guide is extensive, which is great for working out most of the finer details of the language itself. It breaks down into functional language tutorials, followed by tutorials of mix/OTP.

I found the initial exploration of these guides fairly straightforward. Everything would click well for me, and examples / changes to them work as expected. This was all great and felt like an achievement. However, I wasn’t really understanding the content. It took me about 4 times through the series before I could actually write any of it from memory. In particular, the OTP concepts were much more difficult to understand than I would like to admit. I had significant trouble in that area.

Transitioning out of that, I went directly into some real example projects.

Finding a project

I knew that the tutorial wasn’t fully cutting it for me. I ended up deciding to try to write a project that I knew was over my head. I ended up deciding to make a local SMTP trap. It would need to listen on a port and then communicate over a very basic SMTP protocol. This project was great for me for 2 reasons:

  1. The end goal was significantly over my head from when I started
  2. The content was beyond “normal” applications that I write, this made it interesting

Even though I haven’t touched the project in a while, I do still keep it on github.

Throughout this time, I had found people to bounce problems / ideas off of for how I would implement things. I believe that finding some support network is crucial for seeing these complex problems through.

Educating at work

The piece that has had a recent big impact on me and allowed me to solidify my learnings even further is switching to the perspective of teacher. At work, people have been adopting Elixir and gaining interest. As new people learn the language, they will inevitably need help with it. I find that teaching others is usually the most important thing for me. This is one where what you put in dictates what you get out.

Things I would not do differently

I don’t think that I would have looked at paid content to learn the langauge. The tutorials are so extensive and written by the same people that made the language that it just seems like the right choice to use those tutorials.

In addition, I would not hide any early work from the public or my peers. It would be okay for others to know what I was working on it even if it wasn’t ready yet, as it might encourage them to start up as well.

Things I would do differently

On the idea of educating others and doing self-learning through the Elixir tutorial, I will say that working through the tutorials with another person would have been a huge benefit. That learning/education cycle would have been established much earlier and allowed for the faster growth. This is obviously dependent on finding someone who is interested in learning Elixir.

I would have jumped into projects at work a bit sooner to understand even more. This includes both writing Elixir code myself and reading other code that other’s produced with significant attention.

I would pick a small codebase from a language that I know well (Ruby) and convert it into Elixir. I ended up doing this for a work library recently, and that learning was immense. Being a subject matter expert in a certain area means that the act of applying that knowledge into another language doesn’t involve getting lucky with the project selection.

No matter who the person is or what their goals are, I would always have one piece of advice for someone going down a similar path: “just start”. Start the process and figure out a way to make progress, overcoming challenges that inevitably rise.

Thanks for reading the 9th post in my 28 days of Elixir. Keep up through the month of February to see if I can stand subjecting myself to 28 days of straight writing. I am looking for new topics to write about, so please reach out if there’s anything you really want to see!

View other posts tagged: engineering elixir 28 days of elixir