WEBVTT

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

00:00:05.640 --> 00:00:09.820
This is episode 42, recorded September 6, 2017.

00:00:09.820 --> 00:00:11.240
I'm Michael Kennedy.

00:00:11.240 --> 00:00:12.160
And I'm Brian Okken.

00:00:12.160 --> 00:00:14.400
And we have the band back together again.

00:00:14.400 --> 00:00:15.100
How about that, Brian?

00:00:15.100 --> 00:00:20.020
Thank you so much for carrying the Python Bytes news banner while I was gone.

00:00:20.020 --> 00:00:22.200
And then I get to pay you back straight away a little bit.

00:00:22.200 --> 00:00:28.420
Yeah, it was fun listening to one with you and I'm blanking right now.

00:00:28.420 --> 00:00:28.940
Yeah, Miguel.

00:00:29.140 --> 00:00:29.640
Yeah, Miguel.

00:00:29.640 --> 00:00:30.620
It was great.

00:00:30.620 --> 00:00:33.240
And then it was kind of fun to talk with some new people.

00:00:33.240 --> 00:00:35.220
But I'm not ready to replace you yet.

00:00:35.220 --> 00:00:35.920
Yeah, no, no.

00:00:35.920 --> 00:00:41.500
I think this idea of maybe every now and then having someone else drop in and give it a fresh set of topics might be cool.

00:00:41.500 --> 00:00:43.000
But yeah, no, it's great to be back together.

00:00:43.000 --> 00:00:47.380
So before we get started, I just want to say thanks to Datadog for sponsoring this show.

00:00:47.380 --> 00:00:52.580
You can check out their special offer at pythonbytes.fm/Datadog, which is actually really cool.

00:00:52.580 --> 00:00:53.820
You get something out of it.

00:00:53.820 --> 00:00:54.880
So that's sweet.

00:00:55.400 --> 00:01:00.760
But let's talk about what a couple of the one of the prolific Python developers out there.

00:01:00.760 --> 00:01:03.720
Just in one week, what he's been up to.

00:01:03.720 --> 00:01:05.680
Yeah, I think it was the last week.

00:01:05.820 --> 00:01:08.700
Kenneth Reitz has been very prolific.

00:01:08.700 --> 00:01:14.220
And I don't know if he's got insomnia and he's not sleeping lately.

00:01:14.220 --> 00:01:17.100
But he's put out a bunch of stuff recently.

00:01:17.100 --> 00:01:23.180
And instead of spreading it out entirely for our entire episode, we're just going to lump it all together.

00:01:23.380 --> 00:01:25.200
This basically could be an entire episode.

00:01:25.200 --> 00:01:26.000
Yeah, it could.

00:01:26.000 --> 00:01:26.780
But, you know.

00:01:26.780 --> 00:01:27.980
That would be wrong.

00:01:27.980 --> 00:01:28.680
That would be wrong.

00:01:28.680 --> 00:01:30.800
So first off, I think this is cool.

00:01:30.800 --> 00:01:36.260
So if you're a Mac user, maybe you use Homebrew to install stuff.

00:01:36.260 --> 00:01:41.440
And one of the things he's put together is Homebrew Pythons, which is a tap.

00:01:41.440 --> 00:01:44.000
I didn't know there was a thing called Homebrew Taps.

00:01:44.620 --> 00:01:52.440
But it's a way you can get all Python 2.5 through 3.6 installed easily with just a couple of command lines.

00:01:52.440 --> 00:01:53.440
Yeah, it's beautiful.

00:01:53.440 --> 00:01:56.880
You just basically register Kenneth's tap.

00:01:56.880 --> 00:02:02.780
And then you just say, brew install Python dash 3.6 or 2.7 or whatever.

00:02:02.780 --> 00:02:05.520
I really like brew.

00:02:05.520 --> 00:02:07.820
And I've been starting to use it more and more for my Mac.

00:02:07.820 --> 00:02:13.340
The next time I set up a fresh operating system, which seems to be about like yearly, I get frustrated and format the thing.

00:02:14.040 --> 00:02:21.940
So next time I'm going to just brew install as much as I can, like MongoDB, Python, Node.js, all the things that you need.

00:02:21.940 --> 00:02:22.520
It's beautiful.

00:02:22.520 --> 00:02:22.980
Yeah.

00:02:22.980 --> 00:02:23.800
Okay.

00:02:23.800 --> 00:02:24.960
Well, moving on.

00:02:24.960 --> 00:02:39.780
Next up, we've got a request threads, which is a, I think it's something built on top of requests that uses Twisted's deferred objects as a return object for requests.

00:02:40.260 --> 00:02:48.340
And so you can use it with either async and await or with Twisted to have asynchronous reading through requests easily.

00:02:48.520 --> 00:02:49.900
Yeah, it's really, really cool.

00:02:49.900 --> 00:02:55.120
So basically you create this async session and you just say await session dot get.

00:02:55.120 --> 00:02:56.580
So you have actually two ways.

00:02:56.580 --> 00:03:00.280
You can do async await Python 3.6 style, which is really cool.

00:03:00.280 --> 00:03:06.500
Or you can use Twisted's deferreds, which work in basically every version of Python.

00:03:06.500 --> 00:03:09.340
So you actually can pick and it's really, really cool.

00:03:10.000 --> 00:03:12.120
So I'm looking forward to seeing that rock.

00:03:12.120 --> 00:03:16.180
And it basically looks like the last activity on everything was a couple days ago.

00:03:16.180 --> 00:03:17.460
So yeah, this is kind of new.

00:03:17.460 --> 00:03:18.200
It's kind of cool.

