第190回:エージェントが書いたコードをどうテストするか

190: Testing Agents' Code

Programming Throwdown1時間32分
第190回:エージェントが書いたコードをどうテストするか

第190回:エージェントが書いたコードをどうテストするか

Programming Throwdown

0:001:32:50

要約

Programming Throwdown の Patrick と Jason が、AIコーディングエージェントが書くコードの検証方法を語った回。冒頭ではAI賛否の二極化に触れ、後半で本題に入る。単純に「テストして」と頼むと、カバレッジは高くても意味を検証しないテストになりやすいという。対策として、権威あるデータ源による回帰テスト、人間が確認したゴールデンデータ、動画によるストーリーボード、終了条件の明示、検証可能な仕様づくりを挙げている。

この回のポイント

  • ●AI議論は白か黒かの極端に偏りがちで、コード補助の使い方にも幅があるのに、ニュアンスを持って語る枠組みがまだ足りないと二人は述べている。
  • ●エージェントに「テストして」と頼むと、行が実行されるだけで意味を検証しないテストになりやすい。Jasonはこれを、意味の分からない異星語の用紙に答えて食事を得る「異星人の刑務所」の比喩で説明した。
  • ●コードが変わるとテストも一緒に書き換えられ、1+1=3 に合わせてしまうような事態が起きうる。そのためコードとは独立した外部の情報源が必要になる。
  • ●対策の一つが回帰テスト/システムテストで、信頼できる入出力表や環境を基準にする。Patrickは人間が確認したデータを最優先とするゴールデンデータセットを提案した。
  • ●JasonはPlaywrightで操作を録画する「ストーリーボード」を使ってUIの問題を見つけた。AIの弱点は審美眼よりも、どの粒度で作業すべきかというカテゴリの誤りだという見方を示した。
  • ●終了条件が曖昧だとAIは止まり時を判断しにくい。個数や数値範囲を指定し、別のLLMに完了判定させることが有効だと述べている。仕様は新しいプログラミング言語のようなもので、反復しながら磨くものになるという。

章立て

  1. AI賛否の二極化とコーディングの現在

    AI使用の是非をめぐる極端な議論に触れ、プログラミング分野での進歩の速さや、チーム境界・他職種との違いを語る。

  2. ニュース:Minecraft地球とStarship

    地球を1対1で再現したMinecraftワールド、SpaceXのStarship回収の話題を取り上げる。

  3. Tony Robbinsの動画とC++26の投票

    営業トークの「パターンブレイク」と、C++26の標準化委員会でのcontracts提案をめぐる議論を紹介する。

  4. 本・ツール紹介:AI本とTemperance

    『AI: A Modern Approach』を音声化して聴く話や、Raspberry Piを使った自作の子ども向けVPN「Temperance」を紹介する。

  5. エージェントのコードのテスト:問題点

    AIのテストは意味を検証せず、コードに合わせて書き換わる。異星人の刑務所の比喩と、思考ログが暗号化される話題が出る。

  6. 回帰テストとゴールデンデータ、人間の関与

    外部の権威あるデータによるテストと、人間が確認した基準データの有効性、メトリクスを見ながら導く開発スタイルを語る。

  7. ストーリーボードと終了条件の設計

    Playwrightと動画で操作を確認する方法、AIの審美眼とカテゴリの誤り、数値を指定して完了判定を設計する工夫を説明する。

  8. 検証可能性と仕様、NBA Jamの実演

    Blenderでの家の3D再現例から仕様の重要性を論じ、NBA Jamに自分と妻を入れた実演で締めくくる。

解説記事

AI関連の話題に加え、プログラミングの現場がエージェント中心に変わったことを扱うポッドキャスト「Programming Throwdown」の第190回。ホストのPatrickとJasonが、AIエージェントが書いたコードをどう検証するかを語った。冒頭ではAIをめぐる極端な議論を振り返り、後半で実践的なテスト手法を紹介している。

AI議論の二極化と、プログラミングの特殊性

冒頭でPatrickは、ネット上のAI議論に「ニュアンスがない」と嘆く。ゲームのバグ相談にAIを使っただけの小規模パブリッシャーが、アワードの資格を問われた例を挙げた。コードの使い方には「何も知らないのでゲームを作って」から「特定のバグの修正だけ頼む」まで幅があるのに、AIは一律に悪とされがちだという。

Jasonも、舞台芸術の世界にいる息子の周囲ではAIへの反発が非常に強いと話す。アイデンティティの一部になってしまうと考えを変えにくいという見方を示した。一方でPatrickは、この12〜18か月でプログラミング分野の進歩が突出していると述べる。コンパイラなどで出力の質を確かめやすい性質があり、ネイティブアプリの開発など、これまで割に合わなかったことが現実的になったという。ただしチーム境界のあり方など、新しい問いも生まれていると指摘する。

「テストして」では意味のないテストが生まれる

本題でJasonは、現在はほとんどコードを書かず、英語でエージェントに指示していると明かす。Patrickも、アーキテクチャや使うアルゴリズムは説明できる状態にしておきたいと語る。そのうえでJasonは、単純にテストを頼むと「カバレッジは高いが意味を検証していないテスト」が生まれると述べる。

これを説明するのが「異星人の刑務所」の比喩だ。意味の分からない異星語の選択式用紙に答えると、食事が出る日と出ない日がある。囚人は因果関係の対応を覚えるが、言語は理解していない。AIのテストも同様に、コードの実行を通すだけで意味を理解していないという。コードが変わるとテストも合わせて書き換えられ、1+1=3 を正とするテストになる例も挙げた。Patrickも、AIは自分で書いたテストを事前の根拠として引きずるため、質の低いユニットテストは害にもなると述べ、ユニットテストに置く価値はほぼゼロに近いと話した。

外部の基準と人間の関与

対策としてJasonは、信頼できる情報源に基づく回帰テスト(システムテスト)を挙げる。足し算なら、正しい和の表を用意して全件を通す。過去のプロジェクトでは、振り子を倒立させ続ける、迷路を解くといった環境でPRの合否を判定していたという。

Patrickは、人間が確認した出力を基準にする「ゴールデンデータセット」を提案した。人間が確認した層とAIが確認した層に分け、前者を侵してはならない基準として扱う。仕様が変わると足かせになりうる両刃の剣だが、デザインの出来など判断の基準点を与える意味は大きいという。Jasonも、メトリクスを見ながら方向を修正し続ける関与が重要だと述べた。

ストーリーボードと終了条件

Jasonが自作ツールTemperanceの開発で得た手法が「ストーリーボード」だ。想定ユーザーが行う10〜15の操作をスクリプト化し、Playwrightで実行して動画に録り、AIに動画を見てUXを評価させる。1ピクセル幅のリンクのようなUI上の欠陥を見つけるのに役立ったという。Jasonは、AIの審美眼は悪くなく、問題は作業の粒度を取り違えるカテゴリの誤りと、判断に必要な背景情報の不足だとの見方を示した。

Patrickは、閾値や個数を具体的に指定する重要性を強調する。「30分」とだけ言うと、誤差ナノ秒の厳密さを追い始めるといった暴走が起こりうるためだ。Jasonは、明示的な終了条件がないとAIは止め時を判断しにくいため、別のLLMに完了判定をさせる方法が有効だと述べている。

検証可能性と仕様

Jasonは、友人が家の写真からBlender上に3Dモデルを作らせた例を紹介した。出力を見て「木に時間をかけすぎ」「日差しの跡を床のテクスチャで再現しない」と指示を足すうち、結果が改善したという。最初から重要事項をすべて仕様化するのは難しく、反復の中で仕様が育つ。Patrickは、仕様が一種のプログラミング言語になり、厳密にすれば形式検証にもつながるとの見方を示した。最後にJasonは、自分と妻をNBA Jamに登場させた動画をAIに作らせた例を紹介し、動画で確認しながら直すことで実現できたと話した。

まとめ

二人の主張の核心は、AIが書いたコードの信頼性は、AI自身が書くテストではなく、コードから独立した基準と人間の判断で担保するということだ。回帰テスト、ゴールデンデータ、動画による確認、数値を伴う終了条件は、特別な道具がなくても今日から試せる。エージェントに任せるほど、何を検証し何を重要とするかを決める人間の役割が大きくなる点に注目したい。なお、これらはホスト二人の経験に基づく見解であり、一般化された検証結果ではない。

文字起こし(英語・自動生成)

programming throwdown episode 190 testing agents code to take it away patrick here to talk about something which i can't decide if uh it's just me or it's everyone else you know that happens from time to time. If you spend time on the broader internet, which is all just bots now talking to each other. That's right. It's a dead internet. It's a topic for another time. AI hate. AI hate. Man, internet discussion lacks nuance. Maybe I'm just getting to be, I say it as a joke by an old man, but man, this is no nuance. and I feel, you know, people get on both sides.

And all I want to say, and I kind of say this to my kids sometimes, if anyone tells you there's like only two choices, like black or white, like there are almost no cases where that's true. Like it's very rare. And you can just almost just know for a fact that person is probably like misleading you in some way. And I think the AI thing is that. So there's lots of debate about, you know, I saw some, and I'm going to mess up a little, but like a video game competition, like a Code Jam or something. No, I wasn't even that. It was like a small publisher, I think, had published a game. And they like made a note that they had used like AI as a consultant. Like they had asked AI for help on a few like bugs that they were trying to fix. So they didn't like feed their code in it. They weren't like even using cod code for their initiative. And it was code, not art. Yes. It was a code. Yes. I ended up having an issue with a shader. First of all, they decided to admit that. Nobody would have been able to tell at that level.

