Completely new to programming and Elixir

Hey guys and girls,

i am completely “new” to programming, recently played a bit with Python, Ruby and PureBasic, but i want to try something different (PureBasic was a lot different too, though…), so i came across different slant suggestions for Elixir and i want to give it a try.

I am a system administrator and have a small startup myself located in germany, so please beware that my english will have some errors :slight_smile:
In the future i want to be able to offer more than just System administration and consulting in this topics.
I want to have the knowledge to build “small” or even bigger (web-)applications myself or in a small team and i think Elixir as the backend can help me with that.

My questions are:

  1. What yould you think is the best way to get me started through funtcional programming and Elixir as the language?
  2. Regarding Elixir itself: How can i imagine that Elixir need to have BEAM installed? Is this like the Java Runtime Environment most clients have installed?
    So if i have a client Software written in Elixir, the client has to install BEAM with it?
    And if i have a Webapplication the webserver has to run BEAM i suppose?

I hope i made everything clear!
Greetings from germany,

Nopp

2 Likes

Welcome to Elixir! :smiley:

  1. I’d suggest you go through Elixir for Programmers or Programming Elixir. The latter has a lot of exercises which is a great thing to do if your programming experience is limited. After that, I’d suggest Elixir in Action to understand the power of BEAM.
  2. Yes, BEAM is the VM required for Elixir (Elixir+BEAM is like Scala+JVM, just better!). When you’re going to release your software, you’d probably use something like Distillery that will package BEAM and your code as one deployment unit. Or you might want to use PaaS like Gigalixir where everything is taken care for you.
2 Likes

Hey @Nopp welcome!

Let me see if I can address your questions:

  1. I personally feel like https://pragprog.com/book/elixir/programming-elixir is the best introduction to the language for folks who are newer to programming. It has a very gentle learning curve, and has lots of little examples to work with.

  2. The vast majority of programs written in Elixir / Erlang run on something like a server, they are not generally programs that people install and run on their individual computers. That said, there are basically two ways you can run Elixir programs: compiled and run on the same computer, and as a packaged release.

  • Compiled / Run in the same computer: For development work, you’ll want to have erlang and Elixir installed on your computer in full so that you can compile and run the code that you write. Personally I’m a fan of using https://github.com/asdf-vm/asdf to get these installed.

  • As a release: Once you’ve got a working program you can build what’s called a release. A release is a self contained package that includes your compiled code AND the BEAM. This means that if you go put this on your server you can execute it even if the server does not have the BEAM installed at all! Here’s the catch: The operating system that you run the package on needs to match the operating system it was built on.

2 Likes

@stefanchrobot Thanks for your answer. In my excitement i directly purchased this course: The Complete Elixir and Phoenix Bootcamp (Udemy/self-published) without any knowledge of it, besides the ratings.
I hope it’s good. The price is way down than normal, so…

Thanks for your answers. I have to read a lot through the Elixir related stuff, like Distillery, Gigalixir etc.

1 Like

Regarding @benwilson512 Nr.2:

  • so it is not possible to write an application with elixir, which is installed on multiple clients, so they connect to another server instance or database?
    Like a “normal” client-server application? Outlook for example.

  • So if i want to release my program to Windows 7 and Windows 10, i have to “built” it two times, or am i misunderstanding something?

Thanks for your answer :slight_smile:

It’s not very common to have Elixir as the client part of that, there aren’t really tools for building high end native UIs, it just isn’t a targeted use case of the platform. On the server side though the platform really shines, because it can easily handle interfacing with many clients simultaneously through its unique concurrency model.

I can’t speak to windows specifically, I don’t know if a release built for windows 7 will run on Windows 10. Generally speaking though the answer would be yes. On this note though, there’s sort of an option in the middle of the two options I gave before. If your windows 7 computer and your windows 10 computer DO have erlang installed already, then you could probably build 1 release that would work on both. They’d just need to already have erlang available, whereas in a normal release they don’t.

Hi, @Nopp and welcome to the community!

I won’t be able to give you a specific answer for your questions about learning functional programming in general and your questions about BEAM, but I can share some of my thoughts on learning Elixir.

