INDEPENDENT TECH TALK / LIVE RSS MIRROR

Speedrunning the AI Gauntlet with blood shooting out of our eyes so you don't have to!

NEW EPISODES * FRESH FEED * UNDER CONSTRUCTION * HOT AUDIO DROPS *

Latest Transmission

Open Claw in a Velvet Glove

Open Claw in a Velvet Glove

JR and The Foz dissect the latest openclaw shenanigans and dig in to a claude augmented sourdough bread baking application. Use coupon code YELLING for two openclaws for the price of one!

Listen to the audio transmission

Show Notes

JR and The Foz dissect the latest openclaw shenanigans and dig in to a claude augmented sourdough bread baking application.

Use coupon code YELLING for two openclaws for the price of one!

Read the full transcript
JR Reynolds: A Yelling at Robots episode 3! Action! Get ready, it's time for world famous Yelling at Robots. Starring tech legends Joshua Raphael Reynolds and Ian Thelonious Fosberry. The show starts now! Today's episode, Faz, what do we got cooking today? What happened in AI this week? Well, I was only listening to it secondhand from another podcast that I was listening to right before this. I'm happy to benefit from their work, don't worry. The internet is getting a little ahead of itself, think, with this open-claw shit. And so what I was saying is that it, I was saying it's this kind of, it feels very Skynetti, but not in that we're gonna have, you know, the fucking thing's gonna come online and the nuclear bomb is gonna go off. ⁓ But the what I think that the robots will need when they take over is you know information on everyone and people are just out there just fucking it's just shoveling it it shoveling their life data's there into the fucking robots like bucket right now it is insane. ⁓ The fact that anyone would install this thing on their computer given all the keys that knows anything about like Passwords privacy or security. Yeah is mind really great. I'm really enjoying it. It is such a dumpster fire. Yeah the one woman who's like the head of the head of AI and safety or whatever at Metta. Yeah. Uh-huh. I think almost you or I can't remember exactly what her name is. Yeah, the thing almost deleted all of her emails. Yeah. Yeah. She had a run to her Mac mini like she was defusing a bomb. Plug it. Yeah. It's I think it's wonderful. ⁓ God. There's and there's there's just absolutely no security considerations with this thing whatsoever. Yeah. And it is. ⁓ So I guess this is all to say, if you are listening to this podcast and aren't one of our friends. And are thinking of using open claw, stop, definitely do it. Check the show notes, folks, for an installation guide. Follow along. Install as quickly as you can. This thing's gonna automate your life away. Are you tired of working? Try OpenClaw. Don't like OpenClaw? Try NanoClaw. Use coupon code yelling at robots. Use discount code yelling at robots for three extra claws. Two claws for the price of one. I mean, it's... If you want to speed run destroying your life and putting your information on the internet, install OpenClaw. Yeah, yeah. Having trouble spending all your tokens for your clawed Mac subscription. Don't worry. We can help it's called open. That's true Yeah, actually Josh you have been complaining about that. Maybe we do that instead Maybe we maybe we call an audible and we just install open claw on your computer. I mean, I'm I'm on my computer Well, you're the one with the max account I'm not I'm sure a lot of cool shit happens when you install open claw a lot of cool shit happens and it feels real good It's like, and I taste it, I can taste the freedom of just the robots doing it all. But guess what? Like, we ain't there, mother-**ers. We ain't even close. And it's like the robots, yeah, you can taste the freedom of the robots doing it all until they compact their memory because they're out of tokens and they forget like... along with all of your emails before February 3rd. Well, yeah, it's just like, and then, I mean, that's, you know, at least that's the speculation for what happened for this meta employee was that like her instructions, which were just in context, context window instructions, got compacted. And then the bot was just like, had no indication of what not to do. And I don't, so, whoops. Oopsies. Thas. Today we actually have something to do, something real to do. I'm excited. We're going to look at the content. This is going to be when I'm like, this is episode three. You know, in an HBO series when they're like, ⁓ you got to get into it. You got the first two episodes. You guys got to hang in there. is where it pops. Well, maybe. It's a big maybe. Or not. ⁓ Or it's just kind of like, or maybe it's episode six. I don't know. Or maybe it's in episode three when you're like, you know what? I'm not going to keep watching this. It's basically like Star Trek Starfleet Academy. It's like, you know what? I don't think this thing is going to come around, actually. No offense, Paramount. Congratulations on the acquisition. ⁓ So where would you like to begin? I had written up a brief. I think maybe you said, I think you said that we would read the prompt first. Because I don't know what you asked it to do. So I think that's probably a good idea. also for the listeners. Yep, sounds good. And we'll read it out loud for those of you who are joining us purely through your ear holes. Yep. So let me fire up Claude. Now this one, I... I mean, I was also playing around, know, like, it's, hey, cheese and crackers. It's just like, Claude code, you can use Claude code in your Claude app, or can use Claude code on the command line, and you can use Claude code work on the command line. I think you mentioned kind of like Claude being a React app, and it does feel like there's a little bit of an incoherent nature to all the things you can do. So, let in Claude. Yeah, yeah, yeah. Well, that's gotta be the giant, giant, giant organization, different teams building the different parts of it. I don't need to tell this guy. This guy, this guy knows all about it. This guy? Or you pointing at yourself with the thumb? Oh yeah, no, I know all about... Oh yeah. We've been burned. We've been hurt. Both Ian and I have been deeply, deeply hurt in the Yeah, I guess this guy knows too. Wait a minute. Also pointing at myself. Okay, stop These guys know. Are you sharing, you're not sharing your screen yet. I'm not sharing my screen yet. You are correct. And Kostya, we're wondering, now should I share my screen or should I share apps, thoughts? I'll share the screen. I'll share the full screen. I don't have, I have nothing to hide. Except I do have a molt bot running in the background so things could get fucked up. Stealing any and all secrets that are shared on the screen. Yeah, yeah, yeah. Sure. How's it looking? Okay, so what do we got? Plan Sourdough Bakery Management. Yes. So this one I did set up a cloud code and how's the font size here? Readable? ⁓ It's okay, it is pixelated, but once again you're gonna read it, so it'll come through eventually. Alrighty, so let's go up to the top here. ⁓ Use XP and DND. ⁓ wow, you really, ⁓ this is a back and forth, okay, gotcha. Well this is, the rest is just the bot like talking me through its thinking process. Thanks, thank you robot. Thanks for keeping me in the loop and being so communicative. So my prompt. Use XP and DDD to create a plan. ⁓ so this one I was kind of trying to take the approach of have the bot make a plan, and then I can actually QA the plan, and then the bot does the plan. So I can adjust, you know, this is spec-driven development as it is often known. ⁓ Use XP and DDD to create a plan to build an application for boutique sourdough bread bakery management. Software is primarily for managing the production of sourdough bread. Bread is produced on a daily basis using recipes and is set to produce a number of loaves. The software takes the desired production for a given day and works its way backwards to calculate the quantities needed. The software will need to take into account the fact that on a given day you are also producing the sourdough to be used for the next day. Now sourdough, my friend, is not a non-trivial problem space. So let's see. Yeah, so. Um, the bot did stuff. I don't know how much. Why is it saying it's exploring the code base to understand, but there is no code base yet. Is there? No, there was not. So I used this on Claude codes in the Claude application. And then, you know, I shared an empty repository with it. Um, yeah. I gave it a directory to work in and yes, the first trip up the bot, but let's take a look at what its findings were. ⁓ so it's, talking us through what it did based on my thorough exploration of this directory. Here are my findings. The directory is currently empty. that was a lot of way to go. Yeah. Nailed it. ⁓ I'm not going to hold it. I'm not going to hold it to, to, to task for that. ⁓ yeah. So then, then it asked me some questions in terms of kind of what programming language I want them to use. And this is something that Claude. Does fairly well. I don't know if you've used this aspect of it But it has like a user interface giving you multiple choice questions. It kind of like is that in the Chat layer of the application. Yes, it's in the it's in the application layer. So it's not LLM related It is a tool that the LLM has access to and the LLM has instructions on how to use the tool or like And says like ask them these questions kind of as the next step. It will say I want to use the question asking tool and here's the options I want to know and then the software. I wonder if there's some kind of standardization around that because I've when I recently upgraded OpenCode and it started doing the same thing. Yeah. So it actually it does it it groups it too. So you get you don't just get like the multiple choice questions but I might get like four tabs in regards to various aspects of what you're asking. And you're getting asked questions in a series of just kind of like, yeah, select and then some of those questions are like, choose one, some of those questions are choose all that apply. ⁓ So what did this thing ask you? What did you answer? It asked me what ⁓ programming language I wanted to know what kind of interface I wanted, whether it was a web application or a single page application. mean, in its mind, I think web application meant API, because that's what it made. I said web application. ⁓ It asked me some questions about the bakery itself, like whether it was making multiple kinds of bread, whether the bread schedule varied on a day-by-day basis. So is it making the same kinds of bread every day, or is the production change on a day-to-day basis? I was a little surprised. ⁓ and I think, I don't see in here, I don't actually see, maybe this was built into it, ⁓ because I'm trying to see like, you know, so for those of you who are just listening, we're kind of scrolling through the ⁓ implementation here, but it also used the web quite a bit during this, and I don't see that in its. so it went and did research. It did a lot of research, indeed. Yeah, and that's something interesting, and that's something I would prefer to see in here. This is just feedback for the makers of Claude. who I'm sure are active listeners to yelling at robots. As makers of robots, we are their number one user base. ⁓ No, but I would like to see kind of like what it got off the web and ⁓ yeah, I mean that's because that's relevant. But it did a lot of research on bread baking ⁓ and then it asked me a question about ⁓ calculating the loaves to ingredients. whether it should track the basically the starter feeding schedule or just calculate ingredients qualities and then I said it should it should track starter feeding as well. What is sorry and just for those of us who aren't fully familiar with sourdough I know that there's a thing about starter what is the feeding? So basically the way that bread and this is relevant for the application. The way that sourdough baking works is you're kind of doing two things on a given day. You start the day with a large quantity of starter. So this is what's going to kick off your bread production process. And you mix that starter with flour and water and do stuff and then shape loaves and then you basically put those loaves in a little basket and that goes in the refrigerator overnight and then you bake it the next day. So after you start, the starter is like the yeast and the inception dough. It's the dough before the dough. And it's the thing. Well, I'm like, how do I I'm kind of just talking like, how do I explain this to like a really ignorant person? No. ⁓ No, no. But then we then we started getting into my pro choice or my pro life. Is it murder to throw out starter? Is it murder to throw out? It's definitely a starter, although you can make pancakes with it and it is delicious. But actually, so there's more bread. So there's two things that you're doing. You're using this starter. It's basically it is basically like a very high yeast, you know, to flour ratio. And it's the thing that basically is just ideally it's it's really vibrant yeast. It's super alive. And then when you mix the bread, it's just going to like go to town because it's just food and it's like, yeah. And then when it goes to town, it's farting constantly and the farting is what makes your bread rise. I mean this is it. Folks, sourdough bread you're eating yeast farts. That's it. Yeast farts, And it is delicious. It is delicious. And the sourness, okay now I'm going down too much of a technical sourdough. All right, I'll stop. We get it, you worked at a bakery, okay. So the last thing you do in the production, so you've kind of used up a lot of the starter. and you've calculated it so you start with some quantity and you've calculated it so you end with a very small amount of quantity and then you feed that starter for the next day's production. So you basically feed it, and the ratios are quite different to bread. It's usually much more wet. You add a lot more water because it helps it eat more quickly and you also leave the starter in room temperature so it's really just like super active doing a bunch of stuff and you leave it overnight and then that becomes your starter for the next day. So the ingredients for the day are starter, flour, water, and the output for the day is loaves, but also the starter for the next day's production. So it's actually the starter for two days that will be in the bread two days from that day. So it's not like, long story short, there's a little bit of complexity in terms of just like managing ingredients and ratios through time because You're kind of one day ahead of the game, blah, blah. Was that helpful? it. Should we take that from the top? Yes, Definitely not. Yeah, yeah, yeah. Definitely not. Do not take that from the top. OK, cool. Yeah, so I just asking my questions about that. Asked me whether it should do ingredients as percentage. This is kind of some. It asked me a lot of very specific baking questions, which was a bit surprising. because it actually seemed to understand the domain or got into the domain ⁓ pretty well. Asked me what Python framework I wanted to use, what I wanted storage to be. I said I wanted to produce the starter for the next day. Asked me about the production day itself. So just kind of doing some domain investigation, exploration, and then finally came up with a plan, ⁓ which, ⁓ let's see, breadmapper implementation plan was to do a model. ⁓ had a single context. ⁓ this is also, I guess like, why did I say DDD? Like, why didn't I just say XP? Why did I say DDD? for me, DD is cause like, ⁓ why? Cause what do you, are you, are you just like, fuck it? This thing's going to be managing its own code anyway, so it's not my problem? I don't know. It was because like for me, I was curious what, like what it would do to the implementation approach. I don't, mean, I have no idea. We'll look at the code, right? I have no idea if this made it better or not. ⁓ The XP was one that, and this is something I was thinking about today and I'm curious about of like, what kind of, because the way LLMs work, right? It's at least one of the ways it works. It's all activations. have words that are coming in, tokens that are coming in that activate aspects of the model, right? Because of how it's trained, it's making the connections, this and the other thing. And I was thinking like, Is there so? How do you write context or prompts that have the right activation so that you have are more likely to get the results that you want? And this is one where it's so what's your meme? What's the meme that you're going to trigger? The right connections in the in the body and it's kind of like for me and I don't know if this is true or not, but like XP or write the code like Kent Beckwood or just I don't know like what's your shortcuts to actually getting it more likely to do the right thing? I don't know if that's, I mean, maybe that's so totally evident, that was at least, yeah. Shower thoughts. I think that the, yeah, see for me, when doing the robot, because the robot's gonna go and do some stuff, like domain, DDD makes more sense to me than the XP thing. You're not mob programming with the fucking robot. The robot's doing its own thing. Yeah, but XP, it's small testable changes, test-driven development. It's a lot of practices that are about, Making safe. I see what you mean. Yeah. So you want it to do tests first kind of vibe. I want to want to do. Yeah, there is the one thing that I haven't thought of. When I've used AI to do that, to build stuff or to help me at work or in personal projects or whatever, I'm the one doing all the commits. If I just left it to its own devices, is it just going to go one shot and then like get get at all commit done? Yeah. Right. I would like to see like what you're saying, small, like I wanted, I would love to see small changes that are compiling and test readable over full test suite runs. Yeah. Yeah. Okay. I'm with you. Cause then that also got me thinking about, so I have this idea for, want to main agent. I want it to do the thing. And then I want it to spin up some sub agents to do quality control and, and, and, like, what's your feedback loop for knowing if you're writing those things? Well, right. And that's where it gets, I think that's just like, that's really hard actually. I don't know that there, you know, it's, it feels almost magical. Like if you hit on something, it's like, I don't know that because yeah, well, cause it's code, can just write tests. Yeah. Yeah. Yeah. Yeah. That's, that's also the I guess it depends. think you have to, I think it probably, you have to do this more and more to be able to do it, to be able to let the sort of iterations get bigger and bigger, right? Because for me, when I do this, if it goes off and builds half the app and then asks me to look at it, like that's a feedback, like my brain is a bottleneck there. Like I can't ingest that in a reasonable amount of time to be like, yeah, keep going or no, stop, fix these things. Right? that's something think about. And that's probably what we'll encounter when we actually get into the code is like this. Right, right. We're about to come up against it. We're about to be like, you know what? This is too hard to wrap my head around. I'm just going to delete it. Just get a code to do a crossword. Yep, so then, ⁓ this is cool, and actually this wasn't output it created. It came up with essentially the ubiquitous language, right? The shared vocabulary between bakers and code. Things like recipe, baker's percentage, loaf weight, production day, bake schedule, scaling, dough weight, yeah. It's not bad, actually. This is pretty good. Cool. Wow, there's a lot here. Do we want to go through all this, or should we get to the code? Okay, yeah, this thing's detailed. no, but I'm sorry. What I saying is like all the way at the end or is this the open thing of the last thing where it's like, this is my plan. Should I do it? Yeah. Like what was the last thing it said to you? Jesus Christ, there's a lot here. I didn't see, like see any of this when this was happening. What was the last thing it said? didn't read through any of this. He's like, yeah, it sounds like you your work. I don't know, man. Go. Yeah, well, my experience of it was like, I kicked it off with like what you saw to be like a pretty small problem. I answered questions and I was like, ooh, those are good questions. And then I just never looked at it again. Well, actually, that's not true. opened the code and I was like, well, this The intern came back with a 50 page document, know, Josh was like, hey, man, you clearly put some work in here, so I trust you. You've been promoted to vice president. So I got my job. I know, bro. I know. Big schedule query. yeah, actually I'm scrolling past what feels like so right here, what does it say? This is a... Alright. It's complimenting itself on its design. Fucking guys. That's a throw design. It says about itself. Let me review the key details and write the final plan. So it looks like actually the software... Whoa. The software went through Okay, well to be fair to the robot, that's the... the... The king robot. commenting the one of its night. Oh, some agent. Sure. Yeah. Oh, yeah. Well, this is a robot. The sub agent got positive marks from its king robot. Well, you do this long enough. Do you end up with some kind of team hierarchy developing? Oh, definitely. It's like, oh, we got to put just delete the prompt. Oh, no. Yeah. Oh, here comes John with his work. Yeah. Yep. Yep, yep. So one of the sub bots came up with a, man, what is going on? now we're starting to hit some of this sh**ty React implementation of Claude, actually. I don't know if you're seeing the flickering or the jumping. It will show up in the final cut. ⁓ Yeah, it's already pixelated, so I'm probably not seeing it as much as you were. That's thorough design. Let me review the key details. And then it came up with the final plan, which it created a file, which is... goofygatheringstarfish.md. This is another- Goofy Gathering. Oh, does it do like a Docker container kind of naming convention when it needs to, if that can make things? writes, yeah, it it wrote, basically it wrote the plan to an MD file, and then, but it was a temporary MD file that it presented to me, but then, now it's gone. So it's not actually part of the history that I can read back through, and that's disappointing to me, actually. I would like to have those as an artifact. Key design decisions, domain model, there's three aggregates, recipe, starter type, and production day. The bake schedule is a computed value object, never stored. The algorithm is a backward calculation from loaf count. So basically the way this thing is designed is you'll give it a production schedule and it will work its way backward in time and figure out what to produce when. ⁓ So you'll give it kind of a total dough weight for different production elements and then it will calculate the flour weight, individual ingredients, and then do the levain flour water adjustment and cross recipe levain aggregation. And that's also because you might be making different recipes but using the same starter and that's going to impact your total starter. Got you. Multi-day timeline. So day D's worksheet pulls from three production plans, three different production plans. The bake from day D. the mix from D plus one and the scaling and prep from D plus two reflecting the look at this thing using like variables and math. Yeah, yeah. The architecture hexagonal with pure domain layer. ⁓ God. This is why. Yes. Tell me tell me tell me what you're feeling right now. Talk me through what's going on. I can hear is fucking Uncle Bob talking right now and I'm getting angry. OK. Why. A lot of his ideas are very good and sound. You're talking about Robert Martin, author of Clean Code? Yes. There's this air of self-righteousness to a lot of stuff he says that... he's an arrogant mother****er. ⁓ If you're not doing it this way, then you're doing it wrong. You're doing it wrong. And that's just f**** not true in most cases. There's a lot of things that Guy says that I agree with. The one thing that I... Side tangent. which I do agree with which is actually maybe very topical for today's day and age is There's no regulation in our industry. Mm-hmm. And that's For those of us who've been doing this for a long time a good thing probably I don't know. mean for me anyways I don't believe there should be or needs to be right now, but he made it so curious where you're going with this Well, he made a point that if you can if there are people who continue to not take what we do seriously And those people are the same people who are putting software in cars or putting software in hospitals. Something will eventually go wrong. The government will come in. They will analyze the situation and then they will legislate some stuff. Just like I'm sorry, brother. Like the legislators are coming. I got news. they're very slow. a 60 year lead time on these dumb ass mofos. Like if they were coming. They would have come, you know, in 2001. If they're coming for anything, it's really... breaking a lot more recently in the last year and a half than it has in... Topflare? I swear to God, the 10 years prior. Yeah, I mean, think pace of change, right? It's both like the pace of change, change leads to breakage, right? This is... This will be a recurring theme in what we talk about and what we're looking at is actually safe change, making change safely. And for sure, the rise of agentic coding, as we've already seen, is leading to making change incredibly unsafely and in ways that feel feels good. Yeah, man. It looks good. Cool. All right, champ it. Approved. mean, don't get me started on why merge. Well, it's like, and maybe one of my biggest rage, click, bait, whatever, is that MRs are the language of change. an agentic world and that's f**ked up. So pull requests, merge requests or whatever come from open source development where people are working across time and space asynchronously. They're working across space time. Space time. No, but like seriously across time zones in different regions and different parts of the world to build software that is not their full-time job. So they, you know, I might in my spare time make a change and I need Josh to look at it but he's not here right now and he won't be able to until Friday of next week. So that's where pull requests came from and it makes perfect sense for that use case. Absolutely. Exactly. Yeah. Most software teams who are building stuff are not in that situation. And when I say most I mean like 98 percent. It's also this is how the models are trained. So there's something about how the agents are now thinking about coding. Yeah. Yeah. That this is embedded in their mental model or mental models, probably the wrong term, but this is embedded in their model of change, is in memory, their, yeah, in their memory and their activations and whatever the training is like, you know, in their fine tuning, every aspect of their existence. Basically it's like, it's, it's entrenched. It's entrenched. It's entrenched in intrinsic. Obviously like I don't know what the consequences are of that but there are consequences in terms of making safe change. I don't know. Anyways, shower thoughts. Shower thoughts by the way in case you were wondering just means I don't actually have a complete or coherent thought around it but I think it sounds cool and I want to talk about it. Shower thoughts. Maybe that'll be my ⁓ catchphrase. That's your catchphrase? Got it. What were we talking? What were we talking about? think we were at the point where, okay, so we've I think we've covered, sorry, yes, this all started because you showed me hexagonal pure domain layer and I got angry. Folks, we're coming to the close of the episode here. got a, what's I think we've got time to look at some code. think we can jump into have time to look at some code. So I approved the plan. I don't remember what it was. I can't see what it was. The plan is lost in history, but it looked great. It was a markdown document with a bullet list. Trust the plan. ⁓ The tool made some to-do lists. Here's what it did in order. Set up the project, made a recipe aggregator. And it was writing unit tests as it went. ⁓ we'll take a look at the tests, yada, yada, yada. ⁓ Did some hexagonal architecture, ports and adapters and things like that. Set up Postgres, set up the API endpoints, and then did a little bit of deployment, Dockerized it, and deployed it. ⁓ Did it. and came up with stuff. and then I used, I mean, this is like nitpicking. It used poetry and I'm like, use UV instead, it's cooler. Which I don't know if you... At least it used one of those things. I was fantasizing about screaming it, coming in here and seeing a requirements.txt file and I was going to flip my desk. Hey, nothing wrong. You know, it's like that's, yeah, actually, that does suck. It's 2025.6. Yeah, yeah, yeah. You better get on board. It's still what this is my biggest gripe about Python is tooling like it's it's not it's not great. ⁓ But at least you're better than. Yeah. The rest implemented implemented tooling has gotten really really it's it's much much better. I enjoy it much more. I mean I really liked poetry when it came out for what it did compared to what came before which is just like how do I even get this. thing in my Python path. was like, Anytime. I mean, it would be like anytime I'd set up a project, it would be at least half a day figuring out how to get the tests to reference things in the right way without actually installing. ⁓ my gosh. Why are these imports not fucking working? Yeah, yeah, exactly. Yeah, classic. ⁓ bup bup bup. And then it did a bunch of implementation and yeah, this is, I don't think we were having much. interaction here, this is all just what it did. And then got to the gist, all slices are complete, bread map are complete, 105 tests across four layers, which was the the domain value, domain models, we'll get into them, domain services, the application and the API. Here are the key files. Is this gonna be like heavy OOP? Did you give it any like No idea. That's a great question. Yeah. We're gonna look at some Python OOP aka poops. ⁓ was quite possible. Yep. So it did it, ⁓ committed it. ⁓ then I told it to build a web UI, but I canceled that. I'm like, wait, I gotta save that first off. Okay, cool. So there you have it. And then for whatever reason, it's, it's, again, this is kind of maybe crappy. Why does it say that? Yeah. Crappy react interface. Cause it's not actually doing anything. I've tried to stop it. Okay. Did it say clotting and now it says you, you, you quiddying. Cognitating, synthesizing. This is the cheeky way Claude tells you that it's doing work. What do we got here? It really did separate some things out here. We got a domain folder, an application folder, and an API folder. Yeah, what would you like to look at first? Let's pair program it. A domain has models, services, and value objects. Should we look at our value? Value objects? Oh, these are tests. Sorry, that's test land. Wait, I you said you to UV. I still see a Py project. Um, you've already heard of you. also use Pi project shirt. Oh nice smart. Where's my command line Tom? Where's my Tamil? Yeah, let me see. Let me let me just let's just let's just peruse the Pi project for a quick quick second just to see what we got here. Alright, so we're using fast API SQL alchemy boo. I don't think yay. if can get a Tamil formatter in here. I thought I had that. My pie boo. So something I learned about my pie Mm-hmm recently, okay It'll just background any anytime it thinks it doesn't it doesn't see something and won't tell you What do you mean? Back so like if you're using types in your Python, right? Mm-hmm. It'll default things to any Like I thought that you so I was under the impression that you could you could like TypeScript or like a lot of other static type checkers, well, TypeScript is compiler, but a lot of other static type checkers, you can just not specify return types on a function, and it would infer it. MyPy will not. MyPy will say, ⁓ you're just returning any. Yeah, fuck that shit. Anyways, so I switched to PyWrite, which is way better. We switched to what? PyWrite. ⁓ okay. Yeah, I'm not familiar with Yeah, it's pretty good. Yeah, yeah. But does it do a like... compilation phase, because that's kind of my understanding of why TypeScript can do that. No, it's still Python. There's no other way to do it. It's still static type checking. just that its ability to infer things is 10x what MyPy can. And does that show up in the runtime, or is this kind of an IDE thing? No, no, no. This is an IDE. This is a... And a development thing so you can run like make okay type check or whatever you'd sit to make out your or use run poetry run or UV run? Pyrite and it'll it'll tell you it'll tell you what what you've done wrong with your your types Gotcha. So yeah But other than that I agree with these choices robot for the most part except for sequel robot picked picked. Okay libraries Tell it to use pyrite instead of my button. Okay Yeah, all right, cool, cool, cool, cool. Let's see the Docker file. I'm just curious about the Docker file. So, and app, install. I'm not sure where this is, Postgres. What is this, libpq? No idea. ⁓ that's, need that. You need that on your system to be able to, for Postgres, if it's using the like. feels like a Postgres thing. PsychoPG binary. which is definitely what you want to use instead of the wheel or whatever the fuck it's called. Yeah. Yeah. Fucking wheels. Wheels. This is one, total, total nitpicking, just there's no health check for the database coming up when you run it. It just, it will fail, but that's, yeah. I'm okay with that. I'm big on failing fast. No, I mean it won't wait for the database to come up. So it will wait for if you start. ⁓ okay, okay. This is a minor Docker compose. know, this is a new problem. Claw.md it wrote. So this it wrote its own instructions to itself. ⁓ environment. Okay. Yeah. Run the test like this. So one of the things. Yeah. Yeah. Let's do it. Let's do what it says. Let's see what happens when we do what it says. Yeah. ⁓ that's, yeah, yeah, yeah. Let's check it to mean, yeah, checking it to work. Okay, that worked. So it was able to do that. Let's see how Successfully installed all the dependencies. All right. Running the tests. All right. Do you have a, do you have a, you need a local Postgres or something? Or is it all just stubbing Postgres? I don't know, man. I'm just doing it with, so this is just running the tests, running the server. Okay, we just got 105. in like under a second. ⁓ I'm gonna go ahead and say this thing is not connecting to a test database. No, I don't think so. ⁓ Let's see. it's... These are all unit tests? there any integration tests and tests? There are. are. Okay, let's take a look. There are. So there are application tests. You know, it's crazy. I don't think I've seen, I don't think I've seen the term value object in over 10 years, but okay. Okay. Is that, yeah. Okay. All right. Cool. So it's using an in-memory database ⁓ as an abstraction. I think it's, it's actually, what's the in memory, but is it, is it, okay. What's the database? Yeah, let's, well, let's just take a look in memory production day repository. Uh-huh, production day repository, domain ports, domain ports, production day repository. In memory, so there's going to be then a... I don't like this at all. I don't like this at all. Okay. I don't like this at all. This is sort of s***. Okay. Okay. So we have our first... If we're going to write some tests that depend on a database, we don't f***ing... go in there like a surgeon and cut out the database and just put in a thing that just returns what we need. No, but that. But is this just returning what we need? So my question number one for you, at least this is using where is the actual? This is from the ports, domain ports. Production database, so it's essentially production day repository. This is just an abstract interface essentially. for me, correct me if I'm wrong, but what this looks like to me is it's okay, so it's using some sort of repository pattern. And it's at for testing. It's dubbing that. We're mocking it is it's it's I don't think it's mocking it. I think it's creating an in memory implementation of a repository. So as right. So you are you are immediately right. So there is there is stuff that happens with your repository code. and your Postgres connection. And that stuff's kind of important. And there are also migrations and there are types and other things that happen in Postgres that will have very serious implications with your application. If you are not exercising those during tests, you're doing it wrong, in my opinion. In some way, not for all tests. I'm not saying all your tests have to have that. What I am saying is that you should at least have some tests where you connect to a test database. It runs the migrations you have to get all your tables in place. It may or may not have to seed some data and then run some tests. I don't think there's a there is no world in which I would deploy an app without having done that. Yeah, I think so too. I get why it's doing this because don't get me wrong. That was a fast test week. That was lightning fast. Pew! .35 seconds. many seconds does it say? .35. .35 seconds. 100 tests. .35 seconds. We haven't actually even looked at any. optimized for fast tests. We haven't really looked at any of the tests. And I think to give back like what Ian just said in alternate language is there's no integration tests, right? Well, a couple of noticings. this infrastructure folder, I'm not really sure what that means in this context at least, it means mapping to things that aren't part of this system, right? So the database essentially. One thing I notice is there are no tests actually. at least for that aspect of the system. But the bot made like copy of the structure, but it's all just init.pys, right? Right. ⁓ Noticing. Noticing. What's under domain? Domain model. There's your value objects. Yep. Yep. ⁓ So this is a this like, is this is one. This is a fun one. Country sourdough. ⁓ yeah. Let's make a country sourdough. So it's testing whether you can create a recipe or not. And it's just obviously this is this is a super Object oriented design Value objects is it is this a super object or these data class? I don't know I mean, it's more than I would do which is ⁓ greater than zero Well, but I mean you must have to you may mean like what how would you Ian? Hold data together hold the data structure together would you use? I'm a big, yeah, so I, okay, so technically those are objects in classes and stuff, but I use the equivalent of like what I consider to be structs, like a Pydantic models, which recipe might be a Pydantic model. Can you click into that? See if they see if it was smart enough to use Pydantic for that. What's it inheriting from? No recipe. No, no, no, no, no, no, no, runtime validation instead of which data classes don't Data classes are good. All right fine with something else But if it you say you could say like, you know, this is the price is an integer and then at runtime You just make it a string doesn't matter. It doesn't care. Welcome to Python Yeah, baby. Welcome to Python. I'd to close with a message from our sponsor our sponsor today Funny fart the makers of funny fart fart in a can Are you in a boring long zoom meeting? Well, let off a fart. Funny fart. over to you. ⁓ god, we are not being paid by these people just so everyone knows. By the way, and just to be clear, we're about to receive our first cease and desist letter from the makers of Funny Fart. Ian, thank you so much for joining me on the Sunday after, Sunday morning, your Sunday morning, getting up morning for me, Sunday afternoon for you. Yeah, buddy, this is great. This is good. Yeah, always a pleasure. I guess we didn't get into our Well, actually, let's get into our deep. So let's wrap up the episode. ⁓ Anything learning? you have any reflections and learnings that you had on this episode? Anything to share? Other than we gotta figure out... Why you're pixelated for me. It sounds like an Ian problem. You look great. It might have to do with I have all three children streaming right now. Could be. Could be. Yeah. Yeah. Yeah.

← Back to all episodes