People were like, oh, they should be disqualified from winning an award as a video game because they used AI. I just feel like, one, we are not equipped for a framework on nuance of talking about AI use. Like Jason is asking, is this person not paying artists and instead just making slot AI art? Are they, you know, making AI art and then, you know, doing different poses with an AI? There's like, you know, there's a lot of nuance there in code, right? There's everything from I know nothing, make me a game, make no mistakes to, you know, I'm in some unity bug, like in this system that I'm committed, like, can you just help me make a fix for it or whatever, right? Or even just literally asking, like, that's how we used to do it, right? Like, hey, I need an algorithm for kind of, you know, solving this problem. But I find people's just, like, any AI can't be a tool bad. Like, not great. And then on the other extreme, yeah, sorry, go ahead.

Oh, no, I just, I mean, just to double click on what you're saying, you know, my son is really big into the performing arts. Actually, shout out to my son, my older son. He got the lead role in the middle school play. So we're excited. Yeah, he's memorizing a bunch of lines. He's constantly asking me to take the script and say all the other lines. And he has to say his lines and all that. So that's been an adventure. He's been in theater and choir and all that for a long time. So he's kind of moved up the ranks. But but basically, you know, in his community of of performing arts, they are extremely against all A.I. and basically it's going to take away all our water it's going to leave us in like a Mad Max type situation it's going to bring back the Thunderdome etc etc and it's very very extreme and yeah it's even when you bring up how the water issue is kind of temporary and I think it's largely been mitigated

people are just at that point too emotionally invested and they've kind of wrapped their identity around being anti-AI, it's not hard to break that. I do think even without stepping into what the debate centers around, my broader point, you're absolutely right. There's points on both sides, very difficult. People are sort of like not meeting for the desire of being convinced, but just to sort of yell at the other side, right? It's always a bit of struggle. But I do also wonder, in programming, it turns out, like I guess specifically it was a big bet by, I mean, maybe others too, but Anthropic to sort of pursue, you know, enterprise use and programming as like a focus area and yielded a lot of like improvable things just due to the nature of how programming works with compilers and like sort of being able to really assess quality of outputs, maybe a little bit more quickly, which we're going to talk about today. But the sort of like rapid development in the last 12 months,

maybe 18 months it's just like how fast how good how like a lot of this stuff not the like make me gta 6 make no mistakes like that that doesn't still work but like in terms of just like day-to-day like i don't say almost replacing a lot of the glue code that we needed to write your ability if you want to listen to dhh has like a thing where he's doing this like he's big like support into ai even agree or disagree, is a very interesting take on like, you could never support lots of native apps before, just it's too much pain. Now, like that gets offloaded. You still need to own the design, the intention and like all of that. But sure, a native iOS app and I don't know what Swift and an Android app and, you know, Java, you know, whatever, like no big deal. You don't need to know those languages. And, you know, through some of the techniques we're going to talk about, you can kind of test them. But there's just such a gap between that. And, you know, I don't, I'm not a lawyer, but like a lawyer doing their job, like research casework here, you know, or maybe a biologist or, you know, people doing stuff in the physical world, machinists, whatever, you know, I think there's such a gap between coding and those things.

And the less you can fit what you do into like a structured program and that program be like useful, like the less clear it is, the immense progress. Like it feels like it's probably slowed down, right? People buying, you know, OpenAI subscriptions to the chat bot, like probably aren't noticing a ton more today than like 12 months ago versus programmers are seeing just this gigantic shift. And even I'll say like personal observation, but talking to others, like how should team boundaries work now? Because like somebody can just say, well, look at their code base, grab their code, make these changes. And now it's like, it's mine. Like now I do your, like I do your job. Like, what is the point of your team? I just do this on my team. And like, you know, oh, you produce these like really well curated set of results. Thank you. I'll hoover them up into my, you know, framework. And I think we're entering like this very new real thing that even with no further progress, I think we already don't know how to deal with like where we are.

But to just lay these blanket statements down, my caution to everyone, be empathetic. Like everybody's dealing with like a different view of this technology. And just be careful about like absolute statements. Yeah, I mean, I think to your point, you know, I had somebody talk to me a while back before the whole agentic thing really blew up. And they were interested in, they were like, we just want to replace all the coders. We don't want anyone to code anymore. And we should just get rid of all the coders. And I said, well, you know, I mean, there's a lot of folks thinking about that. but why don't you go after teachers like why don't you try to replace all the teachers because uh you know i'm a professor i teach right so i'm putting myself in the crosshairs here i'm not just you know uh punching down or anything like that but i was like why don't you just replace all teachers and he's like oh we don't want to do that teachers are so precious and they're so so basically like what i came away from that is like yeah programmers have a very negative stereotype

and so it's kind of easy to replace them and uh you know people broadly speaking don't have a lot of empathy for programmers but once you start talking about lawyers or teachers or doctors and all of a sudden everyone gets very nervous and then i think on the on the far end of the spectrum are artists so in the same way that programmers you know deserve no empathy uh artists just deserve just exaggerated empathy and so people are just super sensitive to that I mean, I think in all the cases, the fundamental problem is that, you know, AI doesn't attribute. It doesn't give any attribution. And so that is a hurdle that I think could be overcome, but is not there, is not overcome yet. And so, yeah, as a person who creates anything, I could see why that's a problem. I can see why people are upset. But yeah, to your point, it does feel extreme. And the answer is going to be probably, honestly, using AI to figure out how to attribute AI.

That's probably where we need to go. And then it's like, oh, this AI used Patrick Wheeler's art style, and here's the AI's inspiration. And now everyone kind of has attribution, which, again, it's not the only problem. but I think it would be the next hill to climb there. There is precedent there around sampling for music and artists suing each other. I don't know that it's a good precedent, to be honest, but there is precedent for when is your song too similar to another song? Is it like a chord progression? We think everything is different, but it's kind of the same. when you were saying the different careers that may or may not be acceptable to put on the chopping block I feel like there's a version of the trolley problem where you line up different classes and jobs you know like I think you go back in elementary people like what do you want to be when you grow up you kind of line up all those you know right stereotypical jobs and they just ask people which one is it okay for the AI trolley to run over that's amazing um yeah so you know

someone goes and says, I want to make an SSH, you know, engine. And so it goes and builds it. And then I'm able to go and see that they, you know, kind of are effectively copying it from Eternal Terminal, and I copied it all from Stack Overflow. So we'll be able to see the whole legacy. We didn't put it in the show notes, but I did see that there was like a huge drop in Stack Overflow. I don't even go to that website anymore. But like a huge drop. We've talked about it before. Devastating for them, man. Intricacies of posting there. But yeah, nothing gets posted there anymore. Yeah. Yeah, I mean, they just got hit by a train. Just a total meteor strike on their business, unfortunately. Yeah. Well, talking about things we didn't put in the news, how about some stuff we did put in our news links? All right. Time for a news link. So this is pretty wild. Someone made a one-to-one replica of planet Earth in Minecraft.

So I don't know how they did it. I'll have to go and look it up. But I'm assuming they took OpenStreetMap, at least this is how I would do it. They took OpenStreetMap or some kind of alternative. They got an entire mirror of the entire thing. They built all the external buildings and everything in Minecraft. and then they used logic, various procedural content generation techniques to fill in the insides of all the buildings. I mean, they don't know what couch you have in your home, but they could just make something up and it's good enough. So you can actually go to your own house in Minecraft. It's a one-to-one replica of the entire planet. I don't know how that works. Okay, one-to-one, you're expressing scale and outside observability, not one-to-one. And like you mentioned, I don't think all the interiors are. Well, according to the Twitter post, the person said you can go and walk through the inside of your own house.

That's how it was presented on social media. All right. That bot that posted, that was definitely speaking truth. Have you tried this thing? It looks totally wild. It looks good. The flyover views look nice. It's pretty impressive regardless. Yeah, pretty remarkable. Like you said, there must be a good tech stack behind it to do all that. Yeah, it's got to be a massive computational effort there. I think with modern AI, it seems pretty doable. This will get into our show topic, so we won't spoil anything. But, you know, if you had a way of iteratively refining it without a human in the loop, I could see how this could be possible. I was trying to figure out some joke involving splats, but I didn't get there. Rendering voxels has got to be easier than rendering all the splats.

Yeah, or maybe they did marching cubes on the splat. Maybe it started with a splat. Oh, okay. I don't know if we've talked too much about splatting. but maybe we should. Okay. We should have a show on generative 3D. Yes. Okay. All right. All right. Stop. We're in this show. You got to focus. Okay. Right. For those people living under a rock, Starship 42 from SpaceX returned to the launch pad. SpaceX had planned to attempt a double catch. So catch of the first stage, the booster, and the second stage, the Starship. But the initial booster, it sounds like analysis says that they kind of didn't quite have enough fuel and they wanted to make sure not to, you know, break the thing that was going to catch the starship. So they landed softly in the ocean. But then starship did circle Earth many times for almost an entire day and then landed and was caught by, I guess they call it the chopsticks, Mechazilla.

