#451 Databases are a Fad - podcast episode cover

#451 Databases are a Fad

Sep 29, 202524 minEp. 451
--:--
--:--
Download Metacast podcast app
Listen to this episode in Metacast mobile app
Don't just listen to podcasts. Learn from them with transcripts, summaries, and chapters for every episode. Skim, search, and bookmark insights. Learn more

Episode description

Transcript

Brian Okken

Hello, everybody. Welcome to Python Bytes. Let's kick it off. It's a bunch of exciting news today. Hello, and welcome to Python Bytes, where we deliver Python news and headlines directly to earbuds. This is episode 451, recorded September 28th, 2025. I'm Brian Okken. And I'm Michael Kennedy.

And this episode we have as a sponsor ourselves. So please check out all the fun courses at talk python training go to head over to python test.com check out some i test courses there and of course thank you to patreon supporters um you rock we don't thank you all the time but we always think of you and then um if you'd like to we love topics sent to us and just feedback so um uh please check out our our socials uh they're in the show notes but we're on blue sky mastodon and i'm pretty

Michael Kennedy

sure michael's still on uh x i am i don't i don't do too much there but i i do answer at mentions

Brian Okken

and stuff there so okay yeah um and if you're listening and like to um check out the video or check out the live performance uh head on over to pythonbytes.fm/live and you can be a part of the audience usually mondays at 10 pacific time and you can also use that link to get to older episodes. And finally, hop on the mailing list. We send out all the show notes every week, including some background information, all the links to whatever we talk about,

and links to the joke even. So that's always fun. So check that out. And yeah, let's kick it off.

Michael Kennedy

I want to talk about databases. Probably a fad, but yeah, some people use databases. Databases are a fad. We're not over covering things that could be a fad. We'll spend a lot of time on some of these new cutting-edge things like Postgres. So Postgres 18 releases is a major release. And I don't remember the numbers exactly, but if you go look at the PSF slash JetBrains survey results, latest one, it's been Postgres and Mongo as sort of the top two most wanted, most desired ones.

But Postgres has been pulling ahead and it just keeps pulling ahead. It is really far and beyond the most loved, used, and wanted relational database and also manga. So a release of it is a big deal. And their website is not overly dramatic. It's fairly just not straight text or whatever. But hey, you don't got to be a web designer to build databases. So let's not hold that against them. So I put in the show notes a bunch of stuff about what is new. So let me give you the highlights here.

So there's a new asyncio subsystem, which speeds sequential scans, bitmap heap scans and vacuum, which I think is cleaning up dead space and sort of compacting and so on by issuing concurrent read because now it can be asynchronous instead of blocking on each request. So that's already like, you should be like, hey, maybe I should upgrade it from whatever I'm doing to 18 because I get async and async subsystem for reading, right? Async IOSystem.

And then if you're thinking, well, I don't have a fun upgrade. They also did work to make major upgrades smoother. So PG underscore upgrade retains planner stats and also does checks for things if you do a dash jobs option. And it checks those in parallel now as well. And faster cutovers will swap. So those are all good things if you want to upgrade. It has a smarter query system.

So performance lands with skip scans on B-trees, better OR optimization, incremental sorts, parallel, other parallel operations. It's all good. And virtual generated columns are enabled, which is by default, which is great. There's also a new unique identifier that it's using, UUIDV4, which is cool because it'll generate time ordered random IDs.

so if it gets a primary key index based on that i'm guessing like you can sort by that and that's the sort that also it went into the database so you don't necessarily need a creative time if all you care about is order so that's kind of cool right yeah security gets an upgrade and by both throwing out the old and gaining the new adds o off two which is good stops using md5 password auth that seems reasonable you know like world's oldest hash that shouldn't really be used for that kind

stuff and more TLS controls for SSL type things. And finally, last but not least, text operations also get a boost through PG Unicode fast collation for faster, upper, lower and caseful helper stuff and better like hyper queries. So that's actually a pretty big set of boosts you get just for

