WEBVTT

00:00:00.001 --> 00:00:04.840
Hello and welcome to Python Bytes, where we deliver Python news and headlines directly to your earbuds.

00:00:04.840 --> 00:00:09.920
This is episode 77, recorded May 12, 2018.

00:00:09.920 --> 00:00:10.820
I'm Michael Kennedy.

00:00:10.820 --> 00:00:11.820
And I'm Brian Otkin.

00:00:11.820 --> 00:00:14.700
And we have a very special episode and a live audience.

00:00:14.700 --> 00:00:20.460
That's right, we're recording live from PyCon.

00:00:20.460 --> 00:00:23.320
Thank you everyone for being here and everyone who couldn't make it.

00:00:23.320 --> 00:00:24.360
You missed a great party.

00:00:24.360 --> 00:00:26.000
This episode is brought to you by Datadog.

00:00:26.000 --> 00:00:28.060
They actually, I think they have a booth out there?

00:00:28.060 --> 00:00:28.320
Yeah.

00:00:28.320 --> 00:00:29.440
Yeah, I think they have a booth out there.

00:00:29.520 --> 00:00:33.340
I've been stuck at my booth the whole time, which is wonderful, but I don't know what's out there.

00:00:33.340 --> 00:00:34.940
So that's amazing.

00:00:34.940 --> 00:00:36.000
We'll tell you more about them later.

00:00:36.000 --> 00:00:37.440
Right now, Brian, what do you got for us?

00:00:37.440 --> 00:00:44.920
I have a fun article that actually comes from the Java world, but it's why senior devs write dumb code.

00:00:44.920 --> 00:00:54.920
And it starts out with a quote from Kent Beck, which I love, is any fool can write code that a computer can understand.

00:00:54.920 --> 00:00:57.940
Good programmers write code that humans can understand.

00:00:59.040 --> 00:01:05.520
Just some tips to make sure that you try to keep clean, straightforward, obvious code.

00:01:05.520 --> 00:01:11.960
And follow principles like Yagni, single responsibility, dry, etc.

00:01:11.960 --> 00:01:20.920
And I think this is important in the Python world because there are some cool language features that we have that are fun to play with.

00:01:20.920 --> 00:01:32.780
And I definitely want people to go ahead and try all the cool new language features, but make sure that your code still is readable, even by people that aren't as Pythonic savvy as you are.

00:01:33.420 --> 00:01:35.340
That's awesome.

00:01:35.340 --> 00:01:38.720
Are you telling me that the shortest code is not the most readable, always?

00:01:38.720 --> 00:01:39.900
Yes.

00:01:39.900 --> 00:01:47.900
That's hard for me to do also because I really like one-liners that pack in a whole bunch of stuff.

00:01:47.900 --> 00:01:48.500
Yeah, I do too.

00:01:48.500 --> 00:01:55.180
So does that cover the solid principles, like single responsibility, open-close principle, or is it just more general, like write good code?

00:01:55.900 --> 00:01:59.520
Well, I think may write readable code.

00:01:59.520 --> 00:02:00.440
Readable code, right.

00:02:00.440 --> 00:02:03.740
I don't necessarily adhere to solid being readable.

00:02:03.740 --> 00:02:05.960
You know, that's a really good point.

00:02:05.960 --> 00:02:11.640
So like solid principles, I don't know if you all know, it's single responsibility principle, open-close principle, list-cost substitution principle, etc.

00:02:12.180 --> 00:02:18.780
And a lot of times that is like super design pattern heavy, and you're like, there's so much abstraction here.

00:02:18.780 --> 00:02:22.600
Like, I know this looks like it came out of a textbook, but it's bad, right?

00:02:22.600 --> 00:02:23.060
Yeah.

00:02:23.060 --> 00:02:23.560
Yeah.

00:02:23.560 --> 00:02:25.420
So actually, maybe not so much.

00:02:25.420 --> 00:02:27.500
Well, and I've seen it in code reviews, too.

00:02:27.500 --> 00:02:34.200
We've had people do like maybe a C-ism in Python.

00:02:34.700 --> 00:02:41.980
And sometimes that's bad, but also sometimes if you can look, if it's a little bit of code and you can look at it, it's easy, obvious what it's doing.

00:02:41.980 --> 00:02:44.820
Maybe it doesn't need to change to be more Pythonic.

00:02:44.820 --> 00:02:45.220
Yeah.

00:02:45.220 --> 00:02:45.620
It's probably fine.

00:02:45.620 --> 00:02:46.060
That's true.

00:02:46.060 --> 00:02:50.260
So, Brian, have you been having a hard time finding your way around here?

00:02:50.260 --> 00:02:51.640
Yeah.

00:02:51.640 --> 00:02:52.280
You got lost?

00:02:52.280 --> 00:02:54.340
You guys having a bit of a hard time?

00:02:54.340 --> 00:03:02.280
I feel like I've taken like a walk where it's like, okay, we've gone like a quarter mile, and there was a door to that place on the other side of the expo hall.

