Brought to you by Michael and Brian - take a Talk Python course or get Brian's pytest book


Transcript #3: Python 3.6 is coming, and it's awesome plus superior text processing with Pynini

Return to episode page view on github
Recorded on Monday, Nov 21, 2016.

00:00 This is Python Bytes, Python headlines and news delivered directly to your earbuds.

00:04 Episode number three, recorded November 21st, 2016.

00:08 Hey, Brian.

00:09 Hello, everyone.

00:10 Hey.

00:10 Hey.

00:11 Sorry.

00:11 Hey, man.

00:12 Great to chat with you.

00:13 I'm really loving this show we're putting on.

00:15 This is so much fun.

00:16 But before I get to the headlines, I actually have some good news about the show.

00:19 What's that, Michael?

00:20 Python Bytes is now brought to you by Rollbar.

00:23 They take the pain out of errors, and we'll hear from them later.

00:27 But thank you, Rollbar, for sponsoring the show.

00:28 That's really awesome.

00:29 We appreciate it.

00:29 That's really awesome.

00:30 Thank you, Rollbar.

00:31 Yeah, yeah, definitely.

00:32 All right, let's get to the headlines.

00:33 Every week, there's so much cool stuff happening, right?

00:37 Well, yeah.

00:37 And this last week, I just read a huge list of articles I read, Python-related.

00:43 I really enjoyed.

00:44 It was a hard time picking out which one to talk about.

00:47 Yeah, it really was.

00:48 Yeah.

00:48 All right.

00:49 Well, but you had to pick, right?

00:50 Because we're only doing three each.

00:52 We're trying to keep this short and on topic.

00:54 Yeah, and I thought maybe we'd pick the same three, but we didn't.

00:57 So first up, I've got an article titled, How to Get Superior Text Processing in Python with PyNinny.

01:04 I think I'm pronouncing that right.

01:06 PyNinny.

01:06 Or maybe it's Nini.

01:07 I'm not sure.

01:08 PyNini?

01:09 Like the Knights of Knee from Monty Python.

01:12 Oh, yes.

01:12 Yeah, yeah.

01:13 You're probably right about that.

01:14 But this is from the O'Reilly blog, and it was written by Kyle Gorman and Richard Sprout,

01:20 I think.

01:21 Yeah, both who are PhDs in linguistics of some variety or other, right?

01:25 Yeah.

01:26 And actually, because of that and also because of the title, I was afraid this was going to

01:33 be sort of a hard thing to get into, but it's a really easy article.

01:36 And my interest in it is mostly because when I read the Pragmatic Programmer a long time

01:43 ago, it introduced me to the concept of mini languages to solve simple problems with this

01:48 is the data I have and how to change it into the data I need.

01:52 And often I used regular expressions for things like that, but sometimes that's not enough.

01:57 And the next step always seemed to be to build up a parser or an abstract syntax tree, and

02:03 that's way too far that I want to go.

02:06 I think this article produces a nice halfway ground talking about what they call them is

02:12 finite state transducers, which sounds like something in a Back to the Future movie.

02:18 Quick, Marty, connect the finite state transducer.

02:22 Yeah, exactly.

02:23 But I like working with finite state machines, and apparently this is a finite state machine

02:30 turned into something else.

02:31 But the article starts with a small introduction to what finite state machines are, and they're

02:36 really easy to get the grasp of.

02:38 If you look at the article, there's some nice pictures.

02:41 And then they talk about how that applies to text processing and then introduces a concept

02:47 finite state acceptor, which I think just accepts things.

02:52 And then transducer spits things out.

02:54 I believe I get this right.

02:55 But how this applies to how to translate your thinking from regular expressions to these.

03:00 And anyway, it goes through some of this, gives an example using cheese names, which I love the

03:06 Python tradition of using cheese names and examples.

03:08 And then introduces a library called PyNinny from Google to help build these things up.

03:16 And at the end, I kind of got a little bit lost, but I wasn't working through the examples

03:22 myself.

03:22 It is something that I think I might spend an afternoon poking through.

