Тёмный

Callback Hell | Ep 01 Season 02 - Namaste JavaScript 

Akshay Saini
Подписаться 1,4 млн
Просмотров 358 тыс.
50% 1

Callback Hell is one of the issues we face while writing Asynchronous code in JavaScript. Another problem that we face is Inversion of Control. This episode of Namaste JavaScript season the 2 covers Good Parts as well as the Bad parts of using Callbacks.
If you find this video helpful,
Please support me by giving a Super Thanks contribution to the video ♥️
If not by money,
you can also support this video series, by sharing it with your friends on Social Media. 🙏
I'll give my best to come up with great content and everything absolutely for free on RU-vid. 😊
Also, give it a thumbs up and subscribe to my channel for more such videos. 🔔
Link to Subscribe: ru-vid.com...
Cheers,
Akshay Saini
akshaysaini.in
Stay Connected:
LinkedIn - / akshaymarch7
Facebook - / akshaymarch7
Instagram - / akshaymarch7
Twitter - / akshaymarch7
#NamasteJavaScript #AkshaySaini

Опубликовано:

 

17 авг 2022

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 1,5 тыс.   
@akshaymarch7
@akshaymarch7 Год назад
Watch Episode 2 - PROMISE in JS - ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-ap-6PPAuK1Y.html What more topics do you want me to cover next in this series?
@itumandal22
@itumandal22 Год назад
Debouncing and throttling with example and when to use? Please cover these two topics as well.
@maheshbhat2049
@maheshbhat2049 Год назад
Please explain Classes and constructor(--prto--:object;null),Function object Prototype,Super
@akshay-kumar-007
@akshay-kumar-007 Год назад
design patterns (GoF) in JavaScript/TypeScript
@shaiksamiulla6923
@shaiksamiulla6923 Год назад
please explain design pattern in js
@nizamph2022
@nizamph2022 Год назад
explain "this" on java script
@mubasharali5409
@mubasharali5409 Год назад
Two issues while using callbacks 1 - Callback hell When a function is passed as an argument to another function, it becomes a callback function. This process continues and there are many callbacks inside another's Callback function. This grows the code horizontally instead of vertically. That mechanism is known as callback hell. 2 - Inversion of control The callback function is passed to another callback, this way we lose the control of our code. We don't know what is happening behind the scene and the program becomes very difficult to maintain. That process is called inversion of control. Thank you for making this series ❣️
@manumanu6321
@manumanu6321 11 месяцев назад
bro invertion of control is we giving the control to the another nested call back funtion
@sahilgupta9622
@sahilgupta9622 7 месяцев назад
Yup which increases the dependencies to other one
@rohandavid305
@rohandavid305 Год назад
was waiting more impatiently for season2 than Thanos did for infinity stones
@VK-lh7qc
@VK-lh7qc 7 месяцев назад
While using callback we face 2 issues which are as follows: 1. Callback Hell : When more than 1 APIs depend on each other to get call so then we pass the callback function inside callback function so it created nested callback function this makes our code less maintainable and readable this is callback hell. It also know as "Pyramid of Doom". 2. Inversion of Control: When we pass a callback function into another function then the execution of callback function is depend on that function so in this way we loose the control over our code this is know as Inversion of Control. Thankyou so much Akshay Saini Bhaiya for such a amazing video series of Javascript😊.
@joyyy439
@joyyy439 Год назад
Pro: JS is a single-thread language and is synchronous by nature, but with callbacks, we can make async calls. Cons: a. Callback hell - If we have many functions that need to be called, it is easy to fall into a callback hell - many callbacks chain together b. Inversion of control - We give the power to the function that calls our function, maybe that function will never be called, or something in their function makes our function be called twice. Thank you for your video! It is very engaging and informative! I didn't expect that I would stick to the end at first, but you did a great job!
@jagrutsharma9150
@jagrutsharma9150 Год назад
Glad that this series has started again.🤩🤩 Things learned: 1.) "Time, tide and JS waits for none" 2.) Callback function enables us to do async programming in JS. We use this for some functions that are interdependent on each other for execution. For eg: Ordering can be done after adding items in cart. So we pass cb functions as argument to functions which then call the cb function passed. However this causes some problems: a.) Callback Hell: When a callback function is kept inside another function, which in turn is kept inside another function. (in short, a lot of nested callbacks). This causes a pyramid of doom structure causing our code to grow horizontally, making it tough to manage our code. b.) Inversion of control: This happens when the control of program is no longer in our hands. In nested functions, one API calls the callback function received but we don't know how the code is written inside that API and how will it effect our code. Will our function be called or not? What if called twice? What if it has bogs inside it? We have given control of our code to other code. 3.) We will see the solutions in next episode.
@benedictbenny1117
@benedictbenny1117 Год назад
be more of a teacher's pet😇🤭
@jagrutsharma9150
@jagrutsharma9150 Год назад
@@benedictbenny1117 🖖
@typecjelly
@typecjelly Год назад
I'm still going through the first Namaste Javascript playlist and visited the channel for that. Seeing the season 2 was a very pleasant surprise.
@keerthanar9723
@keerthanar9723 6 месяцев назад
JavaScript is synchronous single threaded language, just do one thing at a time. The callback function do the asynchronous code in js. 1. Callback hell - Callback passed into another function as an argument and another function passed into the callback function as nested callback. So code go horizontally inside vertically. So the callback code as unmaintainable ans unreadable. It's also known as pyramid doom 2. Inversion of control - The callback function is passing to another function as an argument. So our callback function blindly trust the other function. Whether this will execute or not. Thank you so much for your brief and clear explanation 🤝
@gurpreetsandha9090
@gurpreetsandha9090 Год назад
Your teaching is so good that even a honeybee wants to learn JavaScript from you 😂😂
@shikharverma1253
@shikharverma1253 4 месяца назад
bzzzzzz
@kshitijnath
@kshitijnath Год назад
The two Problems with callbacks 1) Callback Hell: Callbacks are useful when we want to perfrom some extra functionality with our already existing function for example passing an error handling callback to our already created function, BUT when callbacks within themselves start taking in other functions as callbacks then that mess that you are left with is known as the Callback Hell leading to unreadable code, hence unmaintanable code. 2) Inversion Of Control: when we pass a function to other function as a callback we are giving the called function the control of whether to even call it or not or maybe call it in a wrong context. For example a success callback is called when an error occours inside a called function (maybe due to human error while writing the code for called function), this type of giving up of control over our functions is known as inversion of control.
@sudiptachakraborty1748
@sudiptachakraborty1748 Год назад
Thank you Akshay Sir for teaching us! Glad to see the season 2 of Namaste JavaScript😍 Callbacks are the functions passed to another function as an argument and it helps to write asynchronous operation in JS. When we are using callbacks, we face two issues: 1. Callback hell - When we have multiple dependent callbacks it will form nested callbacks, code will be unmaintainable and unreadable. This nested callback structure is also called Pyramid of Doom. 2. Inversion of control: We pass the callback function within another function, we are blindly trusting where we don't know whether that function will ever execute our callback function or not, it's so risky for a developer. We loose the control of our program.
@omprakashpandey4318
@omprakashpandey4318 11 месяцев назад
I am mechanical engineer, in Indonesia but Indian , have nothing to do with it but loved the way made it interesting, fearless and understandable to people like me 57years of age hard core mechanical All i have to say GOD BLESS YOU, YOU ARE GREAT
@BhavyaYadati99
@BhavyaYadati99 Год назад
I never watched any learning series with this excitement for a long time and without taking break. Thanks a lot Akshay Saini!!. Waiting for your next.
@vishaltanna8198
@vishaltanna8198 Год назад
Great to see you back!! ❤ Thank you so much for making it free for us. Cons of call back 1. Difficulty to understand / maintain code (specially if was done by our ancestors) 2. Completely, Loose control over our code..
@romibohmra8881
@romibohmra8881 Год назад
2 issues with callback: 1) Callback hell: If we have one callback function inside another callback and that is inside another callback and so on, then this is known as the callback hell. 2) Inversion of control: When we create a callback function, we give control to another function to call this callback function. We give the control of our piece of code to some other function, this is known as inversion of control. PS: Really loved the video and so happy that you're back with another season. Looking forward to the future episodes.
@RakeshSahu-cr9ks
@RakeshSahu-cr9ks Год назад
Thank you so much Akshay, you're the reason why we love Javascript as it is! The two problems we generally face when using callbacks are: 1. Callback hell -> When there is a dependency of 1 function in another, we pass the function as a callback function, but in many cases this might lead to passing callbacks into another callback functions so on and so forth, creating codes which are difficult to maintain, and read. 2. Inversion of control: When we pass our callback function into another function, we essentially loose the control over our callback function, as it is controlled by the function which is calling it and not us. Which is quite a big challenge, and might create several performance issues as we don't know how that function is behaving when called etc..
@sarthakbhatia7888
@sarthakbhatia7888 Год назад
The two problems that we faced in callbacks are:- 1) Callback Hell: Asynchronous operations in JavaScript can be achieved through callbacks. Whenever there are multiple dependent Asynchronous operations it will result in a lot of nested callbacks. This will cause a 'pyramid of doom' like structure. 2) Inversion of control: When we give the control of callbacks being called to some other API, this may create a lot of issues. That API may be buggy, may not call our callback and create order as in the above example, may call the payment callback twice etc.
@hemantagarwal5095
@hemantagarwal5095 Год назад
Do you mean interns only write bugs ? 😅
@Prashantsingh896
@Prashantsingh896 Год назад
“No interns were harmed while writing this comment“
@yogeshyts
@yogeshyts Год назад
@@Prashantsingh896🔷🔷😂😂😂😂
@yogeshyts
@yogeshyts Год назад
bhai ne to aankh bnd krke ratta maar liyaa interns bhi dal diyo defination m
@AbhishekKumar-lk2ei
@AbhishekKumar-lk2ei Год назад
bawa
@madhukesh_gaming_vlogging6300
The learning vibe comes in last , the kind of Music you take in last gives us another level of vibe ❤️❤️
@mayurjain2889
@mayurjain2889 Год назад
Great to see you back, I was eagerly waiting for your season 2 and many thanks to keeping it FREE !! Two problems we face for callbacks 1. Asynchronous calls can be achieved from concept called "callback" but when there are series/nested dependent callbacks one after another , which makes our code unmaintainable and leads to Callback Hell 2. Now we are achieving the asynchronous operation using callback. But when we give a responsibility to execute our written function to some other function as a callback, that moment we completely loose the control of our code and this is call as "Inversion of Control". Which is very dangerous
@abinashshasini577
@abinashshasini577 Год назад
Hi Akshay, I'm very thankful to you I'm a frontend developer having 2 yrs+ experience whenever a recruiter calls me to schedule an interview first thing that comes to my mind is your playlist 🤣🤣🤣 Thank you for this kind of informative video.
@SaifiCode
@SaifiCode Год назад
@Text me on Telegram sure karta hu
@shubhamjain8130
@shubhamjain8130 Год назад
I completed the first series yesterday, and getting the 2nd season just next day is super surprise.😁 I am able to see the difference in myself while solving the coding questions and quizzes of javascript now after completion of 1st series. One of the best series on javascript core concepts.
@VandanaSharma-ec6zl
@VandanaSharma-ec6zl Год назад
sir i am a trainee at function up and recommending this series to every other trainee i encounter. I really admire your efforts. Can't thank you enough.
@sarveswaranthangaraj912
@sarveswaranthangaraj912 Год назад
I like how excited you are, bro! Please keep it up :) First, it's Callback hell, and it was named appropriately. When we try to solve interdependent tasks using callback functions, we end up creating a nested callback and when we try to dry run the code or to update it, we'll ending praying Luci to save us. The second is, just a repetition of a mistake that we do in daily life, yeah losing or giving our control to someone else, trusting them out of nowhere. I was surprised to see even codes aren't excluded from trust issues. (don't trust "blindly", especially someone or something digitally)
@kirtikhohal5025
@kirtikhohal5025 Год назад
not only your explanation is amazing, the example that you chose for explaining that e-commerce was so swift to understand, thanks for existing.
@sankalparora9374
@sankalparora9374 11 месяцев назад
Thanks for Existing... I like it.
@amankushwaha8180
@amankushwaha8180 Год назад
please complete this series your teaching style is awesome
@sanchitraghuwanshi5759
@sanchitraghuwanshi5759 9 месяцев назад
Sir by just watching namaste Javascript series I cracked my technical interview. Thank you so much sir for making this amazing content.
@sergiisechka1993
@sergiisechka1993 Год назад
1. multiple calls inside each other make code unmaintainable and some sort of unpredictable 2. you're giving the control of function to another function that calls another function thank you Akshay! You are one of the best
@shubhis2466
@shubhis2466 Год назад
From basic JS to advanced, I have learned it all in a better way through your NJ series. Thank you so so much. ☺
@iamshahid
@iamshahid Год назад
Two problems we face while using callbacks: 1) When we are dependant on our previous operation to run the current one, we use callbacks. If we use callbacks multiple times in a same function that grows horizontally instead of verticall this is called a callback hell. The structure is called callback hell. It is very6 hard to maintain. 2) When we pass a function as a callback, basically we are dependant on our parent function that it is his reponsibility to run that function. This is called inversion of control beacuse we are depenadant on that function. What if parent function stopped working, what if it was developed by another programmer or callback runs two times or never run at all.
@gb18363
@gb18363 5 месяцев назад
Your 2 more minutes are never 2 minutes, but love the way you teach and make things understand, which makes us want to watch more. Thanks😀
@SanketDeb
@SanketDeb 3 месяца назад
The two issues we face while using callback - 1.Callback Hell - When a function is passed as an argument to another function and this process continues making each callback dependent to the other and so forth, this leads to the horizontal growth of the code instead of vertically making the code unreadable and unmanageable, this is known as callback hell. 2. Inversion of control - When we pass one callback function is passed as an argument to another callback, we effectively give away the control of our code to the function upon which it is passed as an argument, in this we don't know the behind the scene of the other callback and don't have any control over it, this situation is known as inversion of control. Thank You for teaching with so much enthusiasm.
@oqant0424
@oqant0424 Год назад
was struggling with callback since last 3 days.....came to your video...finally understood everything in just 15 mins....thanks for making it so simple
@saoudahmedkhan2549
@saoudahmedkhan2549 Год назад
Dear aksha.. its seems like i was listening a story. And its all goes in my mind, thanks for helping mid level devs.. love from Pakistan
@sruthimohan5243
@sruthimohan5243 Год назад
Two Issues with the Callback , 1. Callback hell: Having multiple callback functions under a module , making the code unmaintainable and there is always a chance of breaking functionality. 2. Inversion of control : Giving the control of an important sequence to a function which might fail to execute the callback function and we might not know if that would do the needful .
@629_nishantghadigaonkar3
@629_nishantghadigaonkar3 Год назад
The two problems with Call back are : 1. Call back hell : Here we pass one call back function into another and that call back into another, thus creating an unreadable and unmaintanable code. This is also known as pyramid of doom. 2. Inversion of control : Here we pass call back into another function. This leads to loss of control of our code. Control moves to the other functon where we used call back. Thank You Akshay !
@nikhilkamble3034
@nikhilkamble3034 Год назад
thanks
@rohinisunitha8101
@rohinisunitha8101 Год назад
Hi Akshay, the two issues of call backs are 1) callback hell: we are creating many nested callbacks in code that we cannot handle .2) inversion of callback: we are depending on callback so much that we don't have control over the code .
@thetechrakshit
@thetechrakshit Год назад
Dear Akshay, thank you very much for all your efforts. Through this comment I am trying to express my gratitute from the very bottom of my heart. Your videos, especially NJ series has helped me learn so many thing in depth. I have eventually cleared interviews also. Although I have no tech degree, but I managed to crack multiple company rounds and finally going to a software engineer. Thank you very much for all the initiative you have taken. I am sure, many others like me has received massive help from your content. Once again, thank you very much. Lots of love and respect. Keep up your good work.
@akshaymarch7
@akshaymarch7 Год назад
Congratulations brother, and thank you so much for your beautiful comment. ♥️
@nishantgautam5742
@nishantgautam5742 Год назад
We love you, Akshay Bhaiya. I am also from different background which was in Electrical Engineering. But at the time of the covid pandemic, I decided to switch my field to IT Sector. I was completely on the scratch level. But after attending your playlist I feel that there is no need for any pre-background of coding. You are one of the best teacher in my life. You have done your mission that you made us fall in love with javascript. 🤩🤩🤩😍😍
@shilpi919
@shilpi919 Год назад
Time ,tide and javascript waits for none, 😂 really funny😂😂 appreciate your way of presenting things , your videos really helps in logic building
@prasadsawant7
@prasadsawant7 Год назад
1) We create a lot of callbacks inside other functions, which makes our code grow horizontally and it seems like Pyramid of Doom. i.e. Callback Hell 2) By passing multiple callbacks into multiple functions respectively, we lose our control over program. Meaning after passing callback to other function then it is upto that other function when it'll call the callback or maybe it won't even call the callback i.e. Inversion of Control
@owensechrist1315
@owensechrist1315 Год назад
Love this channel!!! I've been working my way up to async, can't wait for your explanation!! Homework: 1. When we pass a callback function to an API, we lose control of the execution of our code since we don't know if/how that function will be executed and handled outside our own code. 2. If our code is trying to accomplish something that is dependent on a certain flow of executions, we can end up with callbacks inside of callbacks inside of callbacks, which makes it difficult to understand what is happening.
@amitperane1302
@amitperane1302 Год назад
Its 1AM Feeling soo sleepy and even I know Callback Hell... But still watching bcoz it's Akshay Saini....😍😍😎😎
@syedarfeen9526
@syedarfeen9526 Год назад
Hi Akshay, I'm very thankful to you I have cleared my interview by just watching your Namaste JavaScript season 1 I'm Pakistani and I really appreciate your efforts. Thank you once again 🤩🤩 Divided by border United by YT channel 😅
@akshaymarch7
@akshaymarch7 Год назад
Wow, congratulations Syed. ❤ Love from India 🇮🇳♥️
@vik_ruh
@vik_ruh Год назад
@@akshaymarch7 hello sir, someone was fooling me, by being you . asked me to invest in bitcoins. i had a doubts on javascript and node.js thats how he connect with me
@rohitkr.6408
@rohitkr.6408 Год назад
@@vik_ruh Yah same here
@nid30
@nid30 Год назад
@@akshaymarch7 When is your next video on Promises getting uploaded...??? Eagerly waiting and can't keep calm anymore!!!! 🤩🤑🤩🤑🤯😵🤯😵
@mahirvahmad2149
@mahirvahmad2149 Год назад
Thank you for the great class. 1.Tthe main issue of callBack is callBack hell. call one function into another function will help you if there is only one call back function, but chain of call back functions will lead to call back hell that's called pyramid doom. 2. Inversion of Control : as name says the control of the function might be inversion some cases and it will affect the overall performance of the app/website
@mithileshpatel4398
@mithileshpatel4398 Год назад
Thanks Akshay, these videos are very helpful for us. I am out of words for your appreciation, and having a happy and smiling teacher like you is cherry on the cake. Keep smiling always.❤❤😇😇
@neerajshende8373
@neerajshende8373 Год назад
Callbacks: Super important feature in JavaScript that helps us achieve asynchronous behaviour in JavaScript. There are 2 problems that comes with callbacks: 0. Callback Hell: It is the code structure where there is callback function, inside other callback function, inside other callback function..... And our code starts growing horizontally instead of vertically. This is also called as 'pyramid of doom'. Because of this type of structure, our code becomes really difficult to maintain and manage. 1. Inversion of control: When using callbacks, we often loose control of our callback function and relies on the other function to execute our callback function. The function on which we rely to execute our callback function can be buggy, or can have different issues which prevent our callback function to get called.
@shilpesaxena8783
@shilpesaxena8783 Год назад
Two issues of callbacks are: - 1) Callback Hell: callback inside callback and a lot of nested callbacks and the code becomes unmaintainable. 2) Inversion of Control: lose control of the program, which means we gave out our function to some other function and we don't know whether the function will ever execute our function or not.
@bikashneupane2
@bikashneupane2 2 месяца назад
2 problems using callback: 1. Callback hell: This is where there are multiple nested callback functions which makes code difficult to maintain/read. 2. Inversion of control: When we call another callback, we give control of our function to that callback function and we cannot be sure if that callback function will ever be executed or not. PS. Understanding alot from Namaste JS course. Thanks alot
@krishmabhatia696
@krishmabhatia696 Год назад
Thanks Akshay for providing such wonderful series that too free of cost.Please create series on nodejs as well explaining express middleware and other nodejs concepts that can help us become full stack developer.
@anejasahil
@anejasahil Год назад
Two problems that we face due to the callbacks are:- 1) Callback hell: when we use have to do a lot of tasks one after other using asynchornous operations , we use callbacks but as we have to do a lot of asynchronous operations we have to write to write so much callbacks insdie one another.This situation is called callback hell. THis is because the code loses its readability and we are writing a tower of dom 2) Inversion of control: using callbaclks means that we are passing our functions to another fucntion , lets say a api , how this api is maintained can't be known by us , so trust the higher order function that it will take the callback and call it properly , which can't be the case.Hence we wer are trafereing the conrol of our code to some other code.Hence we are losing the control of our application , so this is referd as inversion of control
@vimalkumar-zz6pn
@vimalkumar-zz6pn Год назад
callback hell: callback is a way to write asynchronous code in javaScript but the problem of call back hell arises when we nest a callback inside other callback. Due to which a pyramid of doom get created and it make our code very hard to manage. Inversion of Control: Due to the interdependence of one callback on another we might loose control on our code. Thanks @Akshay Saini bhai ❣❣
@shreyakolekar4059
@shreyakolekar4059 9 месяцев назад
Thank you Akshay Saini for this amazing content! Super excited for season 2. More power to you Sir!
@niteshwadhwani18
@niteshwadhwani18 Год назад
Time , Tide and JavaScript waits for no one but every one is waiting for new episode to come out.
@anshikapathak4422
@anshikapathak4422 Год назад
Hello aksay everyone is recommended you please keep making everything on js and it's my request don't disappear. We need you here on you tube on a serious note. I want to be a developer but you will be here journey will be so easy for us. Please 🥺
@krishmabhatia696
@krishmabhatia696 Год назад
Please release more videos on JS covering topics like inheritance,this keyword and other key topics in JS.Once again thanks for making this wonderful series free of cost for all :)
@sarthakkrishna3492
@sarthakkrishna3492 Год назад
Bhai yaar kya hi padhaate ho aap! Thank you so much for coming back!
@sai-lc8xh
@sai-lc8xh 24 дня назад
Thanks alot akshay for making this series. JavaScript is generally syncronous single threaded language. In order to bring asynchronous nature in to our code we can use callbacks. But there are two issues by using this callbacks. 1)Callback hell:- when we are having multiple tasks which are interrelated to one another we'll pass one callback function to another callback .When we use multiple nested call backs then code will grows horizantally (The structure formed by this multiple nested call backs is also know as "Pyramid of Doom").This growth of nested call backs leads to callback hell. This callback hell makes our code unreadable and unmaintainable. 2)Inversion of Control:- When we pass one callback to another function/callback then the callback that we passed is depended on the function to where it is being passed.This may results in losing our control over the code.And there is no guarantee whether the function will execute the callback.This kind of interdependency which results in losing our control over the code is nothing but Inversion of Control.
@MicroRishi
@MicroRishi Год назад
2 issues: 1. Callback hell - Calling external methods / api in nested order. It leads to vertical expansion of code which is very hard to maintain. 2. Inversion of control When passing functions in function (method), we hand over the control of the passed functions, i.e. the method will control the logic for function execution, which is very deadly ☠️ Hope to find solutions in episode 2 🤩🇮🇳
@MujammilShaikh4091
@MujammilShaikh4091 Год назад
Thank you @Akshay Saini, for the incredible 'Namaste Javascript' playlist!🔥 It played a pivotal role in helping me secure an 8LPA job as an Associate Web UI Developer🎉. I am truly grateful for the valuable content you provided 🙏
@Rafi-cu6gf
@Rafi-cu6gf Год назад
Ohh where are you working
@diviyasundarajamoorthy7250
@diviyasundarajamoorthy7250 Год назад
Dear Akshay, I love your energy and thank you so so much for explaining super clearly. Keep up the great work.
@palma675
@palma675 Год назад
I have been struggling to understand callback function but this genius here explained in a way that even a baby would be able to understand it, so thank you very much. New subscriber!
@atulbihari7494
@atulbihari7494 Год назад
"Callback means, i will call you back later" 1. A callback calling another callback and again another callback calling another callback i.e nested of callback, in other word one callback output pass as an input of another callback so if one callback fails then breaks it down all the other callback after that. 2. Definitely it will unreadable and un maintainable of code and difficult to understand.
@jayashrishinde9692
@jayashrishinde9692 Год назад
This is going to be more addictive than Netflix series🤩🎉 loved the content. Thanks man.
@inderpreetsingh4176
@inderpreetsingh4176 3 месяца назад
H/W is done: Well explained the 2 issues mainly occur in callback 1. Callback Hell: When a situation where one callback inside a callback is being called. 2. Inversion of control: where we do not have control on the callback function
@aditisrivastava133
@aditisrivastava133 10 месяцев назад
Issues while dealing with callbacks :- Callback Hell - Also known as Pyramid of Doom. This type of problem mainly occurs while handling nested callbacks(callback function inside another callback function ...). In this one cb execution depends on another cb leading to a pyramid like structure. In this our code grows horizontally than vertically. Inversion of Control - Such kind of issues mainly arise when we lose control of our program due to interdependency of one callback on another. The function on which we rely to execute our callback function can have issues which refrains our callback function to be get executed.
@siemen_subbaiah
@siemen_subbaiah Год назад
I think season 2 will be mostly focused on the asynchronous behaviour of JavaScript.
@shubhammuniyal4381
@shubhammuniyal4381 Год назад
I think this video was made 6 days ago and now it's gone public. Anyways great video
@omkardeshmukh1942
@omkardeshmukh1942 4 месяца назад
Thank you so much for the video. So today we learned about 2 things, first how callbacks are important and second why they cause problems in programming. 1. Why callbacks are important? Callback provides a way to handle async operations in javascript like reading a file, loading an image, etc. Callbacks are executed after the async operation is completed. This makes it possible to still have control after an async operation. That's why they are super important 2. why callbacks can be evil? There are mostly two reasons for this namely: i) Callback hell: Sometimes async operations are dependent on one another. The way to handle them is callbacks. Due to this reason, as we saw in the example above, code becomes very complicated and hard to understand. That's why we should avoid callback hell. ii) Inversion of control: We somehow depend on the earlier function to call our callback function, but we cannot be sure whether the function is correctly calling our function or not calling our function or calling our function twice. We also need to avoid this problem.
@dinudhane
@dinudhane Год назад
Hi Akshay.. Thank you so much for the amazing explanation. Two problems of the callbacks are, 1. call back inside another call back makes nested callbacks which make the code unmaintainable. 2. inversion of control - we lose the control of functionality since control of the functionality is blindly given to another function.
@jatinparashar5929
@jatinparashar5929 Год назад
Don't put one video and just take such a huge break. It'll be better if you shoot a few and then upload them so that the waiting time isn't this long. Your talent and knowledge is amazing but this management and engagement is poor. You shouldn't have announced in the first place if it's not even beginning properly
@coding7909
@coding7909 Год назад
akshay why did you disappear again when you promised us with more videos on JS
@hiteshsuthar1097
@hiteshsuthar1097 Год назад
Callback is a function that is executed after another function has completed its execution. Or, Callback is a function which is passed as an argument in another function and invoked inside the outer function to complete some action or operation. When it is called immediately, it's called as Synchronous Callback Function. And when it is called after completion of an asynchronous operation, it's known as Asynchronous Callback Function. Callbacks are often used for handling asynchronous operation, their output depends on outer resources and takes some time for it. There are 2 issue mainly when using callbacks. a) Callback Hell b) Inversion of Control
@bhavikadwivedi9879
@bhavikadwivedi9879 10 месяцев назад
Callback have two issues : 1. CALLBACK HELL : In this process function call another function and that function call some another function and this process continues multiple time and which make it unreadable and unmaintainable and grows the code horizontally instead of vertically 2. INVERSION OF CONTROL: In this process we loose the control where the call back function is being executed or what is happening behind the scenes . Thanks for the good explanation and clearing the doubt why we need promises
@patelrajkumarnareshkumar8156
Akshay bhaiya is back with a bang! Issues with callbacks 1) It reduces the code readability, as over time it becomes a tedious task to rework those codes. 2) single point of failure.
@nancy5829
@nancy5829 Год назад
Totally in love with your content and the way you present it!! Excited for further videos😍
@AkashVerma-dx1er
@AkashVerma-dx1er 17 дней назад
Two problems with callback exists are 1. Callback hell/pyramid of doom-so many nested callback function can led to decrease in readability of the code and makes the code more confusing 2. Inversion of Control-if means to lose the control of the code from the user which can led to error or non execution of some part of the code because it is handled by some callback function and not by the user.
@shadabhussain147
@shadabhussain147 Год назад
Sir, I love how you teach. You make every concept crystal clear in our heads. Please create videos on NodeJs also.
@namishnandverma4558
@namishnandverma4558 11 месяцев назад
First reason is it makes to grow code horizontally instead of vertical. Second reason is blind trust on another function , that will execute and take care of execution.
@floatingcloud5955
@floatingcloud5955 Год назад
I was so lucky i Just started to learn JS 3 days ago , accidentally clicked eventloop video end up watching all the episodes of season 1. in this 3 days i spend most of time in learning js and reading article about js it look like i am addicted to Learning js i can't stop myself.
@xx_kyon
@xx_kyon 5 месяцев назад
Hands down the best teacher we ever had on RU-vid. Thank you Akshay, you have no idea (actually you do have) of how many new developers you developed with your classes :')
@poojamahtha2780
@poojamahtha2780 5 месяцев назад
100% ..He is the Best ... His broad smile and his energy are so contagious 😀😀
@akshaykale5150
@akshaykale5150 Год назад
First of all, thank you Akshay sir for this new season 🙏❤️. I was waiting for this .... I humbly request you, to create some videos on OOP with JS 🙏🙏🙏
@utuberyder
@utuberyder Год назад
Understood it, Loved it. Two problems: 1. Callback hell -> Pyramid of dooms -> Unreadable / Unmaintainable code 2. Inversion of control -> While passing a function as callback we are trusting some unknown API for our callback execution which might or might not happen, which is dangerous.
@honeykhra
@honeykhra Год назад
You are one of the best coding teachers I have come across Simple explanation of complex topics
@soumyaranjan580
@soumyaranjan580 10 месяцев назад
The explanation was so Good that i forced myself to make notes :- So the two issues of callback are-: 0-callback inside another callback makes our code very much unreadable and unmaintainable which also makes our code length increase horizantly which is called as Callback hell. 1-losing control over a function(inversion of control) :-passing function inside another function makes us lose the control over it which sometimes can be risky.
@ritikgoyal3903
@ritikgoyal3903 9 месяцев назад
1. Callback Hell When we have a large code base and in this there are so many APIs which are dependent on one after the other then this situation makes it callback hell and it is unreadable and unmaintainable. It is also known as pyramid of doom 2. Inversion of control It means loose the control of code while using callbacks means when there are so many callback function one inside other and it gives the control of one function to another and it don't know what is happening behind the seen then this situation is called inversion of control Thank you so much for providing such type of videos which is very helpful for me for placement preparation and i learn all the thing from basic to deep. Please providing the videos for node.js to make it more strong.
@saiadusumilli2064
@saiadusumilli2064 2 месяца назад
callback : passing a function as an argunment to the another function.this process continues as their callbacks many callbacks inside .which increases code horizontally and vertically.it is difficult to maintain code .this is called callback hell inversion: when function is passed an argument to the another function which is a callback .here we lose control of our function to another function. we don't know what's happenning behind scene. so this is inversion of control i love the way you are teaching❤🔥
@nehruclasses9303
@nehruclasses9303 10 месяцев назад
so far I understood about callback from this video, 1. Callbacks are very important concept in javascript. Callbacks are very helpful in handling asynchronous programming. 2. Call back hell is that which is called by another function. the risk of using call back is that if the parent function has any error, the child function won't execute.
@berd23
@berd23 Год назад
Thank you Akshay for your hard work which helps a lot of developers, you are one of the best teachers
@user-kq1kk8nl3i
@user-kq1kk8nl3i 11 месяцев назад
A function passed as a argument of another function is called Callback function. It is very powerful ways to enable Async operations in Javascript. But generally we face two major issues while using Callbacks 1. Callback hell 2. Inversion of control 1. Callback hell - It is a big nested callback, like pyramid structure. It is very bad in reading of code and bad to manage code too. 2. Inversion of Control - sometimes we lost controls using callback function while using external functions (from library or framework or from apis). We don't really know it is 100% working and bug free but we trust that function. Sometimes goes good but in few cases it goes very bad due to somebugs. Thanks Akshay bhaiyya love you ❤. Can I get a heart from you 🥺
@user-xm1cp3lx3l
@user-xm1cp3lx3l 6 месяцев назад
Hi Akshay Sir Ji. In this Episode I learned 1. Call Backs Means ( JavaScript execute Code line by line sequence way so we call - Synchronous Single Threaded Programming Language.. If Perform Delay of Execution our code we use Call backs- Asynchronous way Execution We use call back . 1. JavaScript methods can utilize call backs to perform asynchronous operations. For instance, the setTimeout function can be used to call a function after a specified delay, as shown in the example below: setTimeout(function(){ console.log("Good Trainer Akshay Sir")},5000) 2. When using call backs, there are two main issues that can arise when dealing with the call stack: A) Call Back Hell: This occurs when multiple nested call backs are present within a function, leading to code readability issues and a large amount of code. B) Inversion of Control: In this scenario, a callback function is passed as an argument to another function, resulting in the loss of control over the code flow and the potential for improper code maintenance. Thank you, Akshay Sir, for providing us with in-depth knowledge for aspiring software developers. Your guidance is greatly appreciated!🤩🥰😍
@anandsuryawanshi9911
@anandsuryawanshi9911 11 месяцев назад
superb explination ! Two problems are : i. call back hell : due to nested calling of callback functions code starts to grow horizontally insted of vertically so this happens. ii. Inversion of control : we can loose control over our code as we pass our important code / functions / any other snippit to some api or any function by trusting that api that it will run properly and will work as expected.
@bhagyashreekhairnar683
@bhagyashreekhairnar683 Год назад
Thank you once again for a superb video !!! a very imp topic and made simple by you!! 1. liked your video 2. HW answer: a. call back hell - nested callbacks tend to increase the length of the code horizontally instead of vertically; the code thus become hard to read and there are more chances of dveloping a buggy code and b. Inversion control - the control to call the callback is given to another function and this inversion of control is risky as we rely on function to call the callback.
@kaminithakur6587
@kaminithakur6587 Год назад
Just finished first season 1 and love it a lot more than the Netflix web series 😄. Thank you so much it helped me a lot .
@saqibidrees4655
@saqibidrees4655 Год назад
I learned this from video. 1- we can achieve asynchronous programming using callbacks. 2- we can ran into callback hell, Mean Deep nested callback calls. 3- we also loose control over function call when we pass function as a callback. Because now other function has control over it. I may never call this function or call it twice. we can't be assure about it.
@ParusStyleCorner
@ParusStyleCorner Год назад
Sir please upload the next episode of this series( how to overcome the Callback hell i.e promises), i watched many videos on promises but still does not get clear idea how promises helps to deal with the callback hell problem. I always watch n refer your videos whenever want to clear my doubts n to have better understanding of the concepts. i feel blessed that i came across your channel. Thanks a lot for your time and the efforts u give in all the videos. you are AHHH...MAZINGGGG
@deltechdiaries5907
@deltechdiaries5907 Год назад
very few people understant js in depth, and out of those few, very few explain those concepts in detail. you are one of those few
@mahabaskaran6359
@mahabaskaran6359 Год назад
Thanks a lot Akshay for season 02. Looking forward for Promises, async await videos. What we learnt from this video: Importance of callback: callbacks can be used to achieve async behaviour. For Example, if some piece of code B has to be executed after the execution of A then we can go for callbacks. Issues: 1. Callback hell Callback within callback results in horizontal structure of code instead of vertical. So this is resulting in callback hell. 2. Inversion of control Instead of our code having control, we are giving the control to the caller of callback function. We never know whether caller will ever call the callback or whats the implementation over there.
@kedarnath435
@kedarnath435 Год назад
thanks Akshay for the new Season. Your every single step is helping JavaScript community knowledgeable, stronger and conceptually advance. The common issue of Callback: 1. Callback Hell: this is basically nested functions with different purposes, which are dependent on each other. That makes our code error prone and unmaintainable. 2. Inversion: this make one function to dependent on other. In this case if any error appears in one function that may impact our all the dependent methods and it sometimes tedious to find the issue. From which piece of code creating issue. Kindly correct me if I made any mistake. Thanks once again for your contribution for the JS community.
@ravikanna1837
@ravikanna1837 Год назад
Thanks Akshay for getting subject more clear , Call back will help to make async operations in javascript where javascript is a sync programming language and with using call we have 2 issues 1. Call back hell(pyramid of doom) 2. Inversion of Control
@ravikanna1837
@ravikanna1837 Год назад
@Text me on Telegram how to text you in telegram broo
@sahersiddiqui6925
@sahersiddiqui6925 Год назад
Hello Akshay, I have been watching you series of javascript videos and it helps me a lot in understanding it also in clearing the interviews. So now I will explain the two problems with the callbacks. 1. Callback hell which means callback inside callback that will make our code complex. 2. Inversion of control means to lose the control over the code as we are dependent on the function to call our callback function which is very risky while writing the code.
@k.ashutoshbaitharu3964
@k.ashutoshbaitharu3964 Год назад
Callback Hell leads to multiple callbacks nested together which could lead to confusion and unmaintanable code(pyramid of doom). Inversion control happens we pass the callback to another function without knowing that if that other function will ever execute or has any bugs. Callbacks are a way of handling asyng operations in JS.