So I don't know. I watched it live. It was a Saturday. So where I am in the South or whatever of America, Saturdays is college football. My wife assumed I was watching some sort of college football game because she could hear me shouting. Wait, did she really? A hundred percent. She's been telling everybody this story. Do you watch college football? I do watch college football. Oh, okay, okay, okay. It's plausible. It's plausible. It's plausible. um but but she heard me getting excited more excited you know trying to get anyone who was not looking to look although no one looked um and then and then she's like trying to figure out what game was on that i was that excited about and came down and was like who are you cheering for it was like the ship they caught it so i was something blew up i saw a video of something blowing up like it was coming down and it it just like tore at the top and then it blew up well they blew it The first stage was attempting a soft landing in the ocean.

But when they've not successfully done, it's called the FTS flight termination system, basically explosives. So they have some explosives that they can set off if there's an issue to prevent it coming down as like a big, solid object, right? And so it punctures all the tanks to let everything out. If they don't, it floats around on the top of the ocean. And then that's like, you know, a problem. They don't want that. So they blow it up. So you got to explain like I'm five years old. So, you know, they decided they couldn't catch it, right? It decided, yeah. It decided it didn't have enough fuel to properly... So then they go over the ocean, right? Why can't they just let it fall in the ocean and then pick it up? Oh, because it will sink. Yeah. Well, I mean, it kind of just floats because as these now empty sealed tanks where the fuel was, they do a soft landing to simulate what would have happened, right, to gather more test data. Yeah. But then, yeah, they don't really want it just like floating around. There's like, it's an area used by ships and other stuff. So they need it to sink.

And it's saltwater. So it's not, you know, they've gotten them back before. They don't need them back. And so they blow up the top of the tank. And then it crushed like a soda can due to like the inertia of the remaining gases leaving the tank out the top. And then, you know, fell into the ocean. Okay. It did explode. It did feel like a waste. Yeah. Yeah. Yeah. Well, yes. So when you listen to employees of SpaceX talk, they say, as an example, the one that they blew up, they already have solutions to a lot of the issues that caused it. Like they're already two or three generations ahead, but they have all these old versions that they still like want to fly. And then hopefully the new versions they'll be able to use over and over again. But they want to move to those. So they want to keep flying the old ones. but sometimes the old one breaks in a way that they knew it was going, was a possibility. But then maybe they learned something else. That makes sense. It's sort of like the rapid iteration, right?

The first version is going to suck. Just get it over with faster is sort of the thing. But if you look at the scale of like how many they're building, I think it's like a first stage every four weeks and a second stage every six weeks that they can build now already. They can churn out a lot of these. and so and something like each launch already so the last one in this one both went orbital so they deployed starling satellites there's something like 10 of the constellation's bandwidth they can launch in like a single launch or something or the equivalent of 10 falcon 9 launches it's whatever it is like huge that within almost like just a year a little over a year they could have a huge fraction of the entire world's bandwidth floating around in space with lasers communicating with each other um wow yeah and they want to be able to like refuel it and send it up again in hours so um definitely cool exciting but just the maneuvers the g-forces the engineering to like

descend through the atmosphere fly it does a very unique they call it the belly flop like flip around and then to have these you know pinchers that it sort of nestles itself into and then it gets grabbed is i don't know just crazy like if you told someone five years ago you're like this is going to happen you'd be like no like here's a video you'd be like uh what and that was after after falcon 9 right so yeah it's amazing all right my second article is um okay so i'm sure everyone out there has heard the name tony robbins i've heard the name i don't think people have you gotta explain it are you kidding or are you serious no i'm serious i think okay Okay. So I heard about Tony Robbins on billboards. Like I would drive to UCF or where I went to college and there was this big Tony Robbins billboard. And, you know, I couldn't tell if this was like a church or like a business thing or some other thing or a politician or what, like it wasn't obvious the billboard, just his face or whatever. And so, you know, I've kind of

seen this, heard of this person come and go. From what I understand, you have to pay all this money to hear this person talk about, which I found out later, to be sales and business stuff. It's not really something that I'm interested in. Then someone posted a video where, and again, it's the internet. Is the internet live? Is it dead? Is this real? I don't know. It looks like an early video of Tony Robbins giving like some kind of sales talk. And in the link, they say this is the same talk that he charges a million dollars for or whatever. I don't know if that's even true, but I watched it and I just thought it was interesting. It's the same way where like, take a genre of music that you have probably never heard, like Bavarian, you know, polka or something, right? If you take like the best Bavarian polka band to ever exist and you listen

to it, it's just interesting for that reason alone. It's like, look, this is the best that this thing has to offer. And I'm just going to be interested in it. Even if I walk away from it saying like, okay, that's still not my favorite type of music. Right. And so this guy supposedly is like the best at this. He charged us money and everything. And it was actually pretty interesting. you know there were a lot of term there's a lot of terminology that he assumed that people knew but I didn't know so I had to go look that up like for example one thing he said just like very quickly he's like we all know this and this and we all know pattern breaking you know to help people close the sale and I was like whoa so I paused the video so apparently pattern breaking is like if you and I are having a conversation and you start saying like, like, oh, you know, my budget is really tight or, you know, the software software these days is so expensive or something like that. Like you can get into this kind of pattern where, you know,

your kind of mindset is there and then you're self-reinforcing it. And so he talks about kind of pattern breaking ways to kind of like change the subject, take over the conversation. And instead of like saying, oh, we're not that expensive, or like instead of like directly attacking the argument, you break the pattern. You see politicians do this a lot where it's like, oh, you know, did you support policy XYZ? Why did you do that? It's terrible. And instead of them like, you know, going into that, explaining it, they pattern break. They're like, well, we have ABC and ABC is so important to this country. And like XYZ, you know, just kind of fell off. Right. And, and, uh, and so, you know, in this, in this video, that was just like, you know, half a second of the video is, oh yeah, we all do pattern breaking. I was like, wait, no, I don't do pattern breaking. So like, I actually, it was really interesting. I went down this sort of rabbit hole of how to sell things to people. Um, yeah, I'm still,

I still probably would be terrible at it. It's just not really in my nature or anything. But it was interesting to see arguably the best person or at least the most renowned person at selling things to people just talk about how to sell things to people So the video is totally free It really interesting I obviously can't comment on whether that stuff works or not, but I thought it was cool. Sales is like its own thing. I've never had to be in sales, thankfully. But I do think like there are sometimes things to learn, even if you don't want to like, you know, be in a high pressure, situation where you're doing sales calls or something. But you do learn, like you said, I didn't know the pattern breaking one, but there's things people do mirroring where if you stand a certain way, they'll stand a certain way or they'll make their accent sound a little like your accent or try to relate to you. You'll notice people and you see it on the street all the time, they will give you something.

Because you've already accepted, then you have this compulsion to give them time of day, listen, whatever. There's all these things that people do. And some of them is just obvious or natural. And then others, like you said, are some sort of handbook that they teach you when you go to a sales boot camp, I guess. And I think there's levels to it. Things with the guy at the mall kiosk versus the person selling private jets. They're both salespeople, but probably a lot similar, but probably very different in terms of what they have to do to close a deal. Yeah, yeah, totally. So, yeah, you could do worse than spending – I'm going to look it up. It's like 20 minutes. 10 minutes, 21 minutes. You could do worse than spending 21 minutes watching that video. I thought it was interesting. And I don't recommend people go into sales. I mean, unless it's your jam. It's not our jam, clearly. But I still felt like it was 21, well, maybe an hour well spent.

I felt like I got a new dimension into it. There's also, he does like a little bit of life coaching stuff too, which, yeah, I, you know, again, give or take, it's whether that's something too. There's another person, Alex Hormuzi, who does YouTube stuff. If you ever come across his videos, he's in maybe a newer generation of what I think that sales stuff is. He talks a lot about like, I don't like it that much, but I do listen to every so often because there are nuggets, you know, like, oh, this is so outside of my normal, you know, I can't speak to him as a person, but like, this is a way to think about, you know, he's very focused on like money. Like, this is how you would make this much money with this much breakdown and target these people in this way and having a plan. And, you know, some of it is common sense, but seeing how other people build frameworks for something that you wouldn't naturally think has like a framing to it. It just feels when you're in a sales conversation with someone, it doesn't feel like they're, you know, working through a script, even though they are. And when it does, they're not doing, they're probably not doing a good job.

Like they're probably not a good salespeople, good salesperson. All right. My next topic is the C++ 26 approval failed vote. There's like a lot of very specific terms for C++ standards committee and I probably didn't get them all. So I apologize. But I found this to be really interesting. There's every so often some, you know, I don't want to say esoteric, that sounds some corner of the internet where people are having like very thoughtful opinions and debates. And this one flared up. And for some reason, I saw it several times. So I figured I'd bring it up here because a little bit interesting, which is just about there. How do you take something like C++, which is massive, and have these standards committees where there's different, you know, companies represented, countries represented, interests represented, right? You can kind of cut it in a lot of different ways. They all need to get together and approve, right? Like you have people who use C++, but then the people who build the compilers, the people who build tooling, the people who build libraries, it is not all the same people, right? And you got to kind of like

