Functional Programming with Elixir - Full Course

Поділитися
Вставка
  • Опубліковано 5 лип 2024
  • Learn Elixir and functional programming in this coruse for beginners. By the end of this course, you'll be able to build your own Elixir applications and confidently apply functional programming concepts in your projects.
    ✏️ Course created by ‪@octallium‬
    💻 Github Repo: github.com/octallium/function...
    ⭐️ Contents ⭐️
    ⌨️ (0:00:00) Introduction
    ⌨️ (0:01:45) What is Elixir?
    ⌨️ (0:04:07) What is functional programming?
    ⌨️ (0:06:57) What is Recursion?
    ⌨️ (0:13:04) Installing Elixir & Setting Up VS Code
    ⌨️ (0:15:03) Learning & Unlearning
    ⌨️ (0:18:29) Pattern Matching
    ⌨️ (0:22:35) Introduction to LiveBook
    ⌨️ (0:26:04) Understanding Immutability
    ⌨️ (0:30:22) Actor Model
    ⌨️ (0:34:48) Hello World in Elixir
    ⌨️ (0:43:25) Data Types - Atom
    ⌨️ (0:50:25) Data Types - String
    ⌨️ (1:45:29) Data Types - Charlist, Process & List
    ⌨️ (1:14:54) Data Types - Tuples & Keyword List
    ⌨️ (1:19:27) Data Types - Maps
    ⌨️ (1:25:38) Data Types - Struct
    ⌨️ (1:30:09) Flow Control
    ⌨️ (1:39:54) Mix Project
    ⌨️ (1:41:19) Head & Tail Recursion
    ⌨️ (2:00:17) Recursion - Sum Digits
    ⌨️ (2:15:31) Recursion - Factorial
    ⌨️ (2:24:57) Recursion - Reverse Number
    ⌨️ (2:32:45) Lists Are LinkedList!!!
    ⌨️ (2:35:53) List Sum
    ⌨️ (2:47:04) Reverse List
    ⌨️ (2:52:58) List Map
    ⌨️ (3:04:34) Concat
    ⌨️ (3:09:23) FlatMap
    ⌨️ (3:14:07) Mid Review
    ⌨️ (3:15:00) Seven Wonders
    ⌨️ (3:40:27) For Comprehension
    ⌨️ (3:42:00) Expense Manager
    ⌨️ (4:04:17) Project Stats
    ⌨️ (5:16:30) Final Words
    🎉 Thanks to our Champion and Sponsor supporters:
    👾 davthecoder
    👾 jedi-or-sith
    👾 南宮千影
    👾 Agustín Kussrow
    👾 Nattira Maneerat
    👾 Heather Wcislo
    👾 Serhiy Kalinets
    👾 Justin Hual
    👾 Otis Morgan
    --
    Learn to code for free and get a developer job: www.freecodecamp.org
    Read hundreds of articles on programming: freecodecamp.org/news