03:26 Yeah, it is quite interesting, right?

03:28 I mean, one of the things that makes me really happy about looking at this is, one, it's not

03:32 too complicated.

03:33 And two, it gets you away from regular expressions, which anything that gets me away from regular

03:38 expressions puts a smile on my face.

03:40 Well, I actually really like regular expressions.

03:43 Although it is true that, I mean, there's oftentimes with text processing where it doesn't work when

03:51 you can't do it line by line.

03:52 And I'm probably not going to use this right away, but I appreciate this tool introduction

03:57 so I can put it in my tool chest.

03:59 And next time I have a problem like this, I might look this thing up.

04:02 Right.

04:03 You guys will be looking at something, some dating, like, oh, you know what we need?

04:06 A finite state transducer.

04:07 We're going to solve this.

04:10 And I totally want to do that in a meeting.

04:12 I think we should put a finite state transducer in here.

04:15 Fantastic.

04:16 Now, it does things like pluralized stuff.

04:20 You can teach it, like, for example, you taught it what all the cheeses were, and then it could,

04:24 like, locate sentences that were talking about cheese and do lots of interesting processing,

04:31 not just pattern matching.

04:32 It's cool.

04:33 It isn't, but it does start out with, like, a simple example of, like, if I tell it all the

04:38 cheeses to look through some code and find the cheeses and add a cheese tag around it or something.

04:43 Yeah, yeah.

04:44 There are simple solutions, simple problems that it can solve as well.

04:48 Yeah, it's great to have it in your toolbox.

04:50 Well, you know where I would like to run it, though?

04:52 I don't really want to run it on Python 3.5 or definitely not on 2.7 anymore.

04:56 Oh, yeah.

04:57 Nice transition there.

04:59 Thank you.

04:59 Yeah, I want to run that on Python 3.6.

05:02 And, you guys, there is amazing stuff coming in Python 3.6.

05:06 And they just released beta 4.

05:08 Beta 4.

05:09 Wow.

05:10 So, yeah, I don't know what the exact release schedule of the final release is, but I think

05:14 it's coming up pretty quickly.

05:15 These things are looking pretty solid.

05:17 Let me just give you a sense of some of the PEPs, Python enhancement proposals that are coming.

05:21 First up, it seems like no programming language these days is content with their string formatting.

05:28 And Python is like, look, we only have, like, eight ways to format strings.

05:32 We need another.

05:33 But this new way is actually pretty good.

05:35 There's a PEP498, and what it is about is formatting string literals.

05:41 So, imagine you've got a string, and normally you'd like, there's a variety of ways to do

05:45 it.

05:45 Maybe the newer way would be to do something like, say, I want to say, hi, my name is,

05:50 and you have a variable called name, right?

05:52 So, you might say, quote, hi, my name is curly bracket zero, quote, dot format, name, yeah?

05:58 Well, it kind of takes this idea and just says, well, why do you have to do the dot format

06:03 and use arguments and orders and then number them?

06:06 Why don't you just put the name of the variable in the string?

06:08 So, now you could say, hello, my name is curly name.

06:11 And now, whatever the value of name is, if there's a variable that will be put into the

06:15 string as if you did the first thing I said.

06:17 Oh, that's really cool.

06:18 Yeah, it's pretty cool.

06:19 The only bummer is you have to indicate that it's this new format string.

06:25 I think it's an F prefix on the string.

06:27 Oh, okay.

06:28 But, you know, because otherwise, you'd have like dictionary stuff mixing in, just for compatibility.

06:33 It's got to have a little identifier.

06:35 But other than that, yeah, it's a really cool way to format stuff.

06:37 All right.

06:38 So, we also have another easy to understand but really nice one, PEP515, which will let

06:45 you put underscores in numerical literals.

06:48 So, if you have a number like 1-0-0-0-0-0, and you look at it, is that a million?

06:56 Is that 100,000?

06:57 Is it 10 million?

06:58 Like, it's hard to know like what the separators are.

07:01 So, now you can put underscores.