build consensus. And how do you go about that, right? Crazy. It's not a personal interest of mine, but very cool that there are people out there doing this work. And in the latest version of the C++ spec, there was a proposal that seems to be what is causing the issue around contracts and around, I didn't know what that was. I had to look it up too, even though I use C++ all the time. Just basically establishing sort of like asserts, right? Like before, like, hey, something coming into this function needs to meet this criteria. Stuff coming out of this function needs to meet that criteria. And then establishing a way to deal with when that's not true. Is it a warning? Is it an immediate crash? Is it a go to an error handler? Like, how do you want to handle this? And how do people implement against, you know, such stuff? And obviously, like, you know, there were differences in how people who are very core to early C++, right? And sort of like their

opinions versus like the opinions of the committees and people sort of like getting, I didn't know, I guess the folks putting forward like the new proposals, like go to each of these subcommittees and like make technical presentations and do Q and A and like try to like explain why the proposal is good and try to convince them to vote. Right. So this whole process, which is like super fascinating and I knew nothing about it. So I assume this happens for lots of other languages, you know, as well. And even things like, you know, Linux, like open source projects. But just to see a little bit of a glimpse of, you know, how it's run, how it is run and what it does. And then like out the other side as a user, you just like, in theory, sometime down the road, get new features. You get like a new compiler, you get new features and there's like more stuff to do. Yeah, it sounds like they need Tony Robbins to get their contracts through. But yeah, I wonder how does someone get started in this? I mean, you have to probably just be really passionate about one language and get ingratiated in the community

and it's probably almost like a monastic exercise where you have to just really put in the hours. Yeah, I think there are big proposals and small proposals, right? Probably proposals for tweaking something or some improvement or bug fix or something. And then there's probably the really big ones. And then it's, yeah, like you said, it's probably the people who have been there a long time really pushing for ideas. But man, if you've ever tried to get a bunch of very technical people to agree on something which doesn't have a technically yes or no answer, it can be fun. It can be an interesting thing when it kind of just comes down to like, we don't know. There's no clearly correct answer here, but we still need to make progress. Yeah, it's wild. I'll have to dive deep into contracts. There already is like a lot of, I don't want to repeat because I'll miss the nuance of it.

But if you want to go read it, there's a subreddit every so often I see it. And it's just, it's one of these like, what in the world? But it's hilarious. It's like hobby drama, which is like somebody in some weird hobby, like it could be knitting. And there'll just be drama of like, oh, there was this thing about knitting patterns and attribution and whatever. And someone will just like write up this whole thing about it. And you'll just learn that in some super corner of the world, there's like people just so passionate about, you know, some just absolutely random thing. So if you've never seen that, maybe it's just me that I know it's not schadenfreude. It's like enjoying sort of like the fact that there's people who just get, you know, drama about literally anything. Yeah. Yeah. I mean, I used to be in like a bunch of volleyball leagues and none of them, you know, were professional or anything. And there'd always be drama every single time. No. That was more, Jason. We need the tea.

We're just here to play volleyball for fun. I mean, most of the drama revolved around, like, people would want to be in the more competitive league, and they weren't that good. And so, like, you'd have, like, this could go in every single, just think of every decision in the decision tree. Like, you can go down. So, the people go into the competitive league, and they get totally blown out, and then they're frustrated and whatever. or it's like the people don't get in a competitive league and then they're feeling like they were wronged in some way, they weren't given a chance, and just all that. I mean, just the whole thing. It really, like, that part of it really, you know, because it becomes like a social hierarchy, right? It's like, you know, if you get into the competitive league, well, like, you're also kind of a cool person, you know, in the unprofessional volleyball community, right? So it's like people want that.

But then it's like no one wants to lose either. So it's like a no-win situation. If you ever go to a race like a 5K or 10K or socially bigger, they group people by like what time you think you're going to finish or how fast you're planning to run. To me, this is a microcosm of what you're talking about. Where do you stand? Because is it the ideal dream day, what you're going to run? Is it what you've most recently run? Is it what you're running right now? oh, it's just funny. And then what it turns out is nobody lines up where they're supposed to. It's just chaos. Yeah, I have a friend whose wife is a big runner. She has a bunch of marathons. She has a personal trainer and everything. She's really into it. And he told me that the last marathon she ran in front, like before the elite people, like the very first people were no joke YouTube influencers. So literally the start of the – let's just say the Boston Marathon.

I don't know if it was that one, but let's just say it was. So the start of the Boston Marathon, first people to cross the start line all have like GoPros. They're holding their phone up like, oh, I'm running the marathon. It's so cool, blah, blah, blah. And then like I don't know how this works logistically, but then like the super elite people go. And I'm assuming they just – it's like the running of the bulls. They just trample those people. That's how I like to imagine it. oh if only we did video and not just audio we could get trampled yeah yeah get trampled by elite runners you could say i was running faster than insert also relatively unknown people because no one knows runners names yeah yeah well i don't think it's so you run fast you say i was ahead of them oh okay well yeah yeah i crossed mile one before they did yes but you know there's no way last past no there's zero chance that's not happening you crossed the first light pole after the start line well it depends on how much gap there is between the influencers and the elite

if they leave people have to wait 15 minutes you could probably still be ahead of them a mile in i don't know maybe yeah 15 minutes yes i'll give you if it's 15 minutes yes all right way to go to book at this show i've been reading a book called the never hero which is the first in a series called the chronicles of jonathan tibbs by t ellery hudges and this is interesting because i have no clue where i got this book from so like i as a result i'm like listening to it on audible so i must have gotten an audible but i have no clue when why where and i don't know why i chose to listen to it like i cannot explain it but like i was in the car i had finished up the book before and I was like, okay, I need to start a new book. This is the one I have downloaded. I'm just going to start this one. Past me must have had a reason. And I was looking before the show and I looked on like Goodreads. I'm almost done with the book now. Like looked on Goodreads, like so few reviews. Like normally all the books I read or listen to

are I guess, you know, like somewhat popular. You get that robustness, right? It's like a thing. If you have a rating, even if it's five stars, but it's like 10 people. And if something that's 4.1 stars, but 100,000 people, you know the 100,000 one is much better yeah um but this one's like not a lot of reviews like it's so few reviews I think a couple hundred or whatever instead of tens of thousands like normal so I literally have no clue why this crossed my like path and why I have this book that being said it is an interesting book it is a what I'll say is a light-hearted take although there are some interesting concepts about um you know I know I try to avoid spoilers but basically like a guy through no choice of his own um needs to become like a hero um but he's only he's like a hero with like a sort of forced secret identity um and so you know he's kind of like dealing with that and the the sort of angst about like why he didn't have a choice in it and sort of like how is he going to deal with it like how are what is he going to choose to engage with the people around

him or not and there seems to be some you know other intrigue but in general a very light book that's weird for like a review just sharing the book I'm reading it is a book and I am finishing it so that's a pretty good thing right like I don't know how to rate it yet yeah it's definitely not going to be memorable but like yeah exactly so it's got to be worth some number of stars right have you seen the anime One Punch Man I know of it but I have not seen it it's giving me One Punch Man vibes you know where it's also did not want to be a hero. Well, it's just this unwitting hero who is just insanely powerful. The interesting thing about One Punch Man is it kind of touches on something where you see this where someone might have all the money in the world, but what they really want is social media clout. And then you have someone who's YouTube influencer and all the money in the world,

but they don't have a wife. Lex Friedman. And then there's like, then there's like, there's like, YouTube influencer, all the money in the world has a wife, but then doesn't have this. So then that, just like there's always another currency, right? And so one punch man is funny because, you know, he's in this superhero academy and he could just kill anything in one punch. He's like infinite strength. But what he wants is popularity. money and like somehow he can't get any of these things and that's kind of the spoiler alert. Can't punch the side of a bank vault and just get the money? Yeah that's the thing. I mean he I think if he could then we would lose the message of the story. The moral story is like there's always something you can't get. But you're totally right. There's a ton of plot holes his moral obligation to not rob the bank yeah got it yeah that's right i think it's like he has no

agency like he doesn't he doesn't have the agency to uh to rob the bank but he can only punch that strong when it's morally right yeah he just doesn't have it in him to to punch the bank vault yeah or a statement on reserve fractional banking and that the vault is actually empty oh man that's amazing okay sorry all right my my book is uh in um artificial intelligence a modern approach you've probably read this book do you take an ai class in college i did not no okay so this is the book i read this book when i took my first ai class i mean it was many editions earlier, but this is like the AI book. I'm actually switching. I was teaching data science at UT Austin, and next semester I'll be teaching AI. I'll be teaching the AI class. It's just called AI. So there's a lot of AI classes in the department. There's machine learning,

there's data science, so I'd consider an AI class. But I'll be teaching like the AI class, And this is the book for the class. And so it's been, you know, 20 years since I read this book. So I actually I got an AI. It's Vox CPM2. This is a text to speech open source model. I got Vox CPM2 up and running on my desktop. And then I also asked AI to take all the figures and the equations and say them phonetically. So if there's an equation, you know, in LaTeX or something in the book, which I have a I bought a PDF version of, then it will actually instead of just, you know, doing text to speech directly, you get something bogus, you know, like Sigma, you know, N equals one or something like that. So it basically says what the equation is. It translates it into like normal human speak. So there's this first pass that translates all the text and normal human speak.

