Yes YES WE LOVE ANALOGIES! Please! Best way of teaching and learning! Starting from the big picture, analogies and then down to the specifics! People seems to want to glorify knowledge sometimes by hitting with the specifics right on their face making them watch and rewatch or just give up on it, but this way u go helps alot!
most of these are intuitive. it's great to formalize these concepts and this video does a great job at providing a high level overview of them. thank you
I love the format of your videos... I also love that in your examples of each pattern you are also reducing the nesting and using early exiting which is the opposite of what the people in the repo I'm currently in have done. My first pass for just about and change is 1st to reduce nesting, 2nd try and apply the appropriate pattern (like taking a constructor with 30 params and converting to a builder pattern, or passing in an object which implements the builder pattern, which means now I'm the lucky SoB who gets to go "fix" all the other code), 3rd weep and commit
Oh, and "bless your heart" hit me right in the feels... and pronouncing facade the way JFK might have done it (fah-Kay-d) is how I like to explain it ;)
Great explanations. I had to watch the section on the Builder pattern a few times over to make sure I didn't miss this, but I think you glossed over the most important step in how this works. The key is that each of the methods that initialize something returns the object itself (i.e. "this") as the return value, so that it's possible to chain calls to those methods as you demonstrated. An astute viewer could pause the video to see this in your code, but I think it's worth an explicitly mention.
To newer developers - when you learn design patterns you generally think "oh i can use this here!" in every scenario, making design patterns your hammer and every code problem a nail. In my experience as a professional developer I have never - not once - deferred to the Design Patterns book to solve a problem. Everytime I had used one in my personal projects however - it was always an imperfect fit to a similar problem. You could say "skill issue" but I'm just pointing out that you should not worry about these things before you're employed. Just make things!
Newer developers, you shouldn't be making the decision to not study software engineering concepts based off the anecdotes of anonymous TH-cam commenters. You will write bad code as you start off. It's inevitable. That's why you practice. Not learning this because of the nebulous idea that you might use it where it "shouldn't be used" is ridiculous.
@@mattwayne9128 There's a lot of things to learn when starting. There's alot of concepts with varying usefulness with building software. The real question is what information is most applicable to getting yourself into a position where you can have good mentorship and stability in learning(employed). If you learn software dev because you're passionate about it - my comment shouldn't dissuade a single person because they'll learn these things from genuine interest (as I did!). I'm advocating for learning relevant skills rather than all skills, which in my, yes, anecdotal experience, would exclude Design Patterns. Otherwise it's easy to fall into a sea of theoretical knowledge with no idea of how to apply it practically! I appreciate your perspective btw
You're not 100% wrong but I made vidéos games and at the end, I was always regretting not making the code more modular for example. It's basically spaghetti code. Design patterns won't make regrets go away but they definitely will make your life easier in the long run for projects you're supposed to build on top of or modify (anything with a long life span)
I would agree if we [in my company] we don't require knowledge about design pattern and usage before employment. I doubt that I will let someone further if they do not know what at least singleton is and how to use it.
I recently found your channel, and it’s impressive the way you explain things and make fun at the same time. This makes the learning process much better. Thank you! Subscribed 😉🧑🏽💻
This is the most easiest way knowing to concepts of the design patterns I've ever found. Your clean and structured way of teach gives us the only task of learn, as easy as possible. Thanks for this amazing content....
Really nice video. First you explained the concept very well, then you showed the practical implementation in codes with real scenarios. This way of video presentations are really helpful to understand the concept. Thanks for your effort and expecting more from you
Some framework strategies of dependency injection can be Singleton by default and are easier to test. For example Spring Singleton beans are easy to mock since the guarantee of being Singleton isn't language enforced (it's at a higher abstraction). If you do singletons the old fashion way it's indeed a pain to mock any Singleton or static implementation. Kotlin does make static and its object Singletons easier to mock using Mockk, but i believe there are still some pitfalls to avoid.
A little confused on the example for the observer pattern you gave here regarding performance. You would still have to loop over however many subscribers there are in order for them to get the notification, and assuming that they are all on the same machine, the work will still be done at the same place. So I don't quite understand how there is a performance gain in this specific scenario, unless that was just an analogy for a distributed system?
21:31 The notify private method is doing the wrong thing. It should be emitting an event that the subscriber can listen for. The whole point is that the acting class does not need any collection of who wants the result of the action. You emit the result.
about subscriber pattern.. i know its useful, and the core of reactive prograaming, but I dont see the advantage in this example. i mean you say loop through users is not performant, but it ends up using a foreach, that is essentially the same. the thing is, i dont think it can be done without looping the array somehow great video as always man
Yeah I was thinking the same thing. I always thought the big improvement it provides is de-coupling things that need to SOMETIMES exchange some data/signals
I believe it would be more useful when let’s say a subscriber only wants to be notified for specific events, not all events. Perhaps a user subscribed to a channel doesn’t want to be notified a new video is released but is still a follower of the channel.
19:54 "And I know this is gonna hurt some feelings. A lot of y'all are just 'IF ELSE-ing, IF ELSE-ing' everything. You know WHO YOU ARE!" Pure gold 😁🤣😂
Great video! “I’m looking for an AI tool that can quickly translate TH-cam videos into Danish and play them with Danish speech. Ideally, it should be able to extract subtitles, translate them, and then use text-to-speech technology to provide the audio in Danish, all in sync with the video. Any recommendations or solutions would be greatly appreciated!”
do you typically write all your JS in classes? no? would've been good to see these written in the way we write JS using closures and higher order functions.
Agreed, however: Typescript + object parameter makes this effectively a non issue in 99% of cases. There are situations where I wish TS had proper overloading though... One thing you can do to get around this is spread your params and type them as XOR. This is the best solution I've found for getting something that looks like Java over loading.
This was such an insightful video! I really enjoyed the part about design patterns . It reminded me of a video series I recently made on S3 buckets, where I dive deeper into core concept of S3 buckets like replication,storage tiers. If anyone’s interested, feel free to check it out - I’d love to hear your thoughts!
Is the book ok for beginners? Like me? Learning JavaScript? I read a review and it said that because it's so old and technical a noob like me would just get confused and would struggle to see how the techniques would apply to my journey learning to program. I've put it on a list either way.
Definitely no, remember that always we use a pattern we are bringing complexity to the program. If u only need to access one tiny part of a codebase, why would be adding a whole class as an adapter a plausible solution?
Nope, you don’t need any of those design patterns. It’s perfectly sufficient to focus on maximizing cohesion and minimizing coupling. In my opinion, the rest is more about convenience - nice to have, but not strictly necessary.
Does anyone have recommended reading or examples on what to do if you inherit a horrendous code base that has every anti pattern imaginable? Would you try to encapsulate in a better design and unravel it? Or just nuke and start over.(keep in mind the latter will cost social capital). Help!!
Yes YES WE LOVE ANALOGIES! Please! Best way of teaching and learning! Starting from the big picture, analogies and then down to the specifics! People seems to want to glorify knowledge sometimes by hitting with the specifics right on their face making them watch and rewatch or just give up on it, but this way u go helps alot!
Learning from you is a fun and engaging activity. This is how teaching should be delivered. Structured, concise, and informative 😊
I REALLY like the analogies. That's the best way for me to grasp the actual concept. Just found you on TH-cam, and I already like the content.
most of these are intuitive. it's great to formalize these concepts and this video does a great job at providing a high level overview of them. thank you
I love the format of your videos... I also love that in your examples of each pattern you are also reducing the nesting and using early exiting which is the opposite of what the people in the repo I'm currently in have done. My first pass for just about and change is 1st to reduce nesting, 2nd try and apply the appropriate pattern (like taking a constructor with 30 params and converting to a builder pattern, or passing in an object which implements the builder pattern, which means now I'm the lucky SoB who gets to go "fix" all the other code), 3rd weep and commit
Oh, and "bless your heart" hit me right in the feels... and pronouncing facade the way JFK might have done it (fah-Kay-d) is how I like to explain it ;)
Great explanations. I had to watch the section on the Builder pattern a few times over to make sure I didn't miss this, but I think you glossed over the most important step in how this works. The key is that each of the methods that initialize something returns the object itself (i.e. "this") as the return value, so that it's possible to chain calls to those methods as you demonstrated. An astute viewer could pause the video to see this in your code, but I think it's worth an explicitly mention.
I watched you since you had 20K subscribers.
Most underrated channel. Please show more code examples. That really helps us!
Nice explanation, you have a great body language and it helps the viewer to keep watching the video
The analogies are spot on! I learned more from this video than the entire book and online tutorials combined about design pattern.
Bro, this is the best thing I've seen in a long time! Keep sharing content like this! 👌
loved the video! the way you describe the patterns is amazing. I'm sending this video to every coder I know. Subscribed!
09:03 schtruschural pattern
Simple and concise explanation. Thanks!
To newer developers - when you learn design patterns you generally think "oh i can use this here!" in every scenario, making design patterns your hammer and every code problem a nail. In my experience as a professional developer I have never - not once - deferred to the Design Patterns book to solve a problem. Everytime I had used one in my personal projects however - it was always an imperfect fit to a similar problem. You could say "skill issue" but I'm just pointing out that you should not worry about these things before you're employed. Just make things!
Newer developers, you shouldn't be making the decision to not study software engineering concepts based off the anecdotes of anonymous TH-cam commenters.
You will write bad code as you start off. It's inevitable. That's why you practice. Not learning this because of the nebulous idea that you might use it where it "shouldn't be used" is ridiculous.
Yeah its not a hammer. Its like 23 different tools actually. Hammer included
@@mattwayne9128 There's a lot of things to learn when starting. There's alot of concepts with varying usefulness with building software. The real question is what information is most applicable to getting yourself into a position where you can have good mentorship and stability in learning(employed). If you learn software dev because you're passionate about it - my comment shouldn't dissuade a single person because they'll learn these things from genuine interest (as I did!). I'm advocating for learning relevant skills rather than all skills, which in my, yes, anecdotal experience, would exclude Design Patterns. Otherwise it's easy to fall into a sea of theoretical knowledge with no idea of how to apply it practically! I appreciate your perspective btw
You're not 100% wrong but I made vidéos games and at the end, I was always regretting not making the code more modular for example. It's basically spaghetti code. Design patterns won't make regrets go away but they definitely will make your life easier in the long run for projects you're supposed to build on top of or modify (anything with a long life span)
I would agree if we [in my company] we don't require knowledge about design pattern and usage before employment. I doubt that I will let someone further if they do not know what at least singleton is and how to use it.
Excellent explanation, loved it a lot, your way of explaining stuff with simple words and analogies is perfect, Thanks
I recently found your channel, and it’s impressive the way you explain things and make fun at the same time. This makes the learning process much better. Thank you! Subscribed 😉🧑🏽💻
This was the most easy way to understand all of these standarts. Thanks ;)
I like the way you explain how we can actually implement what you tell about, got a new sub
The only time I paused was when I liked and subscribed you, amazing video man!
Great video! I love the way you explained things and the way you demonstrated the benefits of each pattern in code.
I loved your analogies, you made it so much easier to understand these concepts! Thank you so much ❤
Great refresher! Love these type of vids
This is the most easiest way knowing to concepts of the design patterns I've ever found. Your clean and structured way of teach gives us the only task of learn, as easy as possible. Thanks for this amazing content....
Really nice video. First you explained the concept very well, then you showed the practical implementation in codes with real scenarios. This way of video presentations are really helpful to understand the concept. Thanks for your effort and expecting more from you
Loved your explanation. Very interesting and simple. Tons of thanks!
I learned more from your video than in the university. Thank you and regards from México
Finally I understood these design patterns, you know how to explain things! subscribed
Some framework strategies of dependency injection can be Singleton by default and are easier to test. For example Spring Singleton beans are easy to mock since the guarantee of being Singleton isn't language enforced (it's at a higher abstraction).
If you do singletons the old fashion way it's indeed a pain to mock any Singleton or static implementation. Kotlin does make static and its object Singletons easier to mock using Mockk, but i believe there are still some pitfalls to avoid.
this is a great video! fellow java dev here. i'd love to see more java / spring boot stuff! not enough good java / spring boot influencers on YT imo
This was so good. I’m sharing it with my dev team! Thank you
Great video, didn't know I was using so many patterns.
your voice like graves from call of duty thank you man for all these videos you make
I love the way you simply everything. kudos
i was needing this this morning haha, thanks dude!
Great Content Man!, please create more of these videos thanks a lot!
first time viewer here, listening to this in the background and keep thinking im getting a lesson from Matthew McConaughey
Really cool video, kudos.
I giggled when you called them “freedom units” 😂
I love your analogies! I subscribed to
18:24 Why will a lot of if-else if-else be gone? How can you know what type of the transport should be constructed without the control flow?
Thank u im new with these kind a type of things , cause i recently learn oop so this video help me a lot in any terms
A little confused on the example for the observer pattern you gave here regarding performance. You would still have to loop over however many subscribers there are in order for them to get the notification, and assuming that they are all on the same machine, the work will still be done at the same place. So I don't quite understand how there is a performance gain in this specific scenario, unless that was just an analogy for a distributed system?
Exactly what I needed to watch ! Thanks !!
21:31 The notify private method is doing the wrong thing. It should be emitting an event that the subscriber can listen for. The whole point is that the acting class does not need any collection of who wants the result of the action. You emit the result.
Correct, I don’t think he really understands what the observer pattern is.
Also, "we don't loop through"- we loop with foreach
Crazy simple examples to remember, I just wish you provide more code examples
hey my friend, please do more videos where you just show us the code and teach it as you go. you do a great job of explaining simply!!!! thanks
Nice video, so easy to learn
A Video i never knew i needed.
Thanks alot, for real, thanks.
Thank you!! I got exams about exactly those patterns next week!
Great instructional video, thank you!
Also, "Freedom Units" is one of the most American things I've ever heard haha!
Great explanation. Beside these ones, I really like the decorator pattern.
You explain well the design patern...
about subscriber pattern.. i know its useful, and the core of reactive prograaming, but I dont see the advantage in this example. i mean you say loop through users is not performant, but it ends up using a foreach, that is essentially the same.
the thing is, i dont think it can be done without looping the array somehow
great video as always man
Yeah I was thinking the same thing. I always thought the big improvement it provides is de-coupling things that need to SOMETIMES exchange some data/signals
I believe it would be more useful when let’s say a subscriber only wants to be notified for specific events, not all events. Perhaps a user subscribed to a channel doesn’t want to be notified a new video is released but is still a follower of the channel.
as a junior developer i felt like i peeked into heaven
Fun fact: if you can read the Gang of Four all the way through in one sitting without falling asleep, you automatically receive a FAANG job offer.
great content bro!
Hi, Your new subs here! i like your video, the way you explain, and some little jokes you put in this video haha
19:54
"And I know this is gonna hurt some feelings.
A lot of y'all are just 'IF ELSE-ing, IF ELSE-ing' everything. You know WHO YOU ARE!"
Pure gold 😁🤣😂
😂😂
Bro this thaught me many things. Now i can too speak like i know everything about design patterns
100% want you to explain everything to me 😅💜
Love It, great explanation
I came to find out that I have been using most of those patterns without knowing what they were
Great video!
“I’m looking for an AI tool that can quickly translate TH-cam videos into Danish and play them with Danish speech. Ideally, it should be able to extract subtitles, translate them, and then use text-to-speech technology to provide the audio in Danish, all in sync with the video. Any recommendations or solutions would be greatly appreciated!”
Nice video! I would like to know what program do you use to diagram ;)
6:00 oh shit! That just solved a problem I had sweet thanks
I don't know who this comment is for, but this feels like watching an Adam Ragusea video except about programming
When can we expect a video of Rust on NixOS on Neovim?
Freedom Units, I like that. :)
Amazing, loved the analogies, sample situations and code snippets which displayed the execution excellently!
Amazing video, Thank you
I clicked subscribe as soon as he said “freedom units”.
I feel like a lot of the issues that design patterns resolve can be fixed with simple static classes with static methods
Thank you man :)
What are you using to diagram ?
fantastic video
do you typically write all your JS in classes? no? would've been good to see these written in the way we write JS using closures and higher order functions.
Factory pattern is so much more flexible when you're able to overload the method.
Agreed, however: Typescript + object parameter makes this effectively a non issue in 99% of cases.
There are situations where I wish TS had proper overloading though...
One thing you can do to get around this is spread your params and type them as XOR. This is the best solution I've found for getting something that looks like Java over loading.
@owenrossi-keen2594 exactly answers the question i had on implementing this overloading technique on TS, coming from Java 😂. Thanks for the insight.
This was such an insightful video! I really enjoyed the part about design patterns . It reminded me of a video series I recently made on S3 buckets, where I dive deeper into core concept of S3 buckets like replication,storage tiers. If anyone’s interested, feel free to check it out - I’d love to hear your thoughts!
Had never written type script before but it looks so much like java which hv written for so long.
Might be stupid question. But why is this not done via functions?
@ForrestKnight Kinda random but can you drop a link to your chair model? Does the seat tilt too or only the back?
Is the book ok for beginners? Like me? Learning JavaScript? I read a review and it said that because it's so old and technical a noob like me would just get confused and would struggle to see how the techniques would apply to my journey learning to program. I've put it on a list either way.
Very nice. Thanks. :)
thx for that
Correct me if I’m wrong, but isn’t the strategy pattern the same as polymorphism?
I see that's why youtube is sending me notifications from weeks ago.
which vscode theme are you using brother?
Would you still use the adapter pattern if you only accessed the slightly wrong API or library in one location in your codebase?
Definitely no, remember that always we use a pattern we are bringing complexity to the program. If u only need to access one tiny part of a codebase, why would be adding a whole class as an adapter a plausible solution?
Whats your color theme called?
another chapter of OO devs solving issues they created
Nope, you don’t need any of those design patterns. It’s perfectly sufficient to focus on maximizing cohesion and minimizing coupling. In my opinion, the rest is more about convenience - nice to have, but not strictly necessary.
For the factory pattern example, why can't that just be a function?
So, singleton pattern is what I was using.
hi
what keyboard is that ?
I was always using it but didn't know about it 😂😅
Singleton pattern is considered to be an anti pattern
4:35 nice colors!
It's Andromeda theme I guess
@@xenos112 It is, and thanks for the name. I've installed it and like it a lot :D
Does anyone have recommended reading or examples on what to do if you inherit a horrendous code base that has every anti pattern imaginable? Would you try to encapsulate in a better design and unravel it? Or just nuke and start over.(keep in mind the latter will cost social capital). Help!!
hey does anyone know what kind of keyboard he has?
I think u use Decoreter pattern but not the adpater pattern
Where's the decorator?
:D I am trying to study here --- why is the surf video ?? lol