07:02 So, you could have like 1-0-0-0-0-0-0-0-0.

07:07 And that would, it basically just ignores the underscores.

07:11 But it allows you to visually see, oh, that's a million, not a hundred thousand.

07:13 Something like that.

07:14 Oh, that's kind of cool.

07:15 Yeah, that's pretty cool.

07:15 No, it's not going to be world changing.

07:17 One thing that is more significant, I guess, is in Python 3.5, we have type annotations.

07:24 Right?

07:25 So, I could have a function.

07:26 I could have a function.

07:27 I could say it takes a, let's say, it says create, functions name is create, and it has

07:34 a thing called entity.

07:35 Well, if you were given that function, you could be like, I have no idea what this does.

07:39 Like, entity, maybe that has to do with databases.

07:41 But in Python 3.5, you could say colon, customer, where customer is like a class or something.

07:46 And then the tooling and whatnot would know to give you the right auto-completion and various

07:52 type checking and whatnot for that type.

07:55 Right?

07:55 But that only applied to functions.

07:57 You couldn't put it on like variables and other types of class fields and other things

08:02 that are outside of functions.

08:03 So, this PEP 526 brings that to functions.

08:08 That seems like obvious.

08:09 I don't know why they didn't have that at the start.

08:11 Yeah, it definitely seems obvious.

08:13 So, you know, maybe you don't care too much, but tooling will care.

08:17 Linters might care.

08:18 So, like the tools you could possibly get better because of this.

08:21 All right.

08:21 So, we have 525 asynchronous generators.

08:24 Async and away is awesome.

08:25 Yield, yield from are awesome.

08:27 But they were not friends previously.

08:30 No, you couldn't use them together.

08:31 So, you could either have an async coroutine or you could have a generator, but you couldn't have both.

08:35 Now, you can have both.

08:38 And similarly, we have asynchronous comprehensions.

08:40 And, you know, actually one of the biggest things is the change to dictionaries coming in Python 3.6.

08:46 What?

08:47 Yeah, so you might think, well, Python has had dictionaries since from the very beginning.

08:53 When you add fields or attributes to a class, it's actually stored in Dunderdict.

08:58 I mean, dictionaries are, it's keyword values.

09:00 Like, all over the place, dictionaries play a super important role.

09:04 Well, in this release from 3.5 to 3.6, dictionaries are now 20% to 25% more memory efficient.

09:13 They should be a little faster.

09:15 They are ordered.

09:17 So, the order that you put things in, they remember that, right?

09:21 Like, if when you first started working with dictionaries, you're like, multiple dictionaries can have the fields show up at different times and different orders.

09:29 It's bizarre, right?

09:30 You can keep switching.

09:30 Now, it's always consistent.

09:32 The order dict part and making them fast is good.

09:36 So, it's all good stuff.

09:37 Yeah, it's all good stuff.

09:38 We've got a new secrets module coming.

09:40 So, you have cryptographically strong random number generators, windows.

09:45 They've now marked the Python executable as long path aware.

09:49 So, I don't know if you guys are aware, but Windows typically has, like, crummy 260 character path limits for a long time.

09:56 There's a lot of legacy stuff that applies that to, like, newer code.

09:59 So, now, long path limitations are gone on Windows, which, if you write code that has to run on Windows, you'll care a lot about that.

10:05 Wow.

10:05 Yeah, actually, I try to write code that I don't have to care about Windows, but...

10:10 Yes, exactly.

10:11 So, there's...

10:13 If you go look through the link, the release notes, the documentation there, there's a lot more stuff.

10:18 I'm scratching the surface on all the cool stuff coming in 3.6.

10:22 So, if people need one more reason to upgrade from 2 to 3, well, here's, like, 20 or 30 more reasons.

10:28 Yeah, and I like the peps that you talked about.

10:30 You left the links to those particular peps in the show notes.

10:34 So, that's great.

10:35 Yeah, yeah, definitely check them out.

10:36 Okay.

10:36 Hey, Brian.

10:38 Hey.

