Sr. Content Developer at Microsoft, working remotely in PA, TechBash conference organizer, former Microsoft MVP, Husband, Dad and Geek.
162159 stories
·
33 followers

The guess and check pattern

1 Share

Here's a software pattern that I've found new use for in our new world of agents. I'll motivate it with an example from build systems.

When using build systems you often write down some information that feels redundant. For example, from the source code you can see that module A imports from module B, but then the build system requires you to separately tell it to build module B before building A. Why do we need to write this out, when it is visible from the source? It is tempting to figure it out automatically, as tools like ekam do.

The easy answer for why we don't always do this is the normal software answer of path dependence and how software tends to be clunky. But there are also two good reasons: information like this can be costly to gather and also can be hard to get completely right. It can be costly if your language design you might need to parse the whole source tree to find where a given module actually lives, as perhaps with C++ modules. It can be hard to get correct if there is configuration complexity; for example in a C file with #include "config.h", it is not clear which of potentially multiple config.h candidates it means; a tool that guesses will be hard to predict and sometimes wrong. (Just so I'm not only picking on C, I'll add that finding where a given import ... from 'x' in JavaScript resolves to has surprisingly complex semantics, and can even depend on the path of the source file.)

However, in the common case it really is often possible to automate things, and it's not that costly. This leads us to what in my head I call the guess and check pattern: use a tool to automatically guess, edit and/or verify the result, and write that down as the definitive answer.

For example Gazelle updates Bazel BUILD files from Go source. Bazel then gets to run quickly without parsing Go source, and if Gazelle gets things wrong, you can still edit the files. As an additional benefit, you check the result in to source control, which means a human gets to see what actually changed, and it pins down the result.

For another example of this pattern, consider "lock files" as used in programming language package managers. When you npm add or cargo add etc., the tooling makes network requests, runs a complex algorithm to resolve what you meant, and writes down the result. Builds after this point can use the lock files without looking around on the network or guessing about versions.

I used this pattern in my Windows emulator projects. For any given Windows function I declare the emulator's version of the function in Rust. To automate writing out the function's matching argument list I can generate it from metadata published by Microsoft. But I only need that metadata when I run the generator, and the output doesn't need to be perfect! I can generate code that is most of the way there, because it's fine as a human to fix up the details after. The generator can even just make up type names that don't exist because the compiler will catch it afterwards.

Another way to look at this pattern is to see there's a chain of work to guarantee determinism atop a nondeterministc start: you can use a tool that makes a guess, and as long as you write down that guess and use deterministic steps from that written state onward you still have determinism in the result.

Which finally leads me to one way I've been tentatively experimenting with AI. AI behavior matches the shape I've been describing. An agent can do a long slow processing step and generate some output — not limited to code, even things like gathering data — as long as I write the output down as a result and have a human and/or tooling verification pass after. Keeping this pattern in mind has helped me find places where AI is suitable: problems where I know up front that a plausible guess is all I require, and that framing helps me keep in mind that the output is always just a guess.