00:03:02.280 --> 00:03:03.320
Why didn't I go that way, right?

00:03:03.840 --> 00:03:10.280
Well, the next thing, if they had used it, I'm sure they haven't, if they'd used it, there's this thing called GeoAlchemy 2.

00:03:10.280 --> 00:03:11.960
You've heard of SQLAlchemy, right?

00:03:11.960 --> 00:03:12.260
Yeah.

00:03:12.260 --> 00:03:18.660
So there's this thing you can layer upon SQLAlchemy called GeoAlchemy 2.

00:03:18.660 --> 00:03:25.320
And what it does is it provides geospatial queries and operations on top of, say, Postgres.

00:03:25.320 --> 00:03:29.580
So you can ask questions like, how far is it from here to there?

00:03:29.580 --> 00:03:31.400
Like, am I within this room?

00:03:31.540 --> 00:03:40.180
Like, you could easily define all these as polygons, insert them as SQLAlchemy objects, and ask questions like, who is in such and such room if we all say RFID?

00:03:40.800 --> 00:03:42.920
And that would be easier to navigate, Python?

00:03:42.920 --> 00:03:50.060
If we could throw some A-star algorithms to, like, say, find the shortest path through all the open doors and stuff, yeah, it'd be easier.

00:03:50.060 --> 00:03:56.060
Anyone out there do any, like, geospatial queries, things like that?

00:03:56.060 --> 00:03:56.440
Yeah?

00:03:57.240 --> 00:04:05.120
Yeah, not that query so much, but we do some geospatial work, and so sometimes you need to, you know, give it an object, find it in Europe.

00:04:05.120 --> 00:04:05.940
Nice.

00:04:05.940 --> 00:04:06.880
Have you tried GeoAlchemy?

00:04:06.880 --> 00:04:07.860
No, I haven't.

00:04:07.860 --> 00:04:08.780
Actually, I wanted to ask.

00:04:08.780 --> 00:04:11.020
Is that from the same people who bring SQLAlchemy?

00:04:11.020 --> 00:04:12.420
I think it's a different group.

00:04:12.420 --> 00:04:23.060
There was a thing called GeoAlchemy, and then you could use that, and this is like a reimagining of the API, so this is like a second edition.

00:04:23.300 --> 00:04:33.280
So the way it works is basically, just like SQLAlchemy, you connect to your database, you declare mapping, you declare, like, the class that just arrives from, like, a SQLAlchemy base.

00:04:33.280 --> 00:04:40.760
It has a name and an ID, but it can also have columns like a geometry, which is a polygon, and then about that, you can ask questions.

00:04:40.760 --> 00:04:51.540
Like, you can go to it and just say session.query.filter where this thing contains this point, or where the area is greater than or less than such and such, and just all sorts of interesting questions.

00:04:51.640 --> 00:04:57.680
So if you like SQLAlchemy, and you want to ask questions about physical stuff, boom, GeoAlchemy 2.

00:04:57.680 --> 00:04:58.880
Nice.

00:04:58.880 --> 00:04:59.320
Yeah.

00:04:59.320 --> 00:05:07.340
Well, since we didn't share each other, we have no cool segue between everything.

00:05:07.340 --> 00:05:10.520
Not too much, but I can see what you got here for this one.

00:05:10.520 --> 00:05:10.880
Yeah.

00:05:10.880 --> 00:05:13.780
Yeah, so we've been on a rant, haven't we?

00:05:13.780 --> 00:05:15.280
A UI rant?

00:05:15.280 --> 00:05:18.100
Yes, a little bit of UI in the podcast.

00:05:19.420 --> 00:05:24.540
But one of the things that has come to our attention is Qt is not staying still.

00:05:24.540 --> 00:05:36.460
So there's, what I'm talking about here is there's another PySide 2, which is going to be called, like...

00:05:36.460 --> 00:05:38.140
Qt for Python?

00:05:38.140 --> 00:05:39.020
Qt for Python.

00:05:39.420 --> 00:05:46.100
But it's not quite ready yet, but there's actually a lot of Python bindings that I know of.

00:05:46.100 --> 00:05:52.780
There's PySide 2, there's PyQt 5, there's PyQt 4, there's the original PySide, and there's a couple...

00:05:52.780 --> 00:05:54.320
And then there's Qt.py.

00:05:54.320 --> 00:05:58.500
And this is just for Qt, not WXPython, not all the other stuff, right?

00:05:58.500 --> 00:05:59.260
Yeah, just for Qt.

00:05:59.540 --> 00:06:05.720
And there's two projects.

00:06:05.720 --> 00:06:18.080
Qt.py convert is a project that converts these interface bindings to an intermediate, which is a shim layer, which is Qt.py, which is a minimal...

00:06:18.080 --> 00:06:22.340
You can build it as a minimal Python 2 and 3 shim around all of the Qt bindings.

