Effective PyCharm Transcripts
Chapter: Tool windows
Lecture: Todo demo

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


Talk Python's Mastodon Michael Kennedy's Mastodon