10:39 Before we get to the next headline, let me tell you about Rollbar.

10:41 Well, tell me about Rollbar.

10:42 All right, man.

10:43 So, Rollbar is sponsoring Python Bytes, and we're really excited about it.

10:46 I use Rollbar for my website.

10:47 Rollbar is a package you install in your Python web app, Pyramid, Flash, Django, whatever, and anytime there's an error, you get an immediate notification and detailed error reports.

10:56 So, you know, even though the Talk Python websites handle almost 2 million dynamic HTTP requests per month, and they transfer, like, 4 to 5 terabytes of data,

11:04 I'm not worried about them.

11:04 Really?

11:05 No, not really, because if something goes wrong, my Slack, my email, my phone, everything will be blown up with notifications.

11:11 And, you know, I don't get many, but when they come in, like, all the info is there, so I often don't even have to debug it.

11:17 I just go and fix the problem.

11:18 That's pretty awesome, right?

11:18 That's very awesome.

11:19 Yeah, I love Rollbar.

11:20 So, and the Python Bytes listeners, all you guys out there, you can have the same peace of mind.

11:25 Just visit rollbar.com slash Python Bytes and sign up for the free tier.

11:28 You get, like, 300,000 free errors tracked, although I really hope you don't have that many.

11:33 Definitely.

11:34 You should do more testing if you do.

11:36 You definitely should.

11:38 Well, next up for me, I am a sucker for, like, I really like efficiency, developer efficiency.

11:45 That's always kind of been important to me.

11:47 And part of that is being able to set up your personal development environment to help you succeed.

11:53 And I know it's different from everybody, and I'm always tweaking mine.

11:57 I like articles when people write about them.

11:59 So there's an article by Dougal, I think, Dougal Matthews, called Create an Excellent Python Dev Environment.

12:07 And he goes through installing Python, but everybody knows how to do that.

12:12 But he's got some goals of, like, don't muck with the system Python and set up virtual environments easy.

12:18 And it's interesting.

12:20 One of the things I think is interesting about this article is to start off the bat saying why he has particular goals for why he's chosen things.

12:27 And that's kind of neat.

12:28 Yeah, that's cool.

12:29 Because you might look at it and go, I would never do that.

12:31 But maybe your goals are different than his.

12:33 And you can really understand where he's coming from because of that.

12:36 That's cool.

12:36 Yeah.

12:37 Actually, the first part confused me because he was covering a project that I'd never heard of called pyenv or P-Y-E-N-V.

12:45 I'm more used to V-E-N-V, which just comes in 3.6 or virtual environment.

12:52 So this is something different, and I just will have to check it out.

12:56 But it's something like virtual environments, but it's independent of Python.

13:01 It sets them up separate, I guess.

13:03 I don't know.

13:03 Yeah.

13:04 But I haven't used that much either, so I might be a little off here.

13:06 But I think it's kind of like for managing and creating and activating different virtual environments.

13:11 It's like your virtual environment manager.

13:14 Okay.

13:14 I think.

13:15 Yeah.

13:16 Next is a pyenv virtualenv, which is apparently similar to virtualenv wrapper, which a lot of people use.

13:24 I don't use either of those, but I still don't get what they're for.

13:29 Straight virtual environments work fine.

13:31 I don't understand what I need more for.

13:34 You have different goals.

13:35 Yeah, that's probably it.

13:36 The next thing he talks about is a thing called Pipsy, which I hadn't heard of, and I just used it today.

13:42 It's a tool to let you install Python-based command line utilities in their own virtual environments so that you can use them.

13:50 You can just set your path to them so you can use them on the command line from anywhere.

13:54 That's really cool just to have like these little virtual environments just for a command line utility.

13:59 That's really cool.

14:00 I never really thought of doing it that way.

14:02 That's great.

14:03 When I was talking in one of the interviews I've done, I heard about more people using Atom than before.

14:09 And I tried to set up Atom and I needed to give it a path to Flake 8.

14:15 And I'm like, oh, I'll use Pipsy to set up this so that you can see Flake 8.

