How To Think And Problem Solve In Coding

How To Think And Problem Solve In Coding


How To Think And Problem Solve In Coding

Join the 3-part epic masterclass that shows you how to become a 6-figure developer…
http://cleverprogrammer.com

Enroll in Learn Python™ course
https://cleverprogrammer.com?utm_source=youtube\u0026utm_medium=yt-description

==================================================
Connect With Me!

Website ► https://cleverprogrammer.com?utm_source=youtube\u0026utm_medium=yt-description
Facebook ► http://cleverprogrammer.io/facebook
Twitter ► http://cleverprogrammer.io/twitter
Instagram ► http://cleverprogrammer.io/instagram
Snapchat ► Rafeh1
iTunes Podcast ► http://cleverprogrammer.io/podcast
Google Podcast ► http://cleverprogrammer.io/google-pod
Support (Patreon) ► http://cleverprogrammer.io/patreon
Youtube ►    / cleverprogrammer  
Github (Code) ► http://cleverprogrammer.io/github


Content

0.03 -> hey you what is up how's it going this
2.85 -> is Kazi from clever programmer calm also
6.42 -> known as Papa Python today I want to
9.42 -> talk to you about the power of how to
12.9 -> think and solve problems effectively
16.02 -> alright I want to talk to you about how
17.97 -> to think about code how do you actually
19.949 -> go about dealing with problems one of
23.34 -> the things that I see with a lot of
24.9 -> people are starting out with code who
26.73 -> are beginners I was actually just on a
28.199 -> call from a profitable shortcut program
30.33 -> it's a group coaching program and we
32.099 -> have lots of students in there and we
34.14 -> have questions like these is like how do
36.09 -> i improve in coding I feel like I'm
38.309 -> stuck either they find that they're in
40.559 -> this tutorial purgatory where they'll
43.26 -> spend a year learning something only to
45.3 -> then forget it and then do it again and
47.309 -> again and again and then never feel like
49.35 -> it sticks or that they understand it I
51.27 -> made a video yes sir by the way this is
53.67 -> also day four of my video challenge so
56.19 -> I'm doing the 30 days of videos one
59.07 -> video a day so if you want to do a some
60.84 -> kind of challenge do it with me and you
62.789 -> can also follow me on Instagram clever
65.22 -> cause II and I am a lot more active on
69.63 -> my Instagram and I you can also follow
73.08 -> me along and see everything that I'm
74.939 -> doing you know including the challenges
76.229 -> in my routine but I'm back to the video
78 -> so how do you think about your palms
80.25 -> effectively and how do you actually
81.54 -> improve so in my previous video I talked
84.119 -> about what are the what are the
86.46 -> effective tips to learn how to code
88.59 -> alright and that was also really amazing
91.619 -> I'm gonna pop that up right here but in
93.57 -> this video I'm gonna talk to you about
95.28 -> how can you actually think about solving
97.71 -> problems so let's say you have some kind
100.35 -> of problem what do most people do they
102.21 -> just start writing code especially
104.64 -> beginners did you start writing code
106.47 -> then to try and see if something works
109.259 -> if something doesn't work they just
110.729 -> write more code to print more stuff but
113.25 -> they're thinking about the program very
115.38 -> very linearly it's this one thing so
119.7 -> let's say you have to make I'm gonna use
121.71 -> a simple example let's say you have to
123.479 -> make a tic-tac-toe game if they have to
126.39 -> make a tic-tac-toe game you'll just
128.25 -> start writing it and they will think of
130.5 -> everything as just one thing so this
132.39 -> includes you know
133.77 -> they'll think of the diagonals and the
136.53 -> columns and the rows all that is like
138.72 -> one thing and you start coding something
140.64 -> up but well you actually need to do
143.37 -> before you start on a project like that
144.84 -> is use a freaking white board white
147.63 -> boards are awesome so get a white board
149.58 -> if you don't have one invest in once one
151.77 -> of the best investments you can make but
153.6 -> if you don't have a white board just use
155.22 -> a piece of paper or something okay but
157.41 -> you want to think about this problem and
159.57 -> coding is thinking and I feel that
161.52 -> sometimes people forget that when
163.14 -> they're following tutorials they're just
164.55 -> typing stuff and following along they're
166.47 -> not actually actively thinking when they
169.02 -> are trying to solve a problem there's
170.49 -> just like typing stuff or running it in
172.11 -> the terminal see if it works but if you
173.91 -> want to go about solving a problem you
174.99 -> to think about it so if I have to solve
177.54 -> a problem like to take Tac Toe right I'm
181.26 -> going to be thinking about I'm gonna
182.37 -> break it up into different components so
184.4 -> tic-tac-toe first of all take Tac Toe I
187.74 -> have to come up with a representation of
191.55 -> the grid of the board so first I'm gonna
194.01 -> be like okay first the thing I would
195.99 -> have to do is actually create a board
198.48 -> write a 3x3 board so you know that might
202.8 -> be like this type of board okay and
206.72 -> whatever for now I'm just gonna have all
209.64 -> X's in there or all zeros or ones
212.34 -> doesn't matter well first I have to
214.32 -> represent this this is my first problem
217.94 -> then my second thing is that how do you
222.51 -> detect a win so I need to be able to
224.67 -> detect a win so what are some ways you
227.16 -> can detect a win well okay I can detect
229.83 -> a win based on rows so if you have all
233.79 -> three in a row you can win right and you
236.64 -> have to check consecutively then I have
239.49 -> to detect a win on the columns and then
241.77 -> I've to detect win on the diagonals so
245.13 -> that means that I'm gonna create like a
247.17 -> function and I'll have one function
250.05 -> that'll just be called like check rows
254.72 -> pretty simple right so I'll write one
258.33 -> function and all that functions job is
261 -> to check the rows that's it that's like
264 -> I so what I'm doing is I'm taking this
266.46 -> problem and breaking it into its
268.53 -> component part taking this giant problem
270.6 -> it's almost like how do you eat an
273.15 -> elephant how do you eat an elephant you
275.099 -> eat an elephant very slowly and one bite
278.009 -> at a time
278.55 -> and over the course of days weeks and
280.77 -> months I never ate element but I assume
282.78 -> that's how you would eat one probably
284.25 -> can't eat one in one sitting
285.69 -> most people code like they're trying to
288.09 -> eat the elephant in one sitting it's not
289.74 -> gonna happen you have to break it down
290.88 -> you have to understand all of the
292.74 -> component problems that one problem has
295.08 -> right it's a layer of problems so I want
298.08 -> to be able to check the rows then I want
300.3 -> to create a function called check let's
304.71 -> say columns all right and then I'll
308.37 -> create a function called check died eggs
311.96 -> so now I'll have three different
314.07 -> functions one function can check a row
316.83 -> and tell you whether there's a win
320.07 -> somebody has won or not then we have a
322.979 -> function called check columns and that
324.84 -> can detect if somebody has won on the
326.669 -> columns or not then we can have check
329.22 -> diag that can check if somebody's want
331.139 -> on the diagonal or not and then we can
333.87 -> have something called you know check win
338.96 -> all right so we have all these functions
343.11 -> the check win function well all this can
347.159 -> be it can be just comprised of all three
350.159 -> of these functions right because you can
352.44 -> just run check win and then it'll run
354.389 -> check rows check calls check diag and
356.729 -> it'll run all three of these functions
358.44 -> until it finds a win all right so right
361.08 -> now we're just trying to think at a high
362.52 -> level we're not trying to get too bogged
364.259 -> down in the coding details of how it's
366.419 -> gonna work what data structure we're
368.31 -> using we're trying not to think about
370.38 -> all those things we're just trying to
371.34 -> think at a high level of this problem
373.289 -> and trying to solve it you know in these
375.63 -> basic components eventually you'll have
377.88 -> this to-do list and then all you do then
379.53 -> the part is easy you write code you do
382.53 -> research you forgot technically but now
384.449 -> you have a big goal of what you need to
386.13 -> actually do because otherwise most of
388.38 -> the people you know are coding blindly I
390.96 -> have all these functions that can tell
393.389 -> me if a wind took place right and then I
396.06 -> can have functions that can determine a
398.01 -> loss we can have a function that can
400.72 -> whose turn it is or whether it's
404.65 -> nobody's turn right so we need we need
407.02 -> some states as well for this board we
410.05 -> need to have a state where it tells us
412.18 -> whether the game is still playing so for
414.61 -> example we can have a still in play or
419.4 -> we can have a state that says you know
424.32 -> the game is game over so meaning
428.229 -> somebody want so what this would do is
431.02 -> if we have a while loop right and we're
432.82 -> running this game over and over and over
434.889 -> again then it would be in this state
437.77 -> still I'll always check if the game is
439.72 -> still in play but if the game is not
443.56 -> still in play and somebody has wand and
445.33 -> somebody's connected all three on either
447.28 -> rows columns and diagonal stop the game
452.979 -> right and then a new game might start
455.38 -> after that the point is not to solve
457.75 -> this compete like tic-tac-toe problem
459.82 -> right here right now but my point is to
463.27 -> get you to actually think at a higher
465.31 -> level about your coding problems you
468.55 -> need to break them down into components
470.59 -> and in the start is gonna require you to
472.72 -> understand it in English or whatever
474.4 -> language is your you know mother tongue
477.01 -> but first you're gonna actually need to
479.02 -> understand the problem in English and be
481.479 -> able to describe it visually have it
484.72 -> somewhere then you need to break it down
487.27 -> into into its component parts and know
489.22 -> exactly what you need to do so first I
491.979 -> will say understand in English okay to
499.349 -> break it down okay so you want to break
506.71 -> the problem down into its component
508.72 -> parts it's that way you know exactly
510.97 -> what it is that you need to do and then
512.95 -> you have a plan of
514.47 -> so after this once you've broken it down
517.01 -> you know you'll have a plan of action
520.91 -> and then it's simply about what order
523.77 -> you want to do this in what's gonna be
525.54 -> like are you gonna make check rows first
527.4 -> so you're gonna make check win first
528.78 -> you're gonna make check diets first or
530.31 -> are you gonna make the tomini board
532.68 -> representation first so it all is gonna
535.38 -> be about you know what your plan of
537.3 -> action is and then once you get inside
540.48 -> of a function that's when you start
542.46 -> needing to worry about what data
544.86 -> structure you'll be using how you'll be
547.29 -> actually making it happen you know for
550.65 -> example are you gonna be using a
552.12 -> dictionary or are you gonna be using a
553.86 -> list of lists to demonstrate a 2d board
556.89 -> okay
557.82 -> so that those are the things that you're
559.83 -> gonna need to think about later so
561.54 -> hopefully this video has helped you or
564.33 -> at least reminded you of some of the
566.01 -> things you might have even known but now
567.9 -> I encourage you you know again to do a
570.45 -> daily challenge with me because I'm
573 -> doing a video challenge you can do a
575.07 -> 30-minute or twenty minute video
577.29 -> challenge with me I'm on day four of
579.3 -> this so you can start tomorrow or the
581.34 -> day after and just go with me and this
583.89 -> would that said I hope this was helpful
586.47 -> for you thank you so much for watching
587.55 -> and leave a comment on how you think you
590.52 -> can apply this all right I'm now being
592.83 -> very engaged with my on my platform on
595.02 -> YouTube as well so I'm responding to a
596.49 -> lot of people but if you really want to
598.26 -> be able to get in touch with me or you
600.75 -> want to see my routine and behind the
603.72 -> scenes so you can be inspired or pick up
606.45 -> a lot of tactics and strategies from me
608.07 -> definitely follow me on Instagram
611.34 -> because I am really really active there
613.44 -> I'm putting stuff there every single day
615.54 -> you can see a lot of behind the scenes
617.28 -> stuff alright thank you so much for
619.41 -> watching as always I love your face and
622.2 -> I'll see you in the next video yo guys
627.09 -> just finished video for day 4 challenge
631.26 -> got my setup right here we talked about
634.35 -> lots of cool stuff but let's keep going
636.36 -> for 30 days and if you have something
637.89 -> you want to be accountable for hit me up
639.42 -> or just do it it's gonna be fun alright
641.97 -> peace
643.11 -> [Music]

Source: https://www.youtube.com/watch?v=Hb9WUEXdkCE