No video

C++ Strategy Design Pattern - Part 1 of 2 - Changing Algorithmic Behavior

  Рет қаралды 1,632

Mike Shah

Mike Shah

Күн бұрын

Пікірлер: 18
@nrnjn8547
@nrnjn8547 5 ай бұрын
Hell yee, I was waiting for this. I'm using your videos along with the gang of 4 book, to understand design patterns
@MikeShah
@MikeShah 5 ай бұрын
Awesome!
@danielabouelezz6448
@danielabouelezz6448 5 ай бұрын
Love your explanation, although I am still a beginner but i found it interesting to watch the whole video. I am very good with data structures now, so do you think I should be learning design pattern or what is my next step.
@MikeShah
@MikeShah 5 ай бұрын
Yes, next step is to give it a try to implement based on the explanation. Next video will also provide a walkthrough. Otherwise, next steps are to also consider a project (e.g. a small game) to put everything together.
@AlanMardi
@AlanMardi 5 ай бұрын
Thanks for great topic! Looking forward to part 2. I have a question: why do double check { threshold >= 16, threshold >= 64 ... } in each "else if" though they already excluded in preceding if's?
@MikeShah
@MikeShah 5 ай бұрын
Would want the conditional to be true if threshold is between a value 🙂
@AlanMardi
@AlanMardi 5 ай бұрын
@@MikeShah hmm, I'm a bit confused :) I mean what is the pofit of: if (thr < 16) do_A() else if (thr >= 16 && thr < 64) // ? thr >= 16 do_B(); comparing to: if (thr < 16) do_A() else if (thr < 64) // no chance to call do_B() with (thr < 16) anyway, program will never even try to check it do_B(); I would even more likely add lower limit to check the 1st "if" entry: if (thr >=0 && thr < 16) ... but not sure why to do this for following "else if"s :)
@MikeShah
@MikeShah 5 ай бұрын
Ah yes, you are right that would be the equivalent, and perhaps even save some cycles. I was being a bit too explicit I suppose :)@@AlanMardi
@AlanMardi
@AlanMardi 5 ай бұрын
@@MikeShah I see :) Really love explicit syntax, though this one is too dangerous for me as requires to change pairs of numbers to tweak thresholds. At some point I will definately miss it and change just one number, so code will compile and pass most unit tests, but still work not as expected :)
@Chupe_chupe
@Chupe_chupe 5 ай бұрын
Great video
@MikeShah
@MikeShah 5 ай бұрын
Cheers!
@VoidloniXaarii
@VoidloniXaarii 5 ай бұрын
Omg, so exciting, thank you. I usually feel like sh.. When think of this stuff, so thanking of u talk about this ❤
@MikeShah
@MikeShah 5 ай бұрын
Cheers, enjoy!
@hoangbuihp2974
@hoangbuihp2974 5 ай бұрын
yes sir, I have waited for this alot of time. And I want to know whether you will teach about linux in the future
@MikeShah
@MikeShah 5 ай бұрын
I can put something together
@MikeShah
@MikeShah 5 ай бұрын
Not sure on timeline -- but doing some videos on terminal is something that I am actively drafting
@hoangbuihp2974
@hoangbuihp2974 5 ай бұрын
thanks @@MikeShah i hope you will be knowed by more people in the future because your tutorial is extremely good
@MikeShah
@MikeShah 5 ай бұрын
Cheers!@@hoangbuihp2974
Delivering Safe C++ - Bjarne Stroustrup - CppCon 2023
1:29:16
managed to catch #tiktok
00:16
Анастасия Тарасова
Рет қаралды 40 МЛН
Kind Waiter's Gesture to Homeless Boy #shorts
00:32
I migliori trucchetti di Fabiosa
Рет қаралды 12 МЛН
طردت النملة من المنزل😡 ماذا فعل؟🥲
00:25
Cool Tool SHORTS Arabic
Рет қаралды 10 МЛН
" Free Pascal: Past, Present and Future" by Detlef D. Overbeek & Mattias Gaertner
46:24
IPC (International Pascal Congress)
Рет қаралды 834
5 Design Patterns That Are ACTUALLY Used By Developers
9:27
Alex Hyett
Рет қаралды 250 М.
How I use C++: a line-by-line code review
1:40:40
strager
Рет қаралды 255 М.
8 Design Patterns EVERY Developer Should Know
9:47
NeetCode
Рет қаралды 1 МЛН
Where Does Bad Code Come From?
42:21
Molly Rocket
Рет қаралды 190 М.
10 Design Patterns Explained in 10 Minutes
11:04
Fireship
Рет қаралды 2,2 МЛН
Writing Garbage Collector in C
1:43:38
Tsoding Daily
Рет қаралды 63 М.
managed to catch #tiktok
00:16
Анастасия Тарасова
Рет қаралды 40 МЛН