16.16: try / catch with Promises - Topics of JavaScript/ES6

  Рет қаралды 65,644

The Coding Train

The Coding Train

Күн бұрын

Пікірлер: 48
@cyri11e
@cyri11e 6 жыл бұрын
Great, crystal clear as usual and so fun, it’s really a pleasure to learn with you
@srinivasagupta6124
@srinivasagupta6124 4 жыл бұрын
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.
@orangus01
@orangus01 5 жыл бұрын
At 5:00 I think you were going for *if (!(results[i].img === null))*
@jakema4o
@jakema4o 3 жыл бұрын
Promises was second confusing thing for me after recursion. Now I got one, I feel so powerfull now.
@benjaminschultz6501
@benjaminschultz6501 2 жыл бұрын
Top notch, Daniel!! Thank you so much. This series cleared up a lot about promises for me.
@YameenYasin
@YameenYasin 5 жыл бұрын
the most amazing thing with your videos is i enjoy and get to laugh a lot :D
@ericzorn3735
@ericzorn3735 6 жыл бұрын
I always love the videos because they are up beat and they always teach a lot
@koopa9815
@koopa9815 2 жыл бұрын
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
@LittleRainGames
@LittleRainGames 6 жыл бұрын
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.
@DarrenDignam
@DarrenDignam 6 жыл бұрын
Any good examples of when it is appropriate to use try..catch then?
@minciNashu
@minciNashu 6 жыл бұрын
Python, C++ and C# make use of exceptions as well.
@utkarshverma9838
@utkarshverma9838 3 жыл бұрын
Can you please share the github link for your Javscript Promises playlist's (Code implementation)
@thesuperiorman8342
@thesuperiorman8342 4 жыл бұрын
Thank you for this series on promises. It's great.
@网于睿
@网于睿 2 жыл бұрын
4:00 you can use try finally without catch
@rampage9530
@rampage9530 4 жыл бұрын
You deserve a big like, as usual !
@kjaygopal5324
@kjaygopal5324 6 жыл бұрын
Hey, can you let me what is a "strict mode" cuz my code is not working.
@nagalokeshkanumoori7822
@nagalokeshkanumoori7822 6 жыл бұрын
Then what is the best solution for the promise.all
@Eltopshottah
@Eltopshottah 2 жыл бұрын
I love the coding train
@owenizedd2830
@owenizedd2830 4 жыл бұрын
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 😂
@toro705
@toro705 6 жыл бұрын
Your videos are amazing, thanks for this
@jimmykaushal9982
@jimmykaushal9982 2 жыл бұрын
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
@andrearivera7065
@andrearivera7065 Жыл бұрын
Hey, new subscriber ♥ Understood you perfectly.
@johnydl
@johnydl 3 жыл бұрын
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)
@WolfRose11
@WolfRose11 2 жыл бұрын
16.15 and 16.16 are out of order in the Topics of JavaScript Playlist
@anthonytsang1961
@anthonytsang1961 5 жыл бұрын
Very nice videos. Can you talk about how to implement streams in returning promises so that I can handle promises not at once?
@johnclifforddevera658
@johnclifforddevera658 6 жыл бұрын
Can you make a topic on using RxJS observables and subscriptions? Thanks.
@eduanlenine
@eduanlenine 6 жыл бұрын
Thanks, Daniel!
@stevealmond7460
@stevealmond7460 6 жыл бұрын
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
@TheCodingTrain
@TheCodingTrain 6 жыл бұрын
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: kzbin.info/www/bejne/fouXdWatebeUm8U Also: sublime text: kzbin.info/www/bejne/i3Srq5-Lnql3Z5I atom editor: kzbin.info/www/bejne/mmSylHmbrcpsf80 brackets: kzbin.info/www/bejne/pJ69k5uDltOJmbs codepen: kzbin.info/www/bejne/a5jJhpqEpbhpobs
@gabrieljimenez6083
@gabrieljimenez6083 6 жыл бұрын
I love this man.
@naut_nigel
@naut_nigel 6 жыл бұрын
Gabriel Jiménez You are handsome. Do you have an IG? LMBO😂😅
@쿼쿼
@쿼쿼 6 жыл бұрын
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??
@TheCodingTrain
@TheCodingTrain 6 жыл бұрын
Try either of these playlists to start from scratch! kzbin.infoplaylists?view=50&shelf_id=14&sort=dd kzbin.infoplaylists?view=50&shelf_id=2&sort=dd
@leonardomra
@leonardomra 6 жыл бұрын
Great videos! Thanks!
@varunbhalla19
@varunbhalla19 6 жыл бұрын
Best teacher
@Engineer9736
@Engineer9736 6 жыл бұрын
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.
@wowatomica
@wowatomica 6 жыл бұрын
@ Richard van Pukkem Have you even watched other videos on this channel? Dan is a genius with tons of experience.
@DarrenDignam
@DarrenDignam 6 жыл бұрын
Dan is the archeytypal Dunning-Kruger coder.
@varunbhalla19
@varunbhalla19 6 жыл бұрын
We still love him
@sharpfocus9572
@sharpfocus9572 4 жыл бұрын
Very useful videos , your way of learning is the best !! Please post the source code of these videos my friend .
@spiraldynamics6008
@spiraldynamics6008 3 жыл бұрын
Best tutorials
@Engineer9736
@Engineer9736 6 жыл бұрын
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.
@OakJIM
@OakJIM 6 жыл бұрын
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.
@nobytes2
@nobytes2 5 жыл бұрын
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.
@Alex-rt7de
@Alex-rt7de 3 жыл бұрын
best ever
@variable_0
@variable_0 5 жыл бұрын
This man helps me understand promises. but can I just point out that you sounded like donald duck?
@driversteve9345
@driversteve9345 6 жыл бұрын
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!!!
@ianprado1488
@ianprado1488 6 жыл бұрын
16.15: Promise.all() - Topics of JavaScript/ES6
11:44
The Coding Train
Рет қаралды 127 М.
16.18: Polymorphism in JavaScript - Topics of JavaScript/ES6
9:29
The Coding Train
Рет қаралды 65 М.
Правильный подход к детям
00:18
Beatrise
Рет қаралды 10 МЛН
“Don’t stop the chances.”
00:44
ISSEI / いっせい
Рет қаралды 52 МЛН
I'm Ditching Try/Catch for Good!
10:29
Web Dev Simplified
Рет қаралды 187 М.
What are JavaScript PROMISES? 🤞
12:37
Bro Code
Рет қаралды 82 М.
try, catch, finally, throw - error handling in JavaScript
5:46
freeCodeCamp.org
Рет қаралды 176 М.
16.14: async/await Part 2 - Topics of JavaScript/ES8
10:08
The Coding Train
Рет қаралды 90 М.
Tips For Using Async/Await in JavaScript
16:26
James Q Quick
Рет қаралды 396 М.
16.11: Promises Part 1 - Topics of JavaScript/ES6
24:53
The Coding Train
Рет қаралды 336 М.
5 Async + Await Error Handling Strategies
18:11
Wes Bos
Рет қаралды 24 М.
JavaScript Pro Tips - Code This, NOT That
12:37
Fireship
Рет қаралды 2,5 МЛН
16.17: Inheritance in JavaScript - Topics of JavaScript/ES6
17:47
The Coding Train
Рет қаралды 79 М.
Javascript Promises vs Async Await EXPLAINED (in 5 minutes)
5:50
Roberts Dev Talk
Рет қаралды 614 М.