Hello and welcome to Python Bytes, where we deliver Python news and headlines directly to your earbuds.
This is episode 383, recorded May 14th, 2024.
And I am Brian Okken.
And I am Michael Kennedy.
And today's episode is sponsored by a new sponsor, Mailtrap.
Thank you, Mailtrap. Listen to their spot later in the show.
And if you want to connect to us, we're all on Fostadon and on Mastodon.
And those links are all in the show notes, of course.
And also in the show notes or just at pythonbytes.fm, you can find out information to join us live on YouTube.
It's always fun. And if not, that's okay.
But you can catch us later.
If you sign up to be a friend of the show, you can get the email.
And the friend of the show emails are going well.
It's growing well. I'm excited about that.
And also the open rate is staying very high.
So that's pretty exciting.
So thank you.
People must care. I think it's cool.
I enjoy getting it myself, actually.
Yeah, I do too.
So also, I enjoy hearing from Michael about the exciting news in Python.
So, Michael, what do you got for us first?
Brian, why aren't you shipping code faster?
Come on.
What's taking so long?
Well...
You know that feeling when you start a new project and everything's going quick.
And then after a couple of years, you're like, why do we have so many meetings to add a button?
You know what I mean?
Or something like that.
Yeah.
It's tricky.
And so we're not the only ones to wonder this.
Bhasky Gupta said, I was also wondering this, but he took more action than most people, I imagine, would.
And said, I'm going to ask a hundred developers why they aren't shipping code faster.
And then write it up.
So I read it up and let's share it.
There's some interesting things in here, basically.
Like, look, I talk to people from a lot of the tech companies you would know.
Meta, Pinterest, Heroku, Roblox, et cetera, et cetera.
Something that I could probably make a joke out of, but I'm going to try not to.
I'm going to try not to.
But I thought it might be fun to summarize this for you.
All right.
So they broke it down into multiple big categories like meetings or human interaction type stuff.
And the first big category is code bases.
So code.
And right at the top is tendency bugs.
So you kind of got to look at these a little bit of where, what are your current today blockers?
And maybe the person who said I'm blocked by this is a 27 year old who never worked when your only resource was a book and there were no packages, no dependencies.
You want a dependency?
You crack it open and you get the algorithm and you start writing.
You know what I mean?
Like that.
So, so the problem is they say, look, if I hit, they've got a bunch of quotes that are actually nice.
So Jack, an ex Microsoft person says the number one barrier to shipping faster is dependency bugs.
So hitting a random mysterious bug with libraries that require, require reading tons of old code or stack overflow links and GitHub issues.
They're just trying to figure out like, why does this thing, why did it stop working?
You know what I mean?
And I would change that a little bit.
Or maybe Michael's version is when something changes and it becomes incompatible and a worst case scenario.
Is especially with the modern resolver and pipe and pip basically is if we can't find a matching fit for you, you don't get it.
Rather than we're going to give you a warning that it's not a great idea, but we're going to let you run it.
Right.
So if there's something that says, I have to have this version of a library less than a version and something else says, I have to have this library greater than a version and there's not an intersection there.
You're now hunting around and it's, you're like, well, guess we're done.
And you can roll back.
Right.
You could say, okay, well, what of this like weird combination of things that it's coming up that I got to deal with?
Can I roll back so that there is an intersection?
But if you need a new feature, all right, then it's hard.
Or even if it's not any feature you need, it's just like, well, here's an hour and a half.
I spent juggling the intersection of these dependencies such that I didn't care about their interaction.
Really.
I just want the, I just want them both to be here, but there's this bizarre interaction I got to deal with.
And my, my complaint about the pip being a hundred percent, like, no, we can't find it.
So you don't get it is that incompatibility.
The one thing that said less than the other thing said greater than maybe that has to do with multi multi-processing.
If you're not using multi-processing, it would probably be fine.
Even though there's like a known intersection bug, if you're not using that part of the code path, it's not your problem.
And you can say, like, I tested it.
I don't care if it's says it's the wrong version.
I want to just keep working.
Right.
And so, well, that's a lot of timing spent on that.
Right.
Okay.
There also is bugs in your dependencies.
And I don't, I don't know if that was covered by this or not.
Yes, that's true.
That's true.
But that's, that's one of those.
I think there's expectations that don't match really how they, what reality should be.
So we, like you said, we used to write all of our code and even if, even if you got it out of a book, you wouldn't blame the book author.
If there was a bug in it, you would fix it yourself.
Yeah.
But now we've got tons of dependencies and there's a lot of projects that are really 10 to 20% new code and the rest of it we're pulling in from everybody else.
Now, if those other things have a bug, do we think that it's, we just save time to not have to write all that.
Do we go out and fix those in the dependent projects or do we just complain about it or?
Exactly.
And it's usually open source.
Usually PRs are welcome, right?
You don't want to do it.
But that's why I brought up like the, the younger developer who didn't have to live through the time where there were no package or no package management things.
Because there were no packages, right?
You just, maybe if you're lucky, you download some random code off the internet and you like work it into your app.
Right?
And so the velocity of writing software is so much faster than it used to be.
And when it takes a step back by 20% because that thing has drawbacks, it's still vastly better than it used to be.
So that was all I was saying there.
Yeah.
And I know you live, you live through the same thing, right?
Yeah.
Okay.
So that's not the only one.
No, no.
There's plenty more complicated code bases.
It's, it's true.
Yeah.
It's tricky.
I would have put this at number one if it was me.
Yeah.
So it says here, look, the law, the logic is sound.
You've got a growing startup.
You've got to ship faster.
You're going to die.
No time to write docs.
Early engineers churn out as the company grows.
New engineers come into a big mess and they've got to deal with it, but they still got to grow fast,
ship fast.
et cetera.
Right.
It says Maria from Amazon says there's so much undocumented in our service, including poor
records of new features, non-existent or outdated info in our dependencies, or even essential
things like best practices for testing.
A lot of time is wasted and things trying to find what this is all about.
Right.
And the nobody has time to write documentation, which creates a vicious cycle.
This is your number one.
The complicated code base would definitely be number one, but the documents,
the documentation and comments part.
I used to have a tool handy that would strip out, do a fork of a repo and strip out all
the comments.
I love it.
Because it was so much easier to navigate some code bases without the comments.
But yeah.
Comments are great.
But if it's, and I don't really know what else you do for this, but if the function is,
let's say 10 lines, but the documentation is 20 or 30, all of a sudden you're like, okay,
okay, I'm trying to see.
I'm trying, you know what I mean?
It's like a little tricky.
And you can do stuff.
I have, for example, in editors, you can code fold the comments and things like that.
Right.
That could help.
Yeah.
But also like when you fix a bug, do you go back and fix the comment?
Sometimes not.
Okay.
Let's move on.
All right.
Next major section is process and QA loops.
I can see what you think about this, but it's not so much a test or no test, but when you
have a, say a QA department and so on, it says Taylor, who's worked for a series of high
growth startups, says me creating a test spec for QA, QA finding problems, getting a list
of problems two days later, fixing the merge conflicts because the code has changed since
then, switching back, back to QA, keep looping.
And that kind of thing, right?
Maybe the challenge here is depending on other people for your code quality.
Yeah.
Or I think that's always in large projects, always going to be a thing, but having one
of the things that helps with that.
I know we're not trying to fix this here, but having embedded QA developers in the development
teams.
But yeah, that's an interesting suggestion for sure.
Waiting for specs on larger companies, you know, just waiting for what are we going to
build?
Well, I got to wait for people to approve, you know, the schemas or the API points or
whatever.
These people wishing we had waterfall again.
I don't know what's going on.
Yeah, exactly.
Just design it all up front and give it to me.
I think a lot of the next one also is awaiting stakeholder approval.
I think there's just a lot of, a lot of that kind of stuff.
So we, we, we're a pure vegetarian team, so we have no stakeholder.
Put the stake down.
Okay.
Raj from AWS said it.
Amazon meetings approval, taking 10 different stakeholder, talking to 10 different stakeholders
because changing the color over a button affects 15 microservices.
Oh, microservices.
Could that just be its own thing?
Like microservices.
Okay.
Let's go.
Writing tests.
Devs complain around tests could be basically divided into one, not enough tests or bad tests.
So grant at a FinTech unicorn.
The biggest thing was we didn't have good tests or good types.
So I had to do a whole lot of work to do end to end testing of stuff whenever I wanted to
ship things.
Yeah.
You could have read them.
He could have wrote them.
Yeah.
Another one has to do with, it doesn't at first sound like bad tests, but CICD taking
so long.
So running pipelines for shipping takes a lot of time and ensures proper code coverage.
The tests sometimes require these pipelines to take their time, which slows us down.
Yeah.
There's a, I know there's more here, but one of the, one of the metrics that I love is, is
throughput.
So was it, is it throughput or cycle time?
I don't know.
I think it's cycle time.
Basically, how long does it take you to get from like a single line code change that's to
shipping and, and how like all that process through the CI, the pipeline, the testing approvals,
whatever you have to do to measure that and try to get that as low as possible and get the
junk out of it.
Because that does, that is a problem.
Yeah, absolutely.
All right.
I kind of also blended the last one together with this.
So people are waiting for PRs to be approved.
Scope creep.
Josh says the human tendency to stuff last minute items into the crevices of their luggage
minutes before leaving for the airport manifests itself at software companies as scope creep
slowly and surely it will push back your release date with every incremental edition feeling
like an insignificant task, but in aggregate adding significant molasses to the team's
velocity.
Yes.
Just ship it.
And then, then add those features later.
Excessive meetings.
I agree.
This, okay.
I'm going to wrap it up with this one, Brian, because it's been kind of long, but this is
interesting.
Motivation.
Diane, a former engineer at Meta said the number one reason that slowed her down was motivation.
So honest answer is I was working on ads and that's a very old, complicated and large stack.
I didn't understand it.
My friends on younger teams seemed happier.
I was miserable.
Yeah.
Like, so basically shouldn't be surprising.
People want to work on inspiring projects.
And when you're inspired, think more about it.
You put more time into it.
And it's like, well, can we squeeze a percent of a percent out of this retargeting thing to
squeeze a bit more money for the company?
Like not the same as sort of inspiration is it?
All right.
Well, people can check this list out and hopefully, you know, maybe bring some of these ideas
together to push back some of these problems at your company.
Yeah.
All right.
Back to you, Brian.
Well, I want to talk about Python 3.13.
Yay.
Speaking of shipping things.
Yeah.
Shipping things.
3.13, 3.13.0 Beta 1 is released as of May 8th.
I guess this is like a week old.
Anyway, Beta 1 released and there's some fun stuff in here.
So betas are available to play with.
And reminder, the beta does not mean that it's completely done.
It is half-baked.
So the feature freeze for Python, is it an feature freeze?
I guess.
Is it a feature freeze?
I believe so.
Oh, okay.
Yeah.
I believe when they hit beta, they say, what's here is here.
Yeah.
Okay.
Ideally, unless maybe they have to got to take something out because they can't get it to
work in the end.
All right.
So disclaimer, it is still under development, but there are four beta releases, previews
planned for 3.13.
So this is a good time to, it says, we bold, strongly encourage maintainers of third-party
projects to test with 3.13.
So time to turn on your, or at least check to see if you can turn on your 3.13 pipelines
in CI.
So a whole bunch of fun new things in 3.13.
A lot of these are sort of internal stuff that are, that I'm excited about, but, you know,
end users maybe might not care about.
There's the experimental Fred, free threaded build mode with, to disable the GIL.
That's kind of fun.
A preliminary experimental just in time compiler.
That's kind of neat.
This is cool.
A cyclic garbage collector that is now incremental, which should mean shorter pauses for collection
and programs with a lot of objects and a different version of MimeAlloc.
MimeAlloc?
I don't know how to pronounce that.
That, yeah, some possible memory improvements, which is kind of neat.
The thing that I'm really, okay, a couple other notes.
I'll get to the exciting thing that I'm excited about.
There's a bunch of removals.
So I guess we're getting rid of CGI now.
Whatever.
That's how you run the web.
However will I run my website?
And last week I did, I mentioned this last week.
Typing.type is.
Type is.
I think I pronounced it type LS.
It's IS.
That makes more sense.
I was looking at the wrong font, I guess.
But some of the exciting bits are that we have a new improved REPL or interactive interpreter.
And this is so exciting that actually Trey Hunter wrote an article about it.
So even like the URL for this is, oh, I have the URL hidden, is like my favorite thing of Python 3.13.
So what's cool about the REPL is there's a bunch of cool stuff.
There's a, it's colored prompt, which is fun.
We like colors now.
And then, ooh, it's like blue.
There's, you can exit now.
You used to have to do, it used to say like exit, bracket, bracket.
Or exit.
What?
It'll exit?
Yeah.
Exit works now.
Oh my gosh.
I was thinking of doing a PR to make this happen.
I'm just like, why is this so clunky?
Yay.
I mean, I mean, a pep.
Just like, we gotta, like, we gotta rally, folks.
Oh, this is worth 3.13 just to get exit to work.
Block level history.
Really cool.
So basically, this is like some of these niceties that you used to get from other sort of alternative
REPLs.
Things like being able to edit the block and, you know, some little block history.
It's really pretty cool to be able to, like, go back and modify things.
And pasting code works better.
So if you copy some stuff out of the REPL and paste it in the REPL, it doesn't paste in the
dot, dot, dots correctly.
You know, it does that right now.
So neat.
The downside, it's curses, so it won't work correctly on, doesn't currently work on Windows.
So that's, actually, it's a pretty big deal.
But, you know, anyway, some fun stuff.
Why not Rich?
Rich and Textual.
That would have been awesome if they'd done that.
Right?
I mean, I'm not joking.
Like, there's, it works all cross-platform.
It's got some incredible UI stuff.
Would have been cool.
Yeah.
Rich and Textual don't work everywhere either.
But, you know, but more places.
Maybe, maybe this is a to be done.
Or maybe just you get the old terminal on Windows.
But, you know, that's 50% of the user base, right?
That's like a, not, it's not like, well, there's, there's one, one particular MicroPython type of device.
It's like this odd $5 thing that goes into tractors that it won't work.
Like, it's like half of the user base.
Yeah.
So, I don't know.
That's a.
Well, Blaze recommends instead of exit, we should just require people to do colon Q.
How do you exit the ruffle?
You reboot your computer.
Okay.
Next.
Anyway.
All right.
Well, should we talk about our lovely sponsor, Mailtrap?
Yes, indeed.
Although, I would like to add two things real quick.
And then I'll tell everyone about them.
One, this is very exciting.
It's going to be interesting to see where the free-threaded Python stuff goes.
Because that's another one of the big deals.
But it's weird, right?
You've got to have a separate build.
It's not even a flag or something you can set.
But it's going to be something else.
But also the high-performance changes outside of this free-threaded thing with a JIT.
Excuse me.
A JIT.
Not just interpreted.
This is great.
So, very interesting.
And then a follow-up.
I apologize.
I can't remember who said it in the comments.
But Dora, DevOps Research and Assessment Metrics, includes four key metrics divided into these areas.
Deployment frequency or lead time for changes to measure team velocity.
Change failure rate and time to restore service.
Measure stability.
So, that's pretty cool.
Dora metrics.
Yeah.
How about we talk Mailtrap now?
Okay.
This episode is sponsored by Mailtrap, an email delivery platform that developers love.
An email sending solution with industry-based analytics.
And email API.
As well as SDKs for major programming languages.
And 24-7 human support.
Try for free at Mailtrap.io.
Yeah.
Thank you, Mailtrap, for supporting the show.
Awesome to have them on board.
We'll be telling you about them on upcoming shows as well.
All right.
So, if you do Jupyter Notebooks, Brian.
Let me zoom in so we see some pictures.
If you do Jupyter Notebooks or JupyterLab in particular, it's got the way it looks and so on.
But what if you could have a nice theming system for it?
So, there's an extension that I want to highlight, JupyterLab Theme Editor, which is an extension to provide basically editing colors, font families, font sizes of different elements in the user interface.
Right?
Yeah.
So, pretty cool.
You can just install it.
And then you can open up this little sidebar, and it lets you pick the layout color, the ax out color, the border color, the UI font size, the content font size.
So, one of the things that sometimes drives me crazy about UIs, you know, think about like Zoom.
If you go to VS Code and you say Zoom, but Zoom's everything.
Like, what if I just want to Zoom just the stuff I actually care about, like the text?
And I don't want all the other crap to take up more space on my screen to make the text even harder to read.
Well, let's just stay over there and just see.
All right.
So, having different settings for like content size versus UI element size is really awesome.
So, there's a bunch of things like that.
And, yeah.
You can basically pick all these different colors that you like, you know.
You want a styler to be light blue on dark blue or dark blue on light blue or purple or whatever you want.
There's a bunch of color palettes you can pick from, which is pretty nice.
And it's not a huge thing, but it's kind of interesting.
So, pip install Jupyter theme editor and off you go.
Yeah.
I want to try to make it themed like an early 2000s.
Yeah.
Where's like the blinking elements and the gradients?
Come on now.
Yeah.
So, that's a quick one.
But people can check it out if they use JupyterLab.
Nice.
Yeah.
All right.
Well, I've got another quick one a little bit.
We were talking about using rich and textual for colors and stuff.
And love both of those projects.
One of the things that, and you can get colors and nice help output if you're using like Typer,
Click, or some of the other extensions for different argument parsing.
But a lot of people, and I do too, on simple projects, I just use arg parse.
It works great for simple things.
It's nice to test.
However, it's more black and white.
So, today we've got rich arg parse.
So, rich arg parse is cool.
It's not, so if you're having a command line program that you want to use colors, of course,
you could use rich, just use the colors.
But the help is auto-generated.
Well, rich arg parse, or it auto-generates the format.
Rich arg parse gets colors in those.
So, it's got, you know, nice orange color, orange and blue and white and green, and some
different great colors to really highlight.
It's a lot easier to read the help text if it's in color.
So, if you can add, if you're okay with adding a dependency, this is great.
And it's also like really easy to add.
I was like, is it possible that this is so easy?
And so, how you add it, there is a whole bunch of features.
So, there's built-in formatters.
So, rich arg parse defines different formatters to help with the help formatter or the raw description
help formatter.
They're different types.
But the easiest thing to do to try it out is all you have to do is import rich help formatter.
And when you're instantiating your argument parser, you just pass in rich help formatter as the formatter class.
And those two lines of code, that's all we did.
So, I wanted to try this out to see how fun colors were in your help.
And I've got a little test project called test arg parse apps.
Basically, a hello world app that uses arg parse and runs testing on it.
And I'm like, how do I do that?
And so, the help for my little program looks like this.
It's just white, normal.
And when I added just these two lines of code for rich arg parse, you just get a nice orange and blue.
It's really much nicer.
Color in the terminal is, I feel it's kind of non-optional.
I will say that it is one more dependency, though.
And one of the reasons why I use arg parse a lot of times is because I don't want to add any dependencies.
And I still want argument parsing.
So, keep that in mind.
That's a totally good point.
But I can imagine plenty of projects that said, we're not going to have dependencies.
Let's just use arg parse.
And then, eventually, they start having some.
And once you're already there, you might as well throw this on here and make it look nicer.
Without writing much different code, right?
Yeah.
And I love that it's, I mean, there are more features.
You go through, go look at the documentation.
But I love projects where you can make your program better by just adding a couple lines of code.
Pretty great.
Indeed.
Jeff out there likes to bring it full circle.
So, wasn't dependency issues one of the biggest causes for slowdown development?
Yes.
Well, it's also, it's just two lines of code to change back.
If you've got a test break, you can take that out.
That's assuming that the original developer that knows that is still there.
They could have left.
And then, no, I'm just kidding.
It's a fair point, honestly.
So, anyway.
I like it.
Well, those are our items.
Do you have any extras for us?
Only one.
Okay.
Only one.
But I will, it's very exciting.
So, I'm, but it's just one of them.
It was good.
It's the only one.
We have a brand new course over at Talk Python.
And this is done by Vincent, who's been on the podcast before with us.
So, it's called Getting Started with NLP and spaCy.
Oh, neat.
Yeah.
So, basically, if you have a lot of text and you want to process it, pull out entities,
understand things about it, right?
Like, at a real deep level, you know, NLP, spaCy is one of the most important ways that you can,
one of the most important libraries for doing that.
And so, here's an awesome course that talks about how to do that with spaCy,
but also even goes into using a little bit, some of the extensions and fun things like spaCy LLM
to integrate, say, ChatGPT or other LLMs along with the spaCy processing to pull things out.
Talks about training custom spaCy models.
Vincent did a really cool job where basically all the examples of this course are based on Talk Python
to me podcast transcripts.
So, he wrote a single function that will give you every line ever spoken on Talk Python
over the last eight years as a generator, which is insanely awesome.
And completely not useful.
Very interesting, right?
Very interesting use of generators.
But then you can just start feeding that kind of information and say, well, you know,
who has talked about FastAPI?
And when you do talk about FastAPI, what other projects and libraries were
talked about and like, you could do things to discover sort of the zeitgeist of a topic
or a tool over time by seeing how much other guests on the show talk about it and stuff.
It's a really cool, really cool course.
And I think people should definitely check it out.
You can train and annotate your own data.
I do all sorts of fun things.
So, the link is in the show notes.
And if you're on the list, I will probably be sending you an email about it as well.
But yeah, very excited to have this new course up for everybody.
It's going to be a lot of fun.
Yeah.
The one extra I've got is last week I announced that I was going to switch the pytest course,
the one at pythontest.com.
Of course, there is also a pytest course at Talk Python Training.
Definitely still worth trying out.
But there's the complete pytest course that covers the entire Python or the pytest book.
That switched to Podia and that switch is done to Podia.
So, well, almost done.
It's there.
Everybody's been invited except for one person.
So, they didn't get their invite.
I'll get that out later today.
But if you're still using the teachable version, it'll still be around until a little bit into June.
But please switch over soon.
And then the next step of this is Podia comes with email services too.
So, I'm switching from ConvertKit to Podia for email.
And I'm starting that this week.
So, doing that.
That's the news on my end.
And a lot of this has to do with just since I'm not as a turbo of a course creator as Michael is,
it's to keep my overhead down so that I can do smaller courses cheaper and get more of them out to you.
There's still good quality stuff.
It's just awesome.
Yeah, you keep the optionality, right?
Keep the optionality open.
So, yeah.
All right.
Yeah, congratulations.
I know that's a big deal to move all that stuff around.
Yeah, it was a little stressful.
I was worried that tons of people are going to be mad.
But I haven't had any complaints so far.
And I'm not inviting other people to complain.
But...
You want to need to complain?
No, just kidding.
Anyway.
Oh, one of the cool things that it has that I hadn't used before is there's comments within the course.
So, people can ask questions like right there.
I know it's a complicated topic.
So, it's kind of cool to have comments.
Yeah, that is cool.
Anyway.
Do you have anything funny for us, Michael?
I do.
I do?
Let's see.
Let me put it up here.
So, another testing one to follow up with your extra, of course.
Comes to us from the venerable XKCD.
This is 2928.
Okay.
So, it's called Software Testing Day.
Did you know there was a Software Testing Day, Brian?
No.
Yeah.
It's right behind Valentine's Day, apparently.
So, do you and the other QA engineers have any fun plans for the holiday?
Yeah.
Assuming the schedule system doesn't crash.
Software Testing Day is a holiday celebrated every negative one years on January 0th at 2571 p.m.
That's why I don't celebrate.
And then if you look at the hover, as you do on XKCD, it says, the company tried to document how often employees were celebrating Software Testing Day, but their record-keeping system kept mysteriously crashing.
This is good.
It's a subtle one, right?
Yeah.
Celebrate every negative one years.
I actually had the question today from somebody as to why we can't structure our tests so that we can completely test our complicated software so that we never see anything after we write the code.
Yeah.
What was a messy place?
I wanted to ask him how much time he had because proving software is correct is something we tried to do a long time ago, and it's not worth going down that road.
Yeah.
The only few places it might make sense is like the Voyager probe or something like that.
You know what?
We're sending it out, and we want it to run 50 years from now.
No, thoroughly testing is good, but you still can't prove that you've caught all the bugs.
You just can't.
Yeah, absolutely.
All right.
Well, here's a nice little test case for him to use.
Yeah.
Every negative one years.
Indeed.
Nice.
All right.
Well, oh, fun.
Cool.
Blaze just mentioned, speaking of testing, BlazeTube says, fun fact, right after this session, they're meeting to go through chapter six of the pytest book.
Yay.
Anyway.
Awesome.
Cool.
Well, thanks a lot for this wonderful episode, Michael.
Yep.
As always.
Bye, Brian.