00:03:18.200 --> 00:03:23.640
And also, before we move on, I really enjoyed your, you interviewed somebody about Twisted recently.

00:03:23.640 --> 00:03:24.340
Oh, yeah, yeah.

00:03:24.340 --> 00:03:24.800
That was Glyph.

00:03:24.800 --> 00:03:28.020
That was the most recent episode that's out, but probably not by the time.

00:03:28.020 --> 00:03:29.440
That was 127 on Talk Python.

00:03:29.440 --> 00:03:29.740
Thanks.

00:03:29.740 --> 00:03:31.200
Yeah, he's doing amazing stuff.

00:03:31.280 --> 00:03:33.340
So that kind of riffs on this as well, for sure.

00:03:33.340 --> 00:03:33.760
Okay.

00:03:33.760 --> 00:03:38.500
Now thinking about instead of threads, you might want to just have a background task.

00:03:38.500 --> 00:03:40.360
And Kenneth has that too.

00:03:40.360 --> 00:03:45.180
He's got a repo called background, which just runs stuff in the background.

00:03:45.180 --> 00:03:45.920
Yeah, it's beautiful.

00:03:45.920 --> 00:03:50.820
You basically put like a decorator on a function and then it becomes this async background thing

00:03:50.820 --> 00:03:52.960
that you just kick off like fire and forget style.

00:03:52.960 --> 00:03:54.320
It's really, really cool.

00:03:54.320 --> 00:03:56.080
Like you can do it for CLIs.

00:03:56.080 --> 00:03:57.140
You can do it for web apps.

00:03:57.140 --> 00:04:00.780
I use this in the Talk Python training site, this type of stuff.

00:04:00.880 --> 00:04:02.300
I don't use this because it's new.

00:04:02.300 --> 00:04:08.380
But like when I first built it and, you know, gave it the capability to like email thousands

00:04:08.380 --> 00:04:09.540
of people and update.

00:04:09.540 --> 00:04:13.960
It turns out that that's really bad to do in a serial way on the main thread.

00:04:13.960 --> 00:04:17.920
So you got to kick that kind of stuff off the background threads or things like Celery.

00:04:17.920 --> 00:04:19.560
And this is a really cool way to do it.

00:04:19.560 --> 00:04:24.080
I know that there's Celery and other things, but having some simple way to just ease into

00:04:24.080 --> 00:04:28.040
multi-process programming and it's really hardly any code at all.

00:04:28.040 --> 00:04:28.280
Right.

00:04:28.280 --> 00:04:29.580
There's no extra service.

00:04:29.840 --> 00:04:31.120
It just runs in process.

00:04:31.120 --> 00:04:32.080
It's simple and easy.

00:04:32.080 --> 00:04:32.440
Yeah.

00:04:32.440 --> 00:04:36.600
Last up from Kenneth, although I'm sure I'm missing something that he's been doing recently,

00:04:36.600 --> 00:04:39.940
is setup.py for humans.

00:04:39.940 --> 00:04:42.280
And this isn't something you run.

00:04:42.280 --> 00:04:49.620
It's just he's got a repo that's an example setup file, which he directly off of it, this

00:04:49.620 --> 00:04:55.440
repo exists to provide an example setup.py file that can be used to bootstrap your next Python

00:04:55.440 --> 00:04:55.940
project.

00:04:55.940 --> 00:05:00.900
It includes some advanced patterns and best practices, as well as some commented out nice

00:05:00.900 --> 00:05:01.440
to haves.

00:05:01.440 --> 00:05:05.780
And it had a quick look through it and it looks actually, I like it.

00:05:05.780 --> 00:05:06.000
Yeah.

00:05:06.220 --> 00:05:08.500
So get out there and make that module package, right?

00:05:08.500 --> 00:05:09.160
Very, very cool.

00:05:09.160 --> 00:05:09.400
Okay.

00:05:09.400 --> 00:05:13.680
And so Kenneth, either slow down or we're going to have to have another podcast just to talk

00:05:13.680 --> 00:05:14.520
about your stuff.

00:05:14.520 --> 00:05:18.660
And he has his own podcast, which is pretty long form.

00:05:18.780 --> 00:05:20.400
So maybe he covers this stuff there as well.

00:05:20.400 --> 00:05:20.920
Yeah, maybe.

00:05:20.920 --> 00:05:22.400
I'm not sure, but yeah, definitely.

00:05:22.400 --> 00:05:23.660
All right.

00:05:23.660 --> 00:05:28.200
So up next is a really positive thing, but it sounds kind of negative.

00:05:28.200 --> 00:05:30.200
I want to talk about the Python death clock.

00:05:30.200 --> 00:05:30.980
Dun, dun, dun.

00:05:30.980 --> 00:05:32.140
Dun, dun, dun.

00:05:32.140 --> 00:05:37.160
So I'm over here on pythonclock.org.

00:05:37.160 --> 00:05:42.200
And it says, Python 2.7 will retire in two years, seven months, five days, seven hours,

00:05:42.200 --> 00:05:44.720
33 minutes, and 35 seconds.

00:05:44.720 --> 00:05:47.580
So that's pretty neat, right?

00:05:47.580 --> 00:05:48.540
So here's this clock.

00:05:48.540 --> 00:05:56.620
There's just a running animated countdown till the 2020 timeframe when Python 2.7 is going

00:05:56.620 --> 00:06:00.240
to be no longer maintained when it goes out of support and things like that.

00:06:00.240 --> 00:06:00.480
Yeah.

00:06:00.480 --> 00:06:06.240
And so this is the get, it's counting to what a best guess for when PyCon in 2020 is.

