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

Rubber Duck in GitHub Copilot CLI

1 Share

In 2012(!) I blogged about rubber duck debugging to help me troubleshoot issues. It's a practice I'm still using even today. With GitHub Copilot CLI's newest update, rubber duckis becoming AI driven. Copilot introduces a second AI model from a different family to critique your agent's plans and implementations at the moments where feedback has the highest return.


Let's have a look at it in more detail...

What rubber duck actually does

Rubber Duck is not a general-purpose chat assistant. It's a review agent that will use a model from a complementary AI family to whichever model you've selected as your orchestrator.

When you're running a Claude model as your orchestrator, Rubber Duck runs on GPT-5.4. This is intentional: a model reviewing its own output is still bounded by its own training biases. A cross-family reviewer brings genuinely different blind spots to the table.

Rubber Duck's output is deliberately narrow — a short, prioritised list of concerns: missed edge cases, questionable assumptions, and architectural issues the primary agent didn't surface.

When Copilot invokes rubber duck automatically

You can call the Rubber Duck yourself, but Copilot can also do this proactively at three specific checkpoints:

  1. After drafting a plan — before implementation begins. This is the highest-value intervention point: a flawed assumption here compounds into every subsequent step.
  2. After a complex implementation — a second pass on non-trivial code before you commit to the direction.
  3. After writing tests, before running them — catching gaps in coverage or incorrect assertions before they self-validate.

Copilot can also trigger Rubber Duck reactively if it gets stuck in a loop and can't make forward progress.

Triggering it yourself

You can request a Rubber Duck critique at any point in your session. Just tell Copilot to critique its current work. It will invoke Rubber Duck, reason over the feedback, and surface a diff of what changed and why. This is useful before you commit to a plan you're not fully confident in, or after a long agentic run you want double-checked before merging.

How to enable it

Rubber Duck lives in experimental mode. To access it:

# Enable experimental features
/experimental

Today it works for any Claude model from the model picker and when you have access to GPT-5.4. You'll see critiques surface inline — either automatically at the checkpoints above, or on demand when you ask.

When it won't help much

Rubber Duck is optimised for complex, multi-step, multi-file work. For short, well-scoped tasks — a single-function change, a straightforward refactor within one file — the overhead of a cross-model review adds latency without proportional benefit. The agent is designed to invoke it sparingly for exactly this reason.

Practical workflow recommendation

For high-stakes agentic tasks, a reasonable pattern is:

  1. Let Copilot draft the plan.
  2. Before approving the plan, explicitly ask for a Rubber Duck critique — even if Copilot didn't trigger one automatically. This is the cheapest point to catch structural issues.
  3. Proceed with implementation.
  4. After implementation on anything touching 3+ files or involving shared state, request another critique before running tests.

The on-demand trigger gives you full control over when cross-model review runs, regardless of what Copilot decides automatically.

More information

Rubber Duck Debugging

GitHub Copilot CLI combines model families for a second opinion - The GitHub Blog

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

Angular 22: The Evolution of Modern Angular

1 Share

Signals, Zoneless, declarative async resources: Angular 22 makes standard several features that help developers build better apps.

A few days ago, we checked out Google I/O 2026, and today we need to talk about our favorite framework: Angular. Why? Because version 22 is here!

Angular v22 is a major update focused on stability, performance and ergonomic APIs. It brings a more polished signal-driven platform and better data loading primitives that make modern apps feel faster and simpler to build.

Before we look at the most interesting changes, let’s talk about the foundation. Angular v22 stabilizes the features we have been testing in the last few versions. If you want to build a high-performance app today, these are the new standards.

Stable Signal Forms and httpResource

Reactive Forms were great, but they often felt separate from the modern Signal-based reactivity. In v22, Signal Forms are officially stable.

What does this mean for us?

  • Better reactivity: No more unnecessary updates when a single field changes.
  • Better type safety: We finally have a form system that works perfectly with TypeScript.

Do you remember HttpClient and the manual toSignal conversions? They worked, but they added extra code. Now we have httpResource.

It is the new standard for fetching data. It treats your HTTP requests as signals, automatically handling the loading, error, and data states for you.

