Anjana Vakil - Functional Programming in JS: What? Why? How?

  Рет қаралды 85,457

HolyJS — конференция для JavaScript‑разработчиков

HolyJS — конференция для JavaScript‑разработчиков

Күн бұрын

Пікірлер: 117
@timmark4190
@timmark4190 6 жыл бұрын
You are so good at making complex problems into a very understandable way. This is the best lecture on Functional programming basics.
@socialaddict1389
@socialaddict1389 2 жыл бұрын
what's her main youtube channel
@briancardona344
@briancardona344 3 жыл бұрын
Functional programming seems to be a great paradigm and very useful to use in javascript. I really liked the Functional programming talks I've seen lately, like this one. Thanks to Anjana and to HolyJS
@TubeYouDubeDood
@TubeYouDubeDood 7 жыл бұрын
Great lecture--clearly presented. I feel that I finally get what others trying to describe functional programming are really talking about.
@gmnboss
@gmnboss 7 жыл бұрын
I have watched many functional programming talks online. This is by far the best introduction to FP I have seen in a looong time.
@TheDigitalPrince
@TheDigitalPrince 6 жыл бұрын
Her presenting skills are really great and natural. Also the concepts are clearly explained.
@francis2dez1
@francis2dez1 7 жыл бұрын
I like your sincere, nervous humor. Thanks for keeping it a 1000.
@sssstupidkid1234
@sssstupidkid1234 7 жыл бұрын
she's a feminist getting paid internships for women
@5ystemError
@5ystemError 6 жыл бұрын
lol get a life
@kerron68
@kerron68 6 жыл бұрын
OK Mr Grey.
@ancientcivilization9245
@ancientcivilization9245 4 жыл бұрын
@@sssstupidkid1234 whats up with you
@asmartbajan
@asmartbajan 6 жыл бұрын
43:53 For those confused about how closure works, the last 3 lines of this example can be expanded as follows: var holify = (function makeAdjectifier(adjective) { return function (noun) { return adjective + ' ' + noun; }; })('holy'); (function (noun) { return 'holy' + ' ' + noun; })('JS'); (function (noun) { return 'holy' + ' ' + noun; })('cow');
@PathumAthuk
@PathumAthuk 7 жыл бұрын
Great talk! Was seeking for a track to follow in learning functional and now we have one, thanks to this.
@ManjunathManja1227
@ManjunathManja1227 4 жыл бұрын
This is an amazing presentation.
@jubalrahl
@jubalrahl 5 жыл бұрын
I lover her mind and voice so much!!! 😍
@johnyepthomi892
@johnyepthomi892 4 жыл бұрын
Wow! Learned a lot. Amazing delivery. Thank you so much!
@montazmeahii6029
@montazmeahii6029 6 жыл бұрын
I'd recommend jumping to 5:23 to save time. At 5:23 she says, "What is functional programming?"
@montazmeahii6029
@montazmeahii6029 6 жыл бұрын
Wait, there's another slide at 8:23 that says "What is functional programming." It wasn't explained at 5:23
@nicholasc.5944
@nicholasc.5944 6 жыл бұрын
thanks man
@irfandy8
@irfandy8 5 жыл бұрын
Thanks, this helps my first 8 min
@fabinSilvas
@fabinSilvas 5 жыл бұрын
thanks
@johnyepthomi892
@johnyepthomi892 4 жыл бұрын
😆
@zaminhaidry
@zaminhaidry 3 жыл бұрын
*Anjana Vakil🔥 Great Presentation*
@aniltheblogger
@aniltheblogger 4 жыл бұрын
Great presentation of FP, Thanks
@veer66
@veer66 4 жыл бұрын
One of reasons that I learned to functional programming is performance. For example, using pmap (parallel map) is easy.
@shibnathroy106
@shibnathroy106 6 жыл бұрын
Thank You for this video. I had a lot of doubts about functional programming and now they are clear.
@wahibakamoulcode
@wahibakamoulcode 4 жыл бұрын
Explained very well thanks a loot HolyJS
@uznemirenapogacica5045
@uznemirenapogacica5045 6 жыл бұрын
I love her lol.Thank you for this awesome introduction!
@voidmind
@voidmind 5 жыл бұрын
Great conference!
@steffenlaurens8280
@steffenlaurens8280 6 жыл бұрын
Thanks for the closures part, now I know how to do function that returns function with arguments
@kehbumasama5020
@kehbumasama5020 5 жыл бұрын
great talk i just learned something
@shubhampurwar4103
@shubhampurwar4103 7 жыл бұрын
Great lecture
@pokerchannel6991
@pokerchannel6991 26 күн бұрын
I am not that good with functional programming, but I am naturally very good at dysfunctional programming. : (
@yashsvidixit7169
@yashsvidixit7169 3 жыл бұрын
Love you Anjana❤️
@Sagitarria
@Sagitarria 6 жыл бұрын
it seems like a lot of speed differences can be made up for because you can do parallel processing safely
@nathancornwell1455
@nathancornwell1455 4 жыл бұрын
I've been trying to get into functional programming instead of OOP but one thing i can't seem to find an answer on or example of is stepping through an array one element at a time without some state variable that updates what position you are at.
@zstolen2110
@zstolen2110 7 жыл бұрын
I LOVE HER
@richtourist
@richtourist 6 жыл бұрын
Totally
@moneyharry
@moneyharry 6 жыл бұрын
You're not alone 😞
@NerdENerd
@NerdENerd 6 жыл бұрын
Me too
@user-wgcb7hgn6a
@user-wgcb7hgn6a 6 жыл бұрын
Me too
@MecchaKakkoi
@MecchaKakkoi 6 жыл бұрын
Easy, tiger
@yerowyn1518
@yerowyn1518 5 жыл бұрын
New for recursion: const rec = (numbers) => { if (numbers.length === 1) { return numbers[0] } else { return numbers[0] + rec(numbers.slice(1)) } }
@21POPOV
@21POPOV 3 жыл бұрын
numbers can be empty array. Also better using tail-recursion for improving perfomance.
@anuraggautam77
@anuraggautam77 6 жыл бұрын
I love the way she speaks ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️
@monugupta32
@monugupta32 6 жыл бұрын
This couldn't have been presented in a better way..
@thomasgdowling
@thomasgdowling 7 жыл бұрын
Great talk! I learned a lot. (At 38.19, line 3, do we need a var/let to keep things 'pure' :-) )
@kyuwoochoi2887
@kyuwoochoi2887 6 жыл бұрын
Nice JS PF introduction.
@manotlj
@manotlj 6 жыл бұрын
Now, I know how to use parameters. Actually, parameter just an instance variable in function.
@abilash_yt_freak
@abilash_yt_freak 6 жыл бұрын
simpler version of 39:29 function sum(arr, index = 0,total = 0){ if(arr.length === index){ return total; } total = total + arr[index]; return sum(arr, index + 1, total) }
@akaratepongsawang7424
@akaratepongsawang7424 6 жыл бұрын
I'm worry about system performance to use Recursion instead of Iteration, ECMAScript run an enormous stack on mobile maybe shutdown everything.
@rumble1925
@rumble1925 6 жыл бұрын
Not just mobile. You can easily hit the maximum stack size with some basic loops on desktop. Until JS gets support for tail calls, stick to simple iteration. You can still get all the functional benefits anyway, just the implementation detail is different.
@nahiyanalamgir7614
@nahiyanalamgir7614 6 жыл бұрын
ES6 doesn't limit max stack size.
@nirupambhandari9192
@nirupambhandari9192 4 жыл бұрын
Thanks
@Thomas-uy4vn
@Thomas-uy4vn 5 жыл бұрын
Seems like you could just use classical approach for you sum function and functionnal for the most other parts of your program
@sbcode
@sbcode 5 жыл бұрын
you are funny, I wasn't sleeping
@niteshagarwal9622
@niteshagarwal9622 3 жыл бұрын
In addition to talk, I liked her playful nature and attitude.
@sol3cito33
@sol3cito33 3 жыл бұрын
So, the reason why functional programming is the way to go is because of the community. Interesting.
@edustreamimg
@edustreamimg 6 жыл бұрын
If fp consists avoiding side efects like a outputing in a screen (as console.log(...)) how you can show information to the user after she/he inputs some value?. Example a calculator: const sum = (a,b) => a+b; const r = sum(3,5) ... what should be the next step in func programming?
@rolfnoduk
@rolfnoduk 6 жыл бұрын
Eduardo Acevedo you don't completely avoid side effects, but you do keep them out of your functions as much as you can - keep them in as few places as possible and away from calculations and they can't cause as many problems
@edustreamimg
@edustreamimg 6 жыл бұрын
Thanx for your explanation. Do you have an example of a crud app with fp in js and mongo?
@bdnugget
@bdnugget 6 жыл бұрын
You can curry your sum function with console.log to make it pure
@rumble1925
@rumble1925 6 жыл бұрын
Think of it like pushing the side effects to the edges of the application. You might have a simple view that calls your sum function and outputs the sum. Nowhere inside your core business logic for your calculator do you actually need to know about the outer world, like screens and user inputs.
@rameshchandran
@rameshchandran 6 жыл бұрын
In Apple Swift , the Closure feature is copied from Javascript ? LOL. :)
@1K1NDR3D
@1K1NDR3D 6 жыл бұрын
compose is always right to left, it's not a Ramda thing
@chicosun
@chicosun 5 жыл бұрын
First programming talk i learn something from wtf xd
@АлександрЛадонин-ы9с
@АлександрЛадонин-ы9с 5 жыл бұрын
holyjs-moscow.ru/registration/standard/ Билет стоит 42 000 руб. Фактически одна "вода": что такое функции в js, как пользоваться IDE (другой лектор) и тому подобное. Ничего такого, чего не знают даже начинающие программисты. Все это есть в открытом доступе. Для чего все это... потусоваться? Концерт мировой рок-группы в 2 раза дешевле стоит...
@amzadzin786
@amzadzin786 6 жыл бұрын
I don't know about functional programming...the way you speak u r becoming my crush haha
@kartheek.g3667
@kartheek.g3667 6 жыл бұрын
I love her body language, I am pretty much impressed by it.
@guojinlong2605
@guojinlong2605 6 жыл бұрын
nice talk .
@ossamabounnite4922
@ossamabounnite4922 6 жыл бұрын
Link to the slides assets.ctfassets.net/nn534z2fqr9f/5YqZAn4MGkww8aAsSo0MIm/605847abdf60ac063335e1be5d7e6299/Functional_Programming-_What-_Why-_How-.pdf
@kristypolymath1359
@kristypolymath1359 5 жыл бұрын
She on numerous occasions references talking about something before that she never actually talked about (ie, imperative, efficiency)....unless she's talking in another video?
@scotthjackson5651
@scotthjackson5651 5 жыл бұрын
Why is printing to the console or to the screen considered an impure side effect if that happens within a function? What if the purpose of a program is to display meaningful information to the user and you decide to trigger that provision of information from within a function? If that's considered "impure" in functional, when can you do it "legally"? Not trying to disrespect the speaker. Noob question.
@chauhan471
@chauhan471 5 жыл бұрын
We can have a impure wrapper around our functional part. In that impure wrapper we can call pure functions sequences, and can log input passed to them output they produced in that wrapper only. Good thing here is that we can trust at least the pure functional part, and can reuse that easily. Hope this makes sense.
@weirdwordcombo
@weirdwordcombo 6 жыл бұрын
I see the benifits to all the stuff. But personally i believe the sum function should stay iterative even for functional programming, just because it adds no benefit and you still get all the benefits of functional programming with the iterative version, even though the STYLE (non-recursive) does not suit a functional programming style. It is still as pure as you can get in the iterative version. Modifying purely local variables are is no way a side effect, or rather I don't count them as such... Personally i just just lodash sum function because readability (expressiveness) is very important. Lodash itsself also wont use recursion for this too. If you are adopting a programming paradigm, don't take the good with the bad. See what is best and adapt for yourself. Don't be afraid if not everything is haskell-like lol. Oh yes and good luck with functional programming and immutability in game design when every frame counts. That is why i say adapt and see what works. :)
@nahiyanalamgir7614
@nahiyanalamgir7614 6 жыл бұрын
What do you mean by iteration? A while or for loop? Well then, you're probably going to have to keep a counter which will mutate in every step, you can't have mutations in functional programming. If you can manage to loop through without mutation, you're fine.
@KostiaBazrov
@KostiaBazrov 6 жыл бұрын
стоит смотреть7
@kerosene4751
@kerosene4751 6 жыл бұрын
The echo on the audio is unfortunate, I don't think I can tolerate an hour of that. Surely they could capture the audio without the room's resonance, or at least some post-processing removal of the echo?
@ngchenghow
@ngchenghow 6 жыл бұрын
why recursion in functional programming?
@ngchenghow
@ngchenghow 6 жыл бұрын
because we can use function instead of iteration?
@okarakoo
@okarakoo 6 жыл бұрын
iteration requires in-place updates of certain variables, which is not part of the functional paradigm (variables, or "bindings" are non-mutable). Recursion is an elegant alternative
@nahiyanalamgir7614
@nahiyanalamgir7614 6 жыл бұрын
Okarakoo perfectly explained it.
@MrSam1804
@MrSam1804 6 жыл бұрын
Generators for the rescue
@Ali-kl3ql
@Ali-kl3ql 6 жыл бұрын
One of the most dangerous videos for programmers :D
@nahiyanalamgir7614
@nahiyanalamgir7614 6 жыл бұрын
Why?
@nahiyanalamgir7614
@nahiyanalamgir7614 6 жыл бұрын
The audio is full of her breathing noises, she should've used a better microphone with a good filter. Or maybe she was just too nervous :P
@Tranc3me
@Tranc3me 6 жыл бұрын
came to see about inline functions, didn't find what i was looking for,.. but you are so cute, with amazing personality, smiling old the time, and like the coolest name ever,.. i could never be mad to you,.. infact I would marry you if you where any closer,.. keep it up!!!
@keashavnair6772
@keashavnair6772 6 жыл бұрын
The fact that you would marry someone without knowing them is so pathetic hahahah. Honestly I cringe at the fact that I will have to work with thirsty men like you in the computer science field. If you are going to drop your jaw at every smart woman computer scientist, you are going to have a hard time concentrating on actually getting the job done.
@ambarishyt
@ambarishyt 6 жыл бұрын
27:38 she seems to be from Indian origin but does not know they are Hindu numerals not Arabic numerals
@danielkaczmarczyk2482
@danielkaczmarczyk2482 6 жыл бұрын
As it appears to be, your assumptions based on anecdotal evidence may be wrong. You must be shocked right now.
@RS-jh2kl
@RS-jh2kl 6 жыл бұрын
www.britannica.com/topic/Hindu-Arabic-numerals en.wikipedia.org/wiki/Hindu%E2%80%93Arabic_numeral_system Kumar is actually correct, information transmitted via trade route, Al Khwarezmi created the Algorithm around the 7th century AD, take at a look at Panini, plus Indians have Srinivasa Ramanajun, if you are referring to ancient Babylon, maybe you can make an argument, Side note: Pre-Islamic Iraq, Al Khwarezmi existed during the "Islamic Golden Age". It is pretty ignorant to deny their contributions, pretty akin to a denial of Nikola Tesla's work until only recently.
@wanged1775
@wanged1775 6 жыл бұрын
ilove her
@darkmath100
@darkmath100 6 жыл бұрын
If you want to program use a programming language. ;-)
@kristypolymath1359
@kristypolymath1359 5 жыл бұрын
The acoustics are terrible in that room :(
@RavinderRam
@RavinderRam 6 жыл бұрын
Or Jaanu ghr me sab bdia h
@vickylance
@vickylance 6 жыл бұрын
Apko kaise malum isko hindi aata hai?
@paedrufernando2351
@paedrufernando2351 4 жыл бұрын
plagiarized the slide content from medium. com... master the Javascript interview. what is functional programming article by Eric Elliot
@pughums
@pughums 6 жыл бұрын
is she wearing combat boots?
@cyrax5628
@cyrax5628 6 жыл бұрын
pughums lmao
@thebrandteam1811
@thebrandteam1811 6 жыл бұрын
Object oriented programming only seems difficult or "buggy" for amateur and inexperienced developers. There is no one better way to program, it's the requirements of the system and maintainability that dictates your programming paradigm.
@mathiasmonstrey7434
@mathiasmonstrey7434 6 жыл бұрын
She never called it buggy, she said that functional programming eliminates a bugvector called state. If you don't have state, then it can't be a source of bugs. Nobody is perfect, so having one bugvector less is nice to have. Also not having a state makes it easier to test -> less bugs But yeah, I also still prefer OOP, but I don't start calling people amateurs or inexperienced if they prefer another paradigm.
@sivanagat9965
@sivanagat9965 6 жыл бұрын
Great talk .!!
@richtourist
@richtourist 6 жыл бұрын
(function(realm, leverage, resource) {return realm.append((leverage({"url": resource}))).share()} (hope, roleModelize, "Anjana Vakil")); Oh shit! After all that good will, I still managed to objectify her.
@kamalabuhenamostafa
@kamalabuhenamostafa 6 жыл бұрын
10 min lecture takes an hour, pretty kitty [too talkative girl] , take note for consideration [in future]...
@PythonPlusPlus
@PythonPlusPlus 4 жыл бұрын
What do we learn from this? Functional programming is absolutely pointless. Unless you just want to show off.
@zoverlvx8094
@zoverlvx8094 5 жыл бұрын
Great information. Horrible speaker. Congratulations, you're a female Marc Stiegler.
@abrahamjaimes7643
@abrahamjaimes7643 4 жыл бұрын
Pure garbage dont waste your time .....
@kloudmuka
@kloudmuka 5 жыл бұрын
I can't believe this speaker just used her talk material in JSconf 2016 and nearly added nothing new into it after 1 year, and what's worse is that she extedend the time of this horrible talk to nearly one hour.
@mohak1990y
@mohak1990y 7 жыл бұрын
I doubt she sits at one place and does the programming..😜
@KimHogeling
@KimHogeling 7 жыл бұрын
She does. Don't just make assumptions. Instead you could just ask her via twitter 😉
@alexnezhynsky9707
@alexnezhynsky9707 6 жыл бұрын
Kim Hogeling its ok to make assumptions.
@Sagitarria
@Sagitarria 6 жыл бұрын
Mohak Londhe, I doubt you can separate your biases around gender from your observation of their behavior. Exuberance is a mark of a good teacher and presenter. I'm really curious if you would see a good, male speaker and think the same thing.
@timmark4190
@timmark4190 6 жыл бұрын
There are many sitting in one place and yet does not understand Functional programming. So even if she dances she still is doing a great job
Why Isn't Functional Programming the Norm? - Richard Feldman
46:09
Кто круче, как думаешь?
00:44
МЯТНАЯ ФАНТА
Рет қаралды 6 МЛН
Do you love Blackpink?🖤🩷
00:23
Karina
Рет қаралды 16 МЛН
If people acted like cats 🙀😹 LeoNata family #shorts
00:22
LeoNata Family
Рет қаралды 16 МЛН
За кого болели?😂
00:18
МЯТНАЯ ФАНТА
Рет қаралды 3,1 МЛН
JavaScript Pro Tips - Code This, NOT That
12:37
Fireship
Рет қаралды 2,5 МЛН
Self Taught Coders Don't Exist | The Secret Sauce
32:47
The Secret Sauce
Рет қаралды 2,7 М.
Functional Programming in 40 Minutes • Russ Olsen • GOTO 2018
41:35
GOTO Conferences
Рет қаралды 819 М.
The Power of JS Generators by Anjana Vakil
36:10
JSConf
Рет қаралды 168 М.
Object Oriented vs Functional Programming with TypeScript
12:07
Functional programming design patterns by Scott Wlaschin
1:05:44
Ivan Plyusnin
Рет қаралды 193 М.
Douglas Crockford - Goto There and Back Again
59:06
HolyJS — конференция для JavaScript‑разработчиков
Рет қаралды 8 М.
Кто круче, как думаешь?
00:44
МЯТНАЯ ФАНТА
Рет қаралды 6 МЛН