00:06:06.240 --> 00:06:06.460
Yeah.

00:06:06.460 --> 00:06:07.180
Isn't that interesting?

00:06:07.180 --> 00:06:12.000
There's no, when they said they're going to retire Python 2.7, they didn't say we're going

00:06:12.000 --> 00:06:17.320
to retire it on June 1st, 2020, or we're going to retire it on December 31st, 2020.

00:06:17.320 --> 00:06:20.580
It's just, you know, within that year, kind of.

00:06:20.580 --> 00:06:22.440
So there's a couple of interesting things here.

00:06:22.440 --> 00:06:26.160
This guy's like, all right, so when would be the ideal date to retire this?

00:06:26.160 --> 00:06:28.420
It would be PyCon 2020, of course.

00:06:28.420 --> 00:06:34.080
So he says, I hereby suggest we make PyCon 2020 the official end of life date.

00:06:34.080 --> 00:06:37.480
And we throw a massive party to celebrate all that Python 2 has done for us.

00:06:37.480 --> 00:06:40.760
Python 2, thank you for your years of faithful service.

00:06:40.760 --> 00:06:42.700
Python 3, your time is now.

00:06:42.700 --> 00:06:43.120
Sorry.

00:06:43.120 --> 00:06:53.060
So yeah, I think this is a really cool idea to sort of encourage people to move from legacy

00:06:53.060 --> 00:06:55.040
Python over to modern Python.

00:06:55.040 --> 00:07:01.400
And it's fun to just, you know, have up if you're, when you're leaving your desktop open,

00:07:01.400 --> 00:07:06.020
going to have some coffee, you can just remind everybody around you that Python 2 is dying.

00:07:06.140 --> 00:07:06.460
That's right.

00:07:06.460 --> 00:07:12.440
Or if your non-technical manager says, we can't really afford to upgrade that old Python 2 code,

00:07:12.440 --> 00:07:15.160
you can say, well, here's the Python 2 death clock.

00:07:15.160 --> 00:07:16.460
So this is our timeframe.

00:07:16.460 --> 00:07:19.820
This is an upper bound for when we should get to this.

00:07:19.820 --> 00:07:20.100
Yeah.

00:07:20.200 --> 00:07:22.720
So this other one that you want to talk about is pretty interesting.

00:07:22.720 --> 00:07:28.420
It's kind of a design pattern, almost a pushback on some of the more intense design patterns,

00:07:28.420 --> 00:07:28.880
I would say.

00:07:28.880 --> 00:07:29.240
Yeah.

00:07:29.240 --> 00:07:35.380
So one of the things that I always push, I don't always, but I, my red flag goes up when

00:07:35.380 --> 00:07:41.860
everybody, whenever anybody follows something dogmatically, like just this is a best practice,

00:07:41.860 --> 00:07:42.900
follow it or else.

00:07:42.900 --> 00:07:44.000
I don't, I don't like that.

00:07:44.000 --> 00:07:48.640
This is a article called small functions considered harmful.

00:07:48.640 --> 00:07:54.560
And it just takes a look, it takes a look at, there's a quote from here, general programming

00:07:54.560 --> 00:08:00.360
advice doled out invariably seems to extol the elegance and efficacy of small functions.

00:08:00.360 --> 00:08:06.520
And I have seen, I've seen that like this, the author has to an extreme where sometimes people

00:08:06.520 --> 00:08:12.020
will go to the point where they're writing very small functions, like one line functions.

00:08:12.440 --> 00:08:18.280
And that, and I think that's okay for some cases, like complicated math, maybe it makes

00:08:18.280 --> 00:08:23.140
sense, but small functions that are only used in one place, it actually doesn't help.

00:08:23.140 --> 00:08:28.280
And so there's, she goes through and talks about quite a few problems with small functions,

00:08:28.280 --> 00:08:32.960
including like just making your, there's a lot of fun things that she talks about, but

00:08:32.960 --> 00:08:37.500
I think that just makes it code harder to read to me and especially to newcomers.

00:08:37.700 --> 00:08:43.340
One thing I didn't think about was if you're using classes a lot, adding more class functions,

00:08:43.340 --> 00:08:47.820
just a kind of a litters up your class namespace, your interface.

00:08:47.820 --> 00:08:51.400
So you, it's harder to tell what the class is supposed to be doing.

00:08:51.400 --> 00:08:51.660
Yeah.

00:08:51.660 --> 00:08:55.400
I mean, you almost, you almost got to go to the level of like using double underscores to

00:08:55.400 --> 00:08:57.000
make that stuff not show up.

00:08:57.540 --> 00:08:57.900
Right.

00:08:57.900 --> 00:08:58.260
Yeah.

00:08:58.260 --> 00:08:58.480
Right.

00:08:58.480 --> 00:08:59.300
Sort of hide it.

00:08:59.300 --> 00:09:00.660
So, okay, these are the internal things.

00:09:00.660 --> 00:09:01.920
These are little stuff I broke it into.

00:09:01.920 --> 00:09:04.420
I have mixed feelings about this.

00:09:04.420 --> 00:09:07.060
I am sympathetic to what Cindy says.

00:09:07.060 --> 00:09:09.700
I feel like she has a really good point.

00:09:09.700 --> 00:09:16.580
And certainly some of these like dry principles, some of the design patterns taken too much to

00:09:16.580 --> 00:09:19.000
an extreme are really painful.

00:09:19.000 --> 00:09:26.860
Like I would say one of the hardest applications I've ever worked on is this like 50 to a hundred

00:09:26.860 --> 00:09:32.460
thousand lines of code that was just fully abstract everything.