00:06:22.340 --> 00:06:31.540
And just sort of fun to be able to use one, whatever you've got now, and convert it back and forth.

00:06:31.540 --> 00:06:33.000
I think it's a great idea.

00:06:33.000 --> 00:06:34.240
So you...

00:06:34.240 --> 00:06:38.420
It's going to be awesome that there are new, better ways to write Python UIs.

00:06:38.600 --> 00:06:43.500
But there's all this other code that people have written, PyQt 4, for example.

00:06:43.500 --> 00:06:50.740
And this thing will let you sort of run a converter across it to adapt from all these different older versions to the new hotness.

00:06:50.740 --> 00:06:51.900
So it should make it work really well.

00:06:51.900 --> 00:06:57.380
Yeah, and one of the neat things about this is it uses a conversion that leaves all your comments in place.

00:06:57.380 --> 00:07:02.380
So it rewrites Python code, but it rewrites it.

00:07:02.380 --> 00:07:04.740
It leaves a bunch of your stuff in there.

00:07:04.740 --> 00:07:05.540
That's pretty advanced.

00:07:05.540 --> 00:07:06.120
Yeah.

00:07:06.120 --> 00:07:08.460
So maybe do like a branch or something before you do that.

00:07:09.000 --> 00:07:09.500
Yeah, probably.

00:07:09.500 --> 00:07:12.160
All right.

00:07:12.160 --> 00:07:14.060
Anybody got a comment on Python UIs?

00:07:14.060 --> 00:07:16.640
All right.

00:07:16.640 --> 00:07:16.840
No.

00:07:16.840 --> 00:07:18.380
All right.

00:07:18.380 --> 00:07:18.540
Cool.

00:07:18.540 --> 00:07:20.100
So I'm really excited for that.

00:07:20.100 --> 00:07:22.600
I'm excited for Python for Qt coming.

00:07:22.600 --> 00:07:23.680
I think that's going to be good.

00:07:23.680 --> 00:07:25.300
There's a bunch of other stuff.

00:07:25.300 --> 00:07:28.980
I think there needs to be more work done there, as I've said.

00:07:28.980 --> 00:07:29.240
All right.

00:07:29.240 --> 00:07:32.540
So let me tell all the listeners and you guys about our sponsor.

00:07:32.540 --> 00:07:35.720
So Datadog, who are big supporters of the Python space.

00:07:35.720 --> 00:07:37.500
They're here at the conference.

00:07:38.020 --> 00:07:39.860
Obviously, they've been supporting the show for a long time.

00:07:39.860 --> 00:07:40.800
So check out Datadog.

00:07:40.800 --> 00:07:44.380
They're like a monitoring solution, mostly for your distributed application.

00:07:44.380 --> 00:07:54.080
So if you've got like microservices and containers and all that, you can trace a request from one part to the next and the next and figure out where things are slow, where you run into errors, all sorts of stuff like that.

00:07:54.120 --> 00:07:55.360
So get a cool Datadog t-shirt.

00:07:55.360 --> 00:07:57.480
Go to pythonbytes.fm/Datadog.

00:07:57.480 --> 00:07:58.960
Do the tutorial.

00:07:58.960 --> 00:08:00.160
Get a cute dog shirt.

00:08:00.160 --> 00:08:00.700
It's awesome.

00:08:00.700 --> 00:08:02.400
All right.

00:08:02.400 --> 00:08:06.920
So, Brian, we live in a pretty laid back city, Portland.

00:08:06.920 --> 00:08:08.020
It's pretty chill, right?

00:08:08.020 --> 00:08:08.640
Love it.

00:08:08.640 --> 00:08:09.540
Yeah, I love it too, man.

00:08:10.900 --> 00:08:16.820
But even in Portland, there is a bit of a sense of people are like working really hard and it's almost like a badge of honor.

00:08:16.820 --> 00:08:17.900
Like, oh, man, how are you doing?

00:08:17.900 --> 00:08:18.800
I'm so busy.

00:08:18.800 --> 00:08:20.120
You wouldn't believe how busy I am.

00:08:20.120 --> 00:08:21.820
I know you're busy, but I'm like way more busy.

00:08:21.820 --> 00:08:24.540
I've got all these projects and I've got this stuff going on and that.

00:08:24.680 --> 00:08:31.220
There's this great article written that is a reminder that you don't have to be a workaholic to get ahead in tech.

00:08:31.220 --> 00:08:37.160
So the article is called You Don't Have to Be a Workaholic to Win 13 Alternative Ways to Stand Out.

00:08:37.160 --> 00:08:41.820
And I really, really like this because I feel like there's two things going on that I don't like.

00:08:41.820 --> 00:08:43.720
One is this is what I kind of opened with.

00:08:43.720 --> 00:08:45.700
People like busy brag.

00:08:45.700 --> 00:08:47.560
Like it's cool to them to be super busy.

00:08:47.560 --> 00:08:48.260
Yeah.

00:08:48.260 --> 00:08:52.560
And so they just tell you how busy they are and, you know, we just one up each other.

