Python Bytes - #451 Databases are a Fad

Episode Date: September 29, 2025

Topics covered in this episode: * PostgreSQL 18 Released* * Testing is better than DSA (Data Structures and Algorithms)* * Pyrefly in Cursor/PyCharm/VSCode/etc* * Playwright & pytest techniques... that bring me joy* Extras Joke Watch on YouTube About the show Sponsored by us! Support our work through: Our courses at Talk Python Training The Complete pytest Course Patreon Supporters Connect with the hosts Michael: @mkennedy@fosstodon.org / @mkennedy.codes (bsky) Brian: @brianokken@fosstodon.org / @brianokken.bsky.social Show: @pythonbytes@fosstodon.org / @pythonbytes.fm (bsky) Join us on YouTube at pythonbytes.fm/live to be part of the audience. Usually Monday at 10am PT. Older video versions available there too. Finally, if you want an artisanal, hand-crafted digest of every week of the show notes in email form? Add your name and email to our friends of the show list, we'll never share it. Michael #1: PostgreSQL 18 Released PostgreSQL 18 is out (Sep 25, 2025) with a focus on faster text handling, async I/O, and easier upgrades. New async I/O subsystem speeds sequential scans, bitmap heap scans, and vacuum by issuing concurrent reads instead of blocking on each request. Major-version upgrades are smoother: pg_upgrade retains planner stats, adds parallel checks via -jobs, and supports faster cutovers with -swap. Smarter query performance lands with skip scans on multicolumn B-tree indexes, better OR optimization, incremental-sort merge joins, and parallel GIN index builds. Dev quality-of-life: virtual generated columns enabled by default, a uuidv7() generator for time-ordered IDs, and RETURNING can expose both OLD and NEW. Security gets an upgrade with native OAuth 2.0 authentication; MD5 password auth is deprecated and TLS controls expand. Text operations get a boost via the new PG_UNICODE_FAST collation, faster upper/lower, a casefold() helper, and clearer collation behavior for LIKE/FTS. Brian #2: Testing is better than DSA (Data Structures and Algorithms) Ned Batchelder If you need to grind through DSA problems to get your first job, then of course, do that, but if you want to prepare yourself for a career, and also stand out in job interviews, learn how to write tests. Testing is a skill you’ll use constantly, will make you stand out in job interviews, and isn’t taught well in school (usually). Testing code well is not obvious. It’s a puzzle and a problem to solve. It gives you confidence and helps you write better code. Applies everywhere, at all levels. Notes from Brian Most devs suck at testing, so being good at it helps you stand out very quickly. Thinking about a system and how to test it often very quickly shines a spotlight on problem areas, parts with not enough specification, and fuzzy requirements. This is a good thing, and bringing up these topics helps you to become a super valuable team member. High level tests need to be understood by key engineers on a project. Even if tons of the code is AI generated. Even if many of the tests are, the people understanding the requirements and the high level tests are quite valuable. Michael #3: Pyrefly in Cursor/PyCharm/VSCode/etc Install the VSCode/Cursor extension or PyCharm plugin, see https://pyrefly.org/en/docs/IDE/ Brian spoke about Pyrefly in #433: Dev in the Arena I’ve subsequently had the team on Talk Python: #523: Pyrefly: Fast, IDE-friendly typing for Python (podcast version coming in a few weeks, see video for now.) My experience has been Pyrefly changes the feel of the editor, give it a try. But disable the regular language server extension. Brian #4: Playwright & pytest techniques that bring me joy Tim Shilling “I’ve been working with playwright more often to do end to end tests. As a project grows to do more with HTMX and Alpine in the markup, there’s less unit and integration test coverage and a greater need for end to end tests.” Tim covers some cool E2E techniques Open new pages / tabs to be tested Using a pytest marker to identify playwright tests Using a pytest marker in place of fixtures Using page.pause() and Playwright’s debugging tool Using assert_axe_violations to prevent accessibility regressions Using page.expect_response() to confirm a background request occurred From Brian Again, with more and more lower level code being generated, and many unit tests being generated (shakes head in sadness), there’s an increased need for high level tests. Don’t forget API tests, obviously, but if there’s a web interface, it’s gotta be tested. Especially if the primary user experience is the web interface, building your Playwright testing chops helps you stand out and let’s you test a whole lot of your system with not very many tests. Extras Brian: Big O - By Sam Who Yes, take Ned’s advice and don’t focus so much on DSA, focus also on learning to test. However, one topic you should be comfortable with in algortithm-land is Big O, at least enough to have a gut feel for it. And this article is really good enough for most people. Great graphics, demos, visuals. As usual, great content from Sam Who, and a must read for all serious devs. Python 3.14.0rc3 has been available since Sept 18. Python 3.14.0 final scheduled for Oct 7 Django 6.0 alpha 1 released Django 6.0 final scheduled for Dec 3 Python Test Static hosting update Some interesting discussions around setting up my own server, but this seems like it might be yak shaving procrastination research when I really should be writing or coding. So I’m holding off until I get some writing projects and a couple SaaS projects further along. Joke: Always be backing up