14:19 So I've done that.

14:20 Oh, nice.

14:21 But he does talk about with Pipsy.

14:23 He usually includes talks for testing multiple environments, which I highly recommend.

14:31 Flake Docs, which is a static site generator documentation thingy.

14:36 I've never used it.

14:37 Get Review, which I would totally use.

14:40 It's a Garrett integration for Git, but I don't use Git right now, but at work.

14:44 And I actually do code reviews on my own code in my free time.

14:50 And then Flake 8, of course, which is my favorite, recommended, way too static in the analyzed stuff.

14:56 And then, as a side note, one of the things he was talking about for this Pi A&V is because it's compatible with Fish,

15:05 which is a different shell that I've never heard of.

15:09 I use Bash.

15:10 I tried Z-Shell for a while.

15:12 I'm always used.

15:13 I think it's fun to try new shells.

15:16 So maybe I'll give it a shot.

15:17 Yeah, it's definitely worth checking out, Fish.

15:19 That sounds cool.

15:20 I use Z-Shell as well.

15:21 I just actually formatted my computer and I'm like, you know, I might try a different shell this time.

15:26 And I set everything up.

15:27 So that's cool.

15:28 I'll check out Fish.

15:28 I do love to see the way people put these environments together.

15:32 And I think it really can help people who are new.

15:35 It can help you discover things you don't know about, like Pipsy.

15:37 That's really great.

15:38 I was just stuck in traffic today, this morning, and was thinking for some reason about this stuff.

15:44 You know, other people, I don't know what they dream about, but this is what I was daydreaming about.

15:49 I was thinking, you know, I might try switching to Conda instead of pip and try using Conda for managing all these environments.

15:57 I really like the way that Conda, like, vets the packages and pre-compiles them for you.

16:02 I was reading about something.

16:03 It was like, well, as long as you have this compiler set up, it'll probably be fine, but it might not work so well.

16:10 I'm like, you know what?

16:11 Maybe I should just use Conda, and, like, all those problems are solved by the Continuum guys.

16:15 And so I'm also doing a lot of virtual environments with Python 3, V, and V.

16:20 And the one thing that I like that I've stopped using the main Python REPL, and I'm using PtPython.

16:27 Do you know PtPython?

16:28 PtPython.

16:30 No, I don't.

16:31 So PtPython is basically the regular REPL, but it has a lot better editing and history and auto-completion and all sorts of stuff for what you can do.

16:42 So, like, for example, if you type in a function in the regular REPL, you know, it's like three lines with indentation or whatever.

16:47 If you want to edit it, you've got to remember to, like, always replay them in the right order.

16:52 You know, up arrow four times, enter, up arrow three times, make the change, you know, that kind of stuff.

16:57 This will, like, if you hit up arrow for code suites, it'll bring the whole thing back and you can edit it, stuff like that.

17:02 Oh, okay.

17:03 Do you work in the REPL very much?

17:05 Not too much.

17:06 Usually I'm in some kind of editor.

17:07 But when I am there, I've been moving to PtPython.

17:10 That's pretty cool.

17:10 I think I'll check it out.

17:12 Yeah, yeah, check it out.

17:13 So what do you got next?

17:14 Well, a lot of people have been checking out Python lately.

17:16 And there was an interesting article.

17:18 Is it an article?

17:20 It was an article that's posted as a GitHub repository, which is accompanied by a Go program that's generated a bunch of statistics

17:27 and graphs.

17:28 And the thing I'm actually linking to is a Reddit article with, like, 350 upvotes and tons of comments.

17:35 So you can check out the conversation.

17:37 But the headline is awesome.

17:39 GitHub language statistics.

17:41 Python is the second most popular language on GitHub for active repositories.

17:46 That's awesome.

17:47 Yeah.

17:47 I mean, Python's growth is just continuing and expanding.

17:52 And it's such a cool time to be involved in the language.

17:55 And here's just one more stat to back that up.

17:58 Yeah.

17:58 Looks like the graphs you have to click through from the Reddit to the GitHub page.

