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
5 Design Patterns That Are ACTUALLY Used By Developers
9:27
Alex Hyett
Рет қаралды 250 М.
Schoolboy Runaway в реальной жизни🤣@onLI_gAmeS
00:31
МишАня
Рет қаралды 2,8 МЛН
WORLD'S SHORTEST WOMAN
00:58
Stokes Twins
Рет қаралды 194 МЛН
Ik Heb Aardbeien Gemaakt Van Kip🍓🐔😋
00:41
Cool Tool SHORTS Netherlands
Рет қаралды 8 МЛН
Multilevel Inheritance in Python | Python Tutorials for Beginners #lec91
21:11
Jenny's Lectures CS IT
Рет қаралды 28 М.
" Free Pascal: Past, Present and Future" by Detlef D. Overbeek & Mattias Gaertner
46:24
IPC (International Pascal Congress)
Рет қаралды 834
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 МЛН
Creator of git, Linus Torvalds Presents the Fundamentals of git
1:10:15
Developers Alliance
Рет қаралды 80 М.
Low Battery 🪫
0:10
dednahype
Рет қаралды 912 М.
На что способен ваш компьютер?
0:34
Слетела прошивка на LiXiang L7
1:01
Настя ЧПЕК Туман
Рет қаралды 3,9 МЛН