Transcript
Discussion (0)
Starting point is 00:00:00 Hello, everybody. Welcome to Python Bites. Let's kick it off. A bunch of exciting news today. Hello and welcome to Python Bites, where we deliver Python news and headlines directly to your earbuds. This is episode 451 recorded September 28, 2025. I'm Brian Ockin. 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 PythonTest.com. Check out some Pytest courses there. And of course, thank you to Patreon supporters.
Starting point is 00:00:35 You rock. We don't thank you all the time, but we always think of you. And then if you'd like to, we love topics sent to us and just feedback. So please check out our socials. They're in the show notes, but we're on Blue Sky, Macedon. And I'm pretty sure Michael's still on X? I am. I don't do too much there, but I do answer at mentions and stuff there. Okay. And if you're listening and like to check out the video or check out the live performance, head on over to Pythonbytes.com.com slash live and you can be a part of the audience.
Starting point is 00:01:14 Usually Monday's 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 the 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. I want to talk about databases.
Starting point is 00:01:40 Probably a fad, but 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, the latest one, it's been Postgres and Mongo
Starting point is 00:02:07 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 it's fairly just straight text or whatever but hey I'm you don't
Starting point is 00:02:32 got to be web designer to build databases so let's not let's not hold that against him 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 async I.O. 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,
Starting point is 00:03:04 you should be like, hey, maybe I should upgrade it from whatever I'm doing to 18 because I get async an async subsystem for reading, right? AISYN-IOS system. And then if you're thinking, well, I don't have a phone upgrade. They also did work to make major upgrades smoother.
Starting point is 00:03:22 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 ore optimization, incremental sorts,
Starting point is 00:03:50 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 you can sort by that,
Starting point is 00:04:16 and that's the sort that also went into the database. So you don't necessarily need a created 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 OOF 2, 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 of 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 correlation for faster, upper, lower, and casefold.
Starting point is 00:04:53 helper stuff and better like type of queries. So that's actually a pretty big set of boosts you get just for upgrading your database server. Yeah, you might not have to do anything but upgrade. It'll be a little zippier. Yeah, exactly. And not only that, wait, there's more. What does
Starting point is 00:05:09 it cost? It's free. It's open source. Why not upgrade? Give it a try, people. Come on. Yeah, cool. Nice. We've got other other versions updating. We'll check in with other new things later in the show. But first, let's do some testing i uh have i got to cover some testing topics we'll probably cover more
Starting point is 00:05:28 testing topics on this this podcast um uh more than normalish i don't know maybe because there's no testing code anymore so got to cover you here anyway ned bachelder uh wrote a nice article called uh testing is better than dsa and i didn't understand i didn't know what he meant by dsa neither do i but you're going to tell us right to he dsa data structures and algorithms and the kind of the point is there's a lot of a lot of people you learn the code you do do a 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 you're trying to find a job it is he does do a nod to say hey um it's if you got to get a job you got to do what you got to do and if
Starting point is 00:06:13 grind in through leak code will help you line a position then do it but once you have the job that's not what you do you don't do i have never done a like a double-linked list at work. If I need one, I use one off the shelf. 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 the list, but you don't build them. 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
Starting point is 00:06:57 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 it can put you above above the the average coder and stuff if you understand um so he's talking about um these testing skills are skills that you'll use constantly real world real world software means writing tests more much more than school teaches you to um it'll help you in job searchings i think uh it's obviously it's not obvious how to test well
Starting point is 00:07:47 and that's one of the assumptions a lot of people do is that you'll just you'll 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've got to be an expert at it to 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.
Starting point is 00:08:15 Yeah, excellent article, Ned. Yeah, thanks. I agree. The one thing I want to add to. this is I think 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 AI, you still need to understand
Starting point is 00:08:44 the high level tests. So that's my pitch. Yeah. And I find without a lot of guidance, the AI test creation is not super it's it's too fine-grained it's like oh we set the value to seven test the value of seven is no but we don't need that just the whole thing worked it probably took the seven you know what i mean like yeah yeah yeah yeah interesting okay so what have i got next i'm all 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 Firefly team reached out to me and said, thanks so much for talking about it.
Starting point is 00:09:26 So, 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.
Starting point is 00:09:56 So I interviewed both Charlie Marsh from T.Y and the team from Pirefly. And what they're doing is really great. If you both, 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,
Starting point is 00:10:22 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 squiggly or get any information about anything like you wanted to hover over and see or you hit command B or whatever your hot key is, command click or control click to navigate to an item
Starting point is 00:10:46 might not work for five seconds. or the hover might take a while to come up with the docs or the auto complete, all those things, right? It's just overwhelmed. So we got to have a faster type system, primarily for a faster type server thing, primarily for the editor experience. So I said, well, I've tried talking about,
Starting point is 00:11:05 let's print it. Let me try it on mine. So if you go over here to the powerfly. org, there's an install, and then you search for pie chart note out there. Where is it? Do you go down for IDE integration, that's one. They've got VS code.
Starting point is 00:11:21 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 there's already come with Python language servers. So you don't want them to fight. And there's also a PiCharm version that's a PiCharm plugin that you can get as the language server for that. Oh, wow.
Starting point is 00:11:42 Cool. I gave it a. Yeah. And I gave it a try. And in there you've got not a huge code base, right, much smaller on Instagram, but still, going there and hit dot. And it's like, my experience is the auto complete is up before you feel the key actually strike the bottom of the key throw at.
Starting point is 00:11:57 You hit the dot. It's like, it just is instant and like really satisfying ways. So I'm giving this a try. 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, we'd figure it out.
Starting point is 00:12:16 it's 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 reenable um what is it pi right i believe it's pi right or base pyrite if you're in cursor depending on read the instruction okay i'll check it out yeah check out i'm just i'm mostly and also look t y has one as well but the t y 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 could give it a try sort of thing is my feel is like it's a super alpha where like the Instagram team is using this day and day out as their autocomplete language server stuff. I feel like the editor
Starting point is 00:13:00 integration right now at this moment is a little bit better for Firefly. So that's why I was playing with that way. All right. Well, how are you? 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. All right. I'm going to switch over to, you know, let's talk about testing a little bit. No. Actually, so it is kind of cool that a couple of great testing articles came up. So what I want to talk about next is from Tim Schilling. And actually, we don't cover a lot of stuff from Tim, but he's got a great looking blog. So Tim is big in the Django community, of course.
Starting point is 00:13:42 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 helps out. So in some of that joy, these are some cool tricks that he's put together, how to do. we've got open new pages and tabs to be tested using a pie test 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 you can exclude those if you don't
Starting point is 00:14:31 run and run your playwright tests or you can or you can include those and actually I I usually probably use something smaller than the whole playwright. I might do something like, you know, web or UI tests or something like that. But whatever marker you choose, that's an easy way to distinguish some great technique. Using pause and playwright's debugging tool, we're using page pause. So also neat to do. You can, if you've got a tester debugging, you can throw in page pause. It's kind of like a break point.
Starting point is 00:15:01 So it's kind of cool technique. Nice. You can give it a look, maybe. yeah if you're looking at it that's one of the one of the neat things about testing with with playwright is to be able to if you're not using
Starting point is 00:15:14 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 the other stuff he's got he's got using pause using axe ax violations to
Starting point is 00:15:29 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.
Starting point is 00:15:50 Anyway, great tips from Tim if you're going to use Playwright in and checking you, 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. 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. I, you know, on my day-to-day job, I'm testing Embedded C with Pytest,
Starting point is 00:16:20 and PiedTest and Playwright are great across languages. Yeah, absolutely. All right, your screen's up. Why don't you do your extras? You got more than me anyway. We did talk about DSA, the data structures and algorithms. One of the things on that topic I wanted to bring up was Sam Hu has this excellent article called Big O, and it is probably one of the best overview, quick overview of what Big O notation is,
Starting point is 00:16:48 and it's just sort of general complexity of algorithms and how much looping based on the size. And it 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.
Starting point is 00:17:11 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 in increases, you know, if it's an O of 1, it might be slower, but eventually it'll be faster.
Starting point is 00:17:34 or those sorts of just and these are what we want to have every engineer understand about big ownocation and algorithmic complexity is to just get a gut feel for stuff. If you've got a nested loop or a multiply
Starting point is 00:17:50 nested loop that goes over everything multiple times it's going to be really slow if the end gets pretty big. The demo of sorting totally fun to watch the just walk through the code and then see the uh the demo of how things are getting sorted
Starting point is 00:18:10 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 oh 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 that's it folks for the RCs. If we're looking at the schedule, release candidate three is the last one scheduled. Final is scheduled for October 7th, just right around the corner.
Starting point is 00:18:40 So I'm pretty excited about that. Speaking of upcoming releases, Django 6 is 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.
Starting point is 00:18:58 there is um there's a our in development release notes so you can check out what's what's in there um but uh there's some exciting things you've got uh i'm i'm excited about template parcels in there that'll be fun and background tasks uh what else uh the ramp the roadmap is a little different um for for the schedule for jango the final release for jango six is scheduled for december 3rd it's still just right around the corner but not quite as close as python 3.14 um yeah the last extra i wanted bring up is actually almost last in 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
Starting point is 00:19:48 put off changing that for now. But the yak is fun. But I did want to, the last thing is Pye Bay. We had some tickets and we still have a couple 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 Pye Bay and want to go, when is it? It's October 18th. Just let me know. So message me on the socials or email the show or mostly try to contact me through the social messages. First couple of people that get in, I'll send you some free tickets. Lots of extras. How about you, Michael? Excellent. I had no extras, but then I decided to 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 how much I went into this,
Starting point is 00:20:38 but I'm back of Valdi, Brian. You know, I mentioned that. But 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 really, I was 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.
Starting point is 00:21:04 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. Yeah, I'm one of the, I love Valvaldi or have since I've been using it. And I do also appreciate that the world sees it as Chrome. Yes.
Starting point is 00:21:25 You hear people say it's not very popular because it doesn't show up in, it doesn't even register on the list of popular browsers, like what percentage is it used? 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,
Starting point is 00:21:51 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.
Starting point is 00:22:05 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. And I hate that. It's extra frustrating because it literally is the same Chrome.
Starting point is 00:22:28 It just identifies itself differently, right? Yeah. Except for Volvaldi. All right. How about something funny? So we started with database. We talked about Big O. Let's finish with database and performance.
Starting point is 00:22:40 Okay. 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. What the hamster says is, you ran a query, which was supposed to update a single row,
Starting point is 00:23:03 but it's still running after 10 seconds. Yeah. You might not out a database, and it's updating every row. That's what it's doing. Oh, boy. Yeah. So, I mean, that ties it all together as the end of the show, doesn't it? Brian, brings the big O notation.
Starting point is 00:23:20 Yeah. 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 async IOS subsystem now, et cetera. Yeah. Scroll up on that guy's face again a little bit. Oh, poor guy. There he is.
Starting point is 00:23:35 He knows. He knows. He's like, I'm turning in my resume. Why? You'll find out soon. Yeah. All right. Poor hamster.
Starting point is 00:23:42 Poor hamster. But now poor listeners. It's been a good show. Yeah. Well, another great. show and another yeah another week we'll talk to next week bye bye bye

There aren't comments yet for this episode. Click on any sentence in the transcript to leave a comment.