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
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 😀
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?
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.
@@jtrossione3475 pre-recorded? It wasn't even posted by him..
@@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!
Been waiting for someone to do a course on elixir, any chance a follow up course using the Phoenix framework?
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
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 !
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 :>
So happy to see this, I was already feeling that this language didn't have much tutorial content on UA-cam
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)
@@coderide more like its not that popular, docs are good tho
I am at 41 minutes and so far it has already been very useful and informative, cheers
It was a great learning experience of functional programming. Thank you for the course.
Thank you sir, very useful lesson! Gotta learn Elixir!
love that go-with-the-flow haha
I was just looking for an elixir tutorial and google(not UA-cam) notified me of this course dropping
Ok, now in this I'm really interested!
thank you for this course!
Excellent presentation, very nicely explained.
Thank you!
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 ! 😇
even "Ash"
Great teacher
Thank you very much!
Nice, I am reading the programmer passport elixir😆
Needed this😅
I would love to get to practice this....😊😊😊
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.
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.
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
This channel is so underrated …
Pls Make Tutorials on Phoenix 1.7 with PostgressSQL database.
Real nice. ✅✅✅
my favorite programming language ❤❤❤❤❤
Why? What other languages did you try? How do you use them?
@@vudshpreyk its eloquent ,expressive and easy (if you remove macro)
What can you build using this language ?
Please make an Ocaml course covering modules and higher order functions
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 😂
Elixir 🔥🔥🔥
Thanks
땡큐 thank you
Create a phoenix live view course as well
great😍😍😍😍😍😍
I wish they did Haskell and Scala too!
Haskell and Idris would be dope
Elixir is funnier than Haskell
let's goooooo
Show example of programming of a till point in a supermarket for example. Thanks. Very nice
Please Please make a course on Functional Programming with Haskell.
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.
Elixir is good for concurrency this is why developers goes for elixir.
@@riteshthakur9250 yeah sure I like Elixir too. But Haskell is different.
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
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.
Great video but Project Stats - Implementing Mean appears twice. From 4:12:00 - 4:30:45 and 4:30:46 - 4:49:31.
I also got this far and noticed
Yeah. I got confused too.
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.
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.
woww
Elixir is life. Vai Brasil !!!
🤝🏼
Does Elixir have the concepts of monads, manoids, etc.?
monads are used in types. @type some_type(String.t()) :: String.t() | term
switching between terminal, livebook, vscode for teaching the language is so hard to follow for me as a beginner
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
omg !
let`s go Gleamlang
Okay
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 😅
pertamax
pertalite
premium
First 🎉🎉🎉🎉
❤😂🎉😢😮😅😊
zhina
e
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.
Bruh clash of clans
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?
No need to explain how recursive lists are done.
Just explain the common Enum functions.
You are giving people a headache.
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!
Actually I want to know why we learn Elixir?
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.
@@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.
For clash of clans
@@toufiqulislam8575 its a multipurpose language...mainly for server,web framework with phoenix, iot with Nerves.
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.
@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
This is the fix -> @spec name_country_list([t()]) :: [[String.t()]]
@@dhanushcode9892 yeah makes sense. Thanks buddy