00:3.04 Hello again. I am so very excited about this chapter.
00:7.11 Refactoring is one of my absolute favorite topics.
00:10.82 Why? Because I see so many people start to write software and then they get
00:15.24 frozen in place thinking oh well what if I'm doing it wrong And what if in
00:19.03 the future we need this other feature or there's other ways to write this part of
00:23.49 the program and they just get stuck when they spend so much time thinking and worrying
00:28.24 about getting started. Instead of just getting started.
00:31.53 And with refactoring we can make some progress,
00:34.81 we'll learn a bunch more about the problem we're trying to solve and then we can
00:38.44 apply refactories changes to our code that changed the structure or the architecture without actually
00:44.64 changing the behavior. We can apply these refactoring to make it better.
00:48.63 So instead of getting stuck with analysis,
00:50.91 paralysis or worrying too much about how to get started.
00:54.07 Just get started and apply what you learn in this chapter to keep you on track
00:58.76 That's the way real software is built.
01:1.84 So we're gonna see as we write our code,
01:4.03 there'll be problems like there'll be a method that's 500 lines long.
01:7.78 There'll be variables that have very poor names,
01:9.92 methods that have poor names, methods that should be broken apart.
01:14.07 Class hierarchies that contain the abstractions at the wrong level.
01:17.96 All kinds of things that we can do to move code around automatically with PyCharm.
01:22.39 Now I want to be super clear here.
01:24.74 This is not some sort of advanced find and replace.
01:28.18 Not at all that could find just duplicates of names.
01:32.03 they don't actually have any relationships across our files and wreck our program.
01:36.24 Know what this is, is PyCharm,
01:38.59 loads up all the files in our project.
01:40.72 It turns it into an abstract syntax tree where it understands the actual relationships between the
01:46.2 symbols and code. And when you apply those changes those re factories,
01:49.87 it's not based on names, it's based on how the code actually works.
01:54.24 So it's really, really reliable and it truly understands what's going on.
01:58.15 So fantastic tools in PyCharm for refactoring.
02:2.61 I think it's such an important skill to master and to know about and the tools
02:6.93 are great. So we're going to dive into it and see how to apply them
02:9.81 to some examples in this chapter.
