Python for Absolute Beginners Transcripts
Chapter: Course conclusion
Lecture: Review: Problem solving

Login or purchase this course to watch this video and the rest of the course contents.
0:00 Next thing we discussed were some techniques for problem solving. Remember it's very challenging when you sit down at just a blank screen
0:08 to start writing code. Because it's there's so many ways you can go. So many ways you can solve it. And if you don't break it down in the right way
0:15 it's actually kind of challenging. We talked about these different ways and these techniques that you can use.
0:20 One was, have I seen a similar problem solved before? And which way is this similar? And can I use the same solution for that part of it?
0:28 Visualizing the data helps you understand what you're working with. Leads ahead to thinking about what data structures
0:34 or how you're going to store and pass it around. Divide and conquer is a huge part of this. We did this with all our games, and our algorithms.
0:42 We sketched out like these are the four or five things we got to do to make this work. And then you don't have one big problem
0:47 you have five small problems. And that's much easier to solve. Run through the data structures. We saw that switching from some giant
0:54 if else if else nested if else statement to just a dictionary turned out to be super powerful. And even made our code more flexible.
1:04 It was more readable, more maintainable and it had other benefits that we maybe didn't see coming. Is there an existing pypi package.
1:12 Meaning, you were thinking about solving some problem. Instead of writing all the code to do it is there something basically out there?
1:18 There 215,000 packages over at pypi.org. Chances are, a lot of the challenges you're facing can be a couple of function calls against those libraries
1:27 that you don't have to work on. That's the best way to do it if you can. Remember, struggling with working through these problems
1:33 that's part of the journey. That's also part of the payoff. So when you get it right and when you finish that program and you get it working
1:40 the joy is overcoming all these steps. So this is just part of the journey and embrace it. And don't suffer from analysis paralysis, just start.
1:49 We have cool refactoring tools built into our software. The software's easy to change and you honestly won't know all the details
1:56 that you need to think about until you're part way through solving the problem. A lot of times the best thing to do is quickly run through the stuff
2:03 and just get started and change it as you learn more.


Talk Python's Mastodon Michael Kennedy's Mastodon