00:09:32.660 --> 00:09:37.840
design pattern, this dependency injection that, and just every time I wanted to do something

00:09:37.840 --> 00:09:39.060
like, where does this live?

00:09:39.060 --> 00:09:40.900
How can I tell what it does?

00:09:40.900 --> 00:09:43.400
I know like somehow it's assembled at runtime.

00:09:43.400 --> 00:09:47.700
So this thing happens, but like there's so many pieces and patterns contributing to it.

00:09:47.700 --> 00:09:49.220
It was really, really not good.

00:09:49.220 --> 00:09:51.300
And I think that's what she's kind of riffing on.

00:09:51.300 --> 00:09:57.900
But I also think there's, it doesn't hurt to necessarily encourage people to write small

00:09:57.900 --> 00:10:00.520
functions, but if they get too small, it is certainly a problem.

00:10:00.640 --> 00:10:06.940
My, my rule of thumb that I use is does the function need documentation to tell what it

00:10:06.940 --> 00:10:07.240
does?

00:10:07.240 --> 00:10:09.200
If it does, it's probably wrong.

00:10:09.200 --> 00:10:14.480
Now that, that doesn't necessarily apply to like, it's an API in a public package and you've

00:10:14.480 --> 00:10:15.220
never seen it.

00:10:15.220 --> 00:10:15.740
Right.

00:10:15.740 --> 00:10:19.180
But in your own code, like do you need comments to tell you what that function does?

00:10:19.180 --> 00:10:21.640
Or does a short, simple name tell you what it does?

00:10:21.640 --> 00:10:27.080
Like that, I feel like anytime I'm about to write a comment and Martin Fowler, I think it's

00:10:27.080 --> 00:10:29.180
Martin Fowler has a really interesting way of talking about comments.

00:10:29.180 --> 00:10:32.280
He says comments are deodorant for bad code.

00:10:32.280 --> 00:10:37.100
So I feel like if I'm about to write a comment about a function, I'm like, oh, this probably

00:10:37.100 --> 00:10:38.060
just should be rewritten.

00:10:38.060 --> 00:10:40.260
So it's really clear what it does.

00:10:40.260 --> 00:10:44.720
It's certainly a tension, but I guess maybe the warning is don't take it too much to the

00:10:44.720 --> 00:10:45.060
extreme.

00:10:45.060 --> 00:10:47.840
It makes it at least as bad or as bad.

00:10:48.040 --> 00:10:52.800
And I want to touch on one more thing because I've been thinking about agile and agility

00:10:52.800 --> 00:10:56.060
a lot lately, especially with refactoring code.

00:10:56.220 --> 00:11:03.900
And one of the comments she brings up is that breaking up your code into small pieces can create premature

00:11:03.900 --> 00:11:04.900
abstractions.

00:11:04.900 --> 00:11:11.240
So you're breaking it up into multiple pieces and that makes it harder to, it might make it

00:11:11.240 --> 00:11:14.840
harder to refactor once you completely understand the problem space.

00:11:15.020 --> 00:11:22.100
So I think the time to break up things is after you've completely mostly solved the problem

00:11:22.100 --> 00:11:25.400
and you're just making it maintainable for the future.

00:11:25.400 --> 00:11:25.700
Yeah.

00:11:25.700 --> 00:11:26.520
That's an interesting point.

00:11:26.520 --> 00:11:30.440
Like once you fully understand and have solved the problem, like apply some refactoring tooling

00:11:30.440 --> 00:11:32.160
or concepts against it.

00:11:32.160 --> 00:11:36.180
And then it's much more likely to be stable and you've got the big picture and then you

00:11:36.180 --> 00:11:36.660
break it up.

00:11:36.660 --> 00:11:36.940
Sure.

00:11:36.940 --> 00:11:37.440
I agree.

00:11:37.440 --> 00:11:38.800
Nice.

00:11:39.220 --> 00:11:40.360
You know what I've been thinking about lately?

00:11:40.360 --> 00:11:40.720
What?

00:11:40.720 --> 00:11:41.380
Datadog.

00:11:41.380 --> 00:11:41.980
Oh yeah.

00:11:41.980 --> 00:11:42.860
Yeah.

00:11:42.860 --> 00:11:44.640
So Datadog, they're sponsoring this episode.

00:11:44.640 --> 00:11:45.220
Thank you guys.

00:11:45.220 --> 00:11:52.340
What they do is basically they let you have an entire view of your entire system, not just

00:11:52.340 --> 00:11:52.840
your application.

00:11:52.840 --> 00:11:57.260
So you've got your Python code, but maybe your Python code is running on a web server.

00:11:57.260 --> 00:11:58.480
It's built on Flask.

00:11:58.480 --> 00:11:59.880
It's talking to MongoDB.

00:11:59.880 --> 00:12:04.280
It's hosted on a set of scaled out Ubuntu servers or Nginx and MicroWSGI.

00:12:04.280 --> 00:12:08.880
You can actually integrate Datadog into all those things that I've mentioned and get an

00:12:08.880 --> 00:12:15.460
entire view of how your overall system, those things all taken as a whole work, not just

00:12:15.460 --> 00:12:20.160
logs or performance monitoring for your Python app, which is pretty awesome if you have a

00:12:20.160 --> 00:12:21.100
big distributed system.

00:12:21.100 --> 00:12:21.460
Yeah.

00:12:21.460 --> 00:12:21.840
Yeah.

00:12:21.840 --> 00:12:27.620
So they actually have a cool little tutorial you can take at pythonbytes.fm/Datadog

00:12:27.620 --> 00:12:31.900
and it takes just a few minutes and they'll even send you a cool Datadog t-shirt if you