КОМЕНТАРІ • 105

  • @octallium
    @octallium Рік тому +106

    Thanks FreeCodeCamp for publishing this course! I really enjoyed making this course and I personally love working with Elixir. Elixir is really awesome programming language and I hope the community too have fun learning it 😀

    • @jtrossione3475
      @jtrossione3475 Рік тому

      Could you clarify please how have you managed to do this 5-hour course if it's been posted 2 hours ago and you've posted your comment 2 hours ago?

    • @Sulayman.786
      @Sulayman.786 Рік тому +1

      Thanks for making it! It's a great course. The explanation of the unlearning of object oriented programming was so enlightening, explained what I struggled to understand about object oriented, as I assumed a = 1 would mean 1 = a. Therefore, now I understand this difference between object oriented and functional, may I ask two questions:
      1. Do you agree, is it correct to assume, given what you said about recursive mutation enabling scaling, that the use of state limited the scalability of the object oriented approach?
      2. Given I'm now interested in learning functional programming, is it an advantage for me to have not become accustomed to the object oriented way of thinking? I always struggled with state, mainly because my learning hadn't got that far yet.

    • @Sulayman.786
      @Sulayman.786 Рік тому +1

      @@jtrossione3475 pre-recorded? It wasn't even posted by him..

    • @octallium
      @octallium Рік тому +3

      @@Sulayman.786 Thanks for your kind words. Let me try and answer your questions -
      1) Generally OOP's & state management is not the problem, problem is the programming complexity brought by OOP's. Functional programming is much closer to mathematics and you can express computational models in a natural way and of course state management via non-mutable data types do help a lot in this.
      2) Thinking functionally is surely an advantage, but it's an double edged sword. Initially you would want to do everything in a functional manner and then realize that the majority of technical debt in the world is in OOP and at some point you will have to use a OOP based language. The natural inclination for functional paradigm may discourage you from taking up OOP based language, but having functional knowledge will help in understanding OOPs better than others. Also, knowing a little bit of C/C++ and memory allocation will greatly help you in understanding OOP's.
      I wish you all the best!

    • @zscoder
      @zscoder Рік тому +2

      Been waiting for someone to do a course on elixir, any chance a follow up course using the Phoenix framework?

  • @YilmazDurmaz
    @YilmazDurmaz Рік тому +26

    timeline is broken around 1 hour mark for about 40 minutes.
    (0:50:25) Data Types - String
    (1:45:29) Data Types - Charlist, Process & List

  • @EricShans
    @EricShans 9 місяців тому +9

    Thank you for this. Prepping for my next job where they use Elixir - didn't realize you had a full course as I watched the first few lessons on your channel !

  • @bbhoxe
    @bbhoxe 8 місяців тому +4

    Thank you so much for this awesome course! I feel like it was a great introduction to Elixir and it definitely left me hungry to learn more :>

  • @muhammadtaimoor876
    @muhammadtaimoor876 Рік тому +21

    So happy to see this, I was already feeling that this language didn't have much tutorial content on UA-cam

    • @coderide
      @coderide 9 місяців тому +3

      Documentation is pretty good, you don't need video content to learn if you go through the docs I would say, (I'm working in elixir since 2016 so trust me)

    • @sharkpyro93
      @sharkpyro93 9 місяців тому

      @@coderide more like its not that popular, docs are good tho

  • @mumk
    @mumk 8 місяців тому +2

    I am at 41 minutes and so far it has already been very useful and informative, cheers

  • @user-ym1eh1wf2j
    @user-ym1eh1wf2j 9 місяців тому +1

    It was a great learning experience of functional programming. Thank you for the course.

  • @Alexr01389
    @Alexr01389 Рік тому

    Thank you sir, very useful lesson! Gotta learn Elixir!

  • @llampp
    @llampp Рік тому +5

    love that go-with-the-flow haha

  • @tyronenorth6644
    @tyronenorth6644 Рік тому +1

    I was just looking for an elixir tutorial and google(not UA-cam) notified me of this course dropping

  • @edbrito-swdev
    @edbrito-swdev Рік тому

    Ok, now in this I'm really interested!

  • @tsblankets
    @tsblankets 2 місяці тому

    thank you for this course!

  • @dr.milindkulkarni7661
    @dr.milindkulkarni7661 Рік тому +2

    Excellent presentation, very nicely explained.

  • @adityanr5654
    @adityanr5654 Рік тому +14

    Thank you for the great tutorial on elixir !! 💙 Please make a tutorial on Phoenix 1.7 framework as well.. There aren't much tutorials on phoenix. especially the updated one (phoenix 1.7). That will be much appreciated ! Thanks again ! 😇

    • @xade8381
      @xade8381 5 місяців тому +1

      even "Ash"

  • @davidarnold1881
    @davidarnold1881 Рік тому +1

    Great teacher

  • @tianmingguo8271
    @tianmingguo8271 Місяць тому

    Thank you very much!

  • @rock1ee
    @rock1ee Рік тому +3

    Nice, I am reading the programmer passport elixir😆

  • @harishvadaparty
    @harishvadaparty Рік тому +1

    Needed this😅

  • @jordanyoung1836
    @jordanyoung1836 Рік тому

    I would love to get to practice this....😊😊😊

  • @tamirhalperin2404
    @tamirhalperin2404 5 місяців тому +4

    I tried following the concept of immutable until about 30 minutes into this video. But it is completely self-contradicting to say that a variable is immutable and then to show with "a = 2" that a is now 2 right after showing that "a =1" binds a to 1. To any level of logic, this example shows that a is not immutable. If a can be 1 and then right after that a can be 2, this is a demonstration of a variable that is obviously mutable. Using the pin operator to prevent mutation introduces another operator that establishes an immutable operation, but this is not the same as the variable being immutable.

    • @octallium
      @octallium 3 місяці тому

      I totally get your point, it can be confusing, but the subtle points to note here are -
      1) "=" is a match operator not to be considered as an assignment operator, it's just matching the RHS & LHS.
      2) "^" pin operator can be imagined as saying that, we don't want to just match, instead take the existing value bound to "a" and then match it with the RHS.
      3) For e.g with immutability, let's consider this, suppose "a" is bound to a list and we have two functions func_1 and func_2, we pass "a" to both these functions and transform it, the value of "a" still remains the same, it does not mutate, instead func_1 and func_2 returns a new list.

  • @user-be4zi9kw6h
    @user-be4zi9kw6h Місяць тому

    at end it's needed start point big bang, it not start from no step
    if you say before the 0 step their is step and so on for infinity, no thing will happen and you get void "nothing printed", because if their infinity switch depend on each other the lamp won't turn on

  • @anythingforclicks
    @anythingforclicks Рік тому +1

    This channel is so underrated …

  • @vishnuvirat2501
    @vishnuvirat2501 Рік тому +8

    Pls Make Tutorials on Phoenix 1.7 with PostgressSQL database.

  • @SkyFly19853
    @SkyFly19853 Рік тому

    Real nice. ✅✅✅

  • @ibrahimshehuibrahim918
    @ibrahimshehuibrahim918 Рік тому +8

    my favorite programming language ❤❤❤❤❤

    • @vudshpreyk
      @vudshpreyk Рік тому

      Why? What other languages did you try? How do you use them?

    • @ibrahimshehuibrahim918
      @ibrahimshehuibrahim918 Рік тому +2

      @@vudshpreyk its eloquent ,expressive and easy (if you remove macro)

    • @codeWithBala
      @codeWithBala 11 місяців тому

      What can you build using this language ?

  • @debajyatidey9468
    @debajyatidey9468 9 місяців тому +1

    Please make an Ocaml course covering modules and higher order functions

  • @saadhabashneh5587
    @saadhabashneh5587 Рік тому

    Damn were you reading my mind i was just thinking about learning elixir today in the morning and now i open yt and see this 😂

  • @johnubz1989
    @johnubz1989 Рік тому +1

    Elixir 🔥🔥🔥

  • @kapnobatai27
    @kapnobatai27 Рік тому

    Thanks

  • @doxxx93
    @doxxx93 Рік тому

    땡큐 thank you

  • @pallabroy8800
    @pallabroy8800 Рік тому +4

    Create a phoenix live view course as well

  • @tharulinsara7136
    @tharulinsara7136 Рік тому

    great😍😍😍😍😍😍

  • @uzbx103
    @uzbx103 Рік тому +12

    I wish they did Haskell and Scala too!

  • @thelasthusserlian4342
    @thelasthusserlian4342 Рік тому

    let's goooooo

  • @mobidick6064
    @mobidick6064 Рік тому +1

    Show example of programming of a till point in a supermarket for example. Thanks. Very nice

  • @RohitSingh-du8jx
    @RohitSingh-du8jx Рік тому +5

    Please Please make a course on Functional Programming with Haskell.

    • @octallium
      @octallium Рік тому +1

      I have been thinking on Haskell for a while now and thinking of ways to simplify it enough so that everyone can understand. But I still find some barriers and trying to figure it out, but till then I hope you can enjoy Elixir and have a taste of the functional paradigm.

    • @riteshthakur9250
      @riteshthakur9250 Рік тому +1

      Elixir is good for concurrency this is why developers goes for elixir.

    • @RohitSingh-du8jx
      @RohitSingh-du8jx Рік тому

      @@riteshthakur9250 yeah sure I like Elixir too. But Haskell is different.

  • @user-hw4td5zc1g
    @user-hw4td5zc1g Рік тому +1

    are these functions have return statement?
    because when i visualize a function
    recursively
    the function calls function inside another inside another inside another and so on

    • @octallium
      @octallium Рік тому

      I am not sure about your question. Are you referring to return statement in a function or a recursive functions? I guess you are jumping a little ahead in the course, I have explained both of the scenarios in the course, let me give you a short idea here as well -
      1) For return statements in a function, the last statement is automatically returned, there is no need of a special "return" keyword.
      2) For recursive functions, please refer to the section on "Head & Tail Recursion", it will help you clear out everything.

  • @latitudeadjustment2251
    @latitudeadjustment2251 Рік тому +4

    Great video but Project Stats - Implementing Mean appears twice. From 4:12:00 - 4:30:45 and 4:30:46 - 4:49:31.

  • @AllForNutrition
    @AllForNutrition 8 місяців тому +1

    Language construction should be optional depending on the needs of a project. If Elixir were both object oriented and functional, it would be a beast.

    • @octallium
      @octallium 7 місяців тому +3

      Scala tries to be both, I feel it adds to the complexity. My general notion is more the choices, more the freedom, more the variations, more the complexity.

  • @tharulinsara7136
    @tharulinsara7136 Рік тому

    woww

  • @MarcosVMSoares
    @MarcosVMSoares Рік тому +8

    Elixir is life. Vai Brasil !!!

  • @nachocode2002
    @nachocode2002 Рік тому

    🤝🏼

  • @PS-dp8yg
    @PS-dp8yg Рік тому

    Does Elixir have the concepts of monads, manoids, etc.?

    • @blacktipe9922
      @blacktipe9922 10 місяців тому

      monads are used in types. @type some_type(String.t()) :: String.t() | term

  • @ZackZack-bj6kr
    @ZackZack-bj6kr 2 місяці тому

    switching between terminal, livebook, vscode for teaching the language is so hard to follow for me as a beginner

  • @tkmyigit6857
    @tkmyigit6857 2 місяці тому +1

    So, no one watched the video until the end to notice that the segment from 4:12:00 to 4:30:00 is repeated again from 4:30:00 to 4:49:00. hahaha

  • @Lucas-bh3et
    @Lucas-bh3et Рік тому

    omg !

  • @olekollo7875
    @olekollo7875 2 місяці тому

    let`s go Gleamlang

  • @pesh4k
    @pesh4k Рік тому

    Okay

  • @BreakerGandalfStyle
    @BreakerGandalfStyle 9 місяців тому

    Only this missing would be the mathematical proof that L in Loop are equal to L in primitive recursive so that my prof in complexity theory can go to computer science heaven 😅

  • @baegopado
    @baegopado Рік тому +1

    pertamax

  • @kratosAk4700
    @kratosAk4700 Рік тому +1

    First 🎉🎉🎉🎉

  • @user-ce4ws7jx6c
    @user-ce4ws7jx6c Рік тому

    ❤😂🎉😢😮😅😊

  • @tsunningwah3471
    @tsunningwah3471 3 місяці тому

    zhina

  • @tsunningwah3471
    @tsunningwah3471 3 місяці тому

    e

  • @muhammadrazatharaj
    @muhammadrazatharaj Рік тому

    I have composed my new mathematical discoveries as well as creative urdu literature in form of short book of 28 pages.Short introduction of book is available on youtube channel.

  • @susayman3536
    @susayman3536 Рік тому

    Bruh clash of clans

  • @stevenstone307
    @stevenstone307 9 місяців тому

    These videos aren't good. Sorry, I'm sure the intention is good, but these don't teach programming properly. This basically covers information in the docs, and shows you how to make extremely simple things. Where's database connection, Phoenix framework, HTTP endpoints, 3rd party services, deploying elixir applications. Where's the concurrency and parralelism, process, supervisor trees, OTP, etc?

  • @pantrypoints
    @pantrypoints 9 місяців тому +2

    No need to explain how recursive lists are done.
    Just explain the common Enum functions.
    You are giving people a headache.

  • @coder_one
    @coder_one 10 місяців тому +4

    This course substantively is wonderful. Unfortunately, I can't concentrate on it because of the pronunciation/accent of the instructor. There is nothing I can do about it. But if it doesn't bother you, then use it, because it is indeed a great source of knowledge about Elixir!

  • @toufiqulislam8575
    @toufiqulislam8575 Рік тому +4

    Actually I want to know why we learn Elixir?

    • @viniciusmorgado9722
      @viniciusmorgado9722 Рік тому

      Why learn any functional programming language in the first place? Theirs no market at all, but If you already made that decision Elixir is the most modern of them all, a better syntax and developer ergonomics.

    • @toufiqulislam8575
      @toufiqulislam8575 Рік тому

      @@viniciusmorgado9722 Thank you sir for your reply. But I couldn't understand the purpose of this language? Where it is use? Is it use in Machine learning or Web Development or Mobile application developing or Game developing? kindly brief/guide me properly.
      Thanks in advance.

    • @susayman3536
      @susayman3536 Рік тому

      For clash of clans

    • @CarrotBoy9
      @CarrotBoy9 Рік тому +4

      @@toufiqulislam8575 its a multipurpose language...mainly for server,web framework with phoenix, iot with Nerves.

  • @epicurehermit4354
    @epicurehermit4354 Рік тому

    I think you have to use the following command to get executed your file instead of mix, which didn't worked:
    elixir -r lib/tutorials/recursion/print_digits.ex -e Tutoria
    ls.Recursion.PrintDigits.upto(3).
    This did worked for me.

  • @re1konn
    @re1konn Рік тому

    @freecodecamp, @octallium
    I have defined a function as so for the exercise at 3:36:00 and it is working, but with the @spec defined as I have, it is giving me a compilation error. Please help. Thanks in advance :D
    @spec name_country_list([t()]) :: [[String.t(), String.t()]]
    def name_country_list(wonders) do
    wonders
    |> Enum.map( fn wonder -> [wonder.name, wonder.country] end )
    end

    • @dhanushcode9892
      @dhanushcode9892 3 місяці тому +1

      This is the fix -> @spec name_country_list([t()]) :: [[String.t()]]

    • @re1konn
      @re1konn 3 місяці тому +1

      @@dhanushcode9892 yeah makes sense. Thanks buddy