Brian Okken

upgrading your database server. Yeah, you might not have to do anything but upgrade. It'll be a

Michael Kennedy

zippier yeah exactly and not only that wait there's more what does it cost it's free it's open source

Brian Okken

why not upgrade give it a try people come on yeah cool nice um we got uh other other versions updating we'll check check in with other new things later in the show but first let's do some testing i uh have i gotta cover some testing topics we'll probably cover more testing topics on this this podcast more than normal-ish? I don't know, maybe, because there's no testing code anymore. So I've got to cover it here. Anyway, Ned Batchelder wrote a nice article called Testing is Better Than DSA.

And I didn't understand. I didn't know what he meant by DSA.

Michael Kennedy

Neither do I, but you're going to tell us, right?

Brian Okken

DSA, Data Structures and Algorithms. And kind of the point is, there's a lot of people, you learn to code, you do maybe a base camp or wait, it's not base camp. What are those things called? Boot camps. Maybe you do a boot camp or you learn in school or something or you're trying to find a job. It is, he does do a nod to say, hey, if you got to get a job, you got to do what you got to do. And if grinding through leak code will help you line a position, then do it.

But once you have the job, that's not what you do. I have never done a doubly linked list at work. If I need one, I use one off the shelf.

Michael Kennedy

Same. Yeah, it's maybe a vague understanding is when I use this one versus that one. When is a dictionary versus a set versus a list, but you don't build them.

Brian Okken

Yeah. And actually, we've got an extra topic later in the show I want to talk about for complexity. Complexity is important, but actually building these algorithms, I don't know. So what should you do instead? One of the things what he's talking about is, and he did say that time complexity is important. You should learn how to test your code because a lot of universities and boot camps and stuff say, you know, when you're on the job, they'll let you know how to test.

But universities don't really teach testing that much, or at least a lot of them don't. A lot of boot camps don't. So it's good to pick that up yourself. And actually, in my experience, tons of working software engineers are really bad at it. And so it can put you above the average coder and stuff, if you understand. So he's talking about these testing skills are skills that you'll use constantly. Real-world software means writing tests much more than school teaches you to.

It'll help you in job searching, I think. It's obviously, it's not obvious how to test well. And that's one of the assumptions a lot of people do is that you'll just, the testing will be handed to one of the lower level engineers. That's a terrible idea. Having a robust test suite and one that's elegant and easy to read is a joy to work with. And you got to be an expert at it. Jumping in and getting good at this helps you. And it'll help any team you land on. Anyway, just that's pretty much it.

It's a shout out to say, hey, you should test more.

Michael Kennedy

Yeah, excellent article.

Brian Okken

then yeah thanks i'm right i got the one thing i want to add to this is i think uh testing at a unit test level is something that there's a lot of tutorials on and that's okay but testing at a higher level like at an api level or at a ui level is more how you think about how the system works and if you can do that really well you're going to be invaluable even if a bunch of stuff is being offloaded at ai you still need to understand the high level tests so that's that's

Michael Kennedy

Yeah. And I find without a lot of guidance, the AI test creation is not super. It's too fine grained. It's like, oh, we set the value to seven. Test the value of seven. No, we don't need that. Just the whole thing worked. It probably took the seven. You know what I mean? Like, yeah. Yeah. Yeah. Interesting. Okay. So what have I got next? I'm going to set this next one on fire by going back to something that Brian talked about. A couple episodes ago, can't remember exactly.

I want to talk about Pyrefly again, but a different aspect. So you mentioned Pyrefly a while ago, six weeks, I don't know. Then the folks from the Pyrefly team reached out to me and said, thanks so much for talking about it. But Michael, you're a little bit misguided and you're a little bit wrong on the features of this. I'd love to talk to you more. So I ended up having three of the people from Meta who are on the team on Talk Python. I had a great conversation. I learned a bunch.

