New to programming, how should I proceed in learning Elixir?

If that’s the case then I would start with books. Start by typing sample code from the book and try to understand what the sample code is telling you. Then modify the sample, re-run it and see what happens to see if you’ve understood it right.

1 Like

Will do

4 Likes

For DevOps type thingies Elixir is a very good match in my opinion. If you need to to absorb preprocess and store large number of event streams etc. with good HA and throughput guarantees Elixir/Erlang is a very good match.

2 Likes

@ thinkpadder1, thanks for sharing the writing a command app in Elixir link! That is pretty helpful.

1 Like

If I were “new to programming” right now, I would pray that someone would point me towards How to Design Programs, 2e and convince me to stick with it [1]. Your immediate reaction would likely be “why Racket - never heard of it”? The short explanation is that Racket is a “family of languages”, i.e. Racket has multiple dialects from a very basic one for beginners up to advanced ones that support OO and static typing (it’s earlier name was PLT Scheme - so yes, at its core Racket is a functional language) that were designed to teach you many of the varying concepts that are important in programming/program design in general.

Now I understand that everyone wants to learn their first “useful programming language” as soon as possible [2] and that most people would prefer to work in just one, their favorite language but the reality is that software developers have to work in multiple languages, not only serially (in time) but also in parallel. The first language you learn is going to have a tremendous impact on how you are going to think about programming. For some time your mind is going to treat “programming” and “your first language” as equivalent.

Elixir may not be a bad choice as the first “applied programming language” but every “applied programming language” tends to have its own (domain) focus and its own quirks - both of which can get in the way of learning your next language whatever that may be. Racket’s goal is to teach you a general way of thinking about programming and program design - so that it will be easier to assimilate the languages that follow.

From The Structure and Interpretation of the Computer Science Curriculum [2004 PDF]

In general, we believe that the HTDP project has validated the usefulness of functional programming and functional programming languages in the first programming course. We have found that teaching Scheme for Scheme’s sake (or Haskell for Haskell’s sake) won’t work. Combining SICP with a GUI-based development environment for Scheme won’t work better than plain SICP. The two keys to our success were to tame Scheme into teaching languages that beginners can handle and to distill well-known functional principles of programming into generally applicable design recipes. Then we could show our colleagues that a combination of functional programming as a preparation for a course on object-oriented programming is an effective and indeed superior alternative to a year on just C++, Java, or a combination.

We are hoping that other functional communities can replicate our success in different contexts. We suggest, however, that using plain Erlang, Haskell, or ML and that teaching programming in these languages implicitly will not do. We all need to understand the role of functional programming in our curricula and the needs of our students.

FYI: back in 2004 OO was still seen as essential (rather than widely misapplied).

[1] Because it would save me from having to go through the agony of having to unlearn bad habits and ineffective / counterproductive mental models that result from the “quirks” that any applied programming language invariably has.

[2] Either because they already have something in mind that they want create or to become quickly “employable”.

See also: Why Racket? Why LISP?

11 Likes

Thanks Peerreynders…I will check out the info that you referenced.

In regards to that last point, I have confess I’ve always been conflicted between “Learn A Language To Be ‘Employable’” and “Learn A Language Because It Opens My Mind To New Approaches”. I’ve been fortunate in that I can still work with languages which I don’t care for but which keep me in a day job :slight_smile:

1 Like

To be honest, it would be difficult to change direction at this point. I’ve invested a few $ into elixir with all of the books, screencasts, etc.

I suggest doing a lot of exercises on Exercism, Project Euler, etc (I like Exercism) to learn the syntax, standard library, and improve your problem solving skills.

1 Like

Also look into Etudes for Elixir.

4 Likes

For me, I did go through the Getting Started section in http://elixir-lang.org/. The key point, is to type the code by yourself and try to run it. I’d like to call it ‘TIY’(Try it yourself). Copy and Paste can give you a false feeling of understanding but it will not last and harm the process of learning eventually. Once I went through most of it, I jumped to exercism.io and start practising.

2 Likes

Thanks for the suggestion, I will go back over the getting started stuff…I’m struggling with Exercism

Thanks I’ll look at etudes

There’s an Elixir For Beginners course on Udemy. Looks like it’s $18 for the next couple of days.

1 Like

There’s a discussion of this Udemy course over here -> Elixir For Beginners (Udemy/self-published) including some critical feedback.

2 Likes

In a perfect world everyone would follow @peerreynders’s advice but unfortunately the industry has made people feel the need to learn “useful” things “fast”. This extends to colleges too—many are just Java programmer factories. Reminds me of this classic post.

I did SICP a long time ago and loved it. Currently learning more functional stuff through Haskell and Elixir! I feel like going through HTDP but a lot of stuff I already know really well.

1 Like

I wish i learned FP first :persevere:

I stil lneed to find time to work on my “Elixir for total beginner” stuff, but i had a good idea of a possible syllabus.

Elixir is not that far from a Lisp and it is quite readable.

Btw i still think that something with pattern matching, especially in function head, make it really easier for newcomers to learn to program… (rather than for loop and all)

2 Likes

Just stated Complete Elixir and Phoenix Bootcamp on Udemy and have gone through 11 modules thus far. It is far superior to the Udemy Elixir for Beginners course in my opinion.

2 Likes