And a second pass that texts the speeches, the entire book. And it's something like 40 chapters. I want to say it's like 39 or 40 hours long, this audio book, maybe more than that. But I've been kind of going through it on audiobook format and just, you know, kind of refreshing my memory. So every time I go run now, I listen to this book on 2x speed. And so within, what, the next 20 runs or something, I'll have it. But this is an amazing, amazing book. If you're interested in AI, this is just such a phenomenal resource. It's so well written. And Norvig, who wrote the book, was my boss at some point. He was my boss at Google. Well, my boss's boss. So he's a super nice guy, too. And they just wrote this in, I think, 2022. So they missed a lot of the agentic stuff of the past few years.

But I think they wrote it recent enough that there's some mention of ChatGBT in it. So don't expect the very latest, but it gives you an amazing foundation into AI. And they have a lot of free resources, too. Yeah, I feel like the number of people maybe interested in AI has just got to be so vastly different today at like a different level. But, I mean, there's always been some amount of – and I don't – maybe you know better. There's not like a good, other than like the hyper-specific terms, doesn't feel like a great hierarchy for us. We're trying to explain this in the day, like things like now, like old school image processing, you know, convolutional neural networks is like, oh, that's, that's, you know, now we use VLMs or we use this. And it's like, well, I mean, there's tools in the toolbox. But even then before that, just stuff like, and I don't know what this book covers, but, you know, like hidden Markov models and stuff like that, right. There's like these like layers to it and, And kind of working your way up the tech stack feels still valuable for people who want to be at a certain level of practitioner in the space.

But yeah, now it feels like AI just becomes equivalent to like LLM. Yeah, I mean, it's such a good point. I mean, the book has a whole chapter, for example, on CSPs, right, like on constraint satisfaction problems. And so, you know, you could imagine that just being everywhere. And, yeah, you could tell an agent, like, here's my problem, code up a solution. But then you're pretty beholden to that agent understanding your problem specifically enough. You know, it might, like, hard code a bunch of heuristics when what you actually need is a CSP. And so even just knowing the terminology and knowing it at a superficial level is really important. so you can kind of guide a tool to build the right thing for you or just know what's solvable and what's not. When someone presents a problem, you want to be able to pretty quickly say, yeah, we could get this done. This will take some iterations.

Or on the other end of the extreme, yeah, it's totally incomputable. There was this issue about a year or two ago where it basically wanted – they have these RFPs, like requests for proposal. So it's like, oh, we want someone to build a roof for our school. So we put out an RFP and then a bunch of roofing companies write the proposals that have been requested for. And this group was like, hey, can you just like given an RFP, just go on the Internet, like find all the companies, like automatically contact them, negotiate and then submit the proposal, blah, blah, blah. And it's like, okay, you know, that is really, really hard. There's a bunch of ways it's going to go wrong. And you kind of have to have some of the experience to know, like, what is tractable, what's intractable, and what sort of unknown pitfalls there'll be. So this will give you the broad knowledge in so many different areas that then you can kind of speak intelligently about that.

It's kind of like the equivalent of programming throwdown, but for AI. you can get the rfb thing to work man just feed it the tony robbins video oh man it all comes full circle so but there is also some evidence at least for now that when you speak at a more expert level that the sort of outputs of the alarm shift and it's not clear what's going on it's maybe not like a long-term behavior but at least Now people seem to, to your point, if you can express that you're a sort of domain expert, you may get a more domain expert level sort of output. Yep. Yeah, that's right. I mean, the AI will ask you questions, I noticed. Like if it feels like you're an expert, the AI will be more likely to ask you questions and ultimately reach a much better solution. Crazy. All right. Tool of the show. Mine is a video game. That's my tools.

I really like your video game tools. Okay. All right. Good. Well, because it's been a permanent fixture for a very long time now, so we should stop making the joke. Oh, the only one that disappointed me, for the record, is Tectonica because the developers abandoned the game. I don't know if you know that. I was thinking about that the other day. Yeah. Yeah, that would be the point. I want to go back. The first like 15 hours of gameplay that actually made it worth it So it still worth buying but just expect the game not to end I was thinking about going back and playing it and then I was like yeah I don think they ever got an ending Oh, we should use AI to, like, somehow reverse engineer the game and put an ending in. There you go. Yes. Oh, man. What are we doing on this show? We need to get up there right now. I don't know. I went back to play Dyson's Fear Program, and now there's all these, like, really hostile aliens trying to, like, make me stop. And I'm like, no, I don't want this. Turn this off. Yeah, I turned that off. I started a new map with that game without the aliens because I'm like, I just want a cozy game.

Yes, okay. You and I are the same. All right. This one is not exactly a cozy game, but it's a little bit cozy. Dome Keeper. So Dome Keeper I came across, I don't know, in one of those like, you know, funny, sort of easy on your computer because, yeah, see the previous GPU RAM crisis. you know, easy on your computer indie games. And I started playing. I was like, honey, I was playing on my computer and then on my Steam deck a little. Anyways, it just released on, I think, Android and iOS, or at least definitely on iOS. I picked it up there again, which is rare to pick it up again. And I've been enjoying playing it on my phone. It's like just easy enough to where you feel like you're good at the game. And there's like some sweet spot. That's where I want to be. And I don't want one of these games that is like, you know, so impossible. and, you know, yeah, you're going to get, like, a cool story and an example, but I can't be too hard. I got to feel like I'm good at it. Yeah. I don't care if it's babying me. Keep me in the sweet spot, man, where I feel – and this game is doing it for me where it's, like, plays long enough.

I'm, like, building up a good engine. You're, like, digging the ground, and then you're, like, finding things, and you're bringing them back. It's got that loop where, you know, I guess, like, you know, you kind of just do the same game loop over and over again. It's just long enough. And then the game always ends, you know, leaving you feeling like, I kind of wanted to build a little bit more I kind of wanted my guy to be a little stronger Anyway Is it a roguelike? It says it's a roguelike so do you die In permadeath or what? I think That word I mean I don't know What that word means anymore It's like you play You either win or lose And then at the end you've like Get more unlocks and then you're like Unlocking and then you play a game and each The chain is procedurally generated, but it kind of has a bounded. You will either die to the enemy by not leveling up fast enough, or you will beat the final boss, and then you'll get your rewards at the end. All right, I bought it. I'm so convinced that I spent the $10.

I got it on Android. We'll see how it is. Okay, well, I guess I'm going to have to zell you $10 if you hate it. All right, sounds good. Rip to me. Good thing crypto's up. wait is it no it's tanky oh it's way down yeah I was like oh man so Lindsay constantly tells me to sell the bitcoin and then today she was like you should have sold it and I'm like well here's the thing you were telling me to sell it for the past decade you know so don't give me this today you know yeah it's down the thing is you just forget the keys and then you can't sell that's true yeah yeah I can't sell something that's not mine anymore. Joke's on you. I'm a millionaire on paper. Oh, man. All right. My tool to show is temperance, which is a thing that I built myself with AI. So basically, okay, so my kids are, in my opinion, like pretty well disciplined.

And essentially, if I ask them to do something, they'll generally do it, and they're generally good-natured, but they lose track of time. So it's constantly like, hey, how long have you been on video games? How long have you been on YouTube? It's like, oh, five minutes. It's actually been like an hour and a half, right? Yeah, try again. So this is a home VPN. So I installed this on a Raspberry Pi, which is running actually right next to my foot here. and I installed this VPN on all my kids' devices. And basically, this routes all the traffic through the Raspberry Pi. Even if they're at a friend's house, all their internet traffic is going through this Raspberry Pi right here. And because of that, I can limit things down to the minute. So I have it set up right now where my kids get, I think it's like 30 minutes a day of YouTube or I don't even know what the rules are, but some amounts of time on YouTube and video games and all that.

And you have this nice admin screen where you can go and tweak things on the fly or give bonus time if you want to do that, turn it off if you're on vacation, these kind of things. So I basically built this whole thing just with bi-coding. And I got into this habit where anytime anything went wrong or I didn't have a feature I needed, I just went straight to Codex remote mode on my phone. I was like, hey, add this feature, add that feature, and then push a new version. And I'm at the point now where I haven't touched it in months, and it's been rock solid. The whole house is on it. All the kids' devices are on it. And it's been wild. So, I mean, you can just build things now, and it's totally free and secure and everything. So if anyone wants, they can just download this. If you have any issues with it, feel free to send me an email, and I'll go tell the AI to fix it.

The only problem is Raspberry Pi has cost like a billion dollars now. Yeah, yeah. You need a computer that's on 24-7 to run this. So, uh, actually I think only the high Ram variants are, are super expensive, but also like all the parenting stuff like you're talking about, to be clear are, uh, not yours. I mean, yours looks like it has a GitHub link, so it's appears to be free, but most of them they charge like obscene, like 49.99 a month subscription to do maybe half of the features you're saying. I would not know where people get away with that. Yeah. My, my initial, my initial, uh, you know, when, when this came up, my wife's kind of exasperated that she's like constantly having to keep track of these times. I was like, yeah, let's just go buy something. And I looked and yeah, they're all like obscenely expensive. There's one called circle. There's another one. I can't remember the name, but they're all like, yeah, 40, 50 bucks a month. And I'm like, well, that's like my, my, uh, you know, Claude code and my codex subscription, chat to ET subscription are combined less than that. Right. So it's like,

