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

Beyond adoption: How organizations shape AI’s effects on work

1 Share

The week of November 16 was important for AI at Microsoft. In San Francisco, Ignite introduced a new generation of Copilot experiences, agents, and models. As Satya Nadella framed the week, we’re considering two challenges: capitalizing capabilities that are growing exponentially, and asking, “How do we build the capability to deal with the consequences of these exponentials?”  

In Redmond, we spent that same week on his second challenge: preparing for the consequences. Microsoft’s AI Economy Institute (AIEI) brought our latest cohort of Senior Fellows, independent researchers from nine countries across 15 universities and institutions, together with Microsoft experts and key partners for a convening on “AI, Jobs, and the Firm”. Chief Scientist and Lab Director of the Microsoft AI for Good Lab, Juan Lavista Ferres opened the convening with a fireside with Brad Smith. Kathleen Hogan, Jaime Teevan, and Copilot leaders Rangan Majumder and Hal Bond led conversations that gave the Fellows a direct view of how Microsoft builds and deploys AI. I, alongside two other Microsoft chief economists, Michael Schwarz and LinkedIn’s Liz Wilke came together for a conversation of our own. The Fellows also participated in working sessions with the World Bank, Gallup, and our Tech-Labor partnership.  

If I had to compress three days into one sentence, it would be this: AI makes the abundant cheap and the scarce costly. It makes output cheap but leaves judgment, attention, and accountability scarce. Its economic consequences are not determined by model capability or adoption alone. They emerge from how organizations reorganize workflows, attention, expertise, data, and accountability around AI, and from how markets allocate the resulting value and risk. Seven findings stood out: 

1. Adoption is not capability

Early in the AI transition, the focus inside companies was primarily on cutting costs. That remains a priority, but we heard a growing emphasis on building new capabilities. As one participant put it, successful firms aren’t implementing AI; they’re implementing a business strategy and using AI as a tool to achieve it. Making a product better is a different goal than making it cheaper, and it requires redesigning workflows, roles, and incentives rather than bolting a tool onto existing work. Some of the biggest gains came from fixing broken processes before AI was even applied, and leaders who visibly use the tools may matter more than individual skills. 

2. The right unit of analysis is the workflow, not the task

Benchmarking success on a well-specified task does not mean a job can be replaced or that a firm will capture value. Real work is underspecified, spread across people, and dependent on context. A team can finish its work faster with AI but then review, rework, and errors land on another team months later. That may help explain why strong task-level results coexist with mixed firm-level productivity evidence. Several fellows pushed us to measure net useful output, not activity. 

3. When output is abundant, attention and judgment become scarce

As generating text, code, and analysis becomes cheap, value shifts to deciding what deserves attention, specifying outcomes, evaluating quality, and accepting responsibility. But review capacity is not free, and unreviewed output does not disappear. It shifts costs onto whoever has to read, check, or fix it next. Any honest accounting of AI’s productivity gains must include that cost. 

4. Entry-level work is both production and apprenticeship

Before joining Microsoft, I studied AI’s effects on entry-level jobs as an AIEI Senior Fellow in Cohort 2. As an Advising Fellow, I also read many of the research proposals submitted to Cohorts 2 and 3 and came to know the entry-level work from Cohort 1 well, which is why this is the finding I keep returning to. Entry-level jobs aren’t completely disappearing, but their shape is changing. Junior employees produce today’s output and become tomorrow’s experts. Automating tasks can raise near-term efficiency while removing the experiences through which people build judgment, and firms have weak short-term incentives to protect those experiences. 

We heard accounts of junior employees presenting polished work they couldn’t explain or defend under questioning. Managers increasingly need to know whether an employee was the pilot or the copilot. That sparked a discussion of “meta-learning”, the ability to learn how to learn, as a more durable advantage than narrow expertise. And perhaps counter to the wider conversation, evidence discussed in the room suggests new hires still turn to mentors and peers before AI tools. Well-designed AI can also act as a tutor and scaffold. Which way it goes is a design choice, not a property of the model. An open question: if firms lose the incentive to train junior employees, does that responsibility shift to schools or elsewhere? 

5. The evidence is running behind, and measurement is part of the problem

Diffusion data is one of the more reliable signals we have about how AI is spreading, though it does not, by itself, give clarity about the impact of AI on jobs. Much of the rest is shakier: research more than six months old may already be outdated, exposure scores miss second-order effects, and simulations that assume capability equals adoption overstate change. Studies of one worker using one tool say little about the whole enterprise; history shows firms can automate, cut some roles, and still grow total employment. No single metric can tell a complete story. We need a scorecard that connects use to workflow outcomes and shows where costs and benefits land. That is why the technical work mattered: the Fellows gave the World Bank detailed feedback on the design and sampling of its Global AI Adoption Index, worked through survey design with Gallup, and took on the Copilot team’s own open measurement questions. 

6. Creating value and capturing it are different questions

Rapid turnover in model leadership may commoditize some base capability, while data, context, product integration, and workflow design remain the complements that differentiate. Having spent years studying the economics of open source software, I find this dynamic especially worth watching.  

Who captures value is a separate question from whether it is created, and history is a caution. The manufacturing shock of the 2000s loomed large: the workers who lost their jobs were rarely the ones who benefited from the jobs that followed. Similar distributional effects are already emerging, as AI-related roles command higher pay. Fiscal questions came up too, since payroll taxes apply to people, not AI systems, but skepticism about robot taxes ran high, and the room agreed better data must come before policy design. Participants also framed worker voice and fair treatment of the expertise and data that workers contribute as conditions for productive deployment rather than only as ethical constraints. 

7. We did not agree on the trajectory, and that is useful

There was broad optimism about AI’s long-term impact, but no convergence on pace. One view expects familiar organizational friction and gradual adjustment; another argues that AI is aimed at an expanding share of valuable human work, which makes historical analogies less reliable. Similar tensions run through the evidence: enriched roles versus substitution, deeper human judgment versus fewer specialists, competition among models versus concentration. We are not going to force consensus. These disagreements can help advance our research agenda. 

