Excellent tutorial. It is very easy to understand JS Promises by watching your videos witch some good examples. Not seen anyone the way Daniel enjoys his teaching. Thank you.
Try and catch is really good for server and database operations, like when you try to connect or grab data. Stuff that is out of your control and has a chance of throwing errors no matter what. So ya, pretty much exactly what you're doing. In these situations you can never use them too much. I came here to see what a promise is, didnt really get my answer though.
Correct and forgive me if I'm wrong - but is the try/catch even necessary in this use case? Try/catch is used to catch errors, including those you might not expect. In this case, the error we are preparing for is if: results[ i ].image === null. But we handle that in the .then block by just not drawing the image if that happens, thus avoiding the problem altogether? I might be misunderstanding
lol that was funny !img === null. I started laughing the moment he did that but great comeback missing on lunch. When I am doing the demo and screen sharing i can use that line lol
4:49 you know it’s always funny when you watch tutorial where the guy has excellent understanding of development but they still make this kind of mistakes 😂
Did you ever make any tutorials on how to have something running async and something else running at the same time (like the loading bar) I'm trying to run a brute force computation and draw the most recent part of that to the screen, I think I'd like the brute force to run in a loop over and over async without having to worry about the draw FPS but I'm not sure how to do this. As it stands without the async I have to put the brute force inside the draw and either the draw doesn't run at the given frame rate or the brute force is slowed (it can only do a certain number of iterations per frame)
Varun Bhalla A teacher that doesn’t know that a catch after a try is compulsory.. Sorry for being a critic, but that says something about his experience. It’s a nice man anyhow.
Dan.. I was looking at you p5.js introduction videos, which mention the p5js ide. But does that still exits? Which ide are you using here? .. sorry if that’s a stupid question
The IDE I reference in my intro video no longer exists, however, a new one is coming out this summer. Stay tuned! Here is my current workflow: ruclips.net/video/HZ4D3wDRaec/видео.html Also: sublime text: ruclips.net/video/UCHzlUiDD10/видео.html atom editor: ruclips.net/video/d3OcFexe9Ik/видео.html brackets: ruclips.net/video/nmZbhManVcY/видео.html codepen: ruclips.net/video/5gfUgNpS6kY/видео.html
hey guys, can you tell me where i should start watch this you tube channel as you know it has so many contents. . i want to follow this one so .. . where is point of start??
Try either of these playlists to start from scratch! ruclips.net/user/shiffmanplaylists?view=50&shelf_id=14&sort=dd ruclips.net/user/shiffmanplaylists?view=50&shelf_id=2&sort=dd
That try catch is a last resort is just nonsense. It’s a key aspect of object orrientated programming. If you have a function that calls a function that calls a function, and that last function produces an error, you can just say throw new exception. All the 3 layers of functions will stop running and in the top function you can catch the error. Lesson you learn from this: Don’t trust oneliner statements from random people without them mentioning a source of information.
Than again, especially in .NET try catch will perform really shitty, so its not a use or dont use scenario. But rather that you consider when to use it so that it makes sense, rather than just sticking to the convention of black or white.
I use try/catch all the time I've written lots of internal cmd utilities for the company I work for. Errors are bound to happen, is just life, a try/catch is the most sane way to let the program keep going without crashing. I think what the chat meant is that not every situation needs a try/catch, of course you can have plain exceptions but well errors can be handled a thousand different ways. Try/catch is perfectly fine for every day use, I agree is nonsense to say limit how you use them.
I find that most examples online, although they demonstrate certain features and how-to wire them up, almost always they show how NOT to code in a professional way! I hardly ever see examples of exactly what professional developers would actually put into production code of the software they develop! That is severely lacking in the teaching world! If it's not the way you would code a professional made software yourself, then DON'T TEACH IT!!!
Great, crystal clear as usual and so fun, it’s really a pleasure to learn with you
Excellent tutorial. It is very easy to understand JS Promises by watching your videos witch some good examples.
Not seen anyone the way Daniel enjoys his teaching.
Thank you.
Top notch, Daniel!! Thank you so much. This series cleared up a lot about promises for me.
Try and catch is really good for server and database operations, like when you try to connect or grab data. Stuff that is out of your control and has a chance of throwing errors no matter what. So ya, pretty much exactly what you're doing. In these situations you can never use them too much.
I came here to see what a promise is, didnt really get my answer though.
At 5:00 I think you were going for *if (!(results[i].img === null))*
Promises was second confusing thing for me after recursion. Now I got one, I feel so powerfull now.
Correct and forgive me if I'm wrong - but is the try/catch even necessary in this use case? Try/catch is used to catch errors, including those you might not expect. In this case, the error we are preparing for is if:
results[ i ].image === null.
But we handle that in the .then block by just not drawing the image if that happens, thus avoiding the problem altogether? I might be misunderstanding
I always love the videos because they are up beat and they always teach a lot
the most amazing thing with your videos is i enjoy and get to laugh a lot :D
Thank you for this series on promises. It's great.
I love the coding train
You deserve a big like, as usual !
lol that was funny !img === null. I started laughing the moment he did that but great comeback missing on lunch. When I am doing the demo and screen sharing i can use that line lol
Any good examples of when it is appropriate to use try..catch then?
Python, C++ and C# make use of exceptions as well.
Hey, new subscriber ♥ Understood you perfectly.
Best tutorials
Your videos are amazing, thanks for this
Thanks, Daniel!
Can you please share the github link for your Javscript Promises playlist's (Code implementation)
4:00 you can use try finally without catch
Great videos! Thanks!
4:49 you know it’s always funny when you watch tutorial where the guy has excellent understanding of development but they still make this kind of mistakes 😂
Very nice videos. Can you talk about how to implement streams in returning promises so that I can handle promises not at once?
Very useful videos , your way of learning is the best !! Please post the source code of these videos my friend .
I love this man.
Gabriel Jiménez You are handsome. Do you have an IG? LMBO😂😅
Did you ever make any tutorials on how to have something running async and something else running at the same time (like the loading bar)
I'm trying to run a brute force computation and draw the most recent part of that to the screen, I think I'd like the brute force to run in a loop over and over async without having to worry about the draw FPS but I'm not sure how to do this. As it stands without the async I have to put the brute force inside the draw and either the draw doesn't run at the given frame rate or the brute force is slowed (it can only do a certain number of iterations per frame)
Best teacher
Varun Bhalla A teacher that doesn’t know that a catch after a try is compulsory.. Sorry for being a critic, but that says something about his experience. It’s a nice man anyhow.
@
Richard van Pukkem
Have you even watched other videos on this channel? Dan is a genius with tons of experience.
Dan is the archeytypal Dunning-Kruger coder.
We still love him
Hey, can you let me what is a "strict mode" cuz my code is not working.
best ever
16.15 and 16.16 are out of order in the Topics of JavaScript Playlist
Dan.. I was looking at you p5.js introduction videos, which mention the p5js ide. But does that still exits? Which ide are you using here? .. sorry if that’s a stupid question
The IDE I reference in my intro video no longer exists, however, a new one is coming out this summer. Stay tuned! Here is my current workflow:
ruclips.net/video/HZ4D3wDRaec/видео.html
Also:
sublime text: ruclips.net/video/UCHzlUiDD10/видео.html
atom editor: ruclips.net/video/d3OcFexe9Ik/видео.html
brackets: ruclips.net/video/nmZbhManVcY/видео.html
codepen: ruclips.net/video/5gfUgNpS6kY/видео.html
Can you make a topic on using RxJS observables and subscriptions? Thanks.
Then what is the best solution for the promise.all
hey guys, can you tell me where i should start watch this you tube channel as you know it has so many contents. . i want to follow this one so .. . where is point of start??
Try either of these playlists to start from scratch!
ruclips.net/user/shiffmanplaylists?view=50&shelf_id=14&sort=dd
ruclips.net/user/shiffmanplaylists?view=50&shelf_id=2&sort=dd
That try catch is a last resort is just nonsense. It’s a key aspect of object orrientated programming. If you have a function that calls a function that calls a function, and that last function produces an error, you can just say throw new exception. All the 3 layers of functions will stop running and in the top function you can catch the error. Lesson you learn from this: Don’t trust oneliner statements from random people without them mentioning a source of information.
Than again, especially in .NET try catch will perform really shitty, so its not a use or dont use scenario. But rather that you consider when to use it so that it makes sense, rather than just sticking to the convention of black or white.
I use try/catch all the time I've written lots of internal cmd utilities for the company I work for. Errors are bound to happen, is just life, a try/catch is the most sane way to let the program keep going without crashing. I think what the chat meant is that not every situation needs a try/catch, of course you can have plain exceptions but well errors can be handled a thousand different ways. Try/catch is perfectly fine for every day use, I agree is nonsense to say limit how you use them.
This man helps me understand promises. but can I just point out that you sounded like donald duck?
I find that most examples online, although they demonstrate certain features and how-to wire them up, almost always they show how NOT to code in a professional way! I hardly ever see examples of exactly what professional developers would actually put into production code of the software they develop! That is severely lacking in the teaching world!
If it's not the way you would code a professional made software yourself, then DON'T TEACH IT!!!