18:03 Yeah, yeah.

18:04 So I'm linking to both.

18:05 Okay.

18:05 So they say, we're going to study active repositories because it doesn't make any sense to think about GitHub statistics if something was put there five years ago and hasn't been touched.

18:15 All right.

18:16 So they said, let's consider the set of active repositories.

18:19 Those are created or updated during the period.

18:22 And the period is like a bunch of dates, like, throughout the last three years, you'll see when you get there.

18:28 And it has to have at least one star.

18:30 So people have to, somebody has to care about it.

18:32 Somebody has to care enough about it to have forked it.

18:35 And it must be more than 10K.

18:38 Right.

18:39 So it can't just be like, well, I put up this one file and somebody forked it or, you know, something silly like that.

18:45 It's got to be like a real project.

18:46 So if you take all of those together, JavaScript turns out to be the most popular.

18:51 But JavaScript, I'm sure, is highly overcounted.

18:55 I'm pretty sure that's generally true on GitHub statistics because almost every one of my Python projects has some JavaScript.

19:03 You know what I mean?

19:04 Yeah.

19:04 I mean, since it's the front end, it's almost every project has it.

19:08 Right.

19:09 Almost any web project in any language is going to be counted as JavaScript to some degree in the language category.

19:15 And so I feel like JavaScript, while it is extremely popular, I think it's massively overcounted in these types of stats.

19:22 And it seems to appear that way in the graph.

19:26 But so Python displaced Java, which we can all cheer for that.

19:30 Right.

19:30 That's awesome.

19:30 Yeah.

19:31 But let me give you some stats that are pretty interesting that will I think this might blow your mind.

19:34 So back in November 2014, there were 1,790 active repositories by the four criteria above.

19:41 Yeah.

19:42 That were Python.

19:43 This is just Python.

19:43 November 2015, there was 2,500.

19:48 And if you look throughout the year of 2015 and early 2016, there's, it would vary, but it's like 2,000 to 2,500, 2,600.

19:58 By November 2016, there's 10,944 active repositories.

20:04 It's just like, it's growing like crazy.

20:06 Yeah.

20:07 I love seeing that.

20:08 And I think one of the things I like, I think has changed in that timeframe is the, I don't know if it can be attributed to this, but the cookie cutter project has made it a lot easier for people to set up something to share on GitHub.

20:23 Yeah.

20:24 Cookie cutter is really awesome.

20:25 If you guys don't know about cookie cutter, check it out.

20:27 It's a cool project.

20:28 I'm sure it's not hurting.

20:30 Yeah.

20:30 Anyway, those are, that's good.

20:31 Also, it makes me think that I spent the right time learning a new language.

20:36 So I started from C++.

20:38 Yeah, absolutely.

20:39 You know, it's good to be in a place that's growing.

20:41 Now, I mean, obviously take these stats, they're with a grain of salt.

20:45 They're sliced in all these various criteria and so on.

20:48 So they might not be perfect, but they give a glimpse into a world that is doing very well and is very fun to be part of.

20:56 So I'm happy to see it.

20:57 Okay.

20:57 We're up to my number three pick, which is handling Unicode strings in Python.

21:03 It is from, I know I'm going to get this name wrong, Wan Li Song, I think.

21:08 But we'll link it, of course, in the show notes.

21:11 I like it because it's a nice article to introduce people about the concepts of text representation in Python.

21:18 And this comes up, at least, it hurts my head sometimes because I came up with the 2.7 Python world.

21:26 And I think anybody that learned with 2.7 and had to switch to a more recent 3x version,

21:32 sometimes it's hard to understand how the switch happens.

21:35 And there's a nice table for some of the things that are different.

21:39 And then it goes through specifics of dealing with Unicode in things like I.O. boundaries to databases or services.

21:50 And then also a few other examples are dealing with it with logging, with JSON encoding, and with Redis even.

21:57 A nice pointer to a 2012 article from Ned Batchelder called Pragmatic Unicode, which I hadn't read before.