Preparing, not just predicting

One idea framed the closing discussion: treat potential disruption the way we should have treated early climate science and prepare as if the hard scenario is the most likely. Technology does not decide the outcome; people, firms, and institutions do. And we have far more data, and far more researchers, than we did during deindustrialization. There will be more to come on this topic next year, as the Fellows’ work will appear in Beyond Adoption: Firms, Work, and Diffusion at the Frontier of the AI Economy, AIEI’s third book, coming in early 2027.  

What’s next and a call for proposals: Designing for augmented work

These questions lead directly to AIEI’s fourth call for proposals, AI and Jobs: Designing for Augmented Work. It asks what organizational choices determine whether AI creates value, who captures it, and how it is distributed across workers, firms, entrepreneurs, and society. Its five themes run from delegation, judgment, and accountability to building expertise and protecting the first rung of the career ladder. 

The call is open to researchers at accredited universities and research institutions worldwide, and the deadline is December 31, 2026, at 6:00 PM Pacific Time. Learn more and apply at: AI Economy Institute – Microsoft Research: AIEI Open Call 4 

The post Beyond adoption: How organizations shape AI’s effects on work appeared first on Microsoft On the Issues.

Read the whole story
alvinashcraft
47 minutes ago
reply
Pennsylvania, USA
Share this story
Delete

Building & Testing API Changes Against Simulated Outages with Claude Code & Postman

1 Share
From: Postman
Duration: 3:16
Views: 44

Adding a new feature across microservices shouldn't mean guessing downstream dependencies or hoping your retry logic survives a third-party outage.

In this video, watch how to use Claude Code paired with the Postman Plugin and Context Graph to take a real-world API change from dependency discovery all the way to automated failure simulation.

Using a healthcare application as an example, we add patient email and phone number updates with confirmation notifications. Watch Claude query Postman’s Context Graph to locate the patient and notification services, implement strict idempotency and retry rules (retrying up to 3x on 500s, 429s, and network errors while keeping updates intact on notification failure), validate both happy-path and outage simulations against local mocks, and save every test artifact to a shared Postman Workspace.

What You’ll Learn in This Video:
• The Feature Scope: Adding patient contact updates (`PATCH`) with confirmation notifications and ownership checks
• Querying Postman’s Context Graph to map downstream services before writing code
• Implementing production-grade resilience: Input validation upfront, channel-level confirmation state, retry logic (500/429 vs. 400), and graceful degradation (`200` with warning)
• Using Postman’s API Simulation & Testing Skills to validate against local mocks without hitting live services
• Running both happy-path (`main run`) and failure-mode (`outage run`) simulations automatically
• Saving collections, mocks, and simulation runs to a Postman Workspace so the next developer or agent can extend the feature immediately

0:00 - Introduction: Taking an API Change from Dependencies to Testing
0:05 - The Feature: Patient Email/Phone Updates & Confirmation Notifications
0:32 - Prompting Claude Code to Query the Context Graph & Simulate Mocks
0:52 - Running API Testing & Simulation Skills in Claude Code
1:09 - Reviewing the Implementation: Idempotency, Retries & Graceful Warnings
2:21 - Inspecting the Main Run & Outage Run Results
2:34 - Reviewing the Saved `PATCH` Request & Simulations in Postman Workspace
2:51 - Wrap-Up: Turning Dependency Context into Reusable Team Assets

Resources & Links:
• Install the Postman Plugin & CLI: https://www.postman.com/product/postman-cli/
• Learn more about Postman Workspaces & Context Graph: https://www.postman.com/

#Postman #ClaudeCode #AIAgents #ContextGraph #APISimulation #SoftwareEngineering #DeveloperTools #APITesting #Microservices #DevOps

Read the whole story
alvinashcraft
48 minutes ago
reply
Pennsylvania, USA
Share this story
Delete

How a JavaScript Promise Really Settles

1 Share

You probably get the basics of a JavaScript promise. Let’s go even deeper to understand what happens in what order when a promise resolves.

To understand how a JavaScript promise settles, first let’s start with understanding basics of promises.

In JavaScript, a Promise is an object that represents a value that is not available yet, but is expected to become available sometime in the future. At any given moment, a promise is always in exactly one of three states:

  • pending – The promise has not settled yet.
  • fulfilled – The promise has settled successfully with a value.
  • rejected – The promise has settled unsuccessfully with a reason.

You read these properties inside callback functions. Let’s create a very simple promise to return a user.

function loadUser(id) {
    return new Promise((resolve, reject) => {
      console.log('pending');
      if (!id) {
        console.log('rejected');
        reject(new Error('id is required'));
        return;
      }
  
      setTimeout(() => {
        console.log('fulfilled');
        resolve({ id, name: 'DJ' });
      }, 100);
    });
  }

The loadUser function returns a promise, and you use three callback functions to handle the promise’s three possible states, as shown below:

 loadUser(1)
  .then((user) => {
    console.log('ok:', user.name);
  })
  .catch((error) => {
    console.error('failed:', error.message);
  })
  .finally(() => {
    console.log('promise settled');
  });

When you call loadUser(1), the returned promise initially remains in the pending state. It stays pending while the asynchronous operation is in progress. Once the timeout completes, the promise is fulfilled with the user object, and the fulfillment callback passed to .then() is executed.

When you call loadUser(null), the promise is rejected immediately. There is no need to wait for the timeout because the executor detects the invalid input and calls reject() in the same turn in which the executor runs. You can then handle the rejection with .catch().

We use three callback functions to handle different promise states.

  • .then() handles a fulfilled promise.
  • .catch() handles a rejected promise.
  • .finally() runs after the promise settles, whether it was fulfilled or rejected.

Many developers understand about promises up to here. Their mental model is:

Diagram showing pending going to either fulfilled or rejected

Then we learn:

promise goes to either then or catch, and those direct to finally

This is enough to use a Promise, but not enough to understand it at a deeper level, leverage its full power or debug unexpected issues.

Let’s once again understand the behavior when we call loadUser with null.

loadUser(null)
.then((user) => {
  console.log('ok:', user.name);
})
.catch((error) => {
  console.error('failed:', error.message);
})
.finally(() => {
  console.log('promise settled');
});

As you examine the output, loadUser(null):

  • Prints pending
  • Then rejected
  • Then failed: id is required, then promise settled

The executor runs immediately, so pending appears first. null is treated as missing, so it logs rejected and rejects with id is required before the timer can run. The .then callback is skipped, .catch prints failed: id is required, and .finally still runs and prints promise settled.

And when we call loadUser() with valid number 1:

loadUser(1)
.then((user) => {
  console.log('ok:', user.name);
})
.catch((error) => {
  console.error('failed:', error.message);
})
.finally(() => {
  console.log('promise settled');
});

As you examine the output, loadUser(1):

  • Prints pending right away
  • Then, about 100 ms later, it prints fulfilled
  • Then it prints ok: DJ
  • And promise settled

The executor sees a real id, so it does not reject. The timer calls resolve with { id: 1, name: 'DJ' }, .then prints ok: DJ, .catch is skipped, and .finally still runs and prints promise settled.

For a promise, settlement is one-shot. Once it becomes either fulfilled or rejected, its outcome is permanently fixed. Any later call to resolve() or reject() has no effect. Similarly, if the promise has already settled, a later throw inside the same executor cannot change its state. A Promise can settle only once.

Now that we have a basic understanding of promises, you may feel comfortable using them. However, as you go deeper, several interesting questions start to arise.

  • Does resolve() immediately fulfill a promise?
  • Why does code after resolve() still execute?
  • Why does .then() run later even when the promise is already fulfilled?
  • What happens if resolve() is called twice?
  • What happens if we call resolve() and then reject()?
  • Why can a promise be resolved but still pending?
  • What happens when a promise is resolved with another promise?
  • What exactly is a thenable?
  • Why does returning a promise from .then() flatten the chain?
  • How do errors move through a promise chain?

The key is to separate three concepts that are often mixed together:

 

  • Resolution
  • Settlement
  • Reaction scheduling

Once these three concepts become clear, JavaScript promises become much easier to reason about. Let’s start with understanding three states.

The Three States

A promise can be in one of three observable states:

  • Pending: The operation is still in progress.
  • Fulfilled: The operation completed successfully.
  • Rejected: The operation failed.

A promise is always in exactly one of these states. JavaScript does not expose its current state through a property such as promise.state. Instead, you observe the state through the behavior of its handlers.

  • pending – Since the operation is still in progress, the result is not available yet, so .then() and .catch() have not run.
  • fulfilled – Since the operation completed successfully, the promise has a value, which is passed to .then(onFulfilled).
  • rejected – The promise has a reason (usually an error) that the operation failed, which is passed to .catch(onRejected).

Pending goes either to fulfilled, which goes to then(value) and on to finally, or to rejected, which goes to catch(reason) and on to finally

As you see in the diagram, .catch() and .finally() are both built on top of .then(), but they serve different purposes.

The .catch() is a shortcut for rejection handling and the .then() can accept two callbacks: one for fulfillment and one for rejection.

promise.then(onFulfilled, onRejected);

The .catch() only provides the rejection handler:

promise.catch(onRejected);

So, the two syntaxes below do the same thing.

promise.catch(onRejected);
promise.then(undefined, onRejected);

If the promise is fulfilled, there is no onFulfilled callback here, so its value simply passes through the chain. If the promise is rejected, onRejected runs with the rejection reason.

The .finally() runs regardless of the outcome. We should use .finally() when we need to perform some cleanup or final action whether the promise is fulfilled or rejected:

promise.finally(() => {
  console.log('settled');
});

The onFinally callback receives no arguments. It does not receive the fulfilled value or the rejection reason. After finally() completes, the original value or rejection reason continues through the chain.

The exception is when onFinally itself throws an error or returns a rejected promise. In that case, the chain becomes rejected with that new error.

A newly created promise always starts as pending, and from pending it can become fulfilled or it can become rejected. You fulfill it by calling resolve with an ordinary value.

const promise = new Promise((resolve) => {
  resolve('Hello');
});

promise.then((value) => {
  console.log('state: fulfilled');
  console.log('value:', value);
});

state: fulfilled; value: Hello

You reject a promise by calling reject.

const promise = new Promise((resolve, reject) => {
  reject(new Error('Something failed'));
});

promise.catch((error) => {
  console.log('state: rejected');
  console.log('reason:', error.message);
});

state: rejected; reason: Something failed

As discussed earlier, settlement is one-shot. A fulfilled promise stays fulfilled. A rejected promise stays rejected. There is no path back to pending, and no path from one settled state to the other.

const promise = new Promise((resolve, reject) => {
  resolve('Hello');
  reject(new Error('Something failed')); // already fulfilled
  resolve('Goodbye');                    // already fulfilled
});

promise.then(
  (value) => console.log('fulfilled:', value),
  (error) => console.log('rejected:', error.message)
);

The first resolve('Hello') settled it. The later reject and the later resolve still run as function calls. They do not change the promise. A fulfilled promise stays fulfilled. A rejected promise stays rejected.

Executor Is Synchronous

When we create a promise, the function passed to its constructor is called the executor. The executor receives two functions, resolve and reject, which we call to settle the Promise.These executors are synchronous in nature. To understand that, let’s consider the example:

function question1() {
    console.log('A');
  
    const p = new Promise((resolve, reject) => {
      console.log('B');
      resolve('first');
      resolve('second');
      reject('nope');
      throw new Error('boom');
    });
  
    p.then(
      (value) => console.log('fulfilled:', value),
      (error) => console.log('rejected:', error.message || error)
    );
  
    console.log('C');
  }

  question1();