00:08:52.620 --> 00:08:55.560
Yeah, I ran into this guy that's just like, yeah, I've got two podcasts.

00:08:55.560 --> 00:08:56.220
I wrote a book.

00:08:56.220 --> 00:08:56.620
Yeah.

00:08:56.620 --> 00:09:01.040
That's not cool, man.

00:09:01.040 --> 00:09:01.640
That's not cool.

00:09:01.640 --> 00:09:07.680
And the other one is like actual tech companies or other companies that are like, you know what?

00:09:07.680 --> 00:09:12.960
We're going to put just a fake deadline here six weeks out and make everybody work overtime so we can hit it.

00:09:12.960 --> 00:09:14.640
And there's like, well, what happens if we don't hit it?

00:09:14.640 --> 00:09:16.560
Well, then my manager will be upset.

00:09:16.560 --> 00:09:18.000
Like that is not a real deadline, right?

00:09:18.000 --> 00:09:20.300
Those are not actual deadlines.

00:09:20.300 --> 00:09:22.580
And so there's just a bunch of great ideas in here.

00:09:22.580 --> 00:09:23.760
So let me run by you.

00:09:23.760 --> 00:09:24.080
See if you think.

00:09:24.080 --> 00:09:25.620
Oh, by the way.

00:09:25.620 --> 00:09:27.340
Yeah.

00:09:27.340 --> 00:09:28.640
Let me just run through the tips.

00:09:28.640 --> 00:09:29.880
Hold on.

00:09:29.880 --> 00:09:32.460
This thing like popped up, Anthony.

00:09:32.460 --> 00:09:34.460
All right.

00:09:34.460 --> 00:09:35.620
So here's the tips.

00:09:35.620 --> 00:09:39.480
The first one is like you can be a workaholic or you can be creative.

00:09:40.620 --> 00:09:48.840
And if you really try to think differently about solutions, if you're the person that says, yeah, we could work all night and we could build this thing this way.

00:09:48.840 --> 00:09:52.440
Or did you know you can pip install a thing that did this, right?

00:09:52.440 --> 00:09:57.300
If you just like think outside of the box and try to solve a solution, like creativity could be more value than working hard.

00:09:57.300 --> 00:09:57.640
Yeah?

00:09:57.640 --> 00:09:58.060
Yeah.

00:10:00.060 --> 00:10:00.340
Stubbornness.

00:10:00.340 --> 00:10:02.980
Stubbornness is not generally considered a good thing.

00:10:02.980 --> 00:10:07.120
But in programming, like I've had lots of people go, Michael, you're so good with computers.

00:10:07.120 --> 00:10:08.100
You're such a good programmer.

00:10:08.100 --> 00:10:08.820
How did you learn this?

00:10:08.820 --> 00:10:10.420
It's like I tried this.

00:10:10.420 --> 00:10:10.860
It was hard.

00:10:10.860 --> 00:10:11.420
It didn't work.

00:10:11.420 --> 00:10:14.220
I'm just like, well, I tried it for three hours and then it did work, right?

00:10:14.240 --> 00:10:18.580
Like I tried everything I could think of until it worked and it just wasn't going to quit.

00:10:18.580 --> 00:10:20.380
And that's one of the things they're talking about.

00:10:20.380 --> 00:10:21.200
You have that experience?

00:10:21.200 --> 00:10:23.780
So that's a way to work less?

00:10:23.780 --> 00:10:25.860
No, that's not a way to work less.

00:10:25.860 --> 00:10:33.220
But what they're saying is if you're the person that like can actually solve the problem because you don't give up on it rather than just like, ah, we can't do this thing.

00:10:33.220 --> 00:10:33.920
We've got to do something else.

00:10:33.920 --> 00:10:34.220
Okay.

00:10:34.220 --> 00:10:35.260
You know, that kind of thing.

00:10:35.260 --> 00:10:37.200
They're all like pretty interesting little takes.

00:10:37.200 --> 00:10:37.840
Curiosity.

00:10:37.840 --> 00:10:39.040
Yeah.

00:10:39.040 --> 00:10:39.380
Right?

00:10:39.380 --> 00:10:44.200
Like I'm willing to like be the person that learns Kubernetes and actually now we can all go home because

00:10:44.200 --> 00:10:46.180
our deployments don't break and I don't even have a pager.

00:10:46.180 --> 00:10:46.720
It's amazing.

00:10:46.720 --> 00:10:47.140
Right?

00:10:47.140 --> 00:10:47.540
That's cool.

00:10:47.540 --> 00:10:49.600
Kindness.

00:10:49.600 --> 00:10:50.840
I really like the kindness one.

00:10:50.840 --> 00:10:54.680
Like if everyone is a jerk and you're the person that's nice and helps everyone, right?

00:10:54.680 --> 00:10:59.740
Like all of a sudden you become the person in the office or the company and they're like, yeah, go talk to Jeff, man.