My approach to learning Elixir has been to read books and do practical exercises. I can recommend Programming Elixir and Programming Phoenix to get a flying start.

If you are completely new to programming (depending on your current level), you might want to check out Learn Functional Programming with Elixir before you move on to Programming Elixir. I have not read this book myself, so I cannot personally vouch for it, but I have heard good things about it.

Since The Pragmatic Bookshelf is one of our community sponsors, you can get a generous 35% discount on those books and others by using the coupon code: ElixirForum

I also listen to these three podcasts: ElixirTalk, Elixir Outlaws and Elixir Mix. I have found that listening to experienced developers talk about their way of thinking when solving problems is very beneficial to my learning process, as it help me to “think like an Elixir developer.”

Other than that, I like to share my thoughts and experiments on this forum to get feedback.

Different people learn more effectively by different methods, so I’m not sure whether this approach would work for you. This is just my preferred approach to learning.

4 Likes

@benwilson512
Hmm, okay so Elixir is mainly used for web applications i suppose?
Still fine for me. I read about a lot of tools for this, like elm or Clojurescript for example.

Regarding an installed client application:
Is it possible to use another language for a UI and Elixir in the backend?
What language paires well with Elixir for accomplishing this task?
Or is this really never ever common with Elixir and i should move to another language when i want to perform those kind of tasks?

Elixir is a general purpose language, which may be used for many different domains and purposes. See Nerves as an example of a different domain. Due to the Phoenix web framework, many people have the impression that Elixir is only for web. Elixir is to Phoenix what Ruby is to Rails (sort of).

@IRLeif Thanks for the links and your words.
I have to say, that i am not the person reading hardcover books for learning purposes.
For entertaining, sure, but not for learning.
If there is a PDF or ebook version, this might suit me well better, or even a video course.
Thanks!

Elixir is a fantastic backend for really any language. It’s been the case for a while now that the clients and servers use some sort of standard API to communicate, so you can pair basically any language on the client side and any language on the server side, it doesn’t much matter.

These are languages that run on the client side actually. They’re run in the web browser and talk back to the server, they aren’t languages that run serverside.

That’s probably it’s most common use case. Erlang (also on the BEAM) is perhaps best known for being a control layer in telecommunication systems. It’s also the language used to power the chat service WhatsApp which has over a billion users.

2 Likes

That’s totally fine; some people learn more effectively by having other people show them the ropes in-person, or from doing exercises, etc. You might want to check out the Elixir track at Exercism. Perhaps that will be a learning approach with which you would be more comfortable.

Also, if you live in a large city in Germany, chances are that there might be an Elixir user group in your city. Perhaps you could join a meetup and learn from other people there :slight_smile:

Okay, thanks for pointing this out.
So if i write a server application for maybe “time tracking” in elixir, i could write the GUI in Clojure/“AnyOtherLanguage capable building UIs”?
Note: No web application. A “normal” desktop app.

By the way, here another tip that might be useful for you to find resources:

This forum has pretty good search capabilities. If you search for “learning functional programming” (for exmaple) you will find many similar threads from other learners, where other members of the community have suggested different approaches, books, videos, courses, etc.

1 Like

I nearly started learning programing with elixir. I just had some basic ruby background. Structure of language elixir is great for first language. Because everything is clear in elixir. But most of elixir community experienced developers, good at min 3 programing language. That makes libraries and tutorials not suitable for beginners. Elixir is like a katana more than swiss army knive. After elixir i realised how deep is programing. So if you want just get things done elixir can be overkill. But if you really want to dive programing elixir is perfect for you.

For a beginner good course.

1 Like

If you are new to programming you should definitely check out:

I haven’t read it yet but have read other books from Ryan and he’s a great author :023:

After that I would be inclined to recommend what I have done myself to date:

1 Like

While Elixir is use a lot for web applications the Erlang/OTP system on which it is based is used for many different types of systems by for example Ericsson, WhatsApp, Cisco, Adroll, … So there is nothing limiting Elixir to web applications.

1 Like

You can build GUI’s in both ruby and python, and python has kivy, which can be used for programming iOS and Android.

Thanks for all the answers, i really appreciate it.
Good to know, that i can just use nearly any langage for the GUI.

1 Like