So, you know, I think it's kind of like, okay, these companies need to sustain themselves, right? Like, I'm a dude. I can just run it for free or whatever. These companies are like, they need a sales team. They need everything. So I understand why they have to charge. But also, like, the people who are most impacted by this are people who, like, cannot track screen time because they're really busy. They're trying to work at the laundromat or whatever. Right. And so those are the people who need this the most of people who probably can't afford it. So there's a totally free version. I was even thinking about somehow. I mean, if the freaking RAM prices come down, I was thinking about just making something where for some really nominal fee, we'll just mail you a Raspberry Pi with this thing ready to go. You just plug it into your router and you're done. But yeah You folks should try it out if you have kids

Or if you want to regulate your own YouTube If you feel like you're out of control Then You can go grab this thing Five minutes That's probably five minutes Let's just say that it's just five minutes It's always five minutes Okay this is one more rant Before we get into our thing YouTube YouTube means so many different things When you say your kids watch YouTube or whatever um and then when like my kids do not like if i'm gonna sit down and watch youtube my kids will not sit with me because uh like it's gonna be they're like oh it's a documentary oh whatever and i'm just like and i'm not saying i'm better whereas i just like for me i just love the fact that there's so much to learn and i i can't i just know it sounds bad i can't stand like the vapid you know just like right i don't influencers or whatever i know no but like maybe these people are influencers i I don't know. Like talking about SpaceX launches. Yeah, great. Let's do it. You know, like in depth about how the full flow engines work on the, you know, new Starship.

Yes, let's like I'm here for it, you know, but even like we're so there's one channel I'm really into. The guy talks about like building like high vacuum refrigeration systems for like DIY like chemical synthesis. I'm never going to do that. It's not terribly dangerous, but it's amazing. And it's so weird that like, I don't know, it just means so much different to so many different people. Um, and my only, and it's not your thing. My only thought is like, if my kids want to sit and watch, like, you know, it doesn't even have to be like super edgy. It's just like something that's like maker sort of like, you know, educational. I'm much more loose than if they're just watching, you know, like the guy play video games. Like, you know, that's okay. But like, maybe I want a tighter tolerance and we just don't have a good way to like deal with that. Yeah. You hit the nail on the head. Exactly. When I turn on YouTube, it's always something like that. I saw this guy who was explaining how artificial flavors actually work.

He had a chemistry set. He was making orange and other flavors and stuff. He was like, yeah, that would be interesting. Educational. I'm totally down for that. But it always degenerates into just the dumbest stuff. like, you know, just like, it's a lot of like listicles. It's like 20 things you didn't know about an airplane. Oh, airplanes. All is tech gadgets. Yeah, yeah, it's like airplanes have 20 windows. And it's like, it's just like these mindless things. And I just, I feel like it's, in a way, AI is kind of similar where like a few people will do some great things with it. And a lot of people will use it in a way that just kind of sucks away their time. And we kind of saw that with Facebook, too, social media. And we're seeing with YouTube. So it's just kind of a recurring trend. We have to figure out how to make sure we're getting value and not giving away our time. Okay. Well, next chapter in old men's dream at clouds.

That's right. No, no. Okay. Well, PSA over, I guess. That's right. Let's talk about testing our agents' code, Jason. We talked about how AI is going to save us all. That's right. No downsides. No downsides. So how do we test the code? No one's lost their job. It's been perfect. So, well, okay, Patrick, before we go into testing, so I pretty much don't write code anymore. I instruct the agents in English, and we have discussions, and we build plans, and sometimes they come back with questions. How do I want to do this? It's like choose your own adventure now instead of writing Python or whatever. That's kind of what's happened with me. What's the situation with you? Is it similar? How is it different? I think it's similar, but I think, you know, I don't know. I mean, I know where vibe coding came from, but I don't know what it means. So I think for me, it's similar to what you're saying, but I want to review the approach.

like I have opinions about the architecture. I do not want to not know what the architecture is. So I feel like the way I've settled on it and it's varying degrees of the simplistic view is it's sort of like I want to be able to explain the code that was built. And when I say explain, I don't mean that I know the specific lines. I mean, I didn't even know the language. Like I've written some stuff. I had the AI write some stuff recently in like a language I don't know because that was like the best choice. but what I want to know is I want to know like what approach how was it architecting it where was it sticking the data like what did the flows look like at a high level what algorithms is it choosing and and engaging to kind of like what you're saying like at that level it's hey I'm going to check your outputs I'm going to check that you work and at some level I will sometimes skim the code not read the code but just like hey does this look valid but as an example some people have started pruning out comments. And I actually think that AI, letting the AI put in really long

comments for future like turns and cycles seems to be effective. Like it seems to be good that the agent leaves notes for itself. So, but that makes it harder for me to read or use, but I've become okay with it. Yeah. Same. Um, okay. So, so, um, yeah, so testing has become, you know, super important. And if you just naively tell the AI, you know, test the code, what typically happens is you get really high test coverage, but semantically, you're not really testing anything. So I'll give you an example or like a metaphor. So I love this metaphor. I keep going back to it. Imagine if you're in an alien prison. Actually, the person who told me it's the first time said a Chinese prison. I'm going to say an alien prison. So imagine you're in an alien prison and you communicate through sheets of paper that are passed underneath the cell door.

So you get this sheet of paper under the cell door and it's got like a multiple choice question, but it's all written in alien speak. And so the languages are all, the glyphs are all just unintelligible, right? And so maybe the first day you check the first box, slip it back under the door, nothing happens. You're getting really hungry at this point, really thirsty. Second day, this form comes, you check the second box, and then food shows up. They put food. Third day, you check the second box, more food shows up, right? So you start learning associations, but this page full of glyphs, you're not really understanding the language. you're just starting to learn kind of like the causal nature of those actions. Right. And and so I think that when you ask the AI to just test something, what you get are, you know, things that go through the code and make sure that that line of code is

executed and the test passes. But it's not really understanding what's going on and testing, semantically, you know, deeply understanding that. And so if you then change that code, the test will just break because it wasn't testing kind of the meaning of that code. And so then, you know, the tests now just get updated when the code gets updated. But because it's this sort of, you know, memorization, your app still has problems. You know, it's like it's like to just explain the extreme example, you know, you have an addition function and then you have a test that's like passes one and one and gets two. And and then later on, like you introduce a bug and one and one plus one equals three. And so they just change the test so that one plus one is three and everything's passing. It's like, no, that wasn't the point.

The function wasn't supposed to do that. So we need better ways to test, and that's the purpose of this show. Yeah, exactly. I mean, you pointed out with the first one, which, you know, just trying to come up with the artificial structure, I'm sort of saying is like closing the loop, right? It's like you ask for some code, it's going to do some stuff, and then, you know, you want it to test. And the first level there is the unit test. most of the like AI agents today will write lots of units and are very happy to write unit tests but as you mentioned if you say you know hey I want modulo division function right and it for some reason just implements regular division it's also just going to test that regular division works or not test the modulo part or whatever and then like you said you try to correct it later on and then it's like oh everything's broken and then now it's like kind of in a bad state right because it's like were the tests right is your words right is your whatever and you know people used to look at the thinking thinking logs

now with the closed models you can't see the thinking logs and even is that true i thought that was just the setting that i had set wrong but yeah they hide them to prevent distillation attacks they're encrypted so it sends you an encrypted like thing so that you can send it back for context. Um, but, but you aren't able to decrypt them. Wow. Okay. That's interesting. But the open source models, that's not true. Open source models, you can see the thinking blocks. Got it. Okay. But, but the thinking blocks are useful is another question, right? Sure. Um, but it's, it's unclear exactly what they do. Um, but, uh, yeah. So like when it's going through this you can kind of imagine the same tension that a human would have like okay did i misunderstand what they said what like what is there as weight like it takes it as and you'll see this like it sort of knows you don't want to spend infinite tokens so it kind of tries to stay with what's there but that gives it this like prior and so having bad unit tests is not great to be honest

and you have to be super careful like it will write lots of them i'm not going to say i tell and not to write any, but I also don't, like I literally give so close to the value zero for it writing unit tests. Like I can't tell you like that I, if it didn't write it, I don't know that I would really care. Just because I don't really find that it like matters a lot. And we're going to talk about other kinds of tests that I become more reliant on just because, and to be honest, like unit tests have always been good, but it is probably as hard or harder to write good unit tests as to write good code. Personal opinion. No, totally agree. If it can't write good code in the first place, it probably can't write a good unit test. Yeah, yeah, totally cosine all of that. Yeah, all right, let's jump into what's better than unit tests. I mean, the thing that I think, you know, what you want ultimately is a decoupling. So, for example, let's take our adding example.

you know if you had a table of operands and their sum you know that came from a reliable source then what you'd want is not necessarily a unit test but you'd want to just run through that table of known sums and make sure that you get the right answer and so this is a it's kind of a regression some people call it a system test has different names um i'm sure testing people are like throwing their hands in the air because they know. Oh, no, no, no, they're not listening. That's right, that's right. They tuned out a long time ago on our 14th language. They're like, these people can't test anything. Okay, so yeah, I mean, that's an example where you have some authoritative source that's telling you, not in terms of code, but at a really high level, what the input and the output should be. And you run against that source. So in reagents, for example, we had an environment. So it was a dynamic source in a sense. But basically you had to