00:10:59.740 --> 00:11:02.780
He will help you and he won't insult you at the same time.

00:11:02.780 --> 00:11:04.720
Planning.

00:11:04.720 --> 00:11:05.840
Planning is good.

00:11:05.840 --> 00:11:07.280
Improvisation.

00:11:07.280 --> 00:11:09.300
Like sort of the opposite of planning.

00:11:09.300 --> 00:11:11.220
Like, well, things aren't going to accord in plan.

00:11:11.220 --> 00:11:11.780
Let's fix it.

00:11:11.780 --> 00:11:12.600
Enthusiasm.

00:11:12.600 --> 00:11:13.780
Kind of like kindness.

00:11:14.160 --> 00:11:14.600
Communication.

00:11:14.600 --> 00:11:16.120
That's good.

00:11:16.120 --> 00:11:17.040
Presence.

00:11:17.040 --> 00:11:17.860
I really like that one.

00:11:17.860 --> 00:11:18.600
Yes.

00:11:18.600 --> 00:11:19.280
Right?

00:11:19.280 --> 00:11:21.440
Like so many people are like, yeah, that's a great idea.

00:11:21.440 --> 00:11:23.580
Yeah, I'm going to go work on my thing.

00:11:23.580 --> 00:11:23.760
Right?

00:11:23.760 --> 00:11:26.780
But just like take the time to like be in the moment.

00:11:26.780 --> 00:11:27.720
That's actually hard.

00:11:27.720 --> 00:11:28.620
It's hard.

00:11:28.620 --> 00:11:29.700
I'm making fun of it, but it's hard.

00:11:29.700 --> 00:11:33.780
And especially in a work environment, you've got – you're like in the middle of something.

00:11:33.780 --> 00:11:34.980
Somebody comes over.

00:11:34.980 --> 00:11:39.660
If you're going to be interrupted anyway, then really be interrupted and pay attention.

00:11:39.660 --> 00:11:40.180
Yeah, exactly.

00:11:40.180 --> 00:11:41.180
Yeah, yeah.

00:11:41.180 --> 00:11:41.500
For sure.

00:11:41.980 --> 00:11:44.040
So I'll keep going just a little bit more collaboration, right?

00:11:44.040 --> 00:11:44.600
Open source.

00:11:44.600 --> 00:11:46.360
Like we're all kind of in that space.

00:11:46.360 --> 00:11:48.240
Anyway, willingness.

00:11:48.240 --> 00:11:50.440
Honestly, I forget what that is about.

00:11:50.440 --> 00:11:52.320
But I remember it was really good.

00:11:52.320 --> 00:11:53.340
Patience also.

00:11:53.340 --> 00:11:55.500
And then finally, institutional knowledge, right?

00:11:55.500 --> 00:11:56.980
Like –

00:11:56.980 --> 00:11:58.180
Where to lock people up.

00:11:58.180 --> 00:11:59.520
Yeah, where the bodies are buried.

00:11:59.520 --> 00:12:03.580
No, like why do we have that old server over there?

00:12:03.580 --> 00:12:05.320
And like can anybody work with it?

00:12:05.320 --> 00:12:08.500
Yeah, actually, I know where the source code is and I could fix that for you, right?

00:12:08.500 --> 00:12:08.920
Yeah.

00:12:08.920 --> 00:12:09.380
I don't want to.

00:12:09.380 --> 00:12:09.960
It's PHP.

00:12:09.960 --> 00:12:11.460
But I could fix it if I had to.

00:12:11.460 --> 00:12:12.940
Right.

00:12:12.940 --> 00:12:15.100
Anyway, like so do these resonate with you guys?

00:12:15.100 --> 00:12:16.140
Yeah.

00:12:16.260 --> 00:12:18.680
It makes me think of, Brian, you had Stephanie.

00:12:18.680 --> 00:12:20.060
I'm forgetting her last name.

00:12:20.060 --> 00:12:20.800
Herbert.

00:12:20.800 --> 00:12:21.480
Yeah.

00:12:21.480 --> 00:12:21.800
Yeah.

00:12:21.800 --> 00:12:26.840
And she talked about – I mean, your conversation over there was about mentoring, but she talked

00:12:26.840 --> 00:12:30.700
about her worker approach and how she only works like four hours a day.

00:12:30.700 --> 00:12:34.420
She goes around like data compression and consultancy.

00:12:34.420 --> 00:12:40.780
But this also makes me think of a post I've seen from somebody who works with Starbucks'

00:12:40.780 --> 00:12:42.760
web applications group.

00:12:42.760 --> 00:12:46.640
And it talked about how they pretty much almost burned out of the tech industry.

00:12:46.640 --> 00:12:53.460
And they just – that AI instituted some of these principles to just make things – obviously,

00:12:53.460 --> 00:12:57.360
probably not only more productive at work, but just more sustainable for you long-term

00:12:57.360 --> 00:12:58.240
on a personal basis.

00:12:58.240 --> 00:12:59.360
Yeah.

