Is elixir good for beginner programmer?

Hi, I am a self taught programmer, and I have some basic background of Javascript and Python that I learned from codecademy and treehouse. I would like to ask wether I am ready to start learning Elixir? Or should I continue to learn Javascript and Python?

If you think I should start learning elixir, then where do I start? Is there any online tutorial?

Thank your for your help.

1 Like

I think Elixir would be good to start with before getting too far into object oriented programming via Python. The guide on the the main website is solid enough to start with. Play around in iex to get the feel for things a bit. (google it if you’re not familiar with iex)

Just explore and don’t be afraid to make mistakes. Good luck!

3 Likes

Why not just try the Getting Started guide, Introduction to Mix and OTP, Meta-Programming in Elixir and see how it goes?

1 Like

@peerreynders

Why not just try the Getting Started guide, Introduction to Mix and OTP1, Meta-Programming in Elixir and see how it goes?

While I agree on Getting Started and maybe Mix and OTP, I don’t think for a begginer Meta-Programming might be a bit too much, I would recommend pursuing meta-programming once one feels familiar and confident with the language, not that it would hurt taking a look.

@William
I would say Elixir is the most approachable of the Functional languages, and since it seems like the next paradigm shift is going to be functional I think its something worth looking into. Also functional programming is arguably simpler than other paradigms. The hardest thing is getting your head around what is the goal of functional programming. And why its quite different from other styles. (Elixir is not considered purely functional since it allows some side-effects, but don’t worry about that). To understand functional programming concepts I would suggest talks from Rick Hickey he is a great speaker, Value of Values and The Languafe of Systems are two of my favorites. And Functional Programming(not a talk but lesson) from Erik Meijer, actually you should start with this one.

To learn Elixir specifically I would suggest getting a book and slowly getting through it.
There are 3 beginner books, Introducing Elixir, Learning Elixir and Programming Elixir. I have read Programming Elixir and can’t recommend it enough, it is totally worth its money!

Finally there are tons of Elixir talks just find the playlists from the conference talks and pick something.
And https://elixirschool.com/ but I think the official guides might be better.

3 Likes

I’d say your main requirement is to have the curiosity to learn a new language. You coming here is a good sign you have that. If you can get your head around Python and Javascript, you can do Elixir. The functional aspect will bite you at first, but in Elixir it is not as weird as it may sound to you now. After a while it pretty much disappears into the background (my experience at least). In fact, once you get the basics, I’d say Elixir is more accessible than an OO language. Because you always see what’s going on right in front of you and there is never any external magic hidden in application state making you scratch your head. Docs are great and the community is second to none, so I’d say go for it, give it a week or two. What’ve you got to lose?

3 Likes

Any new members are welcome so go ahead ant try if you like it :slight_smile:
You can find many learning materials on our forum under Learning Elixir category.

While I certainly understand the sentiment, I wasn’t referring to it for learning how to write macros but to underline that “macros that generate code during compilation” are of central importance in Elixir - and people coming from languages where that capability isn’t a core feature need to be made aware of it as soon as possible.

In my mind some macros express code that “hangs in the sky in much the same way that bricks don’t” - as a result from a novice’s point of view it isn’t at all clear how that code can have any run-time effect and/or how the code connects to the “rest-of-the-world” until they are made fully aware of Elixir’s meta-programming facilities (I’m surprised this hasn’t made it into Elixir’s biggest gotchas).

One good example is the plug router:

defmodule MyRouter do
  use Plug.Router

  plug :match
  plug :dispatch

One has no hope of understanding what is happening here until the realization comes that a whole bunch of code is “hydrated” here, in place, during compilation. The faster any novice realizes that the better. So while writing macros can wait, reading them and understanding their implications on the language as a whole cannot - at least in my opinion.

4 Likes

Thank you for the reply. Do you think I should learn Javascript and Elixir at the same time ? or just focus primarily on Elixir for now? I am asking because one language is for front-end and the other is for backend.

Thank you for your reply. I could not find any good on-line learning video for elixir and its Phoenix framework, and the only functional programming languages that I could find their online classes are scala and f#. My question is, will it better for me to learn other languages such as python with django, ruby with rails or javascript with nodes while I am reading “Learning Elixir 1.3” book?

Do you think I should learn Javascript and Elixir at the same time

You definitely could learn them both, while I still would recommend learning them in separate intervals like focus 2 days on elixir, then switch to js for a day or two, then back again, since the context switch during a day can slow you down, plus it might be too much. Once you feel comfortable with both of them, you can start using them together in frameworks like phoenix.

I could not find any good on-line learning video for elixir and its Phoenix framework.

I don’t recommend learning programming languages from videos, they are good for theory and specific subjects but in general to learn a language I would avoid videos anyway.

will it better for me to learn other languages such as python with django, ruby with rails or javascript with nodes while I am reading “Learning Elixir 1.3” book?

I personally would not try to learn simultaneously more than 2 languages, as you will be also learning lot of technologies and concepts with each and it will quickly become overwhelming. If you are gonna commit to Elixir I would stay away from Rails all together, Phoenix is simply superior, Rails created something awesome and inspiring, it began all this MVC framework movement and was inspiration to Phoenix and many others, however I feel its time has come, there are however many Rails jobs and many are gonna stay for years to come. Cannot say the same for Phoenix yet, but one can expect that in about 3-4 year time there are gonna be more demand for Phoenix than Rails. But if you know no Ruby just look at it as Phoenixes granddaddy.

