7 Design Patterns EVERY Developer Should Know

  Рет қаралды 194,107

ForrestKnight

ForrestKnight

Күн бұрын

Пікірлер: 196
@WestonJP88
@WestonJP88 27 күн бұрын
I REALLY like the analogies. That's the best way for me to grasp the actual concept. Just found you on KZbin, and I already like the content.
@RafaeldaSilvaPeres
@RafaeldaSilvaPeres Ай бұрын
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!
@kopilkaiser8991
@kopilkaiser8991 23 күн бұрын
Learning from you is a fun and engaging activity. This is how teaching should be delivered. Structured, concise, and informative 😊
@noodlespwn42
@noodlespwn42 Ай бұрын
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
@ivanlawrence2
@ivanlawrence2 Ай бұрын
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
@ivanlawrence2
@ivanlawrence2 Ай бұрын
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 ;)
@zayne-sarutobi
@zayne-sarutobi Күн бұрын
Nesting is really a bane of my coding existence 😭
@vincentmontano4518
@vincentmontano4518 27 күн бұрын
The analogies are spot on! I learned more from this video than the entire book and online tutorials combined about design pattern.
@adria3439
@adria3439 26 күн бұрын
Nice explanation, you have a great body language and it helps the viewer to keep watching the video
@mykalimba
@mykalimba Ай бұрын
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.
@theteacher3163
@theteacher3163 22 күн бұрын
loved the video! the way you describe the patterns is amazing. I'm sending this video to every coder I know. Subscribed!
@pouyababaie2159
@pouyababaie2159 Ай бұрын
This was the most easy way to understand all of these standarts. Thanks ;)
@hisoka500
@hisoka500 22 күн бұрын
Bro, this is the best thing I've seen in a long time! Keep sharing content like this! 👌
@derivadadekonoha
@derivadadekonoha 29 күн бұрын
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....
@ianramirez1577
@ianramirez1577 Ай бұрын
I learned more from your video than in the university. Thank you and regards from México
@CokYogaIXGXXVII
@CokYogaIXGXXVII 24 күн бұрын
The only time I paused was when I liked and subscribed you, amazing video man!
@shahabjami3161
@shahabjami3161 Ай бұрын
Great refresher! Love these type of vids
@abzrg
@abzrg 4 күн бұрын
09:03 schtruschural pattern Simple and concise explanation. Thanks!
@gavinwilliams4330
@gavinwilliams4330 Ай бұрын
Great video! I love the way you explained things and the way you demonstrated the benefits of each pattern in code.
@mohamedraslan3504
@mohamedraslan3504 11 күн бұрын
Excellent explanation, loved it a lot, your way of explaining stuff with simple words and analogies is perfect, Thanks
@Zeraltz
@Zeraltz Ай бұрын
Finally I understood these design patterns, you know how to explain things! subscribed
@another_arthur7
@another_arthur7 13 күн бұрын
I like the way you explain how we can actually implement what you tell about, got a new sub
@wiilamaral
@wiilamaral 22 күн бұрын
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 😉🧑🏽‍💻
@abymathew575
@abymathew575 27 күн бұрын
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
@jamiecodes96
@jamiecodes96 Ай бұрын
This was so good. I’m sharing it with my dev team! Thank you
@HP_Tubcraft
@HP_Tubcraft Ай бұрын
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
@yashh7449
@yashh7449 26 күн бұрын
I loved your analogies, you made it so much easier to understand these concepts! Thank you so much ❤
@thomkb
@thomkb Күн бұрын
Great video...puts into words what we already "intuited" but now we "know" the why to these patterns. But "freedom units"?
@ahmadiyad2860
@ahmadiyad2860 25 күн бұрын
your voice like graves from call of duty thank you man for all these videos you make
@BogdanNedelcu-b3n
@BogdanNedelcu-b3n 16 күн бұрын
Great video, didn't know I was using so many patterns.
@sebastianalfaro1887
@sebastianalfaro1887 Ай бұрын
i was needing this this morning haha, thanks dude!
@KineticCode
@KineticCode Ай бұрын
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!
@mattwayne9128
@mattwayne9128 Ай бұрын
Newer developers, you shouldn't be making the decision to not study software engineering concepts based off the anecdotes of anonymous KZbin 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.
@itztlacoliuhqui
@itztlacoliuhqui Ай бұрын
Yeah its not a hammer. Its like 23 different tools actually. Hammer included
@KineticCode
@KineticCode Ай бұрын
​@@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
@w花b
@w花b Ай бұрын
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)
@barbara_993
@barbara_993 Ай бұрын
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.
@AmitabhSuman
@AmitabhSuman 10 күн бұрын
Loved your explanation. Very interesting and simple. Tons of thanks!
@taofeekakinkunmi8990
@taofeekakinkunmi8990 5 күн бұрын
I love the way you simply everything. kudos
@flyte9844
@flyte9844 21 күн бұрын
Exactly what I needed to watch ! Thanks !!
@bradchellingworth5973
@bradchellingworth5973 29 күн бұрын
first time viewer here, listening to this in the background and keep thinking im getting a lesson from Matthew McConaughey
@PavinWannasirilak
@PavinWannasirilak 13 күн бұрын
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?
@Slim_dev
@Slim_dev 14 күн бұрын
Great Content Man!, please create more of these videos thanks a lot!
@mcstephen
@mcstephen 28 күн бұрын
A Video i never knew i needed. Thanks alot, for real, thanks.
@elki_8
@elki_8 Ай бұрын
Thank you!! I got exams about exactly those patterns next week!
@drushkyy2017
@drushkyy2017 Ай бұрын
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
@jaysonlabarrete9121
@jaysonlabarrete9121 4 күн бұрын
I love your analogies! I subscribed to
@totollygeek
@totollygeek Ай бұрын
Really cool video, kudos. I giggled when you called them “freedom units” 😂
@acrosstheocean25
@acrosstheocean25 13 күн бұрын
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?
@juancriolivares
@juancriolivares Ай бұрын
Great explanation. Beside these ones, I really like the decorator pattern.
@ElHirani
@ElHirani Ай бұрын
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
@tiagodev5838
@tiagodev5838 Ай бұрын
Great instructional video, thank you! Also, "Freedom Units" is one of the most American things I've ever heard haha!
@ramgopalvarma5949
@ramgopalvarma5949 22 күн бұрын
Crazy simple examples to remember, I just wish you provide more code examples
@PatrickMeppe
@PatrickMeppe 2 күн бұрын
1:30 I have to disagree. The greatest pattern of all times is the Observer pattern. 🙂 In my case I use the radio & antenna as an analogy to explain it to my students.
@WiktorWandachowicz
@WiktorWandachowicz 29 күн бұрын
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 😁🤣😂
@Slim_dev
@Slim_dev 14 күн бұрын
😂😂
@mpack235
@mpack235 11 сағат бұрын
I'm schizophrenic( diagnosed) , i feel like i think like you or you think like me, when i solve problems or when imagining examples to articulate my problems!
@lilgox3105
@lilgox3105 15 күн бұрын
You explain well the design patern...
@deltatee9050
@deltatee9050 12 күн бұрын
Amazing, loved the analogies, sample situations and code snippets which displayed the execution excellently!
@ziacodes
@ziacodes 8 күн бұрын
I watched you since you had 20K subscribers. Most underrated channel. Please show more code examples. That really helps us!
@codeman99-dev
@codeman99-dev Ай бұрын
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.
@Kenny-st8cg
@Kenny-st8cg Ай бұрын
Correct, I don’t think he really understands what the observer pattern is.
@Valrast1
@Valrast1 27 күн бұрын
Also, "we don't loop through"- we loop with foreach
@KyleLuce
@KyleLuce 9 күн бұрын
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.
@lautidev_
@lautidev_ 12 күн бұрын
Nice video, so easy to learn
@celestinenwachukwu919
@celestinenwachukwu919 21 күн бұрын
as a junior developer i felt like i peeked into heaven
@ashishsapkota945
@ashishsapkota945 Ай бұрын
I came to find out that I have been using most of those patterns without knowing what they were
@lutfiikbalmajid3128
@lutfiikbalmajid3128 Ай бұрын
Hi, Your new subs here! i like your video, the way you explain, and some little jokes you put in this video haha
@Ni7ram
@Ni7ram Ай бұрын
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
@TVDaJa
@TVDaJa Ай бұрын
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
@kingcrashplays
@kingcrashplays Ай бұрын
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.
@Doot_00
@Doot_00 22 күн бұрын
great content bro!
@cris7775
@cris7775 Ай бұрын
Love It, great explanation
@Jonathan-zq8vs
@Jonathan-zq8vs 17 күн бұрын
What are you using to diagram ?
@TAHppled
@TAHppled Ай бұрын
I clicked subscribe as soon as he said “freedom units”.
@gauravfotedar
@gauravfotedar 13 күн бұрын
For the factory pattern example, why can't that just be a function?
@pawel_890
@pawel_890 Ай бұрын
When can we expect a video of Rust on NixOS on Neovim?
@diabeticnomad
@diabeticnomad Ай бұрын
6:00 oh shit! That just solved a problem I had sweet thanks
@youcefmoulla1828
@youcefmoulla1828 Ай бұрын
Amazing video, Thank you
@alexiosgaming6504
@alexiosgaming6504 14 күн бұрын
Bro this thaught me many things. Now i can too speak like i know everything about design patterns
@NebulaM57
@NebulaM57 29 күн бұрын
Freedom Units, I like that. :)
@BooksWeCanRead
@BooksWeCanRead Ай бұрын
100% want you to explain everything to me 😅💜
@Rocknrolla112
@Rocknrolla112 Күн бұрын
damn, i want to give you more than one like for this video!
@jasonford7439
@jasonford7439 Ай бұрын
@ForrestKnight Kinda random but can you drop a link to your chair model? Does the seat tilt too or only the back?
@luan5217
@luan5217 14 күн бұрын
Nice video! I would like to know what program do you use to diagram ;)
@parttimewarrior5789
@parttimewarrior5789 29 күн бұрын
I don't know who this comment is for, but this feels like watching an Adam Ragusea video except about programming
@KimHenriksen.
@KimHenriksen. Ай бұрын
Great video! “I’m looking for an AI tool that can quickly translate KZbin 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!”
@scarymojo5809
@scarymojo5809 Ай бұрын
Would you still use the adapter pattern if you only accessed the slightly wrong API or library in one location in your codebase?
@unprogramadormas22
@unprogramadormas22 14 күн бұрын
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?
@rojinbijukchhe44
@rojinbijukchhe44 Ай бұрын
Thank you man :)
@Alan-hf2gs
@Alan-hf2gs 12 күн бұрын
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.
@Dr.Schnizzle
@Dr.Schnizzle Ай бұрын
Correct me if I’m wrong, but isn’t the strategy pattern the same as polymorphism?
@stereocodes
@stereocodes Ай бұрын
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.
@SonAyoD
@SonAyoD Ай бұрын
fantastic video
@ImNotAshhhhhhh
@ImNotAshhhhhhh Ай бұрын
I feel like a lot of the issues that design patterns resolve can be fixed with simple static classes with static methods
@narcissekabongo2616
@narcissekabongo2616 Ай бұрын
which vscode theme are you using brother?
@ShootFirstNS
@ShootFirstNS Ай бұрын
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.
@yowremco
@yowremco 10 күн бұрын
Might be stupid question. But why is this not done via functions?
@zayne-sarutobi
@zayne-sarutobi Күн бұрын
Same questions tbh Classes in js are just too verbose when used unnecessarily
@codewithfelix3940
@codewithfelix3940 Ай бұрын
Had never written type script before but it looks so much like java which hv written for so long.
@Jaybearno
@Jaybearno Ай бұрын
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!!
@wiktor99321
@wiktor99321 Ай бұрын
Whats your color theme called?
@snowman1185-v
@snowman1185-v Ай бұрын
Very nice. Thanks. :)
@vasiavra
@vasiavra Ай бұрын
hi what keyboard is that ?
@TheForge47
@TheForge47 Ай бұрын
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.
@kamilzielinski504
@kamilzielinski504 28 күн бұрын
another chapter of OO devs solving issues they created
@2spiffyytv
@2spiffyytv Ай бұрын
hey does anyone know what kind of keyboard he has?
@asagiai4965
@asagiai4965 Ай бұрын
I see that's why youtube is sending me notifications from weeks ago.
@circle4106
@circle4106 Ай бұрын
Factory pattern is so much more flexible when you're able to overload the method.
@owenrossi-keen2594
@owenrossi-keen2594 Ай бұрын
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.
@circle4106
@circle4106 Ай бұрын
@owenrossi-keen2594 exactly answers the question i had on implementing this overloading technique on TS, coming from Java 😂. Thanks for the insight.
@tibrec8
@tibrec8 8 күн бұрын
I think u use Decoreter pattern but not the adpater pattern
@Sam-u3s7n
@Sam-u3s7n Ай бұрын
:D I am trying to study here --- why is the surf video ?? lol
@humphreeyy
@humphreeyy 18 күн бұрын
So, singleton pattern is what I was using.
@oussamahatim5918
@oussamahatim5918 24 күн бұрын
Singleton pattern is considered to be an anti pattern
@tawandagamedevs
@tawandagamedevs Ай бұрын
builder pattern is irrelavent if the language has named parameters
@thomaswilliams4755
@thomaswilliams4755 Ай бұрын
Not necessarily. `StringBuilder` is useful for when you need to build a long string, and iteration or conditional checks are involved. It'll save on the expensive costs of string concatenation (by maintaining and resizing an array for you behind the scenes, much like Java's `ArrayList` or C#'s `List` work).
@bertiesmith3021
@bertiesmith3021 28 күн бұрын
@@thomaswilliams4755C++ programmer here I thought that the #1 point of StringBuilder is the efficient concatenation (which high I am led to believe can be really bad), rather than it being an implementation of a builder pattern. C++ has a similar problem but because strings aren’t immutable it is much less of a problem. It’s still worth worrying about, though, and Google’s StrCat solves this (and I have written my own versions many times).
8 Design Patterns | Prime Reacts
22:10
ThePrimeTime
Рет қаралды 450 М.
8 Data Structures Every Programmer Should Know
17:09
ForrestKnight
Рет қаралды 234 М.
Каха и дочка
00:28
К-Media
Рет қаралды 3,4 МЛН
VIP ACCESS
00:47
Natan por Aí
Рет қаралды 30 МЛН
So Cute 🥰 who is better?
00:15
dednahype
Рет қаралды 19 МЛН
Build these projects and I will HIRE you
12:55
Jason Goodison
Рет қаралды 122 М.
Everything You NEED to Know about Docker
18:26
ForrestKnight
Рет қаралды 52 М.
Car Management System: Complete GO Lang Project
4:40:00
Code Alley with Anurag
Рет қаралды 7 М.
The intro to Docker I wish I had when I started
18:27
typecraft
Рет қаралды 361 М.
Apache Kafka in 15 minutes
15:33
Gaurav Sen
Рет қаралды 72 М.
How To Handle Permissions Like A Senior Dev
36:39
Web Dev Simplified
Рет қаралды 322 М.
10 Design Patterns Explained in 10 Minutes
11:04
Fireship
Рет қаралды 2,4 МЛН
Каха и дочка
00:28
К-Media
Рет қаралды 3,4 МЛН