Weekly Digest - August 17, 2026
Scott Keck-Warren • August 17, 2026
Three posts this week: a way to make an AI agent fix its own duplicated code, a deep look at how PHP's loose comparisons can hand attackers a login, and the email templates I use to book podcast guests.
I'm also going to be speaking at GPUG next Wednesday, August 26th.
I Made My AI Agent Fix Its Own Copy-Paste: jscpd + Mago
AI agents write a lot of code, and much of it is the same 100 lines repeated with tiny variations: validation blocks, database fetch boilerplate, identical error handling scattered across files. It works, but it's a maintenance mess. I wired up jscpd, a token-based copy-paste detector, and Mago, a Rust-based static analyzer for PHP, into a check.sh script that runs after every edit. The feedback loop finishes in seconds, so the agent catches its own duplication and fixes it before anything reaches me.
The Complete Guide to PHP Type Juggling and Comparison Gotchas
I opened this one with a login system I found in the wild that compared MD5 hashes with ==. That loose comparison let a "magic hash" starting with 0e slip through, because PHP read it as scientific notation and decided 0 == 0. The guide walks through why == coerces types, how PHP 8 tightened number-to-string comparisons, and the safe habits that avoid the whole problem: hash_equals() for secrets, explicit casts, and strict mode in functions like in_array().
Podcast Guest Outreach Templates That Actually Get Replies
Staring at a blank pitch email is what stops most people from booking guests, so I treat it as a friction problem instead of a willpower one. A good pitch does four things: says who you are, shows you know the person's work, makes one low-effort ask, and gives them an easy way to say no. I share three templates: cold outreach, warm intros, and the follow-up that books more guests than the first two combined, plus the rules that keep them from reading like a template.
See you next Monday.