Learn more: Dive deeper into Getting Started with httpResource API and learn more about Angular Signal Forms vs. Reactive Forms.

But what if your request depends on another signal? In v22, we have the new chain() method. It allows you to link resources together. If the first resource is loading, the second one waits automatically. This is a big win for complex data!

Wait, what if you are already using RxJS? Don’t worry, Angular has a solution for that too. Let’s see how v22 handles the transition from Observables to Resources.

RxResource vs. httpResource

A common question is: “Should I stop using RxJS?” The answer is no. Angular v22 introduces rxResource as the perfect partner for your existing Observable streams.

  • httpResource: Use this for standard API calls. It is optimized for the Fetch API and handles JSON automatically.
  • rxResource: Use this when your data source is an existing Observable. It allows you to use the power of RxJS operators inside the clean, Signal-based Resource API.

Now that we have our data fetching ready, how do we make sure our users and agents can navigate efficiently? Let’s talk about the new smart navigation features in the Router.

Smart Navigation and Incremental Hydration

The Angular Router received some updates in v22 that solve common problems.

  • URL decoupling: You can now keep a clean URL in the address bar while the app shows a different state. With the new browserUrl input on RouterLink, you can show /profile while the router actually uses /users/123.
  • Parameter inheritance: Child routes now inherit parameters from their parents by default, and you don’t need extra configuration to get an ID from a parent route.

But a great UI and smart routing mean nothing if the page is slow to load. This brings us to the most impressive performance update in v22: incremental hydration.

Server-Side Rendering (SSR) is no longer a problem. In v22, incremental hydration is the default.

Angular now loads your application in small parts as they become visible. Combined with resource caching, the client can use the data fetched on the server without making a second API call. The user sees the data instantly, and the “flicker” of reloading data is gone.

Learn more: Explore The New Angular Hydration for in-depth details.

But performance is also about how the browser handles changes. This is where the biggest change in Angular’s history reaches its peak.

Zoneless and OnPush by Default

For years, zone.js was the engine behind Angular’s change detection. With v22, Angular is now Zoneless by default.

By using ChangeDetectionStrategy.OnPush as the default for new components, we get:

  • Smaller app sizes: We no longer need the heavy Zone.js library.
  • Fast performance: The framework only checks what it needs to, exactly when it needs to.

If you have an older app, don’t worry! There is a migration tool that adds ChangeDetectionStrategy.Eager (the new name for the old behavior) so your app keeps working while you move to Signals.

Now, how do we make sure our fast code actually works? Let’s talk about the new speed king of testing.

Vitest

Testing used to be the slow part of our work. Not anymore. Angular v22 officially replaces Karma/Jasmine with Vitest as the default test runner.

It is very fast and shares the same configuration as your build pipeline. Also, the new migrate-karma-to-vitest tool makes the change very easy, even for complex tests!

Do you want to try Vitest?

Angular Aria: Accessibility for Everyone

Building custom components with correct ARIA roles and focus management can be difficult. In v22, Angular Aria is officially stable.

Think of it as “headless accessibility.” It provides the logic you need to build your own accessible components. It handles the complicated parts of ARIA attributes and keyboard interactions for you.

Why does this matter for AI? Because accessible apps are much easier for AI Agents to understand!

Check this example about how to build accessible components with Angular Aria.

Developer Experience & Safety

In v22, we finally have @boundary as part of the preview story. It is useful for future error-handling patterns. Here’s how @boundary works for error containment:

@Component({
 selector: 'app-user-profile',
 standalone: true,
 template: `
   <div>
     <h2>User Profile</h2>
     <p>{{ userData() }}</p>
   </div>
 `
})
export class UserProfileComponent {
 userData = signal(null);
}


@Component({
 selector: 'app-dashboard',
 standalone: true,
 imports: [UserProfileComponent],
 template: `
   <div>
     <h1>Dashboard</h1>
     @boundary on error {
       <p>Failed to load user profile</p>
     } {
       <app-user-profile />
     }
   </div>
 `
})
export class DashboardComponent {}

Selectorless Components