You should get the expected output as shown below:

A; B; C; fulfilled: first

The output above is due to the executor’s synchronous nature, and the why of the above output can be explained more with the points:

A - B - C is the synchronous turn.

  • console.log('A') runs first.
  • new Promise(...) immediately executes its executor, so B runs on the same call stack.
  • The promise constructor then returns.
  • .then() schedules a microtask; it does not execute the callback immediately.
  • Therefore, C is printed next.

First Settle Wins

The first call that settles a promise determines its final state. Here, resolve('first') fulfills the promise, so its state becomes fulfilled.

  • Once the promise is fulfilled, its state cannot change again.
  • resolve('second') is ignored because the promise is already fulfilled.
  • reject('nope') is ignored because the promise can no longer transition to rejected.
  • throw new Error('boom') does not change the promise’s state because the executor has already settled it.

A promise can settle only once. Any later resolve, reject or thrown error cannot change that settled state.

Handlers Wait for the Next Microtask

Even if the promise is already fulfilled when .then() is attached, the fulfillment handler does not execute immediately.

  • .then() schedules the handler as a microtask rather than running it synchronously.
  • The current synchronous code must finish first. So C is printed before the .then() callback runs.
  • Microtasks run only after the current synchronous turn completes, before the event loop moves on to the next task.

A fulfilled promise can execute its .then() handler later, even though the promise is already settled.

Take another example:

const p = new Promise((resolve, reject) => {
  console.log("A");

  resolve("first");

  console.log("B");

  resolve("second");
  reject("error");

  console.log("C");
});

p.then(value => {
  console.log("Promise:", value);
});

console.log("D");

As handler waits for next microtask, it should print:

A; B; C; Promise: first

Resolved and Still Pending

This is probably the most important concept a JavaScript developer should understand about promises.

A common misunderstanding is to think of resolve(value) as meaning: “The promise is now fulfilled with value.”

That is only true when value is an ordinary, non-promise value. This distinction is at the heart of how promise resolution actually works.

When you resolve an ordinary value, such as a string, a number, an object or undefined, then resolving and settling happen together. The promise becomes fulfilled with that value.

When you resolve another promise, or any object with a .then method, the outer promise locks onto that object. It is resolved. It can still be pending.

Its fate is now “whatever that other promise does.” When the inner promise fulfills, the outer one fulfills with the same value. When the inner promise rejects, the outer one rejects with the same reason.

Let’s understand this with examples:

const promise = new Promise((resolve) => {
  resolve(42);
});

promise.then(
  (value) => console.log('fulfilled:', value),
  (error) => console.log('rejected:', error.message)
);

Here promise is resolved with ordinary non-promise value, so it is fulfilled with the value. Let’s consider another example, where promise is resolved with another promise:

const inner = new Promise((resolve) => { 
  setTimeout(() => { resolve("done"); }, 1000); 
});

const outer = new Promise((resolve) => { 
  resolve(inner); 
  console.log('outer');
});

outer.then(value => console.log(value));

Here, outer promise does not immediately fulfill with the inner promise. Instead, outer adopts the state of inner.

The relationship can be defined as outer follows inner, and as inner is still pending, therefore outer is also effectively waiting.

So, after one second when inner is fulfilled with “done,” then outer is fulfilled with “done.”

Also, resolved does not necessarily mean fulfilled. Consider below example:

let resolveInner;
const inner = new Promise((resolve) => { 
  resolveInner = resolve; 
}); 
const outer = new Promise((resolve) => {
  resolve(inner); 
});

Above, inner is pending and outer is pending, but we can say outer is resolved to the state of inner and it is following the inner. So, outer cannot later do reject(‘something’) because even if it is pending , it is resolved and following the inner.

So, we can say that a promise can be resolved to another pending promise while remaining pending from an observer’s perspective.

The Promise Resolution Procedure

There are two types of resolution:

  1. Resolving an ordinary value
  2. Resolving a promise

As you have read earlier, these types of resolution happen differently. So, when you call:

resolve(value);

JavaScript does not simply ask, “Is value truthy?” or “Should I mark this fulfilled?” Instead, it performs a process commonly described as the Promise Resolution Procedure.

A simplified version looks like this:

Promise Resolution Procedure: resolve(value). Is value ordinary? If yes, fulfil with value. If not, is value promise-like? If yes, adopt its eventual state. If not, fulfil with value.

Due to this, resolve(42) and resolve(otherPromise) behave differently. Let’s consider the example below:

const promise = new Promise((resolve) => {
  resolve(42);
});

promise.then(value => {
  console.log(value);
});

It prints 42 and the flow is:

resolve(42) – 42 is ordinary – promise fulfilled – reaction scheduled – .then() handler runs

If you notice the final step, settlement and reaction execution are separate. Let’s consider another example with promise value:

const inner = new Promise((resolve) => {
  setTimeout(() => {
    resolve("hello");
  }, 1000);
});

const outer = new Promise((resolve) => {
  resolve(inner);
});

outer.then(value => {
  console.log(value);
});

Now the flow becomes:

resolve(inner) – inner is a promise – outer adopts inner – inner fulfils with “hello” – outer fulfils with “hello” - .then() logs “hello”

So in the output you get hello printed. It does not print the promise object. This behavior is what makes promise composition possible.

thenable Assimilation

JavaScript does not only understand native promises. It also understands thenables. A thenable is simply an object with a callable then property.

Consider the below example:

const thenable = {
  then(resolve, reject) {
    resolve("hello");
  }
};

Promise.resolve(thenable)
  .then(value => {
    console.log(value);
  });

This is not necessarily a native promise. But JavaScript can treat it as promise-like and prints hello. So conceptually it can be depicted as below:

Promise.resolve(thenable) – find .then() – call then(resolve, reject) – resolve(“hello”) – Promise fulfills

This ability is called thenable assimilation. Let’s see one more example.

const thenable = {
  then(resolve, reject) {
    resolve("first");
    resolve("second");
    reject("third");
  }
};

Promise.resolve(thenable)
  .then(value => {
    console.log(value);
  });

You should get output first printed, because JavaScript promise allows only the first effective call to win. The later calls cannot change it. For the thenable, the resulting promise maintains its one-shot semantics.

Sometimes, thenable can throw an error. Consider the example below.

const thenable = {
  then() {
    throw new Error("boom");
  }
};
  
Promise.resolve(thenable)
  .catch(error => {
    console.log(error.message);
  });

A thrown exception during thenable processing results in rejection. Consider another example:

const thenable = {
    then() {
      throw new Error("boom");
    }
  };
  
  Promise.resolve(thenable)
    .catch(error => {
      console.log(error.message);
    });

You should get boom printed successfully. The later exception cannot change the output because, for promises, the first effective output wins.

.then() Handler Is Asynchronous

One important concept we need to keep in mind is that the .then() handler is always asynchronous. To understand it better, consider the below example:

const promise = Promise.resolve("done");

console.log("A");

promise.then(value => {
  console.log("B", value);
});

console.log("C");

You should get expected output as shown below:

A; C; B done

This happens even though the promise was already fulfilled before .then() was attached, because promise reactions are scheduled as microtasks.

The promise may already be settled, but the handler does not suddenly execute in the middle of the current synchronous execution. It can be depicted as below:

Current synchronous execution – attach .then() – queue reaction – continue current code – current stack finishes – microtask runs – .then() handler executes

I hope this article has helped you understand, beyond the basics, how JavaScript actually resolves a promise and what happens under the hood.

Thanks for reading!

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

5 Christmas Animations in .NET MAUI

1 Share

Bring a little extra holiday cheer to your .NET MAUI app with one of these five simple Christmas animations.

I absolutely love animations that bring apps to life! There’s something about movement and those little interactive details that make an app feel more welcoming, fun and enjoyable to explore.

Now, imagine bringing that same magic into a special theme like Christmas!

In this article, we’re going to create five Christmas animations using .NET MAUI’s native animations. From twinkling Christmas lights to falling snowflakes, we’ll discover how just a few lines of code can make our apps feel magical!

So, grab your favorite cup of coffee ☕, get comfortable and let’s get started!

1. Jingle Bell Animation

Let’s start by animating a Christmas bell to recreate its natural side-to-side swinging motion. You won’t believe how easy it is to create this animation in .NET MAUI! All you need is an image of a bell and the RotateTo() method.

Let’s see how it works in the following example!

XAML:

<Image 
    x:Name="BellImage" 
    Source="jinglebell" 
    WidthRequest="200" 
    HeightRequest="200" 
    AnchorX="0.5" 
    AnchorY="0.1" 
    HorizontalOptions="Center" 
    VerticalOptions="Center" />

C#:

protected override async void OnAppearing() 
{ 
    base.OnAppearing();  
    await BellImage.RotateTo(12, 450, Easing.SinInOut); 
    
    while (true) 
    { 
    await BellImage.RotateTo(-12, 900, Easing.SinInOut); 
    await BellImage.RotateTo(12, 900, Easing.SinInOut); 
    } 
}

2. Christmas Tree Lights Animation ✨

What’s a Christmas tree without twinkling lights? ✨

Let’s bring our Christmas tree to life by dynamically adding colorful lights to a simple tree vector! We’ll use the FadeTo() method to make the lights blink on and off, creating a beautiful twinkling effect.

Let’s see how easy it is to create this animation in .NET MAUI!

XAML:

<Grid 
    x:Name="TreeContainer" 
    VerticalOptions="Start" 
    WidthRequest="240" 
    HeightRequest="300">
 
    <Image 
    Source="christmastreenolights" 
    Aspect="Fill" /> 
</Grid>

C#:

private readonly List<Ellipse> _lights = [];
 
protected override async void OnAppearing() 
{ 
base.OnAppearing();
 
if (_lights.Count == 0) 
{ 
var positions = new (double X, double Y)[] 
    { 
    (0, -73), 
    (-27, -39), (24, -18), 
    (-48, 19), (3, 29), (47, 49), 
    (-63, 89), (-13, 79), (33, 94) 
    }; 

    string[] colors = ["#FFD86B", "#F36C79", "#74D5FF"];
     
    for (int i = 0; i < positions.Length; i++) 
    { 
    var light = new Ellipse  
    { 
    Fill = new SolidColorBrush( 
    Color.FromArgb(colors[i % colors.Length])), 
    WidthRequest = 12, 
    HeightRequest = 12, 
    HorizontalOptions = LayoutOptions.Center, 
    VerticalOptions = LayoutOptions.Center, 
    TranslationX = positions[i].X, 
    TranslationY = positions[i].Y 
    };
     
    TreeContainer.Children.Add(light); 
    _lights.Add(light); 
    } 
}
 
    while (true) 
    { 
    foreach (var light in _lights) 
    { 
    await light.FadeTo(0.2, 180); 
    await light.FadeTo(1, 180); 
    } 
    } 
}

3. Christmas Gift-Opening Animation ✨

OMG! I can’t decide which animation is my favorite, but I think this one might be one of them!

This time, we’ll create a magical animation where a Christmas gift box opens and a beautiful, warm glow shines from inside! We’ll combine three .NET MAUI animation methods: FadeTo(), ScaleTo() and TranslateTo() to bring our gift to life.

Let’s see how it works! ✨

XAML:

<Grid 
    WidthRequest="240" 
    HeightRequest="240" 
    HorizontalOptions="Center" 
    VerticalOptions="Start”>
 
    <!-- Warm glow --> 
    <Ellipse 
    x:Name="GiftGlow" 
    WidthRequest="200" 
    HeightRequest="200" 
    TranslationY="-35" 
    Opacity="0" 
    Scale="0.3">
     
    <Ellipse.Fill> 
    <RadialGradientBrush> 
    <GradientStop Color="#FFFFF2B3" Offset="0" /> 
    <GradientStop Color="#FFFFD76A" Offset="0.25" /> 
    <GradientStop Color="#66FFB830" Offset="0.6" /> 
    <GradientStop Color="#00FFB830" Offset="1" /> 
    </RadialGradientBrush> 
    </Ellipse.Fill> 
    </Ellipse>
     
    <!-- Gift box --> 
    <Image 
    Source="giftbox.png" 
    WidthRequest="130" 
    HeightRequest="100" 
    TranslationY="40" />
     
    <!-- Gift lid --> 
    <Image 
    x:Name="GiftLid" 
    Source="giftlid.png" 
    WidthRequest="150" 
    HeightRequest="28" 
    TranslationY="-24" /> 
</Grid>

C#:

protected override async void OnAppearing() 
{ 
    base.OnAppearing();
     
    while (true) 
    { 
    // Open the gift 
    await Task.WhenAll( 
    GiftLid.TranslateTo(0, -85, 650, Easing.SinOut), 
    GiftGlow.FadeTo(1, 650), 
    GiftGlow.ScaleTo(1.2, 650) 
    );
     
    // Magical glow pulse 
    await GiftGlow.ScaleTo(1.5, 800, Easing.SinInOut); 
    await GiftGlow.ScaleTo(1.2, 800, Easing.SinInOut);
     
    
    // Close the gift 
    await Task.WhenAll( 
    GiftLid.TranslateTo(0, -24, 650, Easing.SinInOut),  
    GiftGlow.FadeTo(0, 650), 
    GiftGlow.ScaleTo(0.3, 650) 
    );
     
    await Task.Delay(500); 
    } 
}

4. Falling Snowflakes Animation ❄️

Let’s create a beautiful snowfall animation with snowflakes falling gently across the screen! We’ll use different sizes, speeds and positions to make the snowfall look more natural and magical. Let’s see how easy it is to bring this winter to life in .NET MAUI!

XAML:

<Grid 
x:Name="SnowContainer" 
BackgroundColor="#142B49" />

C#:

protected override async void OnAppearing() 
{ 
base.OnAppearing();
 
await Task.Delay(300);
 
for (int i = 0; i < 25; i++) 
    { 
    var size = Random.Shared.Next(12, 28); 
    var snowflake = new Image 
    { 
    Source = "snowflake.png", 
    WidthRequest = size, 
    HeightRequest = size, 
    Opacity = Random.Shared.Next(5, 10) / 10.0, 
    HorizontalOptions = LayoutOptions.Start, 
    VerticalOptions = LayoutOptions.Start 
    };
 
SnowContainer.Children.Add(snowflake); 
_ = FallAsync(snowflake); 
await Task.Delay(180); 
} 
}

private async Task FallAsync(Image snowflake) 
{ 
    while (true) 
    { 
    var x = Random.Shared.NextDouble() * 
    Math.Max(0, SnowContainer.Width - 50);
     
    snowflake.TranslationX = x; 
    snowflake.TranslationY = -30;
     
    await snowflake.TranslateTo( 
    x + Random.Shared.Next(-40, 41), 
    SnowContainer.Height + 30,  
    (uint)Random.Shared.Next(5000, 10000), 
    Easing.Linear); 
    } 
}

5. Santa’s Hat Animation

Let’s wrap up our Christmas animations with a little Santa magic! ✨

In this final animation, we’ll make Santa’s hat gently bounce up and down while its fluffy pom-pom swings from side to side. To bring it to life, we’ll combine TranslateTo() and RotateTo() to create a fun, playful effect with just a few lines of code.

XAML:

<Grid 
    x:Name="SantaHat" 
    WidthRequest="220" 
    HeightRequest="200" 
    HorizontalOptions="Center" 
    VerticalOptions="Start"> 
    
    <Image 
    Source="santahat.png" 
    WidthRequest="220" 
    HeightRequest="200" />
 
    <Image 
    x:Name="PomPom" 
    Source="santapom.png" 
    WidthRequest="44" 
    HeightRequest="44" 
    HorizontalOptions="Center" 
    VerticalOptions="Center" 
    TranslationX="84" 
    TranslationY="16" 
    AnchorX="0.1" 
    AnchorY="0.2" /> 
</Grid>

C#:

protected override async void OnAppearing() 
{ 
base.OnAppearing();
  
    while (true) 
    { 
    await Task.WhenAll( 
    SantaHat.TranslateTo(0, -15, 500, Easing.SinInOut), 
    PomPom.RotateTo(20, 500, Easing.SinInOut) 
    );
     
    await Task.WhenAll( 
    SantaHat.TranslateTo(0, 0, 500, Easing.SinInOut), 
    PomPom.RotateTo(-20, 500, Easing.SinInOut) 
    ); 
    } 
}

Conclusion

And that’s it! See how we created such beautiful animations in just a few minutes?

The key is to think outside the box and remember that with the native animations available in .NET MAUI, we can create amazing things with just a few lines of code!

From making Christmas tree lights blink, to watching snowflakes fall across our screens, and even bringing Santa’s hat to life, we’ve seen how simple animations can add a little Christmas magic to our apps! ❄️

Now it’s your turn! I encourage you to explore, experiment and let your creativity shine. Don’t limit yourself to Christmas animations. Imagine all the fun things you can create!

See you in the next article!

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

We're rolling out a new model training control for Search Services History.

1 Share
Manage your Google data with a new setting that lets you opt out of AI training while keeping your Search, Maps, and Shopping history. Update yours.
Read the whole story
alvinashcraft
2 hours ago
reply
Pennsylvania, USA
Share this story
Delete

More agents, fewer blind spots: Inside GitHub Copilot code review

