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

Using BlazorKit

1 Share
BlazorKit is a .NET 11 application template, built on the Oqtane framework. In this article we use it to build an editable website for comedian Keith Michael Ashton, add Aspire with a SQL Server container for local development, use the Oqtane Blog module so he can post his appearances, and deploy it to Azure App Service .
Read the whole story
alvinashcraft
19 seconds ago
reply
Pennsylvania, USA
Share this story
Delete

Recap of Microsoft Ignite 2026: Copilot as the Work OS and Agent Governance

1 Share

At Ignite 2026, Microsoft positioned Copilot as the operating system for work and extended agent identity, governance, and cost controls across Azure, Foundry, Entra, and Defender. Highlights include Cobalt 200 VMs, Azure HorizonDB, a continuous improvement loop in Foundry, Microsoft IQ, a standalone Azure AI Gateway, and Windows Server 2028.

By Steef-Jan Wiggers
Read the whole story
alvinashcraft
1 minute ago
reply
Pennsylvania, USA
Share this story
Delete

.NET MAUI 11 Makes CoreCLR the Default Runtime and Adds Incremental XAML Hot Reload

1 Share

Microsoft released .NET 11 with a .NET MAUI update focused on product quality. CoreCLR is now the default runtime on all platforms, and XAML gets incremental hot reload, implicit namespaces and faster resource dictionaries. The release also adds device test templates and passkey support, and raises the minimum Android and Apple platform versions.

By Edin Kapić
Read the whole story
alvinashcraft
1 minute ago
reply
Pennsylvania, USA
Share this story
Delete

Bending Aspire to your will - Build a custom resource (Part 2)

1 Share

In the previous part I defined ScalarResource and the OpenApiAnnotation, and services can opt in with WithOpenApi(). All data, no behaviour. Now I make Scalar actually start, find the documents, and tell the dashboard what it found.

Note: this post is part of a series about the demos from my session “Bending Aspire to your will”.


AddScalar: the behaviour lives in the extension method

public static IResourceBuilder<ScalarResource> AddScalar(
    this IDistributedApplicationBuilder builder,
    string name = "scalar",
    int? port = null)
{
    ArgumentNullException.ThrowIfNull(builder);

    var existing = builder.Resources.OfType<ScalarResource>().SingleOrDefault();
    if (existing is not null)
    {
        return builder.CreateResourceBuilder(existing);
    }

    builder.Services.TryAddEventingSubscriber<ScalarEndpointLogger>();

    var scalar = new ScalarResource(name);
    return builder.AddResource(scalar)
        .WithImage("scalarapi/api-reference", "0.6.22")
        .WithImageRegistry("docker.io")
        .WithHttpEndpoint(targetPort: 8080, port: port)
        .WithHttpHealthCheck("/health")
        .WithEnvironment(async context =>
        {
            // ... collect the OpenAPI documents, see below
        })
        .ExcludeFromManifest();
}

Step by step:

  • Singleton guard. If a ScalarResource already exists, return a builder for that one. Calling AddScalar() twice doesn't give you two containers.
  • TryAddEventingSubscriber registers the class that reacts to Scalar events. More on that below.
  • AddResource, WithImage, WithHttpEndpoint. This is the same you do for any container. port is optional, so you can pin it if you want a stable URL.
  • WithHttpHealthCheck("/health") gives the dashboard a real health state.
  • ExcludeFromManifest() keeps this developer tool out of publish and deploy.

Find the documents at start-up

The container needs a list of OpenAPI documents. That list can't be built when you call AddScalar(), because endpoints are only known when the AppHost starts. So the environment is a deferred callback:

.WithEnvironment(async context =>
{
    var sources = new List<ScalarEndpoint>();

    foreach (var resource in builder.Resources)
    {
        foreach (var document in resource.Annotations.OfType<OpenApiAnnotation>())
        {
            if (!document.Endpoint.Exists || (!document.Endpoint.IsHttp && !document.Endpoint.IsHttps))
            {
                throw new InvalidOperationException(
                    $"OpenAPI document '{document.Title}' on resource '{resource.Name}' must reference an existing HTTP or HTTPS endpoint '{document.Endpoint.EndpointName}'.");
            }

            var browserUrl = resource.Annotations
                .OfType<ResourceUrlAnnotation>()
                .FirstOrDefault(url =>
                    url.Endpoint?.EndpointName == document.Endpoint.EndpointName &&
                    url.DisplayLocation == UrlDisplayLocation.SummaryAndDetails)
                ?? throw new InvalidOperationException(
                    $"No browser-facing URL found for resource '{resource.Name}'.");

            var documentUrl = new Uri(new Uri(browserUrl.Url), document.Path);
            sources.Add(new ScalarEndpoint(document.Title, documentUrl.AbsoluteUri));
        }
    }

    if (sources.Count == 0)
    {
        throw new InvalidOperationException("Scalar requires at least one OpenAPI document. Declare one with WithOpenApi().");
    }

    context.EnvironmentVariables["API_REFERENCE_CONFIG"] =
        JsonSerializer.Serialize(new { sources }, JsonSerializerOptions.Web);

    // ... publish the discovery event, see below
})

The callback walks all resources, collects every OpenApiAnnotation, and serializes the result to the API_REFERENCE_CONFIG environment variable that Scalar reads. Two details:

  • It fails loudly. A document that points to a non-existing endpoint, or an AppHost without any WithOpenApi(), throws an exception with a message that says what to fix.
  • It uses the browser-facing URL. Scalar runs in your browser, so it needs the URL that your browser can reach, not the internal one. That is why the code looks for a ResourceUrlAnnotation.

Remark: two consequences of the browser-facing URL. First, the APIs need CORS. In aspire-shop, both the catalog service and the DB manager add an OpenApi CORS policy, but only in Development. Second, this connects back to Part 1: if you call context.Urls.Clear() on a resource that also has WithOpenApi() and don't add a URL for that endpoint again, AddScalar throws "No browser-facing URL found".

Talk back to the dashboard: events and state

A resource that silently does something is hard to debug. So Scalar publishes an event when it has discovered the documents:

public sealed record ScalarEndpointsDiscoveredEvent(
    ScalarResource Resource,
    IReadOnlyList<ScalarEndpoint> Endpoints) : IDistributedApplicationEvent;

The last part of the WithEnvironment callback publishes it:

await context.ExecutionContext.Services
    .GetRequiredService<IDistributedApplicationEventing>()
    .PublishAsync(
        new ScalarEndpointsDiscoveredEvent(scalar, sources.AsReadOnly()),
        context.CancellationToken);

And a subscriber, the class we registered with TryAddEventingSubscriber, reacts to it:

public sealed class ScalarEndpointLogger(ResourceNotificationService notification, ResourceLoggerService loggerService) : IDistributedApplicationEventingSubscriber
{
    public Task SubscribeAsync(
        IDistributedApplicationEventing eventing,
        DistributedApplicationExecutionContext executionContext,
        CancellationToken cancellationToken)
    {
        if (executionContext.IsRunMode)
        {
            eventing.Subscribe<ScalarEndpointsDiscoveredEvent>(async (@event, token) =>
            {
                var logger = loggerService.GetLogger(@event.Resource);
                logger.LogInformation("Scalar discovered {Count} OpenAPI endpoint(s).", @event.Endpoints.Count);

                foreach (var endpoint in @event.Endpoints)
                {
                    logger.LogInformation("OpenAPI endpoint {Title}: {Url}", endpoint.Title, endpoint.Url);

                    await notification.PublishUpdateAsync(@event.Resource, s => s with
                    {
                        State = new ResourceStateSnapshot("Endpoints discovered", KnownResourceStateStyles.Info)
                    });
                }
            });
        }

        return Task.CompletedTask;
    }
}

Two services do the work, and both are just services from the container:

  • ResourceNotificationService updates the state column of the resource. Scalar shows a custom state "Endpoints discovered" instead of only "Running".
  • ResourceLoggerService writes to the Logs tab of that resource, so you see which documents Scalar picked up.

The IsRunMode check makes sure this only happens when running locally.

Put it together

builder.AddScalar()
    .WithIconName("balloon")
    .WaitFor(basketService)
    .WaitFor(catalogService);

aspire run, and the dashboard shows a Scalar resource with its own icon, a custom state, and one URL that opens the API reference of every service that said WithOpenApi(). A new service with an OpenAPI document? Add one line to that service. Scalar doesn't change.

Tip: before you build your own, check if it already exists. There are over a hundred Aspire integrations (aspire add <integration>) and the Aspire Community Toolkit has community-built ones. The source of the built-in integrations is also a good place to learn how they do it.