(PS: just in case it wasn't obvious, my blog posts are always just me banging away on a keyboard, no clankers will keep me from my meandering!)

Read the whole story
alvinashcraft
38 seconds ago
reply
Pennsylvania, USA
Share this story
Delete

SvelteKit 3 is here

1 Share

Version 3.0 of SvelteKit, the official application framework for Svelte, is now available.

If you’ve used earlier versions of SvelteKit, everything will feel very familiar — it’s the same framework with a little more polish, a little more type safety, and a little less junk. We’ve made migration as seamless as we can with the sv migrate command...

npx sv migrate sveltekit-3 --tasks all --confirm

...which will automatically migrate as much of your codebase as possible, and generate a TODO list for everything else. (If you’re agentically inclined, your robot friends will make short work of it.)

To create a new app, run sv create:

npx sv create my-new-app

As with any major version bump there are a handful of breaking changes to be aware of, which are covered in the migration guide (or, more briefly, in the recent release candidate announcement).

Quick highlights:

  • configuration now lives in vite.config.ts instead of svelte.config.js
  • the $lib alias is now #lib, making use of standard subpath imports
  • environment variables are more powerful and easier to use
  • service workers are less boilerplatey
  • error handling is improved across the board

Are remote functions ready yet?

Not quite. But it’s our top priority!

Remote functions are a set of utilities for secure, efficient, type-safe client-server communication. You’ve likely seen some version of this idea in other frameworks, but we think you’re going to prefer this one.

Using them requires Async Svelte, which for now requires an experimental flag. Bear with us.

Join us in Ljubljana next month

This is as good a place as any to remind everyone that the next in-person Svelte Summit is taking place on November 19-20 in the lovely town of Ljubljana, Slovenia. Among other things it will be a celebration of Svelte’s 10th birthday, and we’d love to share some cake with you.

Read the whole story
alvinashcraft
49 seconds ago
reply
Pennsylvania, USA
Share this story
Delete

#565: Tachyon, Python 3.15's Built-in Sampling Profiler

1 Share
Do you know what's actually slow in your Python app? Or are you guessing? Until now, profiling Python meant a tracing profiler that made your code 2 to 3 times slower. Or a third-party tool that broke with every new release. Python 3.15 fixes that. It ships Tachyon, a sampling profiler built into the standard library. It attaches to live production apps with almost zero overhead. My guests are Pablo Galindo Salgado, CPython core developer and Steering Council member, and László Kiss Kollár from Bloomberg's Python infrastructure team. Their first prototype ran at two samples a second. Now it does over a million hz. And it lands in Python 3.15 this October.

Episode sponsors

Sentry Error Monitoring, Code talkpython26
Python in Production
Talk Python Courses

Guests
László Kiss Kollár: linkedin.com
Pablo Galindo Salgado

3.11: talkpython.fm
Memray: talkpython.fm
PyStack: talkpython.fm
profile and cProfile: docs.python.org
py-spy: github.com
Austin: github.com
PEP 799: peps.python.org
PEP 768: peps.python.org
PyCon US 2026 talk: us.pycon.org
The docs: docs.python.org
Backport to 3.14: github.com

Watch this episode on YouTube: youtube.com
Episode #565 deep-dive: talkpython.fm/565
Episode transcripts: talkpython.fm

Theme Song: Developer Rap
🥁 Served in a Flask 🎸: talkpython.fm/flasksong

---== Don't be a stranger ==---
YouTube: youtube.com/@talkpython

Bluesky: @talkpython.fm
Mastodon: @talkpython@fosstodon.org
X.com: @talkpython

Michael on Bluesky: @mkennedy.codes
Michael on Mastodon: @mkennedy@fosstodon.org
Michael on X.com: @mkennedy




Download audio: https://talkpython.fm/episodes/download/565/tachyon-python-3.15s-built-in-sampling-profiler.mp3
Read the whole story
alvinashcraft
1 minute ago
reply
Pennsylvania, USA
Share this story
Delete

Scale Cloud Native Workloads with Azure Linux

1 Share
From: Microsoft Azure Developers
Duration: 16:44
Views: 12

In this Azure Friday episode, Scott Hanselman and Poorvi Narang explore why Microsoft built Azure Linux, an open-source Linux distribution optimized for Azure workloads. Poorvi demonstrates a cloud-native application running from a local WSL environment to Azure virtual machines and Azure Kubernetes Service, while highlighting Azure Linux’s minimal footprint, familiar DNF package management, and security-by-default capabilities such as SELinux and firewall controls. They also discuss how to get started with the Azure Linux 4.0 public preview and its path to general availability.

🌮 Chapter Markers:
0:00 – Introduction
0:32 – Why Microsoft built Azure Linux
3:09 – Local development with Azure Linux on WSL
5:19 – Deploying to an Azure virtual machine
12:47 – Deploying to AKS with Azure Container Linux
14:52 – Azure Linux 4.0 availability
16:09 – Resources and wrap-up

🌮 Resources

Azure Linux documentation: https://learn.microsoft.com/en-us/azure/azure-linux/

Azure Linux product page: https://azure.microsoft.com/en-us/products/azure-linux/

Azure Linux on GitHub: https://github.com/microsoft/azurelinux

🌮Follow us on social:

Scott Hanselman | @SHanselman – https://x.com/SHanselman

Azure Friday | @AzureFriday – https://x.com/AzureFriday
Follow us on social:
Blog - https://aka.ms/azuredevelopers/blog
Twitter - https://aka.ms/azuredevelopers/twitter
LinkedIn - https://aka.ms/azuredevelopers/linkedin
Twitch - https://aka.ms/azuredevelopers/twitch

#azuredeveloper #azure

Read the whole story
alvinashcraft
1 minute ago
reply
Pennsylvania, USA
Share this story
Delete

Gemini 4 Argon, Sonnet 5.5 and What Models You Should Be Using Right Now

1 Share
From: AIDailyBrief
Views: 92

Google announced Gemini 4 Argon with state-of-the-art benchmarks and then declined to actually release it. NLW breaks down where Gemini 4 really lands, why Sonnet 5.5 might be a model you shouldn't use, and whether a great product with a weaker model beats a better model with worse UX. In the headlines: the frontier labs sign a superintelligence accord at the White House, Trump launches America.gov, and the FTC opens an investigation into rogue agents.

The AI Daily Brief helps you understand the most important news and discussions in AI.
Subscribe to the podcast version of The AI Daily Brief wherever you listen: https://pod.link/1680633614
Get it ad free at http://patreon.com/aidailybrief
Learn more about the show https://aidailybrief.ai/

Read the whole story
alvinashcraft
1 minute ago
reply
Pennsylvania, USA
Share this story
Delete

Am I paying for a giant model I don't need?

1 Share
From: Microsoft Developer
Duration: 4:10
Views: 400

https://aka.ms/foundry-portal
https://aka.ms/InsideMicrosoftFoundryPlaylist

Model Router routes to the best model for the task. But, before you switch, you'll want to know: will it save me money on my workload without hurting quality? In this episode we use the open-source Model Router Auto Evaluation toolkit. It compares Model Router with your current baseline model (for example GPT-5) on: quality, cost, latency, value and model distribution. At the end you get a HTML dahsboard with 8 charts which answers the question: do I need a giant model or route a selection of the models using the Model Router?

0:00 - Save Costs with Model Router
0:35 - Model Router Auto Evaluation
1:08 - Configure Models and Pricing
1:39 - Prepare the Evaluation Dataset
2:10 - Run and View the Evaluation
2:40 - Compare Cost, Latency, and Quality
3:12 - Analyze the Quality Breakdown
3:43 - Choose the Right Tradeoffs

Read the whole story
alvinashcraft
1 minute ago
reply
Pennsylvania, USA
Share this story
Delete
Next Page of Stories