1 Share

Agents are writing more of our code every day, and every pull request still needs a review before it merges. Human reviewers can’t read every line of that growing volume, so teams are using AI to help.

An AI reviewer has to clear a hard bar, though. If it misses real bugs, nobody trusts its silence. If it buries those bugs in false alarms, nobody reads its comments.

Getting both right means finding actionable bugs, keeping false positives low, and holding latency and cost in check. At a fixed price, we’ve found that several smaller, independent reviewers using complementary models often outperform a single reviewer powered by a stronger model. We used that idea to rebuild Copilot code review’s Lite and Balanced tiers and to launch a new Max tier for your highest-stakes pull requests. This post explains why that works, how we turn many reviewers’ findings into one review, and how we used the idea to rebuild Copilot code review’s tiers.

Why does this work? A simple example

Consider a review agent with a fixed prompt, model, and set of tools. Suppose it has a 60% chance of flagging a particular bug in a pull request. It might catch that bug on one pass and miss it on the next.

If we run that reviewer twice, independently and in parallel, the probability that at least one run finds the bug rises to 84%, while the cost doubles. With three independent runs, the probability rises to 94%, while the cost triples.

More generally, if each reviewer has probability p of finding a particular bug, the probability that at least one of n independent reviewers finds it is 1 − (1 − p)^n. In our example, p = 0.6. The key is that only one reviewer needs to find the bug.

Running several reviewers also has a cost in time. Review time can increase modestly because we have to wait for the slowest reviewer to finish.

Same-model and mixed-model reviews

Repeatedly running the same reviewer only takes us so far. We start to see diminishing returns after the third run.

Each model also has biases shaped by its training. Some bugs remain difficult for a given model to flag, no matter how many times it reviews a pull request. Models have particular strengths when reviewing code, and they also have specific blind spots.

To illustrate this, we used ReviewBench to measure the percentage of critical bugs found using GPT-6.1 Sol (high reasoning), Claude Opus 5.5 (high reasoning), and combinations of the two. You can read more about ReviewBench in our earlier blog post.

In the chart below, the dashed line shows the highest percentage of critical bugs found at each price point by repeatedly running either GPT-6.1 Sol or Claude Opus 5.5. The solid line shows the highest percentage found by combining the two models.

Step chart titled “Critical recall vs. budget.” The x-axis shows average-cost budget per PR from $0 to $3; the y-axis shows critical grounded recall from 45% to 70%. Dashed blue “Same model” and solid green “Mixing allowed” lines rise from about 51% recall at low budgets. At $3 per PR, recall is about 61% for the same model and 66% when mixing is allowed, an estimated gain of 4.70 percentage points.

The solid line is always at or above the dashed line, because a mix can include the single-model option. What matters is the gap between them, which shows the improvement available from mixing models. At $3 per pull request, combining these two models raises the share of critical bugs caught on ReviewBench by 4.9 percentage points, from 61.3% to 66.2%.

Copilot code review can draw on models from different providers, so it isn’t limited to one model family’s strengths and blind spots. That flexibility lets us pick complementary reviewers that perform best at a given price point.

Cohesive reviews

When two independent reviewers examine the same code, they may find some of the same bugs, and each may find issues the other misses. To reduce noise and avoid reporting the same issue several times, we combine their findings into one cohesive review. That means deduplicating findings and removing false positives.

Copilot code review uses two strategies to do this: voting and agentic aggregation.

  • Voting deduplicates the findings from all reviewers and counts how many reviewers flagged each one. Findings with fewer votes than a set threshold are suppressed, on the assumption that fewer votes signals lower confidence. Voting is fast and cost-effective, because deduplication takes only one-shot LLM calls.
  • Agentic aggregation uses an agent to reconcile the findings from all reviewers into one review. The agent can curate and refine findings, resolve disagreements, and double-check that each finding is accurate. In exchange, the review takes longer and costs more.

Let’s look at an example of a pull request that changes src/catalog/service.py, a Python file:

from catalog import cache, repository as repo

CACHE_TTL_SECONDS = 60


def get_product(product_id):
    cached = cache.get(product_id)
    if cached is not None:
        return cached

    product = repo.find(product_id)
    if product is not None:
        cache.put(
            product_id,
            product,
            ttl_ms=CACHE_TTL_SECONDS,
        )

    return product


def rename_product(product_id, name):
    repo.rename(product_id, name)

Three independent reviewers examine the changes and produce these findings:

Candidate findingReviewer AReviewer BReviewer C
Cache expiration uses the wrong unitsXXX
Renaming a product leaves stale cached dataXX
Missing products crash the endpointX

The first two findings are true positives. The cache expects expiration times in milliseconds, and renaming a product updates the database but leaves its cached snapshot unchanged. A closer look at src/api/products.py, a file this pull request didn’t change, tells a different story about the third finding:

from catalog.service import get_product


def product_endpoint(product_id):
    product = get_product(product_id)

    if product is None:
        return 404, {"error": "Not found"}

    return 200, {"name": product["name"]}

An existing guard already returns a 404 for a missing product, so the third finding is a false positive. Now consider what happens as we vary the voting threshold, which is the number of reviewers that must flag an issue before we show it:

Threshold# of True Positives# of False PositivesPrecisionRecall
12167%100%
220100%100%
310100%50%

With a threshold of one vote, we flag two real bugs and one false positive. Raising the threshold to two removes the false positive and leaves only real bugs, which raises precision. Raising it to three drops one of the real bugs, which lowers recall.

Voting gives us a cheap, fast, and simple way to curate findings. The challenge is choosing the right threshold, which can vary between pull requests. Agentic aggregation lets a more capable model check each finding, remove false positives, and filter out low-severity nits. In this example, an aggregator that checked src/api/products.py could drop the false positive and keep both real bugs, at the cost of a longer, more expensive review.