00:12:31.900 --> 00:12:32.600
do the tutorial.

00:12:32.600 --> 00:12:35.580
So check it out at pythonbytes.fm/Datadog.

00:12:35.580 --> 00:12:36.700
It helps support the show.

00:12:36.700 --> 00:12:37.020
Yeah.

00:12:37.020 --> 00:12:37.500
Yeah.

00:12:37.600 --> 00:12:40.040
If I do the tutorial, can I get a t-shirt even?

00:12:40.040 --> 00:12:40.780
You can get a t-shirt.

00:12:40.780 --> 00:12:41.980
I don't think you've been excluded.

00:12:41.980 --> 00:12:42.420
Okay.

00:12:42.420 --> 00:12:42.800
Great.

00:12:42.800 --> 00:12:43.180
Awesome.

00:12:43.180 --> 00:12:43.300
Yeah.

00:12:43.300 --> 00:12:44.340
We could both go get a t-shirt.

00:12:44.340 --> 00:12:44.760
Awesome.

00:12:44.760 --> 00:12:48.740
So we talked about the death clock a little bit.

00:12:48.740 --> 00:12:54.260
Let's talk about more sugar, less of a stick type of a thing to encourage people to use

00:12:54.260 --> 00:12:54.800
modern Python.

00:12:54.800 --> 00:12:56.340
I ran across this site.

00:12:56.340 --> 00:12:58.740
I can't remember where I found it, but it's really cool.

00:12:58.840 --> 00:13:00.620
It's called Y-Python 3.

00:13:00.620 --> 00:13:06.380
And what it is, is if you pull it up, there's a simple little code sample of some Python 3

00:13:06.380 --> 00:13:08.300
feature that's awesome that you can't use.

00:13:08.300 --> 00:13:10.660
And there's a button like, show me another cool feature.

00:13:10.660 --> 00:13:14.800
And it'll randomly generate another code sample of something that you could do.

00:13:15.500 --> 00:13:17.040
And so I hit it a few, isn't that cool?

00:13:17.040 --> 00:13:18.460
So I hit it, it's really simple and quick.

00:13:18.460 --> 00:13:19.480
So I hit it a few times.

00:13:19.480 --> 00:13:20.520
I got annotations.

00:13:20.520 --> 00:13:25.560
So type annotations like functions, say it takes two integers and returns a string or something

00:13:25.560 --> 00:13:25.980
like that.

00:13:25.980 --> 00:13:30.200
Keyword only arguments, which is pretty cool.

00:13:30.320 --> 00:13:35.620
So a way to say like, you're only allowed, you can basically say like, you must pass these

00:13:35.620 --> 00:13:38.380
certain arguments as keywords, which was not a thing in Python 2.

00:13:38.380 --> 00:13:44.700
Yield from for basically consuming generators and turning them into generators, enums, and

00:13:44.700 --> 00:13:45.220
a bunch more.

00:13:45.220 --> 00:13:48.040
You can sit there and keep clicking, give me another random sample.

00:13:48.040 --> 00:13:48.920
It's fun, right?

00:13:48.920 --> 00:13:49.640
That is nice.

00:13:49.640 --> 00:13:50.240
Yeah, cool.

00:13:50.240 --> 00:13:51.880
So just go play around with that.

00:13:51.880 --> 00:13:55.640
Actually, there was a few things that I learned about that I didn't know, like the secrets.

00:13:55.640 --> 00:13:58.880
I just have no reason to really play with the cryptographic secret stuff, but that's

00:13:58.880 --> 00:14:00.520
apparently new in Python 3 and pretty nice.

00:14:00.520 --> 00:14:00.860
Yeah.

00:14:00.860 --> 00:14:01.180
Nice.

00:14:01.180 --> 00:14:06.480
So let's talk about something a little above the code, but something happens a lot in technical

00:14:06.480 --> 00:14:06.940
spaces.

00:14:06.940 --> 00:14:07.400
Yeah.

00:14:07.400 --> 00:14:07.620
Drinking.

00:14:07.620 --> 00:14:09.060
Drinking, definitely.

00:14:09.060 --> 00:14:14.400
And speaking of secrets as well, there's a secret that is not so much as a secret that

00:14:14.400 --> 00:14:16.100
not everybody drinks alcohol.

00:14:16.100 --> 00:14:22.060
So I actually got, I thought about this a lot because Trey Hunter brought it up recently on

00:14:22.060 --> 00:14:28.500
Twitter and he said that a lot of the conferences and tech events that he goes to, he, and I'll

00:14:28.500 --> 00:14:28.880
quote him.

00:14:28.880 --> 00:14:34.100
I feel, I sometimes feel excluded when events include nice alcohol, but cheap soda.

00:14:34.100 --> 00:14:36.580
And I've never really thought about that before.

00:14:36.580 --> 00:14:38.260
And I want everybody else to think about it.

00:14:38.260 --> 00:14:45.900
And so there's this acronym called ENAB, E-A-N-A-B, which is equally attractive, non-alcoholic

00:14:45.900 --> 00:14:46.340
beverage.

00:14:46.340 --> 00:14:48.740
And I think it's a cool idea.

00:14:48.740 --> 00:14:49.140
Yeah.

00:14:49.140 --> 00:14:56.620
So there's a, Trey also linked to us to, got us onto a Stanford site because there is like

00:14:56.620 --> 00:14:59.000
an alcohol.stanford site, which is cool.

00:14:59.000 --> 00:15:03.900
ENABs are required for all Stanford parties and it's a, it's a cool idea.

