Mastering PyCharm Transcripts
Chapter: Tool windows
Lecture: Todo demo
0:01 The first assorted tool that I want to talk about
0:03 has to do with keeping notes for yourself.
0:06 There's lots of ways you can track what needs to be done with a program,
0:09 you can have a github repository, and have an issue there on a particular thing
0:14 or just some kind of issue tracking in general, Jira for example.
0:18 You could have code comments and those maybe say
0:21 hey sometimes you need to optimize this function
0:24 or make sure we have the proper error handling here, things like that.
0:27 But how do you know to go back to that
0:30 and where should you go back to actually to get it.
0:33 So check this out, if we come over here,
0:36 let's go to the search, actually not the search one,
0:39 let's go to one that has something more interesting,
0:41 let's say over here, we want to have some kind of reminder,
0:45 we could say for this, you know what, this is great
0:48 what I want to do is remember to use a hash rather than full text for the key,
0:56 so it's great and we could remember that
0:58 and somebody comes in here and they are looking through
1:00 and they find this and then are like,
1:02 oh yeah look, here I'm supposed to remember to do this.
1:05 But, on large projects that doesn't maybe work so well
1:08 and also how do you know if you got them all.
1:10 So I can come over here and type TODO, that's cool
1:13 and then boom, that turns yellow, okay,
1:16 so that's kind of cool, the yellow stands out
1:18 and you are like here is something I really, really should do.
1:21 So maybe we'll say key = hash (key)
1:27 and now we've remembered to do that, something to this effect,
1:31 but how do we find them all,
1:33 if we're not on this page we don't know to go on and do that,
1:35 so here we have this little to do thing,
1:38 so down here in this section, we have two things that are to do's
1:41 and check out the little color there,
1:43 this one, we got to improve the index on our data access
1:46 when we did this demo, we theoretically improved the index
1:50 it made it a 100 times faster, 20 times faster,
1:53 I can't remember what we did, something like that.
1:55 And over here this is remember to use the hash,
1:57 so this is really cool, we can jump around on and go to these things.
2:00 So we can come here and we could say
2:03 yeah, that was great, we improved the index and that one goes away,
2:08 come over here and say, yeah I think we did this,
2:10 let's run this again, just to make sure
2:16 where is our performance one— make sure that still works
2:19 it's pretty fast, it looks like my little hashing trick worked,
2:24 it was not too much work, was it, I could have done that before
2:27 but this little reminder was kind of nice.
2:29 Now, these are great, except for sometimes
2:32 you get other people's reminders, watch this,
2:34 so check it out, we have 69 other reminders,
2:38 really, I don't remember doing that much work,
2:40 here's the eggs from our virtual environment
2:43 and in here, these are all the reminders to do with this thing.
2:48 So watch this, if we go over here and jump to the source on this one
2:51 remember, we can set these directories as excluded
2:58 and one of the things that happens when you exclude the directory,
3:01 in addition to other things, is it no longer tracks the to do's in there,
3:07 that's pretty cool, notice same thing for node
3:09 down here in or less file, it doesn't have to be Python
3:12 in our less file, we have a to do, but you know what,
3:15 this bit right here, I am not really sure
3:18 like we don't want to exclude bootstrap all together
3:20 so it's kind of careful, we don't want to just go and do this
3:27 but this stuff, like this less here, we don't need it for that, do we,
3:31 so let's exclude that, there we go, now we have zero to do's,
3:39 so let's just go put one more in and collapse everything down for a sec,
3:53 maybe something like this, to do, evaluate whether to expire the cache,
3:59 right, we probably need something different than just his wrapper,
4:01 we could move the caching concept into our method and do it ourselves,
4:06 but now we have another one and see right here,
4:08 if we expand it out that's our final to do.
4:11 So this to do thing, I find this to be actually really helpful,
4:13 I don't think it really replaces issue tracking
4:17 but it is pretty handy to put reminders in here
4:20 just don't forget to follow up, like don't put a reminder like
4:23 we should really check if the user is admin before we do this
4:26 but I am just going to write it for now,
4:28 if you forget that, that's going to be bad right,
4:30 ok so to do's— pretty sweet.