22:04 So I learned a lot about Unicode in this last week.

22:07 Oh, yeah.

22:07 That's great.

22:08 If you have to juggle that stuff, it can be tricky.

22:10 I remember talking to some of the Web Foundation guys.

22:14 I think it was Kenneth Wrights and Requests, but it could have been Armin Roeniger and Flask.

22:22 I'm not sure.

22:23 I think it was Kenneth.

22:24 Anyway, seeing that one of the most challenging things of upgrading their projects from 2 to 3 or supporting 3, let's say,

22:32 is the dramatically different way that bytes go to strings and all of this kind of stuff.

22:38 So, yeah, if you've got to upgrade something that's 2 to support 3, be really careful with the strings.

22:45 Yeah, and this is another one of those, I'm going to bookmark it, and if the next time I come up with an issue, I'll look through this, see if it can help me figure out how to fix it.

22:56 Yeah.

22:56 Awesome.

22:57 All right.

22:57 What do you got as your last one, Michael?

22:59 My last one, I think this one might be a little surprising for you.

23:02 Let's see.

23:03 So, I've asked many people what their favorite editor is over at Talk Python to me, and I've heard many answers.

23:10 You know, it would be fun to go back and actually do some data analysis and graphs or whatever, right?

23:15 But I would say Sublime Text, extremely popular.

23:19 Emacs, very popular.

23:22 Vim, I think Vim might be slightly beating Emacs.

23:25 PyCharm is pretty popular.

23:27 People hear me go on and on about PyCharm.

23:29 I love PyCharm.

23:30 Really?

23:30 I didn't know that.

23:31 Yeah.

23:31 Yeah, and people, most people don't know this about me, but I actually do use it now.

23:35 I do love it a lot.

23:37 But one thing I came across with was I was fooling around with Visual Studio Code, and this is not like Visual Studio from Windows, the big .NET thing.

23:47 This is like a lightweight editor.

23:49 It's based on, I think, the same underlying stuff as Atom.

23:53 Okay.

23:54 It's using the Chrome as its underlying engine, and it's based on some client-side HTML stuff.

24:00 Anyway, it's a free editor that's pretty cool, and it's growing quite a bit in terms of its extensions you can get for it.

24:08 It's got, like, cool Git integration, and now it's getting better Python integration.

24:12 So my pick is this thing called the Python extension for Visual Studio Code, and it runs on Mac and Windows and Linux and so on.

24:22 And I have a link to the one there.

24:23 And what's really interesting is, well, the bunch of features, which I'll tell you, but if I had to ask you, Brian, how many times do you think this thing has been downloaded?

24:34 23.

24:35 23 is good.

24:37 Well, I would guess thousands, maybe 20, 30,000 times, something like this, right?

24:43 Like, okay, how many people are installing full Python support?

24:46 This is, like, not just standard completion, but it, like, reads, if you're writing a package, it, like, understands your package and will tell you exactly what all the names of all the elements symbolically.

24:58 In your package, it'll do, like, AST-based refactoring.

25:02 Like, really cool stuff, right?

25:04 Anyway, 850,000 installs.

25:07 That's actually incredible.

25:09 Now I want to go try it.

25:10 Yeah, I mean, when you think of Python editors, almost a million people installed this Python support for their editor.

25:17 Now, of course, not every one of them is doing Python all the time, and there's not a one-to-one mapping between developers and editors.

25:25 But this is, like, way more popular than I realized.

25:28 And so I thought, well, why don't I play with it?

25:29 So I played with it this week, and I'm pretty impressed.

25:31 For, like, lightweight stuff, I think this is my new editor.

25:34 Oh, okay.

25:34 I was just actually picking it.

25:36 I installed Adam this morning, and maybe I'll try this one out as well.

25:40 Yeah, it's really similar to Adam, actually, so it's worth giving it a try.

25:43 So it has linting, including a bunch of linters you can configure, including Flake 8.

25:48 It has full-on auto-completion, as well as support for PEP 484.

25:53 I think that's the type hint.