You no longer need a selector for a component that only lives in a route. It reduces extra code.

@Component({
  standalone: true,
  // No selector needed! Perfect for routes or dynamic loading
  template: `<h3>I'm a lean, selectorless component!</h3>`
})
export class DetailViewComponent {}

Async Dependency Injection

The injectAsync() function allows us to load services only when they are needed. This keeps your app small and fast.

async onReportRequested() {
  // We only load the heavy AnalyticsService when the user clicks!
  const analytics = await injectAsync(AnalyticsService);
  analytics.track('report_viewed');
}

Building a Dashboard with Angular 22

Instead of just explaining features, let’s build a practical dashboard example that uses the stable core of Angular v22: @Service(), httpResource() and the new template syntax.

Want to follow along? You can clone the complete project from GitHub: angular-22-nba-finals. Just run npm start and you’ll have the dashboard running locally.

The Data Service with @Service

Now, let’s create our service. We will use the new @Service() decorator (which replaces @Injectable()) and httpResource to fetch the games. Notice how httpResource handles loading and error states for you.

// src/app/nba.service.ts
import { Service } from '@angular/core';
import { httpResource } from '@angular/common/http';

export interface NbaGame {
  id: number;
  gameNumber: number;
  homeTeam: string;
  homeScore: number | null;
  awayTeam: string;
  awayScore: number | null;
  status: 'Final' | 'Scheduled';
  date: string;
  location: string;
}

@Service()
export class NbaService {
  // httpResource is the standard for fetching data
  gamesResource = httpResource<NbaGame[]>('/api/nba-finals');
}

The UI Layer & Error States

We display the data using the new @for block and keep the error handling inside the component template. This keeps the example focused on stable Angular v22 behavior.

// src/app/app.ts
@Component({
  template: `
    <app-dashboard></app-dashboard>
    <router-outlet></router-outlet>
  `
})

Our Dashboard component remains simple:

// src/app/dashboard.component.ts
import { Component, inject } from '@angular/core';
import { NbaService } from './nba.service';

@Component({
  selector: 'app-dashboard',
  standalone: true,
  template: `
    <div class="dashboard">
      <h1>NBA Finals 2026: Knicks vs Spurs</h1>

      @if (nbaService.gamesResource.isLoading()) {
         <p>Loading game data...</p>
      } @else {
        <div class="cards">
          @for (game of nbaService.gamesResource.value(); track game.id) {
            <div class="card">
              <div class="meta">Game {{ game.gameNumber }} • {{ game.date }}</div>
              <div class="score">
                {{ game.homeTeam }} {{ game.homeScore }} vs {{ game.awayScore }} {{ game.awayTeam }}
              </div>
              <div class="status">{{ game.status }}</div>
            </div>
          }
        </div>
      }
    </div>
  `
})
export class DashboardComponent {
  nbaService = inject(NbaService);
}

Save changes and run ng server navigate in the browser and tada!!!

Angular 22 example dashboard using signals and httpResource

Done!! We play with the stable part of Angular v22 using @Service() for a clean singleton service definition, httpResource() for declarative, signal-based HTTP loading and @for with @if in templates to render loading and data states.

And, of course, AI is not forgotten by the Angular team. They updated and added new tools for Angular MCP and Skills. Let’s see them!

Angular MCP and Skills

Of course, Angular continues embracing AI. The Angular MCP exposes app state and builds workflows for tools that understand Angular projects. That includes server-side MCP tools such as devserver.wait_for_build, devserver.start and devserver.stop.

Version 22 also introduces Agent Skills for Angular, a lightweight set of skill definitions that give AI assistants direct knowledge of modern Angular idioms and best practices. These skills are useful for teams that want to integrate agent-assisted coding into their workflow without pain.

Recap

Angular 22 is a declaration that the way we build for the web has evolved. And by using Signals, Zoneless performance and declarative async resources, we can build applications that are faster, simpler and easier to maintain.

This release is about making stable patterns:

  • Use httpResource() for fetch-heavy components.
  • Use @Service() for singleton services.
  • Use injectAsync() when you want to defer heavy service loading.
  • Let template syntax like @for and @if keep your view code readable.
  • Embrace the AI era with Agent Skills and MCP tools.