invert a pendulum and keep it inverted, keep it balanced and solve a little grid world maze. If your branch couldn't do that, then your PR was rejected. And so that's a regression test or system tests are a nice way to add external information so the AI isn't just reinforcing its own mistakes when it writes the unit test. And an extension to that, I'll say, in my opinion, or my experience, is sort of human in the loop. And what I don't mean is what Jason sort of started out at the beginning. It's not, per se, humans reviewing the code because it's not really scalable. It can work, but what I mean is in a lot of these cases, Like with Jason's example of having a table, what I've taken to with human in the loop is saying like, hey, let's make a golden data set. And we're going to have two tiers of it, one that I reviewed, one that you reviewed.

And then, you know, the unit tests need to pass both. And so the one and it kind of knows, right, you could always violate it, but it's supposed to keep the ones that I've reviewed in like top regard. Right. These are the ones that are like, hey, these are inviolable. inviolable. Everything else in the system can change. These cannot. And the goal is to get as many of those to pass as you can. You do have to be careful if the specifications change or it's really complex and you realize you need to improve it. It can be a double-edged sword, but I've found it to be enormously valuable to make progress, take a pause and say, hey, I'm going to judge your outputs. If it's a design thing, which I'm not a big design guy, but hey, this page looks good to me. Like I want to make sure we use this as like a baseline. Like we should judge against this, right? Some point in time that it can anchor to as it sort of does like a grid search, right? Sometimes the LLM just goes into like a grid search mode and like you want it to like have an anchoring in that space.

Yeah. Yeah. It's a good point. Yeah. When I'm doing the, when I'm doing agentic programming, I'm constantly getting metrics and then telling it what I'm happy with, what I'm unhappy with, and directions I think it should go in. I feel like I'm just busier than ever, honestly, and more productive than ever. But, you know, this idea of like, you know, we're doing some robotics work in my current company, this idea of like, just telling it like, hey, go, go build the robot and make it do everything. And just come back a month later and it over Right It not like that at all And you know so I constantly looking at the graph saying hey like this thing this number is looking good This other number is turning in a bad direction. Hey, do you think that we should monitor this hyperparameter in real time for maybe every 15 minutes and start modulating it? Because, you know, I feel like that could be,

that would be a good idea. So being in the loop is super, super important in development. And I think for testing too it's like what exactly are you testing um for example with temperance you know it's got a um an admin interface and one of the things i noticed was um it would have buttons or like links that are literally like one pixel wide because they i'm not clicking on these things right i mean it's using playwright and it can just go to exactly that pixel and like click the button It was totally broken UX. So I went on there and I said, okay, every link, nothing should be overflowed. If you see any overflow, that's a problem. You need to fix it. Every word needs to be fully visible. And I only noticed that because I tried the app. So the AI would have never, you know, like on its own realized that sort of human HCI kind of issue.

Yeah, this thing you mentioned, like metric choosing and like limit setting, I don't know how to like talk about it. Something I've tried to express is some people say, and I don't know, like they really struggle with getting the AI to help them with the coding. People are like really accelerating. You know, it's been difficult to figure it out. but this thing you said, like checking in, like making sure that it looks okay. But as an example, you know, I'm not using your temperance app, but I could imagine like in my experience, what happens is like you say, hey, I want a 30-minute time limit. And then it decides, okay, it should be 30 minutes plus or minus 10 nanoseconds. And then it's like, oh, my gosh, I went 30 minutes and 15 nanoseconds. Let me go write a custom assembly timer that runs in the background. Like it'll go off into some wazoo. Yeah. And then you had to be like, whoa, whoa, whoa, hang on. Like, I know in the system one second is a ridiculously large amount of time. So just do 30 minutes plus or minus one second. But even if you didn't know that, just simply saying 30 minutes plus or minus,

or just plus, 30 minutes plus five seconds is your sort of, like, upper threshold, then you're going to, like, immeasurably, at least in today's, like, improve. And that one may be, like, ridiculous. Like, maybe it sort of, like, would do okay. But I see these examples constantly where it's such just like impossible thresholds, either too loose or too tight. And the same thing with running like these evaluation tests, you have to tell it like you've been going 30 minutes. I expected this to take like two or three. You need to be testing less data. Like your iteration cycle is too long. And they know that like they can run timers. They'll say, oh, OK, like I need to cut the data size down or eliminate these things. because otherwise you'll end up killing like 12 hours. Like, what was it doing? Oh, I was rendering a 64 by 64 pixel image by like first creating a world simulator for a camera or something. And it's like, no, that's not what I wanted. Yeah, I mean, in general, the biggest problem that these models make

are just category errors. You know, it's like, I'm going to tune this knob, but actually the whole approach is broken or going the other direction. And what you really needed was to lower the learning rate. What you actually did is rewrote everything. So it's like that's just a chronic issue. So, yeah, another thing that was inspired from Temperance was storyboarding. So what I ended up doing, which helped a lot for the Temperance app and for other apps I've built since then, is that AI is really good, actually, at visual design if you give it videos or images. And so I basically will say, like, hey, look at the app. Think about what an average person is going to do in this app. Like, what are the 10 or 15 most popular things that someone's going to do? in this app, you know, create a markdown kind of script. I actually tell it to create a script with actors, you know, give them names of like users and write this whole storyboard play

for these 10 or 15 different actions that are going to happen. And then for each one, you know, do them in the app, record a video, and then look at the video and look at the UX and the design? Does it look correct? Is it aesthetically pleasing? And that actually helped tremendously. Some people say, oh, the thing that humans can do that the AI can't do is taste. But I kind of disagree with that. I actually think the AI has better taste than a lot of designers. I think what the AI struggles with, again, is category errors, at what level of granularity to be operating. And there's just forks in the road, right? Anytime you build anything interesting, you encounter critical decisions. And I wouldn't say the AI is even good or bad at that. I would say that it doesn't do what you want it to do. You have to instruct it. So if there's some

critical design decision, should I make a progressive web app or should I make a native app? Well, a lot of that depends on factors that haven't been fed to the AI yet. And so as a person, you have to think holistically about the problem and decide that answer yourself. So what people are calling taste, I think, is really more just having a – it's just aligning the AI to your vision. and your vision is inspired by a lot of sources that the AI doesn't have. So that's where storyboarding really comes in, is you can operate kind of at a high level. The other nice thing about storyboarding is it's independent of the code. It just runs your system and collects that video. And then at that point, you know, it can start making code changes. But it's, at least in the beginning, it's totally unbiased by the code or the architectural decisions that were made.

I think to the point you're making there as well, like having just any way to make sure that some part of your system can be put into kind of what the human ends up seeing. So sort of past like the unit test, which is, you know, hey, I have a function. I'm testing this functionality at like, you know, that low level. Once you start getting into some of these higher level systems concepts, making sure that you support a framework, whether that's playwright, like you were saying, where you can drive the sort of like web browser interaction or whether it is sort of just rendering out some of your data or some of your concepts as like a bitmap image or an SVG or a graph or whatever. and then telling the LLM either at the complex, not like spin up a sub-agent to review these or produce them and put them in a folder for me to review. But ideally, using the LLM, and a lot of them are multimodal, but having the multimodal be able to take a look at it

and give it a first pass. Do you think this looks great? That is very quirky. It's a fuzzy boundary. Sometimes it'll do just amazing things and you'll see examples of this on the internet, like someone points their webcam at their robotic arm and be like, make it move and grab the chess piece and it just keeps iterating until it figures it out. But other times you'll just find it's not really working and you may have to try to change up either what you're asking it or what you're telling it, what the prompt is, what level you're judging it at or what stage. But in general, if you can get it to where, they call it that long running sessions and there is like a limit to where you sort of run out a runway and and you know the sort of like hallucinations build up it just becomes cruddy but there is also a limit where you can have it iterate while you're away and allow you to scale up like jason said in some ways once you start getting four or five of these longer running things going it becomes really hard to like

keep track on them all so making sure they can sort of like iterate themselves for a time period and get through a lot of the early gaffs, it's very important, very big unlock. Yeah. I mean, another thing the AI agents are not that great at yet is knowing when to finish if something doesn't have an explicit termination. So if you say, you know, get 90% units as coverage, well, then it will be diligent enough to just keep iterating. But if you say something like a storyboard example, if you say, like, come up with some storyboards, it might make three, it might make five, it might make one. And in general, like, when you speak, you know, more abstractly, it doesn't really know how to terminate. So I think having, you know, having a really clear kind of evaluation baked into your question, I think, is super important. And you can even have, it could be a separate LLM, it could be a sub-agent, but you could actually have an LLM kind of judge the completion of the first LLM.

And I found that, you know, spending a lot of tokens on the am I done yet question can lead to something that actually finishes versus something that gets you kind of half of the way there. And then you're constantly kind of having to mother hand this thing. yeah it i do this point you make is is is very important as well like if you're asking for like hey i want performance improvements mediocre if you say like give me at least three ideas for how we can improve performance or you know whatever like it it's so much better so much better to tell it like some specific number i don't think that works in all cases it it is really weird like it's mine when I use Intenta give me like time estimates like oh I estimate doing this code will take a day and I'm like I don't first of all it's bs I know you'll be done in like 90 minutes but like what day are you talking about uh but uh it's telling it like you know hey I want you know to