Super neat project. So I'm not here to just tell you about Powerfly again, because at best, that would be a follow-up, right? But I'm here to tell you more about the yellowish orange button on their home screen. Get the VS Code extension and not just VS Code. Get the editor integration. So I interviewed both Charlie Marsh from ty and the team from Powerfly. And what they're doing is really great. Both of those projects are amazing.

If you want to do like CI or on-demand type checking, I think they're very much in parallel. But right now, the editor integration, what I learned from talking to the Powerfly guys, girls, is that the team that does Instagram, the reason they built this is the team that does Instagram was having a hard time using their editors on the 20 million lines of Python code that Instagram is.

Like, for example, when you'd open a file to get any squigglies or get any like information about anything, like if you wanted to hover over and see or you hit command B or whatever your hot key is, command click, control click to navigate to an item might not work for five seconds or the hover might take a while to come up with the docs or the autocomplete.

all those things right it's like just overwhelmed so like we got to have a faster type system primarily for a faster type server thing primarily for the editor experience so i said well after i talked about that's pretty let me try it on mine so if you go uh over here to the powerfly.org there's an install and then you search for um search for pychart node out there where is it IDE integration, that's one. They've got VS Code. It installs into Cursor.

It has some things that you've got to maybe turn off the default language server depending on how things are set. So read it because that's already come with Python language servers. So you don't want them to fight. And there's also a PyCharm version that's a PyCharm plugin that you can get as the language server for that.

Brian Okken

Oh, wow. Cool.

Michael Kennedy

I gave it a try. And in there, you've got not a huge code base, right? much smaller on Instagram, but still go in there and hit dot. And it's like, my experience is the autocomplete is up before you feel the key actually strike the bottom of the key throw as you hit the dot. You're like, it just is instant and like really satisfying ways.

Speaker 3

So I'm giving this a try.

Michael Kennedy

It's not like I felt like, oh gosh, it was so slow before, but there's just something about like, it feels magical that the editor just knows it knows what you want. You know what I mean? Like, not like, oh, it figured it out. it's already giving you the answer. You know what I mean? So give it a try. You can always disable the plugin slash extension, whatever, and re-enable. What is it? PyRite. I believe it's PyRite or Base PyRite if you're in cursor, depending on... Read the instruction. Okay.

Brian Okken

I'll check it out.

Michael Kennedy

Yeah, check it out. I mostly... And also, look... TY has one as well. But the ty extension has got a lot... I was going to use that one first, maybe, actually. But it's got a lot of sort of like, we're not quite ready yet, but you can give it a try sort of thing. My feel is like it's super alpha where the Instagram team is using this day in, day out as their autocomplete language server stuff. I feel like the editor integration right now at this moment is a little bit better for Pyrefly.

So that's why I was playing with that one. All right. Well, if it ever changes, we'll probably hear about it. Yeah, I'll be telling you in six weeks how I'm using the TY1 and it's so incredible.

Brian Okken

yeah all right i'm gonna um switch over to you know let's let's talk about testing a little bit no um actually so that just uh it is kind of cool that a couple a couple of great testing articles came up so uh the what i want to talk about next is from tim shilling and actually we don't cover a lot of stuff from tim but um he's got a great looking blog uh so tim is a big in the Django community, of course. And he wrote an article called Playwright and pytest Techniques

That Bring Me Joy. And again, on the topic of, I think more people should be comfortable with high-level tests. If your tests have a web UI, you need to have at least some tests covering that. And all developers need to understand how to do some of that. It helps out. So in some of that joy, These are some cool tricks that he's put together on how to do. We've got open new pages and tabs to be tested using a pytest marker to identify playwright tests. And I really love that.