My advice is don’t just read this article—build something! Take the dashboard we sketched and turn it into an interactive experience with Progress Kendo UI for Angular AI Chat. A chat interface is a powerful way to explore the series score in real time and it’s a great way to test Angular 22 with a modern Kendo UI scenario.

Feel free to watch for all the new features in Angular 22:

Happy coding!

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

Why WebMCP Matters for AI-Powered Angular Apps?

1 Share

Why WebMCP Matters for AI-Powered Angular Apps

TL;DR: WebMCP makes apps AI-ready by exposing structured actions, enabling AI to act with precision instead of guessing from the UI. This means faster outcomes, fewer errors, and smoother user experiences. In Angular apps, it shifts AI from a chat assistant to a system capable of performing real-world tasks. Syncfusion supports this with Angular AI AssistView and rich UI components that make every AI action clear, intuitive, and trustworthy.

AI in web apps looks impressive, but in many cases, it still behaves like an add-on rather than a true part of the product.

Most applications today expose AI through a prompt box. It can answer questions, summarize, or generate content. That works for simple scenarios. But the moment users expect AI to complete tasks, trigger operations, or interact with real data, the limitations become clear.

The next phase of AI isn’t about better chat; it’s about action-driven experiences.

AI apps are moving beyond chat

Early AI integrations focused on chat because it’s intuitive. But real-world apps go beyond conversation; they’re complex systems designed to execute processes.

  • A financial app needs filtering, comparisons, and anomaly detection.
  • A support console requires triaging, recommendations, and actions.
  • An operations system manages approvals, scheduling, and execution.

In these environments, AI’s value lies in helping users complete tasks, not just in generating responses.

The challenge is that most AI systems still don’t understand how to reliably interact with applications. They can suggest what to do, but struggle to act consistently.

This is the gap WebMCP aims to address.

What is WebMCP?

WebMCP (Web Model Context Protocol) is an emerging/proposed client-side approach that lets web apps expose their capabilities to AI in a structured, machine-readable way.

Instead of interpreting UI elements like buttons and forms, AI can directly understand:

  • Available actions.
  • Required inputs.
  • When and how to execute them.

It turns your app into a set of well-defined tools rather than a surface AI must interpret.

Why this matters for real AI experiences

Without structure, AI agents try to “figure out” your UI. This leads to fragile behavior:

  • Labels change → Actions fail.
  • Layout shifts → Context breaks.
  • Small errors → Entire project collapse.

WebMCP reduces much of this uncertainty by giving agents a clearer contract.

Result:

  • Predictable behavior.
  • Reliable execution.
  • Consistent processes.

AI can move from UI guessing toward more reliable, tool-based execution.

How WebMCP reduces reliance on fragile UI guessing with reliable AI actions

With WebMCP, your app no longer needs AI to interpret the interface. Instead, it can directly expose its capabilities through:

This changes the core question from How can AI use our UI? to Which app capabilities should AI safely and reliably control?

By making actions explicit and structured through WebMCP, AI moves beyond being a surface-level feature and becomes a trusted participant in your product experience.

WebMCP changes the AI-app relationship

The shift for Angular apps

Angular apps are typically designed for structured, process-driven use cases. That makes them especially well-suited for this shift.

Angular already provides:

  • Strong state management.
  • Clear component boundaries.
  • Predictable data flow.

WebMCP builds on top of this by exposing those processes as structured actions.

A clear signal from the Angular ecosystem

There’s also an important shift happening in the Angular ecosystem.

Angular’s AI direction is no longer limited to developer tooling. Angular CLI already includes an experimental MCP server that helps AI assistants interact with Angular projects in the development environment. That is useful for developers, but it is not the same as WebMCP inside the browser.

For Angular developers, this matters because Angular’s WebMCP support is designed around familiar Angular concepts:

  1. Tools can be:
    • Registered through Angular’s dependency injection lifecycle.
    • Provided at the app level.
    • Scoped to specific routes.
    • Declared inside services.
  1. Tool inputs can be described with structured schemas.
  2. Angular Signal Forms can be turned into AI-ready tools with minimal configuration. Because the APIs are experimental, teams should validate inputs and account for Signal Form constraints.