00:15:04.000 --> 00:15:08.340
So if you're going to have like, like, let's say we have a get together and you got like

00:15:08.340 --> 00:15:13.860
some specialty beers, we'll go out and try to find some specialty local sodas also, or

00:15:13.860 --> 00:15:18.020
make sure that you have a nice, if you've got a spiked punch, make a non-alcoholic version.

00:15:18.380 --> 00:15:24.280
And then the Stanford site also has quite a few mocktail recipes that look easy and delicious.

00:15:24.280 --> 00:15:25.340
Yeah, that's cool.

00:15:25.340 --> 00:15:27.020
And those are pretty easy to do, right?

00:15:27.020 --> 00:15:31.540
Like here in Portland, I know we have a bunch of like locally brewed root beers, for example,

00:15:31.540 --> 00:15:32.700
and things like that.

00:15:32.700 --> 00:15:32.920
Yeah.

00:15:32.920 --> 00:15:33.600
So yeah.

00:15:33.600 --> 00:15:34.500
Hot lip sodas.

00:15:34.500 --> 00:15:34.760
Yum.

00:15:34.760 --> 00:15:35.180
Yeah.

00:15:35.180 --> 00:15:35.980
Hot lip sodas.

00:15:35.980 --> 00:15:39.340
Those are really nice and not alcoholic unless you spike them.

00:15:39.340 --> 00:15:44.800
And I think most events now think about having non-alcoholic stuff too, but it's the equally

00:15:44.800 --> 00:15:49.920
attractive part of make sure that you're not getting cheap stuff if you're going all out

00:15:49.920 --> 00:15:50.560
on the alcohol.

00:15:50.560 --> 00:15:55.700
You could have either that really cool minty cocktail or RC Cola.

00:15:55.700 --> 00:15:56.280
Yeah.

00:15:56.280 --> 00:16:00.900
And if you're in the Portland area and you are serving cocktails, let me know and I'll show

00:16:00.900 --> 00:16:01.120
up.

00:16:01.120 --> 00:16:02.240
Yeah, yeah, exactly.

00:16:02.240 --> 00:16:03.540
I'll be there with you guys.

00:16:03.540 --> 00:16:03.840
Yeah.

00:16:03.840 --> 00:16:04.200
Awesome.

00:16:04.200 --> 00:16:06.340
So there's probably a theme.

00:16:06.340 --> 00:16:09.520
I don't know, maybe I was just in a particular mood today or something because I've kind of

00:16:09.520 --> 00:16:14.780
chosen a related type of topics, but we've touched a few times on the podcast.

00:16:14.780 --> 00:16:20.820
And I keep coming back to this, not just to like be a cheerleader and rah, rah, rah,

00:16:20.820 --> 00:16:25.420
things are great, but you know, people bet their careers at least short term on studying

00:16:25.420 --> 00:16:30.800
certain technologies and pursuing one thing over the other, show Node.js over, you know,

00:16:30.800 --> 00:16:33.040
Python and web apps or something like this, right?

00:16:33.040 --> 00:16:38.000
So there's a really interesting article from Stack Overflow and Stack Overflow, I think is

00:16:38.000 --> 00:16:42.020
killing it in terms of deep insight into the developer community.

00:16:42.140 --> 00:16:44.300
And the title is not so bad here.

00:16:44.300 --> 00:16:46.420
It's The Incredible Growth of Python.

00:16:46.420 --> 00:16:47.260
How about that?

00:16:47.260 --> 00:16:49.280
Yeah, this is actually a fascinating article.

00:16:49.280 --> 00:16:50.560
So I'm glad that you brought it up.

00:16:50.560 --> 00:16:50.780
Yeah.

00:16:50.780 --> 00:16:53.860
So I just, it came out today, like just a few hours ago.

00:16:53.860 --> 00:16:55.080
I'm like, we have to cover this today.

00:16:55.080 --> 00:16:58.180
So the idea is they recently wrote it.

00:16:58.180 --> 00:16:59.020
This is not this article.

00:16:59.020 --> 00:17:03.720
Previously, they wrote an article exploring how wealthy countries, those that are defined

00:17:03.720 --> 00:17:08.920
by high, as high income countries by the World Bank tend to visit a slightly different set

00:17:08.920 --> 00:17:13.640
of technologies than the counterpart of developers in the world.

00:17:13.640 --> 00:17:19.740
And they said, well, if we actually look at that set, the largest difference we saw was among

00:17:19.740 --> 00:17:22.580
a Python programmers and the Python programming language.

00:17:23.120 --> 00:17:30.060
And in high countries, Python is even more popular, more extreme in its popularity than things

00:17:30.060 --> 00:17:35.440
like Stack Overflow trends, Google trends, and other Python, other language rankings would

00:17:35.440 --> 00:17:36.140
make it out to be.

00:17:36.140 --> 00:17:41.520
So they basically said, in this article, we're going to make a case that Python has a solid

00:17:41.520 --> 00:17:45.180
claim to being the fastest growing major programming language, period.

00:17:45.180 --> 00:17:46.320
Yeah.

00:17:46.400 --> 00:17:48.120
So did you look through some of the graphs in there?

00:17:48.120 --> 00:17:48.460
Yeah.

00:17:48.460 --> 00:17:53.480
Well, the one that I didn't understand, hoping you can explain to me, is the predicting future

00:17:53.480 --> 00:17:57.420
growth looks like an even larger gap between Python and everything else.

00:17:57.420 --> 00:17:57.680
Yeah.

00:17:57.680 --> 00:17:57.900
Yeah.

00:17:57.900 --> 00:18:05.020
So they started out by saying in June 2017 was the first month that Python was the most visited