your storyboard example like are you looking for 100 are you looking for 10 are you looking for two like giving it a number or a number range is like it is a big uh superpower yeah totally so so now we get back get into the concept of verifiability um and uh this is i think super critical um you know there are some tasks where there's really no limit i was talking to a buddy of mine and he uh had this cool thing where he took a bunch of photos of his house and he's not an architect or anything he literally just took a bunch of 2d photos didn't even really save the pose of the camera or anything, and then gave it to one of these models. I think it was Astra or one of these models and said, hey, like, I want to make a 3D model of my house in Blender. And basically, he kind of, he had these reference photos. So he's like, I want you to use Blender.

I want it to be 3D. I want you to be able to navigate, et cetera, et cetera. But when you go to the position of the photos, I want it to look exactly like the photo. I want it to be completely photorealistic when you render it in Blender. And obviously it's a pretty high bar, right? I mean, it's literally impossible, right? Because who knows, it's sort of photon stuff is going in there, and there's probably noise in the JPEG, right? It's an impossible task. But the question isn't like even is it possible or not. It's like, does the AI kind of iterate in a way that is satisfying? Like you actually get closer to what you're looking for. And in this case, I mean, it took some finagling, but it actually did. It got into a loop where, you know, every time it rendered this walkthrough, it got a little bit better. And it just kept getting better and better. and I saw it yesterday

Sunday? Anyways I saw it over the weekend and it was like awesome. Like it was really good. It was at the point where like I didn't realize Blender could make things that good. It was incredible. Yeah it was just mind boggling and I was asking I was like how did it come up with the textures and all this and he was like I was looking through you know all these chats and you know some of them had downloaded off the internet. Some of them just procedurally generated them. But I mean, it was unbelievable. I mean, it blew my mind. So, um, but you know, he, he even said, you know, the first time he basically naively said, you know, just make it look like the photo, you know, it, it failed in like a ton of different ways. So, you know, but, but the failures kind of showed him, uh, what he, what, what logicals he need to close, needed to close up. Like one of them, for example, was, you know there was light coming in through a window and it was creating like a square on the

ground and so it was spending like a ton of time like figuring out how to use textures to recreate that lit square and so instead of just yeah yeah you had to actually explain that like okay the sun is coming in through the window in some of these photos and so you need to use um and i'm not a graphics guy. He had the term for it. Photon mapping. I don't know. But you need to use some technique to represent that. Don't just texture the floor as to what this sunshine was. Right. So so this is probably the future of engineering. Right. Is is, you know, you look at the output of the AI, you figure out kind of like what direction it's heading and you kind of steer the ship in the right way. Yeah. I mean, I think ultimately what what he was trying to do and in general, this used to be like a pretty big thing is creating a specification. So it used to be, oh, hey, we're going to make specifications the code. And there's been historic attempts, you know, decades in the past

where people try to say like, you'll just write the specification and then the code will auto-generate. But I think we're like coming back to it now. And maybe we use LLMs in a way to like iterate the specification. And we're saying like, here's the thing. What I don't know, a lot of people haven't gotten there yet, but is once you have a system. So in your friend's case, like it's a model, but like, maybe you want to do that again. Like you would probably have learned a lot. Like how do we do the second pass, like the V2? And one of those is probably going to be like, we talked about regression testing, but also having a specification, like what is the things that matter and the things that don't matter. And, you know, hey, I want to take a second pass with, you know, smarter, better, stronger models and take another go at this. But ultimately, specification just becomes like another kind of programming language. So it could be in whatever form. I don't think, you know, probably, like you said, offending people who are big into it.

I don't think it needs to have a particular incarnation. It just needs to be, hey, this is what the system should do. This is what the system cannot do. And sometimes making that explicit and if you get it explicit enough, it even becomes like possible to formally verify, right? This is like, it was in the news recently. We don't have enough expertise to talk about it, but like with all the math papers and lean verification and that, right? If you can define your problem in a certain rigorous way, then you're able to prove whether or not your code meets those requirements. Now, there's a lot of weight in those bookending pieces where you have to figure out whether or not the formal specification you have matches what you intended it to. But yeah, it can be super powerful. Yeah, I mean, that's a great point. I mean, I think looking at the rendering example, another thing that I just remember is it kept spending so much time on the trees,

getting the trees to look nice outside of the house. And so that's where he had to kind of again step in and say, look, like the trees are good enough and the trees are not valuable. This is the thing. It's like, what is valuable? Just download a random tree model. I don't care. Yeah, like the tree is not valuable, but it is valuable that you don't pre-bake the sun, you know, spots onto the floor. So it's like, yeah, the AI doesn't know that because now, you know, so there's two ways to go about this. One way is to say, well, you know, you should tell the AI exactly what is and isn't important. But the problem is like it's a frame problem. Like he didn't even think about the trees because they're outside of the house and all the photos. You can only see the tree through the window in some of the photos. So it's like he didn't even realize that that was going to be part of the spec. Right. So so I think even if you go the requirements route, it's going to end up inevitably being an iterative performance.

I want you to see this, Patrick, and try to describe to the audience what you're looking at. I just sent you a link to an MP4. Okay, hang on. Hang on. I'm opening. Here we go. We're going to do it live. Opening a video file. Here we go. Hang on. It's loading. It's thinking. It's thinking. Loading still. Okay, this is fascinating podcasting right here. This is great material. Yeah. Oh, hang on. I have to download it. It says unable to load. It's just a video. I don't know. It just says unable to load. so i don't really hang on okay all right let's see i just got a virus now hang on okay okay what i'm seeing is nba jam okay here we go all right nba jam yeah oh we got audio okay all right i'm seeing two computers play each other in nba jam oh no there's a player as well okay did you see the team select screen yes okay who's who's on the team on the left-hand team. Oh, I didn't even see it. The play bar was over. Oh man. Okay. All right. Yes. Yes.

Jason has placed himself onto the Phoenix Suns. I placed myself and my wife as a gauchy duo on the Phoenix Suns. And so I actually asked Astra to decompile NBA Jam and replace the Phoenix Suns With me and my wife. And we're actually in the game, too. That's amazing. When it gets to the game, it's our head. I just gave it a couple of reference photos of us. And we're playing against Elon Musk and Donald Trump. Oh, wait, I didn't. Oh, now I've got to open it back up. Hang on. I don't know if this is the right video or if I have to send you a different one. But there's only a video where it's me and my wife versus Musk and Trump. Oh, no, it definitely is. Okay. I didn't catch it. it appears like it might be it's a little hard it's amazing oh my god you'll have to go to the show notes for that oh yeah let me put these in the show notes before I forget but this was just so fun

I wanted to do something silly and what a time time to be alive what a time to be alive there we go oh man And yeah, that was also... Testing is the new coding frontier. That's what I'm learning. Yeah, this was also, you know, like an iterative thing where I basically said, hey, you know, I want you to put us in the game and then record a video. It actually, if you notice, like the human players are playing kind of terribly and robotic. That's because they're scripted. So I basically told it, script the actual player and just make sure it looks good. And when you see issues, fix them. And so the first time it ran, we were both decapitated. So our heads were floating above our bodies. I don't know what caused that.

Also, it had trouble with my wife because she has longer hair. I did notice that. Yeah, it had trouble with that. But by looking at the video, I was able to iterate on that. So with the right testing framework, you can take ideas that seem out of reach, even if the AI builds it, it's kind of garbage, and turn them into actually working awesome ideas like temperance and gauchy jam. That's our moral of the story. Our call to action is write good tests. They'll actually allow you to build things you didn't expect and do it, you know, not actively. Vacation on the beach will finally become a reality. We'll just have to do it Wally style, sitting in the little chair with the Slupey and the VR goggles. Oh, yeah, that's right. Oh, man. Good times. All right. This was awesome. Folks out there, if you want to hear more of this, I mean, you know, we're programming throwdown, but programming has changed a lot. I'm having a lot of fun recording these episodes around tool use,

agentic use, et cetera. I mean, this is the new, I feel like this is the new paradigm. But let us know if you hate these shows, like these shows, want to see more or less of them, just shoot us an email, post on Discord. I'm happy to chat more about it. Thank you, everyone, for listening. Bye-bye. Music by Eric Barmeller Programming Throwdown is distributed under a Creative Commons Attribution Sharealike 2.0 license. You're free to share, copy, distribute, transmit the work, to remix, adapt the work, but you must provide an attribution to Patrick and I and share alike in kind.

番組の概要欄(原文)

Debugging code written by agents

出典・この記事について

番組
Programming Throwdown(Patrick Wheeler and Jason Gauci)
元の回
190: Testing Agents' Code
配信日
要約作成日
公式サイト
www.programmingthrowdown.com

この要約・解説記事は、元の音声を文字起こしした内容をもとに AI(Claude)が日本語で作成したものです。 固有名詞や数値に誤りを含む場合があるため、正確な内容は元の音声でご確認ください。制作方法について

X でシェア

関連エピソード