That's it! A resource, an annotation, an extension method and an event subscriber. That's the whole pattern, and it works for any tool you want in your graph.

More information

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

Garbage In, Confidence Out: Data Quality for AI

1 Share

Part nine of ten. Every data professional knows garbage in, garbage out. AI adds a twist: the garbage comes out polished, fluent and sure of itself. This is the chapter where your years of data work become the advantage.

Figure showing flawed data going in and a fluent, confident answer coming out.

1. Why does data quality matter more with AI?

Because AI hides bad data behind good writing. A report with a wrong total looks wrong to a trained eye. A fluent AI summary built on the same wrong data sounds right to everyone.

Why it matters. AI also scales mistakes. One bad row can shape thousands of answers, recommendations or classifications before anyone notices.

Watch out. Don’t promise that a smarter model will fix messy data. It can smooth over the mess, which makes the mess harder to see.

2. How do missing values mislead AI?

A model can treat missing as meaning something, or quietly skip it. If a region’s sales are NULL because a feed failed, a summary can report that region as having no sales.

Why it matters. Missing data is rarely random. Blanks cluster in certain systems, time periods or groups, and that skews every answer built on them.

What the interviewer wants. A plan to measure missing values before use and decide per column: fill, flag or exclude. Saying “NULL isn’t zero” to a data interviewer earns a nod.

3. What is data drift?

Data drift is when production data changes from the data a model was built or tested on. New products, new customers or a changed form can all shift it. The model keeps answering as if nothing changed.

Why it matters. Drift is why an AI feature that worked in March misbehaves in September. Nobody changed the model, and the world changed under it.

Watch out. Drift isn’t only about numbers. A new product line, a renamed category or a new language in support tickets counts too.

4. How do you prepare PDFs and emails for AI?

Extract the text, clean it and add structure before embedding it. Parse PDFs and emails, run OCR on scans, and remove headers, footers and signatures. Keep metadata such as source, date and owner with every piece.

Why it matters. Most company knowledge lives in documents, not tables. A RAG system is only as good as the text it gets.

Watch out. Tables inside documents are the hardest part. Extract them as tables, not flattened text, or the numbers lose their meaning.

5. What is a data contract?

An agreement between the team that produces data and the teams that use it. It spells out the schema, meanings, quality rules and how changes will be announced. When the producer breaks it, checks fail before bad data reaches anyone downstream.

Why it matters. AI features sit downstream of many systems. A renamed column or a changed code value can quietly break a model’s inputs.

Watch out. Start small. One contract on the table your AI feature depends on most beats a company-wide programme that never ships.

Five minutes, any AI assistant

This list is small on purpose, so you can check every decision it makes:

How many unique customers are in this list? Jane Smith / JANE SMITH / J. Smith / Tom Brown / Tom Brown / N/A

What number did it give, and did it explain how it decided? Did it treat JANE SMITH and Jane Smith as one person? Did it ask whether J. Smith is Jane, or count N/A as a customer?

The list alone doesn’t tell you how many people are in it. A good answer separates distinct names from distinct people, and says so. Most first answers pick a number and move on.

That is the whole chapter in one exercise, and it’s the part of AI work you already know how to do.

Why this is worth a book

Chapter 9 has ten questions. It also covers duplicates, biased data producing biased output, and data leakage between training and testing. Then why freshness matters for RAG, and how to profile a dataset quickly.

Data leakage is the Senior one, and it’s a question a data person can answer better than most machine learning specialists. That’s worth knowing before you walk in.

100 AI Interview Questions and Answers for Data Professionals is in Kindle (also on Amazon.in), paperback and audiobook.

Part ten is the question everybody wants answered. Will AI replace your job?

Bad data is not fixed by a better model, it is only made to sound better.

Published by Pinal Dave on SQLAuthority. More of my work at pinaldave.com.

First appeared on Garbage In, Confidence Out: Data Quality for AI

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

New York bans childrens' toys with AI

1 Share
The Golabs Panda was one of the AI toys highlighted by consumer watchdogs

New York Governor Kathy Hochul today signed a five-year ban on selling toys in the state that feature AI chatbots. The law follows a series of comical but very alarming cases in which such toys could be induced to discuss weapons, sex and other things inappropriate for the youngest New Yorkers. — Read the rest

The post New York bans childrens' toys with AI appeared first on Boing Boing.

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