That's really simple. But you can just set up a marker. And that way, you can, on which tests are running playwright, that way you can exclude those if you don't want to run your playwright tests, or you can include those. And actually, I usually probably use something smaller than the whole Playwright. I might do something like web or UI test or something like that. But whatever marker you choose, that's an easy way to distinguish them. Great technique.

Using pause and Playwright's debugging tool, we're using page pause. So also neat to do. If you've got a test you're debugging, you can throw in page pause. It's kind of like a breakpoint. So it's kind of a cool technique. I see. You can give it a look, maybe.

Speaker 3

Yeah, if you keep looking at it.

Brian Okken

That's one of the neat things about testing with Playwright is to be able to, if you're not using, I mean, even if you are using headless, you can turn on, you can switch to a headed UI so you can watch it. So I'll just run through the other stuff he's got. He's got using pause, using axe violations to assert axe violations to prevent accessibility regressions. Oh, that's interesting. Yeah, I'll have to check that out more.

And then using page expect response to confirm a background request occurred. That's also nice. If you've got a Zippy app and it's refreshing the background request. That's cool. Anyway, great tips from Tim if you're going to use Playwright

Michael Kennedy

and testing your UI. Yeah, very cool. And just bring it home. Your app doesn't have to be in Python to use Playwright to test it, right? I mean, you're just touching the web.

Brian Okken

Yeah, and also, and that's one of the great things about Playwright is it's anything on the web, but also the integration with pytest. On my day-to-day job, I'm testing Embedded C with pytest, and pytest and Playwright are great across languages. Yeah, absolutely. All right, your screen's up.

Michael Kennedy

Why don't you do your extras? You got more than me anyway.

Brian Okken

um i did we did talk about dsa data structures and algorithms um one of the things on that topic i wanted to bring up was uh sam who has this excellent article called big o and it is probably one of the best overviews quick overview of what big o no uh big o notation is and it's just sort of general complexity of algorithms and how much looping and based on the size and um it goes through goes through a lot of stuff. What do we got? I think there's like a table of contents here somewhere.

But anyway, it talks about iterating and going through stuff, but he does do finding and searching as well. And oh no, sorting. So we often talk about sorting algorithms and complexity, but the little demos are just awesome because you can just walk through stuff. And like this one, you can run, see how long something takes. But then there's some examples of, you know, as N increases, you know, if it's an O of one, it might be slower, but eventually it'll be faster.

Those sorts of just, and these are what we want to have every engineer understand about big O no-captation and algorithmic complexity is to just get a gut feel for stuff.

If you've got a nested loop or a multiply nested loop that goes over everything multiple times it's going to be really slow if the end gets pretty big so um the uh the demo of uh of sorting totally fun to watch the just walk through the code and then see the uh the the demo of how things are getting sorted it goes through a bubble sort here um but anyway uh really great for complexity kind of went long on this already but if you'd like to understand big o

consider that python 3.14 uh rc3 the last rc is out it's it's let's see it was out as of september 18th and that's it folks for the rcs um if we're looking at the schedule uh release candidate three is the last one scheduled final is scheduled for october 7th just right around the corner so i'm pretty excited about that speaking of uh upcoming releases django 6 is in in the works and Django 6 Alpha 1 is available.

This was posted September 17th, so I'm not sure when it was out, but about then, I'm guessing. Django 6 Alpha 1. There's our in-development release notes, so you can check out what's in there. But there's some exciting things. I'm excited about template partials in there. That'll be fun. And background tasks. What else? The roadmap is a little different for the schedule for Django. the final release for Django 6 is scheduled for December 3rd.

It's still just right around the corner, but not quite as close as Python 3.14. The last extra I wanted to bring up is actually almost last. Last week, we talked about that Python test is a static site, and I was looking at possible alternatives. I'm still looking. However, I've realized that I think I might be yak shaving, and there's other stuff I need to be doing, like writing new content. So I'm going to put off changing that for now.

Michael Kennedy

But the yak is fun.

Brian Okken