00:18:05.020 --> 00:18:07.580
tag on Stack Overflow, period.

00:18:07.580 --> 00:18:12.880
That's, of course, all those conversations restricted to these high income nations, right?

00:18:12.980 --> 00:18:16.820
US, Europe, Canada, Australia, those types of places.

00:18:16.820 --> 00:18:23.140
But if you restrict your attention to those areas, Python is by far the most visited.

00:18:23.140 --> 00:18:27.120
It's actually grown two and a half times in popularity since 2012.

00:18:27.120 --> 00:18:34.200
And there's one that compares it to, there's a graph called Python compared to smaller growing

00:18:34.200 --> 00:18:35.440
technologies.

00:18:35.440 --> 00:18:37.000
But what was the first one?

00:18:37.000 --> 00:18:38.220
You asked me about which one?

00:18:38.220 --> 00:18:39.600
Looking at future growth.

00:18:39.600 --> 00:18:40.180
Oh, right, right.

00:18:40.180 --> 00:18:41.360
The prediction of future growth.

00:18:41.420 --> 00:18:47.520
So they said, look, if we're going to look at these graphs over from 2012 until now.

00:18:47.520 --> 00:18:50.760
And then the guy who wrote this article is actually a data scientist.

00:18:50.760 --> 00:18:54.020
And he said he used to do a little Python, but he only does R. So he doesn't really have

00:18:54.020 --> 00:18:56.400
much of a horse in this race.

00:18:56.400 --> 00:19:02.500
But he said, let's apply statistical modeling to the growth curve out to 2020.

00:19:02.500 --> 00:19:05.060
And if you look at that, it's just like crazy.

00:19:05.180 --> 00:19:09.280
So they say, well, maybe there's going to be a back and forth with Java as students go

00:19:09.280 --> 00:19:10.720
back to school this month.

00:19:10.720 --> 00:19:15.320
And they're going to look up issues for their homework because Java's taught a lot of the

00:19:15.320 --> 00:19:16.380
first year computer science.

00:19:16.380 --> 00:19:19.520
But if you follow this trend, it's like, it's domination.

00:19:19.520 --> 00:19:21.000
It's basically what he said.

00:19:21.000 --> 00:19:25.200
There's another one that's really interesting because I feel like people compare this a lot.

00:19:25.200 --> 00:19:27.620
It says Python compared to smaller growing technologies.

00:19:27.620 --> 00:19:32.820
So Python often gets compared to things like Go and Rust in the data science world, it gets

00:19:32.820 --> 00:19:34.580
compared to R and so on.

00:19:34.580 --> 00:19:42.400
And there's a graph showing it just like 10, 20 times more popular and steeper growth curves

00:19:42.400 --> 00:19:46.420
than all of those languages, which I think is really interesting because people kind of see

00:19:46.420 --> 00:19:51.160
these shiny new languages and go, oh my gosh, this is, I should just abandon Python and go

00:19:51.160 --> 00:19:52.360
write Go or whatever.

00:19:52.360 --> 00:19:56.320
And that may be true for some particular case, but not in general.

00:19:56.320 --> 00:19:56.680
Yeah.

00:19:56.680 --> 00:20:04.480
And some of the strong languages that we have been around for a while, like PHP, C++, Java,

00:20:04.480 --> 00:20:10.780
it's interesting to see that those charts are, they've been relatively, either relatively

00:20:10.780 --> 00:20:13.960
flat or slightly declining for the last few years.

00:20:13.960 --> 00:20:14.200
Yeah.

00:20:14.200 --> 00:20:17.600
A lot of the standard well-known ones, the ones you named, right?

00:20:17.600 --> 00:20:22.080
They are definitely slowly, slowly trending down, which is not amazing for them.

00:20:22.080 --> 00:20:22.440
Yeah.

00:20:22.440 --> 00:20:22.760
Yeah.

00:20:22.760 --> 00:20:24.560
So also related, there's another article.

00:20:24.780 --> 00:20:30.120
I almost covered this one, but in fact, this one was just so, so neat and had so much data

00:20:30.120 --> 00:20:32.240
behind it that I thought I'd rather cover this.

00:20:32.240 --> 00:20:36.640
But there's another one that says Python overtakes R to become the leader in data science and machine

00:20:36.640 --> 00:20:37.340
learning platforms.

00:20:37.340 --> 00:20:38.940
So these are all of course related.

00:20:38.940 --> 00:20:41.000
So I linked to that one in there as well.

00:20:41.000 --> 00:20:41.500
Yeah.

00:20:41.500 --> 00:20:44.740
And finally, one, one wrap up is this was applied to high income countries.

00:20:44.740 --> 00:20:49.660
If you apply to countries that are not in that group, they said Python has the exact same

00:20:49.660 --> 00:20:51.080
growth curve.

00:20:51.080 --> 00:20:53.400
It's just, it's starting at a lower point.

00:20:53.400 --> 00:20:57.140
So they expect in the future in a few years that to also be able to make these kinds of

00:20:57.140 --> 00:21:00.080
statements there, but there's like a lag and they talk a little bit about that.

00:21:00.080 --> 00:21:00.720
It's kind of interesting.

00:21:00.720 --> 00:21:00.920
Yeah.

00:21:00.920 --> 00:21:05.360
I'll have to go back and read those other article because I don't understand why the difference

00:21:05.360 --> 00:21:06.520
between different countries.

00:21:06.520 --> 00:21:09.600
I didn't get a good solid answer there either.

00:21:09.600 --> 00:21:09.900
Okay.

00:21:09.900 --> 00:21:10.460
Cool.