This aligns closely with Angular’s existing architecture, making adoption more natural for Angular teams.

Designing AI as a product participant

The key mindset shift is simple: AI is not a feature. It is part of the interaction model.

Not every app needs a fully autonomous agent. But many can benefit from agent-assisted executions in well-defined areas.

Where this makes an immediate impact

A few examples make the opportunity clearer.

  • In a sales analytics app, an AI assistant could help users explore performance trends. But the real value lies in its ability to trigger specific, trusted actions, such as applying date filters, generating a summary view, or highlighting underperforming segments.
  • In a support app, the assistant could summarize a ticket history, draft a response, and surface the next best action. With structured tool access, it could open a related customer record or set up the steps needed for resolution, rather than leaving the user to do everything manually.
  • In a document-heavy business app, AI could extract key points from uploaded material, but the surrounding product still needs tables, visualizations, approval flows, form validation, and stateful interactions that guide users toward completion.

A better way to think about AI-powered Angular Apps

This is where AI strategy becomes UX strategy. The winning apps will not be the ones that merely contain AI. They will be the ones who shape AI into a predictable, useful part of the system.

Governance and safety for WebMCP-enabled actions

When AI agents can trigger actions inside apps, governance must be built in from the start, not layered on later. The goal is to ensure every action is secure, auditable, and aligned with user intent.

  • User-level authorization enforcement
    Every action must respect the signed-in user’s permissions, ensuring agents can only access and perform what the user is already allowed to do.
  • Mandatory confirmation for sensitive actions
    High-impact actions like deleting data, submitting approvals, sending messages, or updating records should always require explicit user confirmation before execution.
  • End-to-end auditability
    Agent activity should be fully traceable, including the requested action, context, user approval, system execution, and final outcome.
  • Scoped and controlled capabilities
    Exposed actions should be tightly defined tools with limited inputs and predictable outputs, avoiding broad or unrestricted access.
  • Human-in-the-loop for critical tasks
    For regulated or high-stakes scenarios, humans should remain in control, with AI supporting preparation and recommendations rather than making final decisions.
  • Lifecycle-aligned governance
    Safety and oversight should extend across the entire app lifecycle, including design, deployment, and release processes.

Where Syncfusion Fits: Building the UI foundation for AI-ready Angular experiences

For Syncfusion® Angular users, the practical takeaway is not to treat WebMCP as a built-in component capability at this time. Instead, the opportunity is to build the structured UI and execution foundation that future AI-assisted experiences will need.

As browser-level AI interaction models such as WebMCP evolve, this kind of structured UI foundation becomes even more important. AI may help expose, recommend, or trigger actions, but users still need clear and reliable interfaces to understand, control, and trust those actions.

For Angular teams, the practical challenge is therefore not only exposing agent-friendly actions. It is also designing the surrounding product experience that makes AI useful, visible, and trustworthy to end users.

AI AssistView: The conversational entry point

The Syncfusion Angular AI AssistView gives teams a ready-made conversational surface for AI-powered interactions. It supports:

  • Prompt and response experiences,
  • Built-in toolbars,
  • Prompt suggestions,
  • Attachments,
  • Custom views,
  • Templates, and
  • Real-time streaming.

Syncfusion also supports AI-related enhancements in Angular, including real-time streaming responses and SpeechToText for voice-to-text input.

This becomes the front door for AI interactions.

Beyond chat: Why the full UI system matters

AI operates inside a broader application experience.

That’s why Syncfusion’s broader Angular component ecosystem also provides:

  • DataGrid,
  • Query Builder,
  • Charts,
  • Scheduler,
  • Gantt Chart,
  • Kanban,
  • File Upload,
  • PDF Viewer,
  • DOCX Editor,
  • Spreadsheet Editor,
  • Rich Text Editor,
  • SpeechToText,
  • Chat UI,
  • Inline AI Assist, and
  • Dashboard Layout.

These components transform AI outputs into structured, actionable experiences.

