Python Bytes - #145 The Python 3 “Y2K” problem
Episode Date: August 31, 2019Topics covered in this episode: friendly-traceback * Pandas Users Survey* * python3 “Y2K” problem (python3.10 / python4.0)* pypi research * DaPy* python-remote-pdb Extras Joke See the full s...how notes for this episode on the website at pythonbytes.fm/145
Transcript
Discussion (0)
Hello and welcome to Python Bytes, where we deliver Python news and headlines directly to your earbuds.
This is episode 145, recorded August 28th, 2019.
I'm Michael Kennedy and Brian is away on vacation.
Yeah, I was on vacation last week, now Brian's gone.
But don't despair, we have two special guests.
We have Matt Harrison.
Hello.
Welcome, Matt.
And Anthony Sotili.
Welcome, first time here on the show.
Nice to have you here. Nice to be on the show. Nice to have you here.
Nice to be on the show.
Yeah, it's great to have you.
I'm looking forward to talking about all these things with you.
Now, before we get on to our topics, let me just say real quickly, the show is brought
to you by Datadog.
Check them out at pythonbytes.fm slash datadog.
More on that later.
But I want to focus first on something that's going to help people learning Python or teaching people who are learning Python.
And that's this project called Friendly Traceback.
Matt, you do a lot of teaching.
What is your experience with folks?
You know, what are their first programming experiences running into like a traceback crash?
Like, is it really clear for them most of my training is with experienced technologists who understand what a traceback is
so i do do some with kids in elementary school that sort of thing but my issue is i like the
idea here but in my courses i teach explicitly have them hit errors and teach them how to read the traceback and recover them.
How to recover, yeah.
So I like the idea.
The other thing that I have sort of an issue with is that you have to install it, right?
So having someone who's a beginner install something, I don't know.
What do you think about that?
That's an interesting question because you – well, let me tell folks what it is real quick.
So this one comes to us from Jose Carlos Garcia, I think, because his Twitter name is in Elite Speak.
So that's my attempt to understand it back into English.
Thank you, Carlos, for sending that in.
And the idea is it's really aimed at beginners, as you kind of hinted at, Matt.
And let me just give folks a sense of what it is.
So normal traceback
will have like in reverse order, the call stack, and then maybe the line of code, and then the
error message, like the error type, and then possibly the error message, right? Well, what
this does instead is it will catch the exception type, like an index error, and then it has a
little help message in an example,
right? So it says, Oh, this was a Python exception, you got an index error, that means a list index is
out of range in this case. And this error occurs under these circumstances. Here's usually what
happened, here's usually the cause. And then one thing I really like about is it first shows the
line of code where it happened. And then it actually shows the local variables. So like in the example, there has a function called get last item, and you're passing a list.
And it says, the list that was passed was one comma two comma three. And then here is actually
like three or four lines of code where this error is happening and what the index value was and all
that. So you could actually diagnose this without even stepping into a debugger. You could just say, oh, I see the index is three,
but actually it's 012 by just looking at the output on the screen here.
And that I think is pretty cool.
Yeah, I think it's definitely useful.
I looked over the documentation.
I thought this is really cool.
My issue with beginners is how to walk them through something.
And installing is always a pain when they're
beginners. I also, the other thing that's really cool about it is it looks like it has some hooks,
so you can define your own exceptions. You can customize how you handle those. So I think that
looks kind of cool as well. I mean, I can imagine maybe if you're in a environment at work where you have support people
and they might have to look at your code or look at your servers and take problems and resolve
them, this might be something that could aid them. Right. The fact that it catches the local
variables in production would be kind of nice. Yeah, I think it really comes down to, are you using any external packages?
If there's a pip install or a condo install,
you could wrap this up to include friendly traceback, right?
But if you're using none of that,
then all of a sudden, yeah, this is like another burden, right?
Yeah.
This actually looks a lot like the PyTest tracebacks.
I sometimes find that those are useful
and sometimes not so useful.
Yeah, exactly. I think it depends. Like they said that there's a lot of tools to make
exceptions better for advanced developers. This is not that this is something. Yeah.
One of the things I thought that was cool about this is there's three ways to like integrate it
into your app. You can install it as an exception hook. So all exceptions, the application are caught,
which is cool. Cause I
mean, I knew that that was possible, but I didn't really, I've never really played with that. And
I'm like, Oh, look how easy it is. You just take a function and assign it to this, this callback
globally in any era, we'll go through it. That's cool. So you can do that at the top of like
your startup or your app. You can actually in a try accept block, you know, say explain friendly
trace back, explain, explain, and it'll do that on demand.
But both of those require you changing your code.
You can also use it from the outside.
When you run an app, you can say dash m friendly trace back, then the script file, and that way you can run it on code that's not modified to be friendly, I guess.
Unfriendly code, would you call it?
I don't know.
Anthony, let's wrap this up.
What are your thoughts on this thing?
Looks good.
I'm actually teaching my brother
how to program right now
and he was pretty overwhelmed
by the first stack trace that he saw.
And I think if he would have saw
something like this,
it would have changed his perception
about errors and maybe taught him
something more than I had to teach him
after the fact.
Exactly.
Yeah, I totally, I think it's awesome i really
really like the idea i do take matt's point as valid as like it's now a step preceding actually
writing code that they've got to go through so depending on how much control you have over their
environment if you can like get this in place for them and maybe it's no big deal but yeah
anyway worth considering matt what about next for So recently, the Pandas developers released the Pandas user survey from 2019.
So this came out last week.
They had a call on Twitter and they had about 1,200 responses.
Yeah, that's cool.
I'm surprised they got so many folks to participate.
Those are really solid numbers for statistics.
Yeah, I think we've got a link to the survey there. But some of the things that stood out to me
is that more than half of the people who responded have been using Pandas for less than two years.
Pandas has been out for quite a while now, but it seems to be one of, from what I see,
it's one of the key drivers of growth.
It's just sort of a central component of sort of the data analysis, data science space.
And it looks like they're getting a lot of new users there.
Yeah.
So, you know, we talked about the incredible growth of Python before.
And a lot of that has to do with this big inflection point where Python was largely adopted, moved to by
data scientists. Do you think this is like an indicator of that? Like there's all these new
folks coming into the Python ecosystem and they're often coming into the data science space. And so
hence they haven't been here for many, many years. Yeah, I think so. I mean, that's the sexy thing
right now, data science and kind of didn't exist before. so there's a big push for AI, ML, that sort of thing.
But if you look at the number one tool that data scientists use,
it's often called Python, and I would say that Pandas
is probably the number one tool of those people
who are using data science.
Yeah, cool. What else is in the survey?
What was really interesting is they have the numbers
of the operating system. So I sort of geek out on that sort of thing. But this isn't
what I thought I would have thought at all. Because some definitions of data scientists
are they're a statistician who uses a MacBook in San Francisco. Yeah, you definitely do better
data science if like the back of your laptop glows at Alienware, maybe, but certainly an Apple.
No, I'm just kidding.
Yeah, so the numbers,
actually they have about 60% of their users use both Linux,
60% use Windows and 42 Mac.
So I wouldn't have thought that.
I mean, obviously those don't add to a hundred.
So I imagine you've got a lot of deployments on Linux,
that sort of thing.
But people tend to forget that Linux sort of rules the enterprise world.
And I think this might be a further indication that Panda's adoption or Python's adoption
is not limited to just startups and people hacking around on their MacBook.
I'm always super surprised by the percentage of Windows users when you consider Python.
And I guess it makes sense
because it's really easy to get started
with Python on Windows,
but the number just blows me away every time.
Yeah, absolutely.
Steve Dower did a great talk at PyCon
called Python is okay on Windows, actually,
or something like that.
And he had some really interesting...
Yeah, it was really good.
And it had some interesting statistics.
I feel like the Windows Python developers
are somewhat in this realm of like the dark matter developers
in that you know they're using it
because it keeps showing up in these surveys.
But you go to PyCon and there's many more MacBooks
toting around and whatnot.
But yeah, it's definitely a good thing to remember.
And you know, honestly, Matt,
the thing that surprised me most here
is how high Linux is in this group.
Yeah, I imagine that's deployments.
But the other interesting number here is Python 3 percentage.
And Python 3 percentage is 93%.
So legacy Python goodbye there, I guess.
The data scientists move on to the latest and greatest.
Yeah, the data scientists are leading the way with ditching legacy Python. I mean, the whole Python 3 statement came out of that space, which is pretty cool. I think that also has to do with less legacy code, as well as the models and the technology are changing so fast, you don't keep building on the same code. You're like, forget that, we're going to go to TensorFlow, because this whole thing is slow and wrong, right? Yeah, like you said, I think they're leading the way.
Well, speaking of Python 3,
I think Anthony has something around that as well.
Yeah.
I do indeed.
Yeah, let's talk about the Y2K problem that I kind of stumbled upon recently.
The YP3 problem?
Yeah.
Yeah, okay, what is this?
Python 3.8, close to release,
and Python 3.9 right around the corner. There's the question that comes up, which is what is this? Python 3.8, close to release, and Python 3.9 right around the corner.
There's the question that comes up, which is, what is going to come after?
And we really have two main choices, which would be like Python 3.10 or Python 4.0.
But both of these present problems just because of their version number.
So there's a significant amount of code out there that's using the sys.version and sys.versionin variables in the sys module. Right. And trying to like just take that string and go,
is there a Python 3 or 2 in here or something like that, right? Yeah, there's a lot of like
slicing or like checking the first character of that string. And it presents a number of
different problems. The most common one that I've seen is when you access sys.version and look at the first three characters,
and that works fine at 2.7 or 3.6 or whatever.
But as soon as the second minor version of Python becomes 10,
you're suddenly reporting Python 3.1 again.
Right. Sorry, this doesn't support Python 3.1.
You need at least version 3.5.
You're like, no, it is 3.5.
There's an even worse situation where if you check,
even if you're doing it correctly and using sys.versioninfo,
if you only check the first number and only check equality,
so like say sys.versioninfo 0 equals equals 3,
that's a perfectly fine check if you're checking if it's exactly Python 3.
But as soon as Python 4 happens, that condition is going to be false.
And guess what? You're going to be false and guess what you're going
to run python 2 again yeah some of the maintainability libraries like six have this
in there right yep yeah six is broken if you change the version to four which is a little
scary given it's uh one of the most installed libraries as we'll see later yeah well you know
i guess that makes sense because six is not divisible by four. So it's probably fine. Now, actually, this is really tricky. You know, it reminds me of Windows 10,
right? Like, if you look at the Windows operating system numbers, we had Windows 7, which was XP,
Windows 8, which was Vista, and then Windows 10. And the reason they don't have a Windows 9 is
exactly this, like so many people are doing substring searches for Windows space 9 for looking for 95 or 98.
And so if they had a 9 that was beyond, you know, Vista.
Even Oracle Java had that problem.
Yeah, it's so they just said, you don't forget it.
We're going to 10.
But it doesn't sound like skipping to 4 is going to make this better.
Probably worse.
I don't know what you think is the worst way to go.
I think skipping to 4 is going to make this better, probably worse. I don't know, what do you think is the worst way to go? I think skipping to 4 is going to be worse.
Most of the things with the 3.10 release will just be like slightly broken, but trying to
run Python 2 code in Python 3 is way more broken.
Yeah, for sure.
So I haven't followed this, but I recall, and maybe my memory is just fading me, that
there was talk that there would never
be a Python 4 so
has that changed?
As far as I know that hasn't changed.
I think the jury's still kind of out
on that one.
From what I understand
there was talks of Python 4
just being the next version of Python 3
but I don't think anyone has
definitively chosen whether it'll be 3.10 or 4.0 next.
Yeah.
I mean, we're at this crossroads, right?
Guido has expressed a dislike of double-digit second version numbers.
But everyone is tired of this 2 versus 3 debate.
We don't want to kick it up a notch, right?
So where do you go from there, right?
We'll just release 3.9.9.9.9 forever.
That's right. Yeah, it'll be fine. Yeah, right? We'll just release 3.9.9.9.9 forever. That's right.
Yeah, it'll be fine.
Yeah, this actually is coming up pretty quickly.
So 3.9 will reach beta, according to the PEP, will reach beta sometime in 2020.
And usually when the next version releases on beta, they start developing the version afterwards.
And so we'll start seeing 3.10 in the wild.
But I made a couple of easy ways
that you can start fixing these problems
before they're a problem, I guess.
One of them, I pre-built a version of Python 3.10.
Well, it's actually 3.8, but with a fake version number.
And you can run that directly on Ubuntu today.
And I made a Flake 8 plugin,
which checks for these common issues called Flake 8 2020.
Nice.
Yeah, that's really cool.
Yeah, it makes it into your...
So does that suggest that you use version info instead?
Yeah, it makes the proper suggestion when it detects which thing that you're using incorrectly.
Cool.
Yeah, super.
That's great.
Now, before we get to the next one, let me just tell you all quickly about Datadog,
their long-term support of the show.
And Datadog is a modern cloud scale monitoring platform that
brings all your metrics and logs and distributed traces together so basically it will auto
instrument all the popular frameworks django flask postgres whatnot and you can actually trace your
requests and your performance across different service boundaries so not just what is your python
code doing or what's your database doing but like all together in one coherent thing, which is cool. If you go to a free trial
with them, you'll get a cool Datadog t-shirt. Just visit pythonbyst.fm slash Datadog to get started.
Now, Anthony, you had hinted that we may come back to popular packages and some folks out of the,
I think they're associated with University of Michigan, but they
also have their own consulting project, these two folks, they did some interesting research on the
current state of PyPI. Now, sometimes people use BigQuery, you can ask interesting questions like,
well, what are the most common user agents downloading from PyPI? Or what are the most
common packages or whatever? These folks went all in and they
downloaded all of the packages from what I can tell, like all of them. And then they started
analyzing all sorts of stuff about them. So they started saying, look, we downloaded 178,592 592 packages, which has roughly 1.7 million releases and 77,000 contributors.
And they also analyzed something that was pretty interesting is the connections or the
interconnectivity or dependency graphs of these various things. And they found there's 157
million import statements within these packages. And then, yeah, they just did a bunch of analysis. This is
basically like an academic research paper. So the thing I'm linking to is actually a PDF.
So, you know, look for a download you're going to get rather than a website they set up. But yeah,
it's pretty interesting what these guys put together. What do you see that caught your
attention going through this? I went to their, I read the paper and then I looked at they actually have a GitHub project and I wanted to
actually pull the data from the GitHub but sadly the data is not there it says coming soon because
I wanted to do some analysis on. Ah bummer. So my question is what do you think is the most common
third-party library and it wasn't what I thought it would be. I mean my guess was just going to be
like six because that you see that everywhere.
Okay.
All sorts of projects.
Yeah, it's super, super low level.
Yeah, I would have guessed requests.
Yeah, that would have been my guess as well, I think. But the most common was NumPy, which surprised me.
Those data scientists, they're really dominating.
I don't know.
They definitely are.
Wow.
How interesting.
So certainly so many of these libraries that are in the data science space do seem to like all focus in on NumPy as the foundation, don't they?
Yeah, it's sort of built around that as well. rather than, say, the web space, where you've got Flask, Django, Pyramid, Bottle, Molten, whatever,
and they all kind of have their own foundation,
so that breaks up their potential high-res.
Yeah, yeah.
That was definitely interesting, NumPy.
I wouldn't have guessed that, but I guess it does make sense.
So some interesting things that I saw was within PyPI,
they said they find that the growth of PyPI itself, all the packages,
has been robust under all measures with an annual compound growth of 47% year over year
for the number of active packages, and 39% for new authors, and 61% for new import statements.
So I guess that means Python packages are becoming
more dependent on each other. Yeah, that makes sense. Again, when I'm doing a training, I will
go to PyPI, the Python package index, and I point them at that number and I'm at it right now and it
says 193,830 projects right now. And I think that's pretty mind-blowing.
But also, like you said, you've got 47% growth in there, 39% for new authors, right?
Yeah, that's incredible.
Apparently, it's somewhat straightforward for someone to come into Python, make a package, and start contributing and sharing it with the community.
Yeah.
I think the new authors is the most impressive stat from there.
It means that people are coming into the community and building stuff for other people, which
is great.
That's a really good point.
Yeah, absolutely.
That's a super positive number.
That's really high growth when you're talking about you already have 77,000 authors, right?
Yeah.
Some other real quick stats I thought was interesting.
They have the number of active packages, which is a much smaller number than the total packages.
But in 2005, you could go to PyPI and you could literally just kind of browse all the active packages.
There were 96.
Yeah.
So in the early days, it was useful to have it, but it was not quite as amazing as almost 200,000 now.
Before PyPI, there's this cheese shop, which I think was the predecessor of that. And it was sort of a single web page and had like, here are the categories, right? And so on that web page was a list of packages. But yeah, this is crazy.
Yeah. So the cheese shop, as you're telling me, it's kind of like Yahoo for packaging. Yeah. So the cheese shop, as you're telling me, is kind of like Yahoo for packaging.
Yeah.
All right.
Final stat from this analysis.
The most popular license for packages in the Python space is MIT.
They've got all the listed, all the listed there.
That's pretty cool.
All right, Matt, what's this next one?
Speaking of data scientists, you got another one for us.
Yeah, so speaking of data scientists and sort of, I guess, the proliferation of, Michael mentioned proliferation of web frameworks.
I came across a new project that I hadn't seen before recently called DAPY, D-A-P-Y.
DAPY.
DAPY.
And it sort of labels itself as pandas for humans.
Not precisely, but it says for humans somewhere in its web page.
And so I just think this is interesting now.
So the evolution of web frameworks.
And I recall when Django came out, at that time, there was another popular web framework called TurboGears, and there was sort of a faction in the Python community of like, are you a TurboGears person or you're a Django person, right?
And they both sort of had their pluses and minuses, right?
But I think, and TurboGears has sort of morphed into what we see as Pyramid these days.
But I see that there's been benefit.
I think in general competition is good, and there's been benefit from that.
This is an interesting library.
It looks like it's sort of is pandas-esque.
It's got portions of pandas in it,
but it also has scikit-learn in it,
yellow brick, which is a visualization tool
for machine learning and NumPy as well.
And it says explicitly on there
that it's designed for data analysis,
not for coders,
which I think that's trying to say that maybe pandas is a little too complicated and that data
analysts maybe need something a little bit more simple than that. But I think it's interesting
that there's now a proliferation and people are using Python and maybe they're saying,
oh, we want to use Python, but we want to use
maybe something simpler and there's a proliferation there. Yeah. I think it's super interesting.
One of the things that seems to do is also leverage the simpler startup idea. Kind of like
you talked about before, like a lot of folks say, well, you get started by setting up a Jupyter
server and installing, you know, pandas and NumPy and all that stuff. And one of the things you can do with this is you can have one of these data sheets and you can say show and it will like print
out an ascii representation of the table and stuff like that yeah in general with most software like
a good five minute out of the box experience is really good for bringing someone on right
it'll be interesting to see what happens to this moving
forward. Because what I'm also seeing is a lot of new projects are taking the interface from pandas
and replicating that. And you've talked to people who are doing similar things, right?
But yeah, like Dask, for example, and stuff like that.
Like Dask. I was just playing the other day with a a library called cudf i don't
know how you pronounce that but uh basically it's a pandas on top of uh cuda so you can leverage your
gpu to do pandas like operations so it'll be interesting to see where that goes it looks like
in general that the data science community is sort of honing in or adopting the pandas interface as sort of a standard interface.
But, you know, is there room for improvement, room for something more for humans?
I guess that remains to be seen there.
Yeah, it definitely seems like a lot of flowers are blooming.
Yeah, which I think in general is good.
Competition is good.
And, you know, if you only have one tool, you have to use that tool, right?
But if there are multiple tools and some are better at certain things, then I think it pushes everyone to be better.
So appreciate the competition there.
For sure.
How do you think a programming library that's not for coders works out?
Yeah, I'm not sure how to interpret that.
You start by installing friendly traceback and then you go from there.
Yeah, good one.
I mean, I also consider Excel a programming environment, right?
I think Excel is the most common programming environment
in the world and lots of people use it.
They won't admit that they're programming,
but I mean, if you do a VLOOKUP or something like that,
you're programming using Excel.
And Google Sheets is a great database.
Yeah.
At some point, I think you have to bite the bullet and learn some syntax.
And so I'm not quite sure how to interpret that statement there.
But friendly interface, Pandas has gotten some slack for some things that might not be super intuitive or not Pythonic in that way.
So whether this is an improvement on that don't
maybe it's a way to graduate to pandas yeah yeah this is your training wheels yeah potentially
potentially now i started off this whole conversation by saying we could use this
friendly traceback to possibly gather information about crashes on the server because it captures
local but anthony this next one you've got might take it up a notch, right? Yeah. So I'm actually going to talk about Python
Remote PDB. This is intended to be a small over the network remote debugger. It's a very, very
thin wrapper around PDB that ships in a single file. It's really easy to kind of drop into an
existing environment and just like add it to your path using python path
or you can pip install if if that's easier for you uh it doesn't have all that many features
there's a bunch of other remote debuggers that are much more powerful things like pudb or rpdb
or pycharm's debugger or visual studio codes debugger or like any of the other things that
are brought to the table but i found found this. It was pretty simple.
It solved my use case and worked pretty well.
That's cool.
So it integrates with Python's new breakpoint feature,
which lets you plug in a new debugger, right?
Yep. Yeah, you just set some environment variables,
and any time you call breakpoint in your code,
the runtime knows how to import the right module
and call the right stuff to call your debugger.
So if you wanted to call remote PDB,
you would just set Python breakpoint
equals remote PDB dot set trace,
and it would just do the right thing.
Yeah, that's pretty cool.
Yeah, and the access for this tool
is you generally just use like Telnet or NetCAD
or SocketCAD or anything that can talk to a socket and basically gives you
a pdb session remotely i'm actually working on creating my own text editor just so i can learn
curses and it was really useful to be able to debug a curses application because you can't
really enter pdb while it's trying to paint your screen yeah that's interesting so i mean even
though it sets up a little server you don't have
to have it be on a different machine right yep yeah i was just developing it in one tab and i
had a debugger in my other tab yeah yeah so in general anything that's printing to if you've
got something that's printing to the screen or maybe doing input from the screen that might be
a case where this would be more appropriate than the built-in debugging tools of Python. Yeah, another use case might be if you're using a web server,
although Flask has nice tools for using a debugger,
and Pyramid does as well, and I'm sure the others do also.
But it's a potential tool.
Yeah, that's cool.
Yeah, more tools are good.
Tell folks really quick what Curses is.
Curses is a library which allows you to paint
kind of graphical user interfaces but in a terminal
it's kind of how text editors like vim or nano or emacs draw out their ui or if i wanted to create
a game for like a bbs you know yeah you can make games with it too i've seen some really good
curses games yeah that's pretty cool all right well that's definitely a good one and i hadn't
heard of it so yeah thanks for sharing that and that's it for our main topics, but I do have a few quick extras.
I know we all do that. I want to share.
I just want to share a story that just made me laugh. I really love it.
So there was this, the press calls them a hacker.
I don't really know what this person would be classified as.
Cause it's like a pretty low level hack, but a,
a person was trying to avoid getting parking tickets and they assumed that if what they
could insert into the the field that contains the number for the license plate was null
the systems like at you know the county or whatever is going to give you a ticket
i say oh there's no address or there's no license plate here so we can't send them a ticket
but in fact quite the opposite is the case so there's this person plate here, so we can't send them a ticket. But in fact, quite the opposite is the case.
So there's this person who got a custom license plate,
which you can do in the U.S. and have words on it,
and they got the word NULL, N-U-L-L, all capital.
And then all of a sudden, all the other places
where there actually were NULLs in the database
started directing to this license plate,
and they got $12,000 in parking tickets
without even parking illegally
because they started to receive all the failure cases
of the database for parking.
Guess he hacked himself.
Exactly.
I don't know if hackers would take kindly to the naming there,
but I don't think it worked out how he wanted it to.
It was definitely a backfire.
Anyway, I'll link into that. It it's pretty funny and then just really quick uh pycon 2020 has been sort
of officially announced it's going to be earlier this year trying to figure out exactly yeah yeah
it's going to be april 15 to 23 in pittsburgh and the website is already up so go check it out sign
up maybe maybe you can submit a talk i'm not entirely sure but the website the website is already up. So go check it out, sign up, maybe you can submit a
talk. I'm not entirely sure, but the website at least is already up. So I'll link to that and
people can check that out. Matt, what do you got? I recently released a course on Pluralsight on the
XGBoost library. So XGBoost, if you're not familiar with it, is a library that a lot of people are
using with great success and like Kaggle competitions for analyzing structured data
and making predictive models around that.
So if you're interested in an in-depth course on XGBoost,
not only how to use it, but how to tune it,
how to understand what the model is predicting when it comes out,
check that out.
I've got a bit.ly link, bit.ly slash PSXGB, plural site,
XGBoost. So PSXGB if you're interested in that. Nice. Yeah, we'll put the links in the show notes.
Congrats on the new course. You and I have both written a fair number of online courses,
and that's a lot of work. Yeah, thank you. Yeah, I'm excited about it. I think it's a
great course for anyone interested in XGBG Boost. Yeah, awesome. Anthony?
Cool.
I've got one quick little library.
This is on the same line as the Curses work above.
I found a tool called Ecate.
I don't know how to pronounce it.
It labels itself as a Selenium web driver,
but for the terminal.
And it's kind of a cool library that allows you to control a process in the background
and make assertions about it as a
testing library so are you sending curses commands or you is that like expect so the way it works is
it runs a tmux server in the background and then uses the tmux commands to interact with it so
it'll sound like up arrow or like control x or sends keys kind of. Yep. Pretty much. Ah,
that's cool.
Yeah.
And then it takes utility in that for like driving demos and that sort of
thing as well.
That's cool.
Oh yeah.
That'd be cool.
Yeah.
You sit there and it looks like you're typing and you're just flying through
it and you just get up.
You said,
let me show you some over here and it just keeps going.
Feel right.
Yeah.
Yeah.
And you could make it understand Emacs.
It could even control emacs awesome
yeah yeah it works great for emacs too sweet all right we always in the show with a joke or two
and this one is not like a laugh out loud sort of joke but uh matt you're here you do a lot of
data science i thought i'd bring some sort of scientific-esque humor here and i just this one
just really is deeply satisfying to me.
So it's a little story.
I'll get you all a reaction in a minute.
So there are two mathematicians sitting at a table in a pub
having an argument about the level of math education
among the general public.
Like one of them is defending overall math knowledge.
And he gets up and goes to the restroom.
And on his way back, he wants to prove his point, right?
So he encounters the waitress and says,
hey, I'll give you an extra $10 on your tip
if you can answer a question for me.
It doesn't matter what I ask,
just say the words X squared, X squared, okay?
She's like, yeah, sure, no problem.
So a few minutes later,
the guy sits back down with his buddy,
he says, I'll bet you $20 that even our waitress
can tell us the integral of 2x.
And the cynic's like, yeah, I'll take that bet, buddy.
No problem.
So he beckons her over to the table, asks the question, to which she replies, x squared.
And this mathematician begins to goad and demand his winning.
And she says, plus a constant.
I don't know why I like that one. at least she knows yeah i don't know why i like that one but it's just satisfying to
me uh so uh yeah so so on that i'm gonna brief aside there was a poll on twitter the other day
whether they should teach statistics or calculus in high school and i said the only times i've
used calculus since high school even though i much
enjoyed the class was tutoring other people in calculus so that's a good career path by the way
just you know when you're young that's right no i i hear you but i honestly if you're going to
throw up a math class in high school for uh the for sacrifice geometry it's got to be geometry
replace that with some computer programming.
Serves the same purpose, logical thinking.
Let's do it.
Awesome.
But yeah, I definitely take your point.
All right.
Anthony, do you have another joke or you want to,
should we wrap it up?
I had a Golang joke prepared, but then I panicked.
Whoa.
I will cut that too.
No, no, it's all good cut that too. No, no.
It's all good.
It's all good, man.
Thank you, Matt Harrison, Anthony Sotile.
Thank you both for being here.
It's been really great to have you, Matt, back on the show and Anthony here for the first time.
Yeah, thanks for having me.
Yeah, thanks, guys.
Bye.
Okay, bye.
Thank you for listening to Python Bytes.
Follow the show on Twitter via at Python Bytes.
That's Python Bytes as in B show on Twitter via at Python Bytes. That's
Python Bytes as in B-Y-T-E-S. And get the full show notes at PythonBytes.fm. If you have a news
item you want featured, just visit PythonBytes.fm and send it our way. We're always on the lookout
for sharing something cool. On behalf of myself and Brian Ocken, this is Michael Kennedy. Thank
you for listening and sharing this podcast with your friends and colleagues.