00:21:10.460 --> 00:21:11.920
But worth definitely worth checking out.

00:21:11.920 --> 00:21:13.480
Hey, that's our six, man.

00:21:13.480 --> 00:21:14.960
So that is our six.

00:21:15.080 --> 00:21:15.640
That was fun.

00:21:15.640 --> 00:21:16.860
What's up with you?

00:21:16.860 --> 00:21:17.980
What's any news?

00:21:17.980 --> 00:21:20.160
Well, I've been doing a couple of things.

00:21:20.160 --> 00:21:27.320
I've been learning the joyful bit of the decay of online courses and been re-recording some

00:21:27.320 --> 00:21:32.580
of my online courses, sections of them as the web properties they depended upon, like web

00:21:32.580 --> 00:21:35.400
services or something, change their model or went away.

00:21:35.400 --> 00:21:36.380
So that was fun.

00:21:36.380 --> 00:21:41.360
But it's all good to be able to keep that stuff fresh.

00:21:41.360 --> 00:21:44.080
Also, I'm going to pie cascades.

00:21:44.080 --> 00:21:49.640
So this is a new pie con in Vancouver, British Columbia, beautiful place of the world in

00:21:49.640 --> 00:21:50.680
January 2018.

00:21:50.680 --> 00:21:54.900
So I already booked my flight and I'm trying to get you to go and you're on the fence, man.

00:21:54.900 --> 00:21:56.780
Yeah, I really want to go.

00:21:56.780 --> 00:22:01.340
I don't know what my January is going to look like yet, but I should decide soon so I can

00:22:01.340 --> 00:22:01.780
get a flight.

00:22:01.780 --> 00:22:02.640
Yeah, you definitely should.

00:22:02.640 --> 00:22:03.520
Awesome.

00:22:03.520 --> 00:22:03.940
How about you?

00:22:03.940 --> 00:22:04.860
What else is new?

00:22:04.860 --> 00:22:07.800
Well, I just got back from Germany.

00:22:08.300 --> 00:22:11.860
And one of the things I did there was I met up with the...

00:22:11.860 --> 00:22:18.420
I want to shout out to everybody at the Munich Python user group that like less than a week's

00:22:18.420 --> 00:22:22.620
notice decided to come together and hang out with me for an evening, which is like totally

00:22:22.620 --> 00:22:23.000
awesome.

00:22:23.000 --> 00:22:23.940
And it was a lot of fun.

00:22:23.940 --> 00:22:27.900
We talked about pytest, of course, but we talked about quite a few other things as well.

00:22:27.900 --> 00:22:28.180
Yeah.

00:22:28.180 --> 00:22:28.880
That's awesome.

00:22:28.880 --> 00:22:30.960
They were able to put that together on a short notice for you.

00:22:31.080 --> 00:22:31.320
Yeah.

00:22:31.320 --> 00:22:34.580
And then something happened just today and I didn't even know it was going to happen.

00:22:34.580 --> 00:22:37.500
So the pytest book I'm now no longer working on.

00:22:37.500 --> 00:22:43.620
The last beta was beta 5, but beta 6 just came out today, which is the...

00:22:43.620 --> 00:22:46.920
I wasn't involved at all, but it's all the copy editing changes.

00:22:46.920 --> 00:22:48.380
They fixed all my typos.

00:22:48.380 --> 00:22:48.920
Oh, nice.

00:22:48.920 --> 00:22:53.320
So this stuff has been pushed off to the editors and they're rolling it back out to the readers,

00:22:53.320 --> 00:22:53.520
huh?

00:22:53.520 --> 00:22:53.880
Yeah.

00:22:53.880 --> 00:22:56.140
And so it's just a...

00:22:56.140 --> 00:23:00.160
There's some magic machine now that turns it into a book, a physical book.

00:23:00.500 --> 00:23:05.460
Does your book have a version number, like 1.3, 0.7, 0.6?

00:23:05.460 --> 00:23:06.700
No.

00:23:06.700 --> 00:23:07.520
It should.

00:23:07.520 --> 00:23:12.980
Well, I mean, all of it's stored in revision control, so it has versions that way.

00:23:12.980 --> 00:23:13.320
Yeah.

00:23:13.320 --> 00:23:16.040
It just has a SHA, really long, hard to make any sense of.

00:23:16.040 --> 00:23:17.620
Awesome.

00:23:17.620 --> 00:23:17.860
All right.

00:23:17.860 --> 00:23:19.480
Well, it's good to be back together with you, Brian.

00:23:19.480 --> 00:23:24.080
I think we're both going to be relatively stable for next few episodes probably, so that'll

00:23:24.080 --> 00:23:24.340
be good.

00:23:24.340 --> 00:23:25.240
Yeah, definitely.

00:23:25.240 --> 00:23:26.100
So thanks a lot.

00:23:26.100 --> 00:23:28.900
Thank you for listening to Python Bytes.

00:23:28.900 --> 00:23:31.460
Follow the show on Twitter via at Python Bytes.

00:23:31.460 --> 00:23:34.360
That's Python Bytes as in B-Y-T-E-S.

00:23:34.360 --> 00:23:37.800
And get the full show notes at pythonbytes.fm.

00:23:37.800 --> 00:23:42.120
If you have a news item you want featured, just visit pythonbytes.fm and send it our way.

00:23:42.120 --> 00:23:44.820
We're always on the lookout for sharing something cool.

00:23:44.820 --> 00:23:48.220
On behalf of myself and Brian Okken, this is Michael Kennedy.

00:23:48.700 --> 00:23:51.840
Thank you for listening and sharing this podcast with your friends and colleagues.