Transcript #198: There's a beaver in your database and Anna-Lena drops by
Return to episode page view on github00:00 Hello and welcome to Python Bytes, where we deliver Python news and headlines directly to your earbuds.
00:05 This is episode 198, recorded August 31st, 2020. I am Brian Okken.
00:11 I'm Michael Kennedy.
00:12 And we're joined by a guest. We have Annalena Popkis.
00:15 Yes, that's very correct.
00:17 Wonderful. She's been on Michael's Talk Python podcast a couple times.
00:22 Absolutely.
00:22 And or at least once.
00:23 It depends how far out in the future. I think in the future twice. We've already recorded a couple shows together, but it's, you know, we've got quite a buffer there. So this one will be out before. So one and two times and Welcome to this show. Nice to see you. Yeah, thanks for having me. I'll kick it off with the first topic Give us something easy. Don't make it hard brian. Come on Yeah, actually so when I remember It's been a while since I shifted of thinking about python as a scripting language to as a full-blown Language to do like everything big applications and stuff Of course, I still do both. I use it for a quick scripting language, but also more meaty things.
01:01 But back in the day when I was using Bash, if I wanted to have a little script to do with arguments, I'd have like an example Bash file that I would just keep copying from.
01:12 And I was thinking about that because I would never remember how to do arguments and stuff and parameter passing through into a little script. And the same is true for Python with arg parse, But we have Google now to find that information out.
01:25 But I was thinking about that when I saw this comment on Twitter.
01:29 It's from Joshua Schreiber.
01:32 And he said, "Every time I write a Python script, I have to go back to an old script of mine to remember how to set up argpars.
01:39 For some reason, it just doesn't stick in my mind at all." And then Ken Yones Clark, and I think he's been on your show, hasn't he, Michael?
01:48 No, I don't think so.
01:49 Okay.
01:49 Probably should be, but hasn't.
01:51 He commented and he said, I've got this little utility called the new.py.
01:56 So I went and checked it out.
01:58 And I'm pretty happy with it. It's not something you can pip install.
02:01 We're going to link to it in the show notes. It's just part of it. He's got a repo for it.
02:05 And I think he uses it in a book that he wrote.
02:08 But basically what it does is you run it and give it a file name and it gives you a little starter script with all our stuff with examples.
02:18 You've got an example positional argument, a string argument, integer argument, file argument, and a boolean flag.
02:24 So you don't have to look that stuff up. They're already there as dummy ones.
02:28 And then you can, you know, add to it and whatever, delete the stuff you don't want.
02:33 So just in, if you've got this around, you can use it to spin up a new script really easily.
02:39 And he also just recently added test code for it. So if you pass it a -t, it'll generate a little stub test file so you can test your script with it too.
02:51 Anyway, if you're using Python for scripting, I think this is a good thing to look at.
02:55 I love that. I have the same problem every time.
02:57 I always copy it from an old script every time.
03:00 I was thinking the same thing.
03:03 What is one of the big differences between beginners and experts?
03:06 Experts have a whole bunch of these old things they can go and copy from.
03:09 Well, I often use, so I'm usually using Click or what's the other one that's...
03:14 Typer.
03:15 Typer.
03:16 Yeah, so I'm usually using those for larger applications, but there's a lot of times where you're passing, you have a shared script that you don't really want to have install anything extra.
03:27 So arc parse is still something to use for a lot of stuff.
03:30 Yeah, very cool.
03:31 Yeah, if you don't want arguments, sorry, dependencies, this is a great example there. Because if your script could literally run without a pip install or without a virtual environment, except for that, you know, I probably would just have a slightly more cumbersome bit of code and have it easy, easy to run, you know, I've been thinking about how I should really be building more CLI based applications. And I have an insane number of these little what I would really call scripts. They're not applications. They're like, little tools that I just use to run all the stuff around my company. So for example, one that I wrote last week was, I had a company that did transcripts for the video courses, and then they stopped doing that. It's fine.
04:14 and they moved on to doing other things, but all of a sudden I had to figure out, well, how do I get transcripts again?
04:19 So I wrote a little script that would go find all of the videos in a course, see if it was missing transcripts, go and use AWS transcribe, and just say the videos in AWS S3, do this and then download it and turn it into sentences and subtitles and video.
04:36 So there's like 50 of these, and I'm at the point where I almost think I might just make one command line option to run every one of those scripts, right?
04:44 Like kind of like Git with sub commands, like TP space transcripts, TP space video and code, right?
04:51 Like I'm almost ready to build this huge CLI thing.
04:53 And I probably won't use ArcPars though, I'll probably use Typer.
04:56 - Yeah. - Sounds like a good idea.
04:57 - Yeah, exactly.
04:58 'Cause I always forget, I'm like, did I write that?
05:00 What's it called?
05:01 How do I run it again?
05:02 To track it down.
05:03 So this next one comes to us from a listener, Exuma is the username, didn't get a first last name.
05:10 So thanks for sending that over.
05:12 And it's called dbeaver, dbeaver, something like that.
05:18 So it's for databases and has to do with beavers.
05:21 So dbeaver, database UI tool.
05:24 And something about working with databases inspires people to use animal names or creature names.
05:31 So this is dbeaver.
05:34 And the one that I mentioned that started, got Exuma saying, hey, this is cool, but you should also check this other one out, is I mentioned Beekeeper at beekeeper.io, which is really, really cool.
05:45 So here's another cool free open source database GUI tool.
05:50 So if you got to work with databases, this looks like a really nice one.
05:53 - Yeah, it looks pretty cool.
05:54 - Yeah, you know, it doesn't have the full on marketing, beautiful page.
05:59 Like if you go to Beekeeper Studio, sorry, beekeeperstudio.io, man, that thing looks like it could be a VC funded startup, like landing page, right?
06:08 Whereas the beaver is nice, but it doesn't look like ultra polished, but it's based on Eclipse, and it supports 80 different database types.
06:16 So obviously the popular ones like MySQL, Postgres, SQLite, Microsoft SQL Server, and so on, but a whole bunch of other ones as well.
06:25 So yeah, if you got to work with databases, and you want some kind of UI tool, this looks like a pretty good option.
06:32 Do you have an idea why they called it beaver?
06:34 I have no idea why they called it beaver.
06:36 It's funny sometimes since in machine learning, they had a trend that they named the models like Sesame Street. Do you say Sesame Street?
06:43 Yeah, yeah, yeah, yeah.
06:44 And they started calling them Bird.
06:47 Like Grover and Big Bird and all this kind of stuff.
06:49 Yeah, and someone started it and then the others just continued naming the models like that. It was a lot of fun.
06:58 Yeah, it's really fun. Last episode, which isn't out yet, so there's no way you would have heard this.
07:04 But we were talking about something on Debian.
07:07 It was going through the Python Docker script and understanding what it means to create a bare-bones Python system.
07:15 And found out that Debian names their releases after Toy Story characters.
07:21 I like that.
07:23 Yeah, that's nice.
07:25 And of course, you are doing all of your stuff with 100 Days of Code and Harry Potter, right?
07:29 Which is also pretty awesome.
07:31 But there's not really releases for that, is there?
07:33 Nope.
07:35 So let's see, so a couple more things that are interesting about dBeaver is it's got a nice GUI interface, it has dark mode, light mode, and whatnot.
07:43 It has support for cloud data sources, so if you're going to connect to, I'm presuming, things like hosted databases, like SQL, Azure, or something like that.
07:51 But it also has extensions that allow you to work directly between databases and Excel, or databases and Git, which I think is pretty cool.
08:00 will build UML entity diagrams, like show me the relationships of this table, you know, where the foreign keys go and all of the things like that visually, which pretty nice if you're just like given a project, here's the database.
08:12 Oh, what the heck did I just get?
08:14 Right, you could open it up in something like this.
08:16 You know, PyCharm Pro has something along those lines as well, but this is free and open source. So that's pretty cool.
08:22 Yeah, I use the one for PyCharm Pro for in the diagramming helps a lot to be able to visualize what your data is doing.
08:29 Totally agree. I use it all the time. Yeah.
08:31 All right. Well, that's it for DeepWeaver. I think it's cool.
08:34 People can check it out and compare it with Beekeeper Studio.
08:36 Great. So I want to talk about PDB++.
08:40 So I was always using the IPython debugger when debugging, but I recently switched from using IPDB to PDB++.
08:50 So PDB is the Python debugger, like the normal one that's part of the standard library.
08:56 And PDB++ is an extension of that.
08:59 So it's fully compatible with PDB.
09:01 But it has some pretty nice features.
09:04 And I think they improved the debugging experience quite a bit.
09:08 It's very easy to install.
09:10 So you just type pip install PDBPP, since PDB++ is not a valid package name.
09:18 And I have two favorites, like it has quite a few additional commands and features compared to PDB, but it has all the usual commands that are also part of IPDB, so it's very easy to switch. But there is the sticky mode, which I like a lot.
09:36 So the official description is that when you're in the sticky mode, every time you change the current position, the screen is repainted and then the whole function is shown. So when doing step-by-step debugging, it's very easy to follow the flow of execution. And I constantly use that feature, since I find it very annoying to always type L or double L to see the code.
09:59 And with a sticky mode, you can just always follow along with the code and the flow of execution. I like that a lot. And then there is smart command parsing, which I also like.
10:11 So if you have or if you're using PDB, it always tries to interpret the commands you enter as one of the build and commands, which can be quite inconvenient in some situations.
10:24 For example, if you want to print the value of a local variable and that one happens to have the same name as one of the commands, for example, you can... Oh no.
10:34 Yeah, that could... And I had that quite a few times. So, for example, if you call something P or C and then you want to print the value of that variable, but it is interpreted as the command continue, which is C is short for continue.
10:51 And I think PDB++ has quite a nice solution for that.
10:55 So when there is ambiguity, so if you have a variable with the same name in the current scope, then that variable is preferred.
11:04 And if you still want to run the command, you can just prefix it with two exclamation marks.
11:11 But if you don't have any ambiguity and you type C, then it will always be continue.
11:16 And I find that very convenient.
11:18 Oh, yeah, that seems like a great little feature.
11:20 And it just runs in the terminal, right?
11:23 So you can run it anywhere that you have SSH access to or something to that effect.
11:27 Yeah, I think it's a very nice package.
11:30 Maybe this is a dense question, but why use this over an IDE?
11:35 Oh, I just always use Vim.
11:37 And that's why I got so used to using Vim that I find it very convenient to use PDB or IPDB or now PDB++.
11:48 I guess I would have to start using an IDE properly to really be able to appreciate it.
11:57 But it's hard if you got so used to using your keyboard and you have your keyboard shortcuts.
12:03 And yeah, I don't think I can switch back to an IDE for a while.
12:08 Okay.
12:08 Yeah, it has some cool features as well down here.
12:11 Like one of the things is if there's an exception, you can ask it for a post-mortem report, and it'll give you like extra details in there.
12:24 You can also do stuff like break on set attribute.
12:28 So if some kind of attribute is set, which is, I guess, a little bit like a conditional breakpoint and say an IDE or whatever, but yeah, it looks pretty cool.
12:36 I like the fact that it has syntax highlighting and color and all that.
12:40 Yeah, autocomplete.
12:41 I know that it can be quite nice in an IDE too.
12:44 I think on the last Talk Python episode, it was on the Python...
12:49 How was that episode called?
12:51 It was called the Modern Python Developers Toolkit by Sebastian Witwoski.
12:55 And you talked about Visual Studio.
12:58 And yeah, I know that it has quite a few features as well.
13:03 But when you're used to something like IPDB, this is a very nice addition.
13:07 Yeah, yeah, absolutely.
13:09 And you can also, what's the double exclamation point thing?
13:12 So you mean what I just mentioned with the command?
13:16 Yeah. Yeah. Like when would I run that?
13:17 So if you have like a variable C and that has some value, so it's a local variable, but you want to run continue in this case, then you would have two exclamation marks and the C.
13:29 Yeah. So that's why it's, it skips it.
13:31 Okay. Got it.
13:32 Understand now.
13:32 Cool. Cool.
13:33 All right.
13:34 Yeah.
13:34 This, you know, I live largely in the IDE world, but if I needed to do some debugging outside of it, this is a really nice option, I think.
13:43 Like maybe in a Docker container, and I don't want to set up like remote debugging and all that kind of stuff.
13:49 I just, you want to run it?
13:50 What's it doing? Yeah, that's cool.
13:52 Nice.
13:52 Oh, yes.
13:53 Today's sponsor is us.
13:56 So thank you, us.
13:57 Thanks, us.
14:00 We'll probably have to edit that section.
14:03 Today's sponsor is both Talk Python Training and Test&Code podcast as well.
14:09 I wanted to highlight, I had some, I think last episode I mentioned that Adam Johnson, which hadn't actually, he hadn't actually been on our show yet, but the last episode of Test&Code 128, I did have Adam Johnson on. He is the maintainer of pytest Randomly. And so we talk about what the importance of randomizing your tests to make sure that you have order dependent, order independent tests.
14:33 So that's a good episode.
14:35 But we talk about all sorts of stuff on testing code including things like tips for working from home. That was on episode 127.
14:43 Check it out.
14:43 I think people are doing that more than they used to for some reason. I'm not really sure why.
14:47 Working from home?
14:48 Yeah.
14:48 Definitely.
14:50 Yeah, that sounds great.
14:51 And Talk Python Training.
14:52 Yeah, we just released a brand new course.
14:54 Move from Excel to Python and Pandas.
14:57 So if you have been trying to overdo all the stuff that you do with around data with Excel or people you work with are.
15:04 We created a course written by Chris Moffitt from Practical Business Python to basically go through all the main use cases of Excel and show how much easier it is to do that in Jupyter and Pandas.
15:16 And I think it'll help a lot of people get their foot in the door in the Python world.
15:20 I think that's really cool. I always wanted to learn Excel, but it's so much nicer with Python that I never got around to doing it.
15:27 Yeah, that's perfect. That's the good side to be on, not the other side.
15:31 Yes.
15:32 Awesome. So Brian, tell us about Markdown.
15:36 I really like Markdown. I use it for a whole bunch of stuff. And when I mean, so much so that I just kind of assume everybody's using Markdown now. But sometimes people have trouble getting up to speed or you want to share something. Anyway, I came across, I was actually having a a Twitter discussion with somebody and they brought up this HackMD.io tool and HackMD, I've never heard of that.
16:02 So I went to check it out and I'm pretty impressed with it.
16:05 It's pretty cool.
16:06 It is a paid service, but there's a free option too.
16:09 So of course I'm on the free option.
16:11 But the idea is this sort of, you've got the similar, there's a lot of tools that do this.
16:16 You've got a two panel system where you, on the left, you're marked down and on the right it shows up, then you can hide one or the other.
16:23 But what I really like is some of the stuff that I always forget, like how to insert a picture or do a table of contents or put reference links in or footnotes.
16:35 Those things are just sort of in there with menu items.
16:38 So I don't have to remember what all those markdown codes are.
16:41 They just added, apparently you can collaborate and have multiple people editing a document with this. So that's pretty cool.
16:47 There's some fancy extra things like UML diagrams that you can add in.
16:52 And I'm not sure if you're exporting it, you'll have to try to figure out what sort of extra tools you need to actually generate those.
17:00 But it's pretty fun.
17:01 The thing that I like that they just added recently, apparently, is you can sync with GitHub.
17:07 So you can keep all your markdown documents in GitHub and edit them with HackMD.
17:13 That's pretty fun.
17:14 That's awesome.
17:15 The other thing I found was this thing called Markdown Guide.
17:19 And it is just a really good, clean reference for Markdown.
17:23 So I'm going to--
17:24 I had a handful of different references that I was using, but I think I'm going to switch to this one because there's tabs that have a getting started page that I can send people to.
17:33 And a couple of cheat sheets, one of them is the most common things.
17:37 And I think it's pretty indicative of common things you'll use.
17:41 And then an extended syntax page with--
17:44 and then a bunch of tools you can use.
17:45 So a couple of Markdown references for people.
17:48 Have you ever used Pandoc?
17:50 Oh, yeah, I love Pandoc.
17:51 Yes, since I recently started using it and I'm preparing my presentations now with Pandoc every time and I love it.
17:58 It's just great. Great tool.
18:00 I love about Pandoc is it's not just from Markdown to to HTML, but you can convert to MediaWiki or lots of or I use it A lot of times to format my emails correctly in the Microsoft Office, I will write them in Markdown and then use hand doc to generate the Word doc version, and then copy and paste into an email.
18:26 I know it's backwards, lots of steps, but it works for me.
18:29 Yeah, you know, it'd be nice to have just an email editor that just takes straight Markdown. Wouldn't that be cool?
18:35 Yeah, that would be cool.
18:37 And I really like an extension to Microsoft Outlook that had them key bindings.
18:44 That would be awesome.
18:46 The programmers are invading Outlook.
18:48 You have some other cool stuff about Markdown, or Hack Markdown, Hack to MD, is it has a VS Code extension.
18:55 And like you said, the GitHub integration is cool.
18:57 It has a browser extension.
18:59 You could turn your notes into a slide deck.
19:01 You can turn it into like a research project, into like what they call book mode.
19:05 Yeah, it looks pretty interesting.
19:06 and the collaboration is definitely needed around Markdown these days.
19:11 There's not really a great collaborative place that I know of, although I'm sure listeners are going to send us five examples, which is awesome, because they always do.
19:19 But for example, - like we use paper which lets us... - You can do slides with this?
19:22 Yes, you can export paper from Dropbox paper, paper.dropbox.com, as Markdown, but it's not full fidelity. It's like 85% that you can edit what you get, But it's still, it's better than nothing.
19:37 But yeah, this looks cool.
19:38 - Nice. - You know what's not cool?
19:39 Python malware.
19:40 That's not a thing, is it?
19:42 Apparently, it is now a thing.
19:44 So, Connor Fester, Fester, sorry, sent in this interesting article, which was done, what was this done by?
19:53 It was, one second, Cyborg Security.
19:57 So these guys wrote a pretty cool article about how Python malware is starting to show up.
20:03 Now you may have heard articles or mentions of certain package management stores getting infected with malware.
20:10 Like we talked about some researchers putting some kind of malware onto PyPI.
20:14 JavaScript had this at NPM.
20:16 Ruby had this with their gem store.
20:18 So that's not what I'm talking about here.
20:21 That's an issue, but that is not this.
20:23 This is about what are people doing to create the runtime environment, just the viruses basically with Python.
20:32 So traditionally, this has been like a C, C++ type of thing, but there's some interesting parallels just to go through here.
20:40 I don't want to encourage anyone to do this, but I want to put it on people's radar to be aware that it could be being done, you know?
20:46 So for example, one of the challenges of you build a C++ app, you can just send a binary around and run it.
20:52 Not so easy with Python, the standard library has to be there, or CPython has to be there.
20:57 But they talk about, well, people are using py2exe and py2app to package up their Python viruses and send them around.
21:06 Isn't that weird?
21:06 I mean, I guess.
21:08 People will do weird things.
21:10 Yeah, so there's an example of Python malware called cduke that was used against the Democratic National Committee back in 2015 and 16.
21:19 There's other tools that might be just generally useful to people regardless of whether it's in this context or not like uncompile6.
21:28 This is the successor to decompile, uncompile in uncompile 2.
21:33 I don't know where 3, 4, 5 went, but uncompile 6 is a native Python cross-version, a Python version, I guess, decompiler and fragment decompiler. So what it'll let you do is it'll take Python bytecode and turn it back into source code.
21:48 So, instead of taking a Python file and turning it into a pyc, take a pyc and turn it into a Python file.
21:53 Interesting.
21:54 Yeah.
21:54 Some people have been shipping pyc files alone, right?
21:58 And just knowing that Those can literally be turned back into source code and like one line of commands should be something on your radar, right?
22:05 Because it looks safe, but it's not that safe.
22:08 There's also a PyInstaller extractor.
22:13 So if you were to ship a library or application as a PyInstaller thing, you can turn it back into a bunch of source files you can open up and stuff.
22:24 And then they also talk about if you're given an executable, how to understand whether or not it was built with PyInstaller or if it was built to Py2xe or any of those tools.
22:35 Given an arbitrary executable, is this a Python packaged up thing? Yes or no?
22:39 That's cool. These are great tools.
22:41 The article looks really interesting. I never thought about malware and Python before.
22:46 Yeah, there's a lot of interesting details and concrete examples of here's how they did this with this one thing or that.
22:52 I think it's an interesting read.
22:54 Again, not trying to encourage people to do these things, just raise awareness, like what the role of Python is in this, you know, less popularized space, right? People always want to hide what they're doing in this world.
23:05 There's another application for some of these. Sometimes businesses have, they'll be afraid or like not want to pass around Python files because of the problems with, you know, knowing what the interpreter is or something.
23:20 So they use PyDXE or something to make an executable for a tool for the company.
23:26 And then somebody, and then that gets passed around, and somebody loses the source, or you don't know who has it or something.
23:34 So using some of these reverse engineering techniques to get some source back, that'd be kind of cool to use for that purpose as well.
23:42 I have an example of that.
23:43 So one time, there was this program we built.
23:46 And this was early in my career.
23:49 I must have been like not so good about checking in stuff.
23:52 And somehow the thing that I was working on had a file that somehow didn't get added to, it was SVN at the time.
24:01 So I had pushed all the changes, but I forgot to add this one file.
24:05 And then my computer died.
24:07 And the problem was, it was like my hard drive died.
24:10 And so like, there was some part of the application that in the middle of the app used this library.
24:15 And then there was the rest of the app that was kind of below that.
24:18 And so it was really hard to figure out how to rewrite just that middle piece, because it was like a weird jigsaw puzzle that had to fit together.
24:26 So I just went and disassembled the application, found the few files I needed.
24:31 They were named weirdly, but I just renamed them in a way that worked.
24:35 And then off it was, I checked it into Git and we were good to go, or just SPN and we're good to go.
24:39 And you probably never forgot to check in your files again.
24:42 No, I'm very obsessive about it now, that's right.
24:45 Yeah, absolutely. Anyway, that's all I got for this one. It's an interesting article, though. It's well done with some nice examples.
24:51 Yeah. So I'm going to go on with, do you call it Etters?
24:54 I call it Etters. Brian, what do you think?
24:56 Etters. Etters. That's really like American English. I would probably say Etters, like often and not often. Okay. Anyway, so what is Etters? So I only, I think I saw it a few times before but I never actually looked into the package.
25:15 But now a few weeks back I've started using it for the first time.
25:19 So what is Ethers?
25:20 It's a Python package that simplifies writing classes so it creates a lot of the Dunder methods automatically.
25:27 Yeah, that's cool.
25:28 Yeah, and when I first saw it I thought we have data classes so why do we need Ethers?
25:34 And only then I realized that Ethers is much older than data classes.
25:39 So PEP 557 added data classes to Python 3.7, and they do resemble Etters in many ways.
25:49 So when I started reading a bit on the documentation page of Etters, I found out that the PEP was actually inspired by Etters, and it was the result of the wish of the community to have a simplified way to write classes without having to deal with the problems that named tuples have. And I think the main difference between Etters and data classes is that data classes are strictly less powerful, and that certain features were sacrificed for the sake of simplicity. So it's very easy to use data classes, they are part of, I think, 3.7. With 3.7, they come automatically. But if you have 3.6, you have to pip install them, but you don't have to get a new package for them. And it's very easy to use them, especially if you have classes with many attributes.
26:40 But with Etters, you have quite a few additional features.
26:44 For example, you have validators that you can use when you have your initializer in the class and you want to perform some kind of validation of the input arguments, like checking that they are an integer or some other type or more fancy stuff, then you can do that very easily with Etters.
27:04 And it's a very powerful library.
27:06 So I think I need a lot more weeks to really get into the details and all its possibilities.
27:14 Yeah, this is a good one. There's a lot of subtleties around creating classes that can be a little bit annoying.
27:20 Like, wouldn't it be great if you could have it print out something other than just the name of the class at some memory address automatically?
27:27 That would be nice.
27:29 If you create a dunder equal, dunder eq method, Well, you got to remember to create the not equals.
27:35 That is the opposite of that.
27:37 And oh, if you create equals, maybe you also have to implement hash as well, because all of a sudden, if two things are equal, you put them in the dictionary, but then they're not the same thing. That's going to be all sorts of crazy.
27:48 It just starts to cascade. You're like, wait a minute, doing this right, it's not so easy. And so I think that's the kind of the Zen of the adders.
27:55 Yeah, I found it a bit confusing in the beginning with the syntax, how it looks like if you declare an attribute, like it's a decorator, etters, but then for the attributes of the class, you have this, is it etters.s or something.
28:12 And I found that a bit confusing in the beginning, since data classes are, I think, more beautiful when you write them and you don't need this extra bit.
28:22 But once you get used to the syntax, it's very nice and easy to use.
28:27 I have to agree.
28:28 I like the data class syntax better.
28:30 The dotness of the address syntax is cute, but bugs me a little bit.
28:37 Like attrib, the attributes are attr.ib.
28:43 And it's not something I really enjoy, but it's not difficult either.
28:48 The main switch for me, I think, is now that data classes are here, I use data classes all the time. But when I need a validator, the validation mechanism in adders is pretty darn cool. So if you want data validation, adders is still a great thing to pull up.
29:04 I agree.
29:05 I really wish that validators were in, or at least maybe we could have an extra package that we could pip install or something that would make data classes have validators, hopefully.
29:17 I know there's other things that you can do to validate schemas and stuff like that.
29:22 Yeah, I feel like there's a little bit of a paradox of choice.
29:25 Like you look at all these things and you want all of the features that like kind of in this impossible combined way.
29:31 So adders is cool.
29:33 They've got things like you can say that these attributes can only be set as keyword arguments in the initializer and not as positional arguments and just kw only equals true, stuff like that, which is pretty cool.
29:44 And then you've got the PyDandic models, which have built-in validation for all sorts of types, which is cool.
29:51 You've got data classes. Those can be frozen, which is kind of nice.
29:55 There's a lot of stuff going around here, and I feel like I'm under-utilizing all of it.
29:59 Grab what you need. It's good.
30:01 Throw some tests around it and switch later.
30:04 For me, it's sometimes just easy to forget what's out there, since there are so many nice packages.
30:09 And I sometimes hear, like I listen to a podcast, and then I think, "Oh, that package sounds cool, but I don't have an application for it right away." So I forget about it again, and then in some context, I hear about it again, and I think, "Oh, yes, you always wanted to try that." But I think at least with Etters now, I will use it again quite a few times. Yeah, I have that same problem. I get excited about all these things, but I don't have a chance to use them, and then I forget.
30:35 Then I'll rediscover it, like, "Oh, yes, that's why I thought it was cool in the first place." You should create a Harry Potter style project yourself.
30:43 I'm trying out all these things.
30:45 That's right. Like awesome.
30:46 Harry Python, Harry Potter, Python.
30:49 I would work on the naming.
30:52 I like Harry Python.
30:53 It might invoke images that are not exactly the same.
30:57 What you're thinking.
30:59 Oh, yeah. Okay.
31:00 Nevermind.
31:00 Yeah.
31:01 All right. Well, you guys got anything extra?
31:03 I don't.
31:03 Brian, no extras?
31:05 No.
31:06 No.
31:06 I'm with you.
31:06 Anna Lena, maybe take a moment and just tell folks what you're up to.
31:10 We didn't give you a really introduction on the kind of work and stuff you're doing.
31:14 Yes. So I think the first time Michael and I talked on Talk Python to me, I was still an AI resident at Microsoft Research in Cambridge.
31:22 So I was doing a lot of machine learning research, so working in the middle between a full researcher and a full software engineer.
31:29 And now I'm a machine learning engineer here in Germany in a company called Innovex, where I do, like I apply machine learning to projects, proper real world problems, which is also very interesting.
31:43 And I do all kinds of stuff now, data engineering. So yeah, I'm always learning new things every day, which is really nice.
31:51 Yeah, that's very cool. I've got a couple of things really quick to share. I was on a cool podcast, TV like show called tech NATO, which was a cool experience. It's a little bit like Python bytes, but for the IT space.
32:05 So that was a lot of fun to be on there.
32:07 And, on YouTube, you can check it out and we play the game Python, Python, Python, where we would get partial words out of a headline and we'd have to decide, is it Python, the snake Monty Python or Python, the programming language that the article is about.
32:22 And that was pretty fun.
32:23 So you could check that out over there.
32:24 Sorry.
32:26 So did you win?
32:28 I completely got crushed.
32:29 I think I got last because I wanted everything to be about Monty Python and they're like, no, that's about a snake.
32:34 I'm like, "Oh, come on, that would have been so funny if that was about Monty Python." But no.
32:39 Yeah, I let my hopes and dreams get ahead of me.
32:43 Maybe next time.
32:44 Exactly.
32:45 I'll come back for the championship later.
32:47 All right, Brian, what do you think about this joke?
32:49 I haven't looked at it.
32:51 Oh, perfect.
32:52 Then you got to open it up, Annelena, as well.
32:54 This one is, as per usual for us, a visual joke in an audio format, but I think it's going to work great.
32:59 So this one is called the only valid measurement of code quality.
33:04 And I know Brian, you're very passionate about high quality code and testing and stuff like that.
33:10 Have you seen this metric built into any of the software you've used?
33:13 Well, you can.
33:15 Maybe with some voice recognition and some AI and Elena could put something together for us like starting the code review now.
33:24 It looks so funny.
33:25 I love that.
33:26 So this is the only valid measurement of code quality is WTFs per minute.
33:31 I'll try to keep this without the explicit tag, but WTF.
33:35 So there's a comparison here.
33:37 On one hand, we've got the good code review, which is still, it's like a door that's closed, and you can just see statements of what people's going on.
33:46 It's going on the side, you hear this, "WTF, WTF, what is this?" That's the good code.
33:51 The bad code is just full of them.
33:53 It's like WTF, what the WTF is this?
33:57 A dude WTF, WTF.
34:00 I think this really captures code review pretty well.
34:03 - It does.
34:03 - Anyway, the only valid of measurement of code quality, WTFs per minute.
34:09 - Definitely.
34:10 All right, well, that wraps it up for this week.
34:13 - All right, thanks Brian.
34:14 Thanks Annalena for being here.
34:15 - Thanks, it was a lot of fun.
34:16 - Yeah, Yvette, bye bye.
34:17 - Bye.
34:18 - Thank you for listening to Python Bytes.
34:20 Follow the show on Twitter @pythonbytes.
34:22 That's Python Bytes, as in B-Y-T-E-S.
34:25 And get the full show notes at pythonbytes.fm.
34:28 If you have a news item you want featured, just visit pythonbytes.fm and send it our way.
34:33 We're always on the lookout for sharing something cool.
34:35 This is Brian Okken, and on behalf of myself and Michael Kennedy, thank you for listening and sharing this podcast with your friends and colleagues.