00:12:59.360 --> 00:12:59.860
That's great.

00:13:00.260 --> 00:13:00.720
Yeah, absolutely.

00:13:00.720 --> 00:13:04.100
All right.

00:13:04.100 --> 00:13:05.460
So are we going back to World War I?

00:13:05.460 --> 00:13:08.160
No, we're actually going back to QT.

00:13:08.160 --> 00:13:08.860
Oh, okay.

00:13:08.860 --> 00:13:12.560
So pretty much the trenches?

00:13:12.560 --> 00:13:13.160
Yeah.

00:13:13.160 --> 00:13:21.620
So actually, we – just related to that, when I was researching for the QT PyConvert, I was

00:13:21.620 --> 00:13:26.180
curious as to how they did the conversion while leaving the code comments in place.

00:13:26.180 --> 00:13:27.880
So I followed the rabbit hole.

00:13:28.320 --> 00:13:32.260
And there's a project called Red Baron, which I hadn't heard of before.

00:13:32.260 --> 00:13:37.880
But it calls itself a FST, which is a full syntax tree.

00:13:37.880 --> 00:13:44.960
So it's a lossless abstract syntax tree thing, which you can do queries and modifications.

00:13:46.280 --> 00:13:58.880
And I think it's – they've got a few uses that they list of possibly like renaming a variable in a source file and making sure that it doesn't clash with anything that's not a variable,

00:13:58.880 --> 00:14:03.140
like not clashing with things and strings and other bits.

00:14:04.740 --> 00:14:07.160
A few handful of like splitting up files.

00:14:07.160 --> 00:14:11.740
There's other – I think this is sort of maybe a tool to build other tools with.

00:14:11.740 --> 00:14:19.180
I can't imagine like – I personally wouldn't try to like write a script of like doing this.

00:14:19.180 --> 00:14:21.960
But if I built it into an ID or something like that.

00:14:21.960 --> 00:14:22.340
Yeah.

00:14:22.340 --> 00:14:25.260
This sounds like this is like the foundation of a refactoring tool.

00:14:25.260 --> 00:14:25.760
Yeah.

00:14:25.760 --> 00:14:26.560
Pretty much.

00:14:26.560 --> 00:14:27.160
That's awesome.

00:14:27.520 --> 00:14:33.160
But there's no off-the-shelf thing that's going to do that.

00:14:33.160 --> 00:14:34.280
But maybe something like this is like –

00:14:34.280 --> 00:14:34.460
Yeah.

00:14:34.460 --> 00:14:35.380
That's really, really awesome.

00:14:35.380 --> 00:14:37.140
But it's a fun project.

00:14:37.140 --> 00:14:44.940
Michael, you joke about like the conversion of two to three, but that's exactly what two to three, the tool does.

00:14:44.940 --> 00:14:45.280
Yeah.

00:14:45.280 --> 00:14:45.500
No.

00:14:45.500 --> 00:14:45.960
Yeah.

00:14:45.960 --> 00:14:49.020
So like everyone here knows the AST module, I hope.

00:14:49.020 --> 00:14:49.660
It's really cool.

00:14:49.660 --> 00:14:56.880
And then I guess they call it a full syntax tree, but it's often more broadly I refer to it as a CST or concrete syntax tree.

00:14:56.880 --> 00:14:57.120
Okay.

00:14:57.120 --> 00:14:57.520
Nice.

00:14:57.520 --> 00:14:59.600
And so that's what two to three is based on.

00:14:59.600 --> 00:15:05.500
That's also what the new black code formatting tool that they're going to talk to us today is based on.

00:15:05.500 --> 00:15:06.060
Right?

00:15:06.060 --> 00:15:10.200
Because it has to maintain comments and all these things that otherwise go away with AST.

00:15:10.200 --> 00:15:10.880
Right.

00:15:10.880 --> 00:15:11.360
That's awesome.

00:15:11.360 --> 00:15:11.540
Yeah.

00:15:11.540 --> 00:15:11.900
Thanks for that.

00:15:11.900 --> 00:15:12.000
Yeah.

00:15:12.000 --> 00:15:12.640
Black is awesome.

00:15:12.640 --> 00:15:13.480
We covered it before.

00:15:13.480 --> 00:15:15.220
You've got to like the color.

00:15:15.220 --> 00:15:18.280
All right.

00:15:18.280 --> 00:15:21.700
So I want to close out the official items with something pretty cool here.

00:15:21.700 --> 00:15:25.680
So our booth is right next to the Beware guys.

00:15:25.680 --> 00:15:33.880
And the Beware guys are trying to fill another major hole that I see in the Python space, which is really around packaging and especially mobile.

00:15:33.880 --> 00:15:34.420
Right?

00:15:34.500 --> 00:15:37.560
Like they're trying to build native apps in Python.

00:15:38.440 --> 00:15:44.840
And I've been a little bit of a – I've criticized them a little bit previously saying, you guys, there's like not really many demos.

