text
stringlengths
1
81
start
float64
0
10.1k
duration
float64
0
24.9
much functionality honestly the version
7,596.4
3.64
that we just typed up these 10 lines
7,598.119
3.921
this is fine this solves this problem
7,600.04
4.519
but as our code gets longer as we start
7,602.04
4.119
collaborating with other people as the
7,604.559
2.801
problems we're trying to solve with code
7,606.159
2.92
get more sophisticated you're going to
7,607.36
4.839
find that your code gets messy quickly
7,609.079
4.48
and you're going to find that you have a
7,612.199
3.241
huge number of functions for instance in
7,613.559
4.361
one file and some of them are related to
7,615.44
4.759
each other but some of them are not well
7,617.92
3.639
at that point wouldn't it be nice to
7,620.199
3.121
just organize them a little differently
7,621.559
3.481
and in the World of Harry Potter let's
7,623.32
3.48
have a class for student let's have a
7,625.04
3.599
class for Professor let's have a class
7,626.8
3.72
for the Sorting Hat let's have a class
7,628.639
3.681
for something else and so once your
7,630.52
3.719
world gets much more complicated than
7,632.32
4.08
some of the demonstrations we do here in
7,634.239
3.48
class when we want to focus on
7,636.4
3.759
individual ideas is object-oriented
7,637.719
4.041
programming is just a way of
7,640.159
4.241
encapsulating related data that is
7,641.76
4.839
variables related functionality that is
7,644.4
5.08
methods inside of things that have names
7,646.599
5.08
these things are called classes so it's
7,649.48
4.239
just another way to solve problems and
7,651.679
3.721
when we focused on libraries a couple of
7,653.719
3.761
weeks back that too was another solution
7,655.4
3.839
to the same problem you could Define
7,657.48
4.119
your own modules or packages put some of
7,659.239
4.281
your data Andor functionality in there
7,661.599
4.361
and that's fine too and sometimes which
7,663.52
4.52
one you should use overlaps if you're
7,665.96
4.04
familiar with ven diagrams the
7,668.04
4.119
overlapping region might mean that you
7,670
4
could use a class you could use a module
7,672.159
3.52
or a package you could just use a single
7,674
4.8
local file over time you'll develop an
7,675.679
4.56
instinct and maybe even a personal
7,678.8
4.399
preference for which tool to
7,680.239
6.121
use all right let me propose now that we
7,683.199
5.04
apply this same idea of a class method
7,686.36
4.359
to clean up one other thing as well let
7,688.239
6.48
me close haty and reopen student. py as
7,690.719
5.96
we left it earlier and let me go ahead
7,694.719
4.48
and simplify it just a little bit
7,696.679
4.841
uh I'm going to go ahead and get rid of
7,699.199
4.4
the properties not because there's
7,701.52
3.28
anything wrong with them but just
7,703.599
2.6
because I want us to focus on some of
7,704.8
3.64
the key ideas when we began with this
7,706.199
3.96
program so I'm going to go ahead and
7,708.44
3.6
keep Maine as well I'm not going to
7,710.159
4.321
adversar try to change Harry's uh
7,712.04
4.599
address there I'm going to instead go
7,714.48
4.119
ahead though and just print the student
7,716.639
4.161
but this is the thing I want to focus on
7,718.599
4.921
here this in our previous student
7,720.8
4.839
examples was kind of a missed
7,723.52
4.679
opportunity to clean up my code well
7,725.639
4.44
what what do I mean by that well up here
7,728.199
3.641
at the top of this file even though I've
7,730.079
3.201
simplified it by getting rid of the
7,731.84
2.64
properties and all of that error
7,733.28
2.48
checking because I want to focus on the
7,734.48
3.28
essence of this class now just the
7,735.76
3.56
students name and the house and the
7,737.76
4.839
printing thereof this is by nature of
7,739.32
5.72
classes an object-oriented programming
7,742.599
6.08
theoretically all of my student specific
7,745.04
6.079
functionality that is to say if I have
7,748.679
4.241
functionality and data related to a
7,751.119
4.56
student you the programmer my colleague
7,752.92
4.719
would assume that it's all bundled up
7,755.679
3.96
encapsulated so to speak inside of the
7,757.639
4.44
student class and yet if you scroll down
7,759.639
4.721
further what is this like there's a
7,762.079
4.241
function called get student that just
7,764.36
4.04
exists elsewhere in this file that
7,766.32
3.839
prompts the user for a name prompts the
7,768.4
3.64
user for a house creates the student
7,770.159
3.92
object and then returns it like that's
7,772.04
5
not wrong like it works and we saw many
7,774.079
5.52
many times it kept working but this is a
7,777.04
4.88
little weird right because what if this
7,779.599
4.921
is a function that helps you get a
7,781.92
4.48
student helps you get the name of a
7,784.52
3.84
student and the house of a student why
7,786.4
3.6
why isn't that functionality in the
7,788.36
3.68
class itself after all as my code gets
7,790
3.719
more and more complicated and does more
7,792.04
3.159
things I'm going to be looking at the
7,793.719
3.281
student class for all student related
7,795.199
3.081
functionality I'm not going to be
7,797
3.239
scrolling down expecting that oh maybe
7,798.28
3.839
there's some other student functionality
7,800.239
4.4
just kind of randomly later in this file
7,802.119
4.641