But I did want to, the last thing is Pi Bay. We had some tickets and we still have a couple of tickets left. So how are we going to give those away? I think that we decided that the easiest way is if you are available for Pi Bay and want to go, when is it? It's October 18th. Just let me know. So message me on the socials or email, email the show or mostly try to contact me through the social messages. First, first couple of people that get in, I'll I'll send you some free tickets.

Michael Kennedy

Lots of extras. How about you, Michael? Excellent. I had no extras, but then I decided I have an extra. So let's talk real, real quick and then we'll do a joke. So I know last time I don't know if I have much I went into this, but I'm back of a volley, Brian.

you know I mentioned that but the you know the thing I really liked about Zen was how I could have just little icons down the left and it would give me more room and that would just be like a super minimalized view and then I realized like well let me just let me try playing with some settings and guess what I knew Vivaldi had side tabs but I'm just they were weird to me but then I tried it for a day and I'm like that's actually kind of neat so I'm back and I think it's better

I think, you know, it's Chromium based and for all the problems of monoculture and all the stuff that I wish it weren't that way, the web is a little bit smoother on Chrome.

Brian Okken

Yeah. I'm one of, I love Valvaldi or have since I've been using it. And I do also appreciate that the world sees it as Chrome. Yes.

Michael Kennedy

You know what? You'll hear people say it's not very popular because it doesn't show up in, it doesn't even register on the list of like popular browsers. Like what percentage does it use? It's because it's the only browser that I know of that lies about its user agent, right? Like Opera says it's Opera plus Chromium. Brave says it's Brave plus Chromium. But Vivaldi just says whatever Chrome would be for the one that I'm running on, that's my user agent.

And so it literally just is like a stealth sort of thing. I'd also encourage people to check out the themes, like this bright red theme that it comes with is like, I don't know, it gets your attention, but it's tiresome to me. So there's a bunch of nice themes. Check them out.

Brian Okken

And the lying about what you are, I really appreciate that in a work setting because there's a lot of internal stuff that just for ease of use, they just say, we're going to support Chrome and that's it. So they'll check to see what user agent you have. And if you don't have Chrome, they'll like not let you in.

Michael Kennedy

And I hate that.

Brian Okken

It's extra frustrating

Michael Kennedy

because it literally is the same Chrome. It just identifies itself differently, right?

Brian Okken

Yeah.

Michael Kennedy

Except for Vulti. All right. How about something funny? So we started with database. We talked about big O. Let's finish with database and performance.

Brian Okken

Okay.

Michael Kennedy

Now you could take this joke in a vibe coding. You don't really know. And you made a mistake and you're sorry. Or you could take it in the way of, I'm an experienced engineer and I know I messed up right away. Here we go. So there's a hamster and the hamster is freaked. Ah, what the hamster says is you ran a query, which was supposed to update a single row, but it's still running after 10 seconds. Yeah.

Speaker 3

You might not have a database anymore. It's updating every row. That's what it's doing.

Michael Kennedy

Oh boy.

Brian Okken

Yeah.

Michael Kennedy

So, I mean, that ties it all together as the end of the show, doesn't it? Brian brings the big O notation.

Speaker 3

Yeah.

Michael Kennedy

And how long does it take to update 10 million records? It talks about the database. It'll do it faster because there's an asyncioS subsystem now, etc.

Brian Okken

Yeah. Scroll up on that guy's face again a little bit. Ah, poor guy.

Michael Kennedy

There he is. He knows. I'm turning in my resume. Why? You'll find out soon.

Brian Okken

Yeah. All right. Poor hamster.

Michael Kennedy

Poor hamster.

Brian Okken

But not poor listeners.

Michael Kennedy

It's been a good show.

Brian Okken

Yeah. Well, another great show and another week. We'll talk to you next week. Bye. Bye.

Transcript source: Provided by creator in RSS feed: download file
For the best experience, listen in Metacast app for iOS or Android