00:15:44.840 --> 00:15:45.780
There's not a lot of screenshots.

00:15:45.780 --> 00:15:48.880
You've got to like show me where this stuff is if you expect people to use it.

00:15:48.880 --> 00:15:49.080
Right?

00:15:49.080 --> 00:15:54.600
Well, so one of the announcements this week is that Project Beware just launched an app in the Apple App Store.

00:15:55.160 --> 00:15:59.660
Like a straight up approved by Apple, installed on your phone, and it does stuff.

00:15:59.660 --> 00:16:00.940
It's not super advanced.

00:16:00.940 --> 00:16:04.580
It's basically like gives you currency conversions and tip calculations.

00:16:04.580 --> 00:16:07.980
Like how much do I need to tip in like RMB?

00:16:07.980 --> 00:16:10.580
You know, things like that.

00:16:10.580 --> 00:16:15.700
But it's really cool that there's an example of a Beware app in the App Store.

00:16:16.040 --> 00:16:16.160
Yeah.

00:16:16.160 --> 00:16:17.040
Yeah.

00:16:17.040 --> 00:16:19.300
Is it up on the source code?

00:16:19.300 --> 00:16:20.940
I'm sure that it is.

00:16:20.940 --> 00:16:24.500
I haven't looked at the source code, but yeah, I'm sure that they've got it up there.

00:16:24.500 --> 00:16:29.100
So the link I have, I think, either goes to an article or straight to the App Store.

00:16:29.100 --> 00:16:30.580
And it's pretty cool.

00:16:30.580 --> 00:16:32.260
So it uses Briefcase and Toga.

00:16:32.260 --> 00:16:42.700
And Briefcase is a tool for converting a Python project into a standalone native app on Mac, Windows, Linux, iPad, iPhone, Android, Apple TV, and tvOS.

00:16:42.700 --> 00:16:45.120
Actually, are those different?

00:16:45.120 --> 00:16:45.920
Anyway, yeah.

00:16:46.160 --> 00:16:47.240
Apple TV and tvOS.

00:16:47.240 --> 00:16:47.600
Awesome.

00:16:47.600 --> 00:16:48.600
So it's pretty cool.

00:16:48.600 --> 00:16:51.620
So it's like a first step.

00:16:51.620 --> 00:16:57.540
I was talking to Keith Russell McGee about it, and he's pretty excited, but it's just the first step.

00:16:57.540 --> 00:17:04.620
But if you guys are looking to contribute to open source, they're really, really big at accepting new folks.

00:17:04.620 --> 00:17:05.920
They're a really great project for that.

00:17:05.920 --> 00:17:07.320
And you get a token.

00:17:07.320 --> 00:17:12.620
And you get a cool token, like a token to say I contributed to the Beware project.

00:17:12.620 --> 00:17:13.440
Yeah.

00:17:13.520 --> 00:17:15.060
I was actually talking with Ken.

00:17:15.060 --> 00:17:16.260
Russell.

00:17:16.260 --> 00:17:17.120
Yeah.

00:17:18.060 --> 00:17:27.260
And he was one of the things that I, one of the parts of their system is Cricket, which is a testing GUI.

00:17:27.260 --> 00:17:34.480
And it doesn't handle pytest, but that's one of the things they'd like to have somebody work on is to try to convert.

00:17:34.480 --> 00:17:35.900
Oh, are you going to add pytest to Cricket?

00:17:35.900 --> 00:17:42.060
I'll look into it, but I'm bringing this up now to recruit anybody else that wants to help out with that.

00:17:42.060 --> 00:17:47.480
Because I would definitely try it out more if it already had a pytest link.

00:17:47.800 --> 00:17:48.620
Yeah, that's awesome.

00:17:48.620 --> 00:17:55.580
Yeah, you gave your talk on visual testing with PyCharm, which is awesome.

00:17:55.580 --> 00:17:57.620
And it's going to be on one something I'm going to mention in a second.

00:17:57.620 --> 00:18:01.080
But that's sort of another analogous thing, right?

00:18:01.080 --> 00:18:03.040
Like a GUI for running your tests and your project.

00:18:03.040 --> 00:18:03.580
Yeah.

00:18:03.580 --> 00:18:07.380
So we use PyCharm for the test runner part.

00:18:07.500 --> 00:18:10.060
But this would be just a standalone test runner without an IDE.

00:18:10.060 --> 00:18:10.780
Yeah, exactly.

00:18:10.780 --> 00:18:11.860
No editing, just the running.

00:18:11.860 --> 00:18:12.200
Yeah.

00:18:12.200 --> 00:18:12.660
Right.

00:18:12.660 --> 00:18:14.460
It's easier to fix a test if you don't have to edit it.

00:18:14.460 --> 00:18:16.240
All right.

00:18:16.240 --> 00:18:19.240
Well, I think that's it for all of our items that we have for you guys this week.

00:18:19.240 --> 00:18:21.160
I have a few extra things I want to throw out.