The bigger picture

The goal isn’t just adding AI, it’s designing systems where AI and UI work together.

  • Chat enables interaction.
  • Actions drive value.
  • UI enables execution.

This moves teams from: “Add AI to the app” to “Build an app where AI helps complete work.

What should product teams do now?

WebMCP is still early, so this isn’t the moment for blanket adoption. It is the moment for clearer thinking.

Treat WebMCP as an architectural direction to watch and prototype, not a mature browser capability to depend on broadly today.

Focus on high-value, structured use cases:

  • Start with tasks that are repetitive, structured, and governed by clear rules.
  • These are far better candidates for future agent integration than open-ended, ambiguous experiences.

Design for clarity and user trust:

  • AI interactions must keep users oriented at all times.
  • Prioritize visibility (what the AI is doing), confirmation (before actions execute), and transparency (why it’s doing it).
  • A strong UI is just as critical as model quality; users need to clearly understand and trust the actions taken.

Be selective, not expansive:

  • Avoid the temptation to expose every feature to AI.
  • The best early wins will come from narrow, high-confidence operations with predictable outcomes.

Align with both product and engineering realities:

  • This focused approach reduces risk and complexity.
  • It improves usability by keeping experiences understandable.
  • It creates a solid foundation to adapt as standards evolve.

Frequently Asked Questions

Is WebMCP only relevant for AI-first products?

No. WebMCP can also make traditional enterprise apps that want to make selected tasks more accessible to AI agents. The value is strongest when the app already contains repeatable actions, structured data, and clear user permissions.

How is WebMCP different from adding a chatbot to an Angular app?

A chatbot usually provides a conversational layer, while WebMCP focuses on exposing app capabilities in a structured way. In practice, an Angular app may use both: a conversational UI for user interaction and WebMCP-style tools for reliable action execution.

Does WebMCP replace existing Angular components or UI architecture?

No. WebMCP does not replace grids, forms, charts, schedulers, or other UI components. It adds an agent-facing layer that can make selected app actions easier for AI systems to understand and invoke.

How should product teams decide which Angular processes are worth exposing to AI agents?

Teams should prioritize processes that are frequent, structured, measurable, and easy to govern. The best early candidates are actions where AI assistance can reduce friction without removing user oversight or increasing operational risk.

Should WebMCP tools be exposed for every feature in an enterprise app?

No. Enterprise teams should start with a small number of high-confidence actions where the business value is clear and the risks are manageable. Exposing too many actions too early can make governance, testing, and user trust harder to manage.

How should teams think about security when exposing app actions to AI agents?

WebMCP-style actions should follow the same permission model as the app itself. An agent should not gain access to actions, records, or processes that the current user is not already authorized to use.

Where does a component library like Syncfusion fit in a WebMCP-ready Angular app?

A component library helps build the visible enterprise experience around AI-assisted systems, including data display, forms, charts, file handling, and conversational surfaces. WebMCP may help agents understand app capabilities, but users still need a trustworthy interface to review, confirm, and complete work.

What is the practical advantage of preparing an Angular app for WebMCP now?

The advantage is architectural readiness. Teams that define clear actions, execution boundaries, state handling, and user confirmations now will be better prepared as agent-facing browser standards and tooling mature.

Harness the power of Syncfusion’s feature-rich and powerful Angular UI components.

Turn conversational AI into action-driven Angular systems

Thanks for reading! WebMCP represents a shift from embedding AI to exposing real application capabilities in a structured, AI-friendly way.

For Angular teams, that’s a big opportunity. Apps built with:

  • Clear execution,
  • Strong state management, and
  • Well-defined UI components

…are naturally better positioned to evolve into AI-ready, action-driven experiences.

This is also where tools like Syncfusion AI AssistView and Angular UI components library fit in. They help teams shape AI into a usable product experience rather than a disconnected novelty.

Get started today

If you’re ready to put this into practice:

Already using Syncfusion? Download the latest version from the license and downloads page.

New to Syncfusion? Start with a 30-day free trial.

Need help or have questions?

We’re here to help you build smarter, more capable Angular apps, every step of the way.

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