25:55 It has Jupyter support, intending, code formatting, refactoring, like I said, code navigation, debugging.

26:04 You can remotely debug over SSH to, like, a Flask app.

26:08 I mean, that's pretty serious for this little plug-in, right?

26:11 That's awesome.

26:12 Unit tests, all the various tests you're talking about, lots of good stuff.

26:16 So anyway, I thought this is kind of one of the unsung heroes of the editors, so I thought I'd highlight it.

26:23 Yeah, cool.

26:23 And maybe the next time you ask somebody, they'll say, I use code.

26:28 Oh, yeah, I use Visual Studio Code all the time.

26:30 Anyway, yeah, it's pretty cool.

26:31 So I'm excited to try it out, at least.

26:33 Okay, well, I think I'll try it out, too.

26:35 And that brings us to the end.

26:38 But we do like to catch up with what both of us are up to.

26:41 So, Michael, what are you up to lately?

26:44 Well, I've been continuing to crank out the Talk Python to Me episodes.

26:48 So the last one I just released was parsing horrible things with Python, which I wanted to make sure I pointed out here, because I think that's a really interesting tie into your first pick of the week.

26:58 Because it's another way to parse horrible things that I think is really actually quite powerful and interesting.

27:04 So anyway, I released that with Eric Rose, and that was cool.

27:08 That was a really interesting episode.

27:10 I really enjoyed it.

27:12 Eric is obviously a brilliant guy.

27:14 So that was good.

27:15 Yeah, thanks a lot.

27:16 Yeah, he was a great guest and definitely enjoyed talking to him.

27:19 You last week had asked me if Awesome Python, the GitHub thing, was the same as the Awesome Python newsletter.

27:25 And I said, I think so.

27:26 And now I think I might be wrong.

27:29 No, in fact, the Awesome Python newsletter comes from python.libhunt.com, which is a really cool place for Python news.

27:37 And I think one or two of the news items throughout the podcast, not this one, but over all of them, I've gotten from that place.

27:43 Okay.

27:44 So, yeah, that's my picks.

27:46 What's up with me?

27:47 Python is so awesome.

27:48 We like to slap it on everything.

27:49 It's awesome, yeah.

27:51 How about you?

27:52 What are you up to?

27:53 Man, I've been doing a lot of writing.

27:54 I've got a deadline, an editor deadline, in about a week, actually exactly a week from today.

27:59 Because I'm trying to put on full steam, and it's the pytest book, and I'm trying to get it ready so that it can be printable,

28:07 and I can take a stack of copies with me to PyCon in 2017, in May.

28:14 So that's what I've been working on.

28:15 The last episode of Test and Code is recorded and partly edited.

28:21 This was number 25 with Dave Hunt about Selenium.

28:24 And there's some really good content mixed in with some really stupid questions that I've asked.

28:30 So I need to go and cut out the stupid questions, and then it'll be good to go.

28:34 Hopefully we'll get that out in the next couple days.

28:36 And then I'm really excited about an interview tomorrow scheduled.

28:42 Hopefully it goes through with a person called David Hussman.

28:46 He runs a place called Dev Jam Studios, and he also talks about Agile and goes around and speaks to people.

28:54 And he's a really good speaker, so looking forward to talking to him.

28:57 Yeah, that'll be awesome.

28:58 Kind of a slightly above-the-code talk about all the testing and whatnot, right?

29:02 Yeah, and I don't even know if he'll get into testing.

29:05 One of the things he likes to talk about lately is story mapping, which is sort of high-level planning for an entire project above the writing stories level.

29:16 And that's pretty neat.

29:18 Yeah, that's cool.

29:19 Definitely precedes code.

29:21 Yeah.

29:21 Well, anyway, I really enjoyed talking with you this week, and look forward to seeing what cool stuff people put out in the upcoming week.

29:30 Yeah, thanks, Brian.

29:31 I enjoyed it as well, and like always, I learned about some cool new things.

29:34 I'm definitely checking out Pipsy.

29:36 And thank you, everyone, for listening, and we will see you next week.

Back to show page