00:18:21.160 --> 00:18:23.880
Actually, this one more and more to the listeners.

00:18:23.880 --> 00:18:30.920
So first of all, all the videos, except for things like this, are recorded and put online.

00:18:30.920 --> 00:18:36.040
So already the videos from PyCon 2018 are live, and people can check them out, right?

00:18:36.040 --> 00:18:37.140
There's some.

00:18:37.540 --> 00:18:38.920
Yeah, not all of them, but they're coming in.

00:18:38.920 --> 00:18:40.440
There's a day or two latency there.

00:18:40.440 --> 00:18:41.700
That's pretty good, though, for video.

00:18:41.700 --> 00:18:45.460
So just go to youtube.com slash PyCon 2018.

00:18:45.460 --> 00:18:48.540
The other one is not so good.

00:18:48.540 --> 00:18:50.800
Apparently, there was some package that caused some trouble.

00:18:50.800 --> 00:18:57.720
Like previously, remember we talked about there being bad packages getting into the PyPI?

00:18:57.720 --> 00:19:01.660
So there's some Reddit post that says,

00:19:01.660 --> 00:19:06.500
Hey, guys, you should be a little bit careful with the SSH-decorator package.

00:19:06.780 --> 00:19:11.020
And it says, Don't install it or use it from pip.

00:19:11.020 --> 00:19:13.780
It has a backdoor to steal all your SSH credentials.

00:19:13.780 --> 00:19:14.340
Oh.

00:19:14.340 --> 00:19:20.640
And if that's true, you should not have this running anymore, and you should uninstall it.

00:19:20.700 --> 00:19:25.780
I don't know, but the people say the compromise package has been taken out.

00:19:25.780 --> 00:19:30.400
They reached out to the developers, and initially there was no response, but apparently it's gone now.

00:19:30.400 --> 00:19:32.460
So you can't update it.

00:19:33.220 --> 00:19:35.160
But if you already have it, you should not have it anymore.

00:19:35.160 --> 00:19:39.580
So just like a sort of PSA, public service announcement, don't use that.

00:19:39.580 --> 00:19:40.920
Yeah.

00:19:40.920 --> 00:19:41.380
Yeah.

00:19:41.380 --> 00:19:43.060
So anything else you want to add, Brian?

00:19:43.060 --> 00:19:45.820
No, I'm just having a great time at PyCon.

00:19:45.820 --> 00:19:46.840
Yeah, PyCon.

00:19:46.840 --> 00:19:48.660
PyCon is awesome.

00:19:48.660 --> 00:19:50.480
I call this my geek holiday.

00:19:51.120 --> 00:19:56.260
I try to refrain telling my wife that because she's like, you just got back from geek holiday.

00:19:56.260 --> 00:19:57.480
I'm like, no, I'm really actually tired.

00:19:57.480 --> 00:19:58.040
I need to rest.

00:19:58.040 --> 00:19:59.680
No, you need to take the kids and do this and do that.

00:19:59.680 --> 00:20:00.420
It's all right.

00:20:00.420 --> 00:20:05.400
But yeah, I really love coming here, and I really look forward to meeting everybody and having these experiences.

00:20:05.400 --> 00:20:06.800
It's exhausting.

00:20:07.040 --> 00:20:08.800
It's exhausting in an amazing way.

00:20:08.800 --> 00:20:13.740
Talk with nerd stuff all day long and then go out and have dinner and drinks with nerds also.

00:20:13.740 --> 00:20:13.760
I know.

00:20:13.760 --> 00:20:15.120
I had to have cocktails yesterday.

00:20:15.120 --> 00:20:16.020
It was really hard.

00:20:16.020 --> 00:20:19.600
All right.

00:20:19.600 --> 00:20:25.220
So how about everyone in the audience, you guys want to just close it out, say goodbye from PyCon?

00:20:25.220 --> 00:20:26.440
Goodbye.

00:20:26.440 --> 00:20:28.100
Goodbye, PyCon.

00:20:28.100 --> 00:20:29.740
Thank you, everyone, for listening.

00:20:29.740 --> 00:20:31.920
Thank you for being here for this live recording.

00:20:31.920 --> 00:20:41.040
Thank you for listening to Python Bytes.

00:20:41.040 --> 00:20:43.600
Follow the show on Twitter via at Python Bytes.

00:20:43.600 --> 00:20:46.500
That's Python Bytes as in B-Y-T-E-S.

00:20:46.500 --> 00:20:49.900
And get the full show notes at pythonbytes.fm.

00:20:49.900 --> 00:20:54.260
If you have a news item you want featured, just visit pythonbytes.fm and send it our way.

00:20:54.260 --> 00:20:56.960
We're always on the lookout for sharing something cool.

00:20:56.960 --> 00:21:00.360
On behalf of myself and Brian Okken, this is Michael Kennedy.

00:21:00.620 --> 00:21:03.960
Thank you for listening and sharing this podcast with your friends and colleagues.