Lastly about learning Phoenix there is the Phoenix book, “Programming Phoenix”, its a really good book to get you up and started, I know 2 books to buy might be a bit too much. But given you are learning, I take it you are probably a student and I am sure your parents would be more than happy to help you get the money if you tell them its for books.

2 Likes

Honestly, you’re probably better off going deeper with JS and Python first. Build some things. There are orders of magnitude more beginner-friendly resources available for those languages. Most Elixir developers are already experienced programmers so it will be harder to find blog posts and Stack Overflow posts about the basics.

The better you get, the easier it will be to pick up new languages, so don’t worry about wasting time learning something else first even if Elixir is your goal for later.

1 Like

The problem is that your first language has an incredible impact on how you think about programming - the good thing about starting from scratch is that you don’t have any preconceived notion on how things are supposed to be. Learning “those other languages” first can actually erect obstacles to learning languages like Elixir. I’ve already expressed my current preference on “how to learn to program” elsewhere so I’m not going to repeat it here.

Short answer: Give priority to Programming Elixir 1.3 and depending on how committed you are, consider acquiring it via the Starter Kit for Elixir Development (it also applies to “Programming Elixir 1.3”).

Now of all the other languages you listed JavaScript is the next most important one because there is just no getting away from it in web development - no matter how much you may learn to “hate” it in the future (same for NodeJS, not because of its use as a server but because it is such an integral part of the web development tool chain). It is essential that you become competent in it eventually - no matter what your personal opinion on JS in the future will be. But it probably is a good idea to pick up some good habits in Elixir first so that they can rub off on your JS.

Ultimately you should aspire to the JS style that is showcased in JavaScript Allongé, the “Six” Edition to make your JS-experience as pleasant as possible. Focus on ES6/EcmaScript 2015 - not because of classes (:unamused:) but because of destructuring, template literals, generators, etc. Probably the best on-line resource to expanding your JS knowledge is the “You don’t know JS” series:

See also the [ECMAScript book topic] (ECMAScript book).

3 Likes

Hear hear, that is why I am a huge proponent of people learning a low-level assembler (old Motorola or so, not necessarily a nasty one like x86), as well as LISP. Both of those prepare you for both understanding how the CPU works and high level concepts (every high level concept if you learn LISP well).

4 Likes

I’m afraid I have been spoiled. :frowning: I will not name by which language. :slight_smile:
But Peer’s quote reminds me of Edsger Dijkstra:
“It is not only the violin that shapes the violinist, we are all shaped by the tools we train ourselves to use, and in this respect programming languages have a devious influence: they shape our thinking habits. This circumstance makes the choice of first programming language so important.” (E.W.Dijkstra Archive: To the Budget Council (concerning Haskell))

4 Likes

I think Elixir is approachable for beginner programmers. However, my impression is that most of available resources (including my own book) are targeting experienced programmers. A suitable beginners book might be Introducing Elixir. I didn’t read it myself, but from what I’ve heard, it’s a very gentle introduction to Elixir, so it might be a good place to start.

1 Like

I’d encourage you to use a site like http://exercism.io and work through some of the basic problems in Elixir and then do the JavaScript version. Maybe switch it up and do a problem in JavaScript first and then the Elixir version and so-on. Heck, try one problem in Python and compare to your solution in Elixir.

But back to your question - JavaScript is a big world. I think it is very important to know JavaScript, but the question is in regards to the context. With the large client-side JS frameworks today like Angular, React/Redux, Ember, and so-on - that blurs things a bit versus just knowing JavaScript. And then you have Node, which can be used for tooling or building systems… lots of ground to cover. I guess it really depends on what kind of work you do or are pursuing. I work with JavaScript on a regular basis and at one point was the lead on a client-side framework team for a large product, so I’ve been 100% in JS land at times in my career.

If you’re simply learning for fun or to become a better programmer, I do believe learning the basics of Elixir and how to think functional will help you in almost every other language you encounter. You can write functional code in other languages or use some other functional language altogether, but I feel the Elixir syntax is very approachable and can help you get started quickly.

At the end of the day, I’d not approach it like one language versus another. I love Elixir, so obviously take my suggestions with a grain of salt - but I’d focus on the basics of the language to start. How to handle iterating over a list of data. Learn the Enum module. Learn about Maps. See how that compares to other languages and their core libraries. Basically just get in there and get dirty. After that, learn the more Elixir-specific stuff if you want - OTP related things, Phoenix, etc. But I would stay away from all of that if you’re just beginning.

3 Likes

It all depends if you only had time to learn only one language, than JavaScript let’s you write, desktop(electron etc.), mobile (Rect Native, Ionic etc.), web front end and backend apps. Elixir is so much nicer though and a lot of people make a very valid point about first language shaping your thinking so in that regard Elixir is a good option.

It should be noted that Études for Elixir (O’Reilly) are the companion exercises to the book (see also When learning, what order of books did you start with? and Which Elixir books have you got/read?). Also note the a 2nd edition is slated for November - though I don’t think that is a good enough reason to put off getting started with the first edition :slight_smile:.

If you want to learn something interesting you can try

This XSeries presents a programming method that will enable you to produce well-structured programs — programs that tell a clear story about what they do, are well tested, and are easy for others to improve. This series differs from other online programming courses by focusing on a general design method, rather than how to program in a specific language.

https://www.edx.org/xseries/how-code-systematic-program-design

Thank you for your recommendations. I am thinking to buy Programming Elixir 1.3 and Introduction To Elixir 2nd.