The back cover of C++: The Programming Language also raises questions not answered by the front cover

1 Share

A little while ago, we considered how the cover of the book C++: The Programming Language raises questions not answered by the cover, since the cover illustration for a book putatively about the C++ programming language shows code written in JavaScript.¹ But there’s also a question raised by the back cover.

According to the blurb for the book,

The topics included in it are of utmost significance and are bound to provide incredible insights to students. Some of the diverse topics covered in this text address the varied branches that fall under this category. Those in search of information to further their knowledge will be greatly assisted by this textbook.

This sounds like a book report written by a student who didn’t read the book! Those sentences could be used to describe pretty much any textbook.

Indeed, I found nearly identical sentences in the blurb for Casting Handbook (Hannah Wells, editor).

The topics included in this book on casting are of utmost significance and bound to provide incredible insights to readers. Some of the diverse topics covered in this book address the varied branches that fall under this category. It will serve as a valuable source of reference for graduate and post graduate students.

And in Food Industry: Processes and Technologies (Kaden Hunt, editor):

This book is compiled in such a manner, that it will provide in-depth knowledge about the theory and practice of the workings of food industry. Some of the diverse topics covered in this text address the varied branches that fall under this category. This textbook, with its detailed analyses and data, will prove immensely beneficial to professionals and students involved in this area at various levels.

And in Nutrition and Metabolism: Processes and Technologies (Kaden Hunt, editor):

This book provides comprehensive insights into the field of nutrition and metabolism. It provides deep insights about this field. Some of the diverse topics covered in this text address the varied branches that fall under this category. Such selected concepts that redefine this subject have been presented in it. This book aims to shed light on some of the unexplored aspects of this field. It is meant for students who are looking for an elaborate reference text on nutrition and metabolism.

One more example: Material Science and Engineering (Emilio McMahon, editor)

The book aims to shed light on some of the unexplored aspects of materials science and engineering. It describes in detail the various concepts and theories of this field. The topics included in it are of utmost significance and bound to provide incredible insights to students. Some of the diverse topics covered in this book address the varied branches that fall under this category. This textbook is an essential guide for both graduates and post-graduates in this discipline.

The common thread is that all of these books are published by Larson and Keller. I guess they can’t be bothered to spend time crafting a blurb that suits the book, so they just use the same blurb template for all of their books.

¹ Rory Jaffe found that the book cover image it is an Alamy stock photo from 2013 with the title “Program code on a monitor.”

The post The back cover of <I>C++: The Programming Language</I> also raises questions not answered by the front cover appeared first on The Old New Thing.

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

Rotation revisited: Avoiding having to calculate the gcd when doing cycle decomposition

1 Share

Last time, we looked at how clang’s libcxx implementation of std::rotate uses cycle decomposition to minimize the number of swaps. Doing so requires calculating the greatest common divisor, but I noted that the OpenJDK implementation of the java standard library uses a trick to avoid doing the gcd calculation.

The trick is realizing that the total number of elements is equal to the sum of the lengths of each of its cycles, and each of the initial elements belongs to a different cycle. Therefore, we can just keep rotating elements until the number of elements rotated is equal to the total. We don’t have to precalculate the number of cycles; we just let the counter tell us when we’re done.

auto a = std::distance(first, mid); // number of "A" elements
auto n = std::distance(first, last); // total elements
auto count = 0;
auto k = 0;

while (count < n) {
    // Rotate the elements in the cycle starting at k
    auto save = std::move(first[k]);
    auto i, next = k;
    while (i = next, next = (i + a) % n, next != k) {
        first[i] = std::move(first[next]);
        ++count;
    }
    first[i] = std::move(save);
    ++count;
}

The post Rotation revisited: Avoiding having to calculate the gcd when doing cycle decomposition appeared first on The Old New Thing.

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

How to Add Self-Service Analytics to Your WinForms Application

1 Share
Learn how to add self-service analytics to your WinForms application. See more from ComponentOne today. Continue reading
Read the whole story
alvinashcraft
21 minutes ago
reply
Pennsylvania, USA
Share this story
Delete
Next Page of Stories