High Definition Standard Definition Theater
Video id : -JOlvbayVIE
ImmersiveAmbientModecolor: #788cb4 (color 2)
Video Format : (720p) openh264 ( https://github.com/cisco/openh264) mp4a.40.2 | 44100Hz
Audio Format: 140 ( High )
PokeEncryptID: a2ee64af77e6ec3f7c87094587e2d8b8176e875be2b84d61e4c37fba7b6e5ea197614624befde3d15a2e490b4ff0eb97
Proxy : cal1.iv.ggtyler.dev - refresh the page to change the proxy location
Date : 1732621248385 - unknown on Apple WebKit
Mystery text : LUpPbHZiYXlWSUUgaSAgbG92ICB1IGNhbDEuaXYuZ2d0eWxlci5kZXY=
143 : true
379,589 Views • Apr 1, 2024 • Click to toggle off description
Metadata And Engagement

Views : 379,589
Genre: Science & Technology
Uploaded At Apr 1, 2024 ^^


warning: returnyoutubedislikes may not be accurate, this is just an estiment ehe :3
Rating : 4.789 (390/7,018 LTDR)

94.74% of the users lieked the video!!
5.26% of the users dislieked the video!!
User score: 92.11- Overwhelmingly Positive

RYD date created : 2024-06-28T18:48:23.582462Z
See in json
Tags

oh hey i think you lost your tags look how to find one

Connections
Nyo connections found on the description ;_; report an issue lol

218 Comments

Top Comments of this video!! :3

@BrianVoelker

7 months ago

YES!!! Deal with errors first. End should be the success. In most cases

416 |

@paulstelian97

7 months ago

The last if... I would have kept it, because both situations are valid, non-error ones. I agree with the others, the error cases.

72 |

@Oaisus

7 months ago

It helps to have proper spacing so its very difficult to mix up which indentation level you are looking at

7 |

@jlopez0941

7 months ago

This is a great example of why failing early is so helpful for keeping code clean.

169 |

@Adventures_of_Marshmallow

5 months ago

My opinion, NULL should be checked before calling this function unnecessarily. The function name implies that it expects a user that is not NULL. Then you can make it a single if else to check for the subscription with a ternary operator on user.age to determine what version to show.

1 |

@jtms1200

6 months ago

I am guessing this is just contrived example code, but definitely don't use throw/catch for flow control the way this function implies the rest of the system does.

|

@anonymoususer520

5 months ago

I appreciate that early returns prevent nesting, but they still force you imperitively execute the code in your head.

Ideally, a function like this should read like a mapping expression. Eg, given a particular input and set of conditions, produce a particular output.

|

@willd0g

7 months ago

Understandable post refactor; But also understandable function build. The function now takes on the context of a functional if block. Previous build would have provisioned for a continuation of code post conditional checks for anything else that needed to be irrespective of the if block above. But owing to the fact the function’s only purpose is process users who have a valid description and then to decide what content will be shown, then of course upfront requirements may have prevented this from occurring jn the first place. The first attempt by the developer is still valid in the sense that he/she didn’t optimise early and moved on to shipping the next feature / product

11 |

@Olliertlol

6 months ago

similar to early return principle, helps you avoid over nesting if blocks

|

@AloisMahdal

6 months ago

nice. I have a saying that the best kind of `else` is called `return`.

1 |

@abm2210

7 months ago

Nice video!!!
What is ur vscode theme and text colors ?? I like that

4 |

@patrickxDDD

5 months ago

where's the brackets? omg, what agony!!

|

@jackhammer915

7 months ago

Please put brackets around those conditions through your just asking to have this broken by the next person who touches this code.

57 |

@RobertJene

7 months ago

when it gets too complicated just have a few if checks by themselves with returns

|

@Stray0

6 months ago

These are called guard clauses and they dramatically increase readability.

33 |

@davidwhitaker6489

5 months ago

I remember doing this earlier in my career. That or using truth tables for really jacked up code for the same proper results. Discrete mathematics does come into play 😊

|

@HellDuke-

6 months ago

Yeah, I started doing this when writing Google Apps Script years ago, just makes more sense to me

|

@KingCrunch82

5 months ago

Called "Return early" and "fail hard, fail early". Also (regarding the sidenote): dont use undefined. Never. Thats why people start crying, when thwy hear about js

|

@jakeoshay

6 months ago

Yeah but the problem then is if you can find a way to get an error that's none of those you'd get full access just by virtue of triggering this thing.

1 |

Go To Top