Voting rewards agreement and controls noise, which makes it useful when cost and latency are tight. Agentic aggregation costs more and, in our experiments, produced higher-quality findings.

New review tiers

We used independent, complementary reviewers and aggregation to rebuild our existing Lite and Balanced tiers and to launch a new Max tier. At a high level, each tier reviews your pull request with these agents:

  • Lite: 4× GPT-5.6 Luna reviewers, combined with voting.
  • Balanced: 3× GPT-6.1 Sol reviewers, combined with agentic aggregation by GPT-6 Astra.
  • Max: 4× GPT-6.1 Sol, 2× Claude Opus 5.5, and 2× GPT-6 Astra reviewers, combined with agentic aggregation by GPT-6.1 Sol.

To develop and iterate on the initial configurations for all three tiers, we used ReviewBench, a benchmark for code review agents built on representative GitHub pull requests and production-aligned metrics. We then ran several rounds of online experiments on internal and external traffic.

How we measure

  • Online experiments: In total, 1.4 million pull requests, including external ones, were involved in the online experiments to design the lite and balanced tiers between September 16 and October 7. We used 30K internal reviews within GitHub and Microsoft between October 2 and 7 to design and test the Max tier.
  • Severity: Each finding is labeled critical, moderate, or low by a separate agent using a rubric. A critical comment is a concrete problem that should be fixed before merging; a moderate one is an issue that affects behavior but is unlikely to cause serious harm, while a low severity comment is one that describes a minor improvement that can safely be deferred.
  • Precision: The share of findings that are real issues.
  • Recall: The share of real issues that Copilot code review found. We estimate this at review time by looking at the comments and issues identified by other agents or humans and comparing them to those flagged by Copilot code review.
  • Addressed/Ignored/False positive: Just as we have a separate agent label severity, we also have an agent check whether a comment was addressed or ignored. An addressed comment is one which is fixed when the pull request merges, while an ignored one is one on which a user does not act upon. A false positive is a comment that a user has explicitly indicated is incorrect or invalid.

Here’s how the final tier configurations performed online:

Comparison table for Lite, Balanced, and Max. Online precision is 69%, 75%, and 73%; recall is 57%, 61%, and 67%; F1 is 62, 67, and 69. Findings per review are 1.24, 1.14, and 2.01, with 0.58, 0.41, and 0.75 high-severity findings. Median cost per review is $0.19, $1.18, and $7.90; median time is 4, 4, and 12 minutes.
Note: The F1 score is the harmonic mean of precision and recall and is used in ReviewBench (in an offline setting) to rank review agents.

What is the difference in coverage and quality?

First, let’s compare the average number of findings per review for each tier, broken down by severity:

Stacked bars show average high-, medium-, and low-severity findings per review. Lite: 0.58 high, 0.47 medium, 0.18 low, total 1.24. Balanced: 0.41 high, 0.65 medium, 0.08 low, total 1.14. Max: 0.75 high, 1.09 medium, 0.17 low, total 2.01.

Max provides the greatest coverage, especially of critical issues, which was our goal. Lite and Balanced produce a similar total number of findings per review, and Lite produces more critical and low-severity findings. Balanced finds fewer issues than Lite, but more of them are worth fixing.

The chart below shows the percentage of critical and moderate findings that developers addressed, ignored, or that were classified as false positives, for each tier:

Stacked bars compare addressed, ignored, and false-positive findings for Lite, Balanced, and Max reviews. For critical findings, addressed rates are 59.9%, 70.0%, and 76.3%; for moderate findings, 63.3%, 67.7%, and 74.4%.

Together, these form three distinct tiers. Developers act on more findings as you move from Lite to Balanced to Max. That makes Lite better for frequent review while you’re iterating, and moving to Balanced and Max as you get closer to final.

How much do the tiers cost?

Each tier targets a specific price and quality range, with target costs rising roughly 6× from one tier to the next. Lite is designed for frequent reviews as you iterate. Max is designed for a thorough pass before you merge.

Three overlapping cost distributions on a logarithmic USD axis compare Lite, Balanced, and Max plans. Median costs are $0.19, $1.18, and $7.90; dashed lines mark average costs of $0.27, $1.50, and $9.27.

Balanced sits between them, offering a middle ground between fast iteration and a final review.

Max also asks more of you. It leaves about two findings per review, compared with about 1.1 to 1.2 for Lite and Balanced, so there’s more to read. It’s worth using it where a missed bug would typically cost more than the review.

How long does each tier take?

Review time matters too. Sometimes you need fast feedback while you build. Other times, correctness and thoroughness matter more than speed.

Overlaid duration distributions compare Lite, Balanced, and Max. Median times are 3.8, 3.9, and 12.4 minutes; the 90th-percentile times are 7.3, 7.8, and 20.0 minutes.

Lite and Balanced typically finish in about four minutes. Max takes about 12 minutes at the median and can take 20 minutes at the 90th percentile, so it fits best as a final pass.

Just a starting point

This is a snapshot of where the tiers stand today. As new models become available and our approach improves, we’ll update each tier to deliver the best performance we can within its price range.

Next: Review effort that fits the change

Every tier uses the same tools and review prompt. The tier sets how hard Copilot code review looks. Your repository’s context sets what it knows to look for, including your team’s conventions, the exceptions you allow, and the mistakes your reviewers keep catching.

Different parts of a pull request may also need different levels of attention. Some may require a frontier model, while a smaller model may be sufficient for others. We’re working toward dynamic code review, dispatching reviewers from a roster of review personas to specific parts of a pull request and tailoring the review to its needs.

The goal remains one useful review: more chances to catch important issues, without handing the work of sorting through findings back to you.

Try the Max tier on your next high-stakes pull request.

Acknowledgments

Thank you to the science, engineering, and product teams across GitHub and Microsoft who helped make these new tiers a reality!

The post More agents, fewer blind spots: Inside GitHub Copilot code review appeared first on The GitHub Blog.

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