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

Linus Torvalds gets the AI coding bug (News)

1 Share

Linus Torvalds pushes AI generated code, Jordan Fulghum thinks this is the year of self-hosting, FracturedJson formats for compact / human readability, Scott Werner believes a flood of adequate software is coming, and Sean Goedecke explains why generic software design advice is useless.

View the newsletter

Join the discussion

Changelog++ members support our work, get closer to the metal, and make the ads disappear. Join today!

Featuring:





Download audio: https://op3.dev/e/https://cdn.changelog.com/uploads/news/176/changelog-news-176.mp3
Read the whole story
alvinashcraft
1 hour ago
reply
Pennsylvania, USA
Share this story
Delete

How To Use LLMs for Continuous, Creative Code Refactoring

1 Share
tweak

Refactoring used to be limited to a fixed set of transforms hardwired into IDEs. If the one you needed wasn’t included, you were out of luck and had to do it the hard way. AI-assisted IDEs with Model Context Protocol (MCP) tool support have changed that game. Show them before and after examples of a wide variety of patterns, and they can figure out all kinds of transforms without explicit support for them.

For example, here is a prompt I’m using to clean up XMLUI apps that make unnecessary use of the Fragment component:

I pointed Claude, Cursor and Codex at a directory with an XMLUI app that included uses of Fragment that should and should not be refactored according to these rules. All produced the same correct diff. A conventional approach would entail the use of an XMLUI parser that could distinguish when attributes from others (like gap) and act accordingly. Large language models (LLMs) don’t work that way; they are general-purpose pattern recognizers, and one of my seven rules for working with them is: Exploit pattern recognition.

Extracting Components To Reduce Repetition

It’s easy to create a user-defined component in XMLUI to encapsulate repetition. When you do something once, there’s no need. When you do it again, with variation, you may start to think about extracting what’s common into a component. But it often takes more repetition, with more variation, to clarify what the common core is that a component should embody. There’s always been tension between letting variation happen to discover what’s truly common and consolidating into more readable and maintainable code. LLMs can ease that tension.

Suppose you find yourself doing something like this:

<!‑‑ before ‑‑>
<HStack>
<VStack>
<Text variant=”secondary” fontSize=”$fontSize-sm”>Cloud Cover
<Text fontWeight=”semibold” fontSize=”$fontSize-lg”>{condition.cloudcover}%
</VStack>
<VStack>
<Text variant=”secondary” fontSize=”$fontSize-sm”>Humidity
<Text fontWeight=”semibold” fontSize=”$fontSize-lg”>{condition.humidity}%
</VStack>
<VStack>
<Text variant=”secondary” fontSize=”$fontSize-sm”>Wind Speed
<Text fontWeight=”semibold” fontSize=”$fontSize-lg”>{condition.windspeedMiles} mph
</VStack>
</HStack>

You may realize this would be better:

<!‑‑ after ‑‑>
<HStack>
<WeatherStat label=”Cloud Cover” value=”{condition.cloudcover}%” />
<WeatherStat label=”Humidity” value=”{condition.humidity}%” />
<WeatherStat label=”Wind Speed” value=”{condition.windspeedMiles} mph” />
</HStack>
<‑‑ a new component ‑‑>
<Component name=”WeatherStat”>
<VStack>
<Text variant=”secondary” fontSize=”$fontSize-sm”>{$props.label}
<Text fontWeight=”semibold” fontSize=”$fontSize-lg”>{$props.value}
</VStack>
</Component>

We’re often lazy about applying that kind of transform, but laziness can be a virtue. If you haven’t seen a sufficient number and variety of before cases, you may not yet know what after should be. AI assistants can make experimentation cheap and fluid.

Planning Code Changes With AI Collaboration

AWS Kiro invites you to operate in Spec mode, where you collaborate on writing requirements, design documents and task checklists. In my experience, its reach often exceeds its grasp, and I’ve abandoned several checklists. But the idea took hold in a less formal way and is now woven into conversational use of Claude Code and Codex.

When I asked Claude to implement an authentication gate for an app built by a novice XMLUI developer, it identified all the user-defined components that needed to change, enumerated the changes it proposed to make and noted one component requiring special treatment.

Customers.xmlui has a pattern close to the standard but with some differences:

– Uses contact_id for routes, but id for API URLs
– Only has “Mark as inactive” (no status toggle)
– Delete APICall is outside the DropdownMenuI need to update the component to support different ID fields for routes vs API calls.
Let me do that first.

The app also made unnecessary use of the Queue component, which handles batches of API calls. In this case, there was no need for Queue because the backend provides a batch API. The change entailed the removal of extraneous stuff and the addition of calls to the batch API. Here was the plan:

1. Remove the Queue (lines 106-143)
2. Remove unnecessary variables (lines 4-7): var.action, var.processedCount, var.errorCount, var.completed
3. Replace the bulk action buttons (lines 84-104) to call APICall components instead of Queue
4. Add APICall components following the pattern you described:
– POST /contacts/active with body: {contact_ids: […], organization_id: 906441453}
– POST /contacts/inactive with body: {contact_ids: […], organization_id: 906441453}
– DELETE /contacts/{ids} for bulk delete

In this case, things went exactly as planned. Often they don’t, but the conversational style of AI-assisted coding helps me adjust the plan as work proceeds.

Limiting Software Liability With Cleaner Code

As Cory Doctorow recently observed, code is a liability (not an asset). Tech bosses, he says, don’t know this.

“They think they’ve found a machine that produces assets at 10,000 times the rate of a human programmer. They haven’t. They’ve found a machine that produces liability at 10,000 times the rate of any human programmer.”

For Bruce Schneier, such liability entails legal and financial risks that software makers will need to mitigate with insurance policies that make it costly to ship insecure or otherwise flawed products. Will AI-assisted coding increase software liability? Of course, when used improperly. But two things can be true at the same time. Thoughtful use of AI can also help us reduce liability by making it easier and safer to do the continuous refactoring that keeps codebases lean and clean.

Applying Creative Insight With AI Assistance

With the extraneous uses of Queue removed, there was still repetitive use of APICall to implement a similar pattern across a suite of user-defined components. How to consolidate, given that APICall can’t be packaged in a declarative user-defined component? I realized that APICall‘s imperative, cousin Actions.callAPI, can be used in onClick handlers, obviating the need to declare separate APICall components. That wasn’t an immediate win; it just shifted declarative properties to imperative arguments. But in the imperative domain, it became easier to define families of arguments for different cases. When handling a batch of items, for example, an action’s name might be Mark as active or Delete, its in-progress message might be Marking as active or Deleting, and its completion message might be Marked as inactive or Deleted.

Encapsulating that variation in a function made the code cleaner, but led to a new refactoring challenge. Each component needed a variant of the function. How could they share a common one? AppState provides a global key/value store that’s visible to all user-defined components in an app. It’s typically used to store simple values, but I realized it might be possible to store arrow functions there, too. LLMs won’t discover that kind of creative insight, but when you do, they can help you validate and apply it. In this case, Claude wrote a quick test to prove it would work, then merged a family of similar functions into a common global function.

The ‘Less Is More’ Approach To Coding

The most memorable thing Bill Gates said to me, in a long-ago interview, was: “It’s all about writing less code.” LLMs love to write code, and when used indiscriminately, will create more than we want or need. Code is a liability. It’s on us to rein in the generative instinct of LLMs and focus them on the refactoring needed to limit that liability. We decide when and how to refactor, they do the mechanical transformations — it’s a continuous conversation. Tools built to generate vast amounts of code can, paradoxically, help us write less of it.

The post How To Use LLMs for Continuous, Creative Code Refactoring appeared first on The New Stack.

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

CSS at Scale With StyleX

1 Share

Build a large enough website with a large enough codebase, and you’ll eventually find that CSS presents challenges at scale. It’s no different at Meta, which is why we open-sourced StyleX, a solution for CSS at scale. StyleX combines the ergonomics of CSS-in-JS with the performance of static CSS. It allows atomic styling of components while deduplicating definitions to reduce bundle size and exposes a simple API for developers.

StyleX has become the standard at companies like Figma and Snowflake. Here at Meta, it’s the standard styling system across Facebook, Instagram, WhatsApp, Messenger, and Threads.

On this episode of the Meta Tech Podcast, meet Melissa, a software engineer at Meta and one of StyleX’s maintainers.  Pascal Hartig talks to her about all things StyleX—its origins, how open source has been a force multiplier for the project, and what it’s like interacting with large companies across the industry as they’ve adopted StyleX.

Download or listen to the episode below:

You can also find the episode wherever you get your podcasts, including:

The Meta Tech Podcast is a podcast, brought to you by Meta, where we highlight the work Meta’s engineers are doing at every level – from low-level frameworks to end-user features.

Send us feedback on InstagramThreads, or X.

And if you’re interested in learning more about career opportunities at Meta visit the Meta Careers page.

The post CSS at Scale With StyleX appeared first on Engineering at Meta.

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

AWS Weekly Roundup: AWS Lambda for .NET 10, AWS Client VPN quickstart, Best of AWS re:Invent, and more (January 12, 2026)

1 Share

At the beginning of January, I tend to set my top resolutions for the year, a way to focus on what I want to achieve. If AI and cloud computing are on your resolution list, consider creating an AWS Free Tier account to receive up to $200 in credits and have 6 months of risk-free experimentation with AWS services.

During this period, you can explore essential services across compute, storage, databases, and AI/ML, plus access to over 30 always-free services with monthly usage limits. After 6 months, you can decide whether to upgrade to a standard AWS account.

Whether you’re a student exploring career options, a developer expanding your skill set, or a professional building with cloud technologies, this hands-on approach lets you focus on what matters most: developing real expertise in the areas you’re passionate about.

Last week’s launches
Here are the launches that got my attention this week:

Additional updates
Here are some additional projects, blog posts, and news items that I found interesting:

Crossmodal search with Amazon Nova Multimodal Embeddings Architecture

Upcoming AWS events
Join us January 28 or 29 (depending on your time zone) for Best of AWS re:Invent, a free virtual event where we bring you the most impactful announcements and top sessions from AWS re:Invent. Jeff Barr, AWS VP and Chief Evangelist, will share his highlights during the opening session.

There is still time until January 21 to compete for $250,000 in prizes and AWS credits in the Global 10,000 AIdeas Competition (yes, the second letter is an I as in Idea, not an L as in like). No code required yet: simply submit your idea, and if you’re selected as a semifinalist, you’ll build your app using Kiro within AWS Free Tier limits. Beyond the cash prizes and potential featured placement at AWS re:Invent 2026, you’ll gain hands-on experience with next-generation AI tools and connect with innovators globally.

If you’re interested in these opportunities, join the AWS Builder Center to learn with builders in the AWS community.

That’s all for this week. Check back next Monday for another Weekly Roundup!

Danilo

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

KendoReact Internationalization

1 Share

The React Internationalization component package can help translate your app’s numbers and dates into regionally appropriate formats.

When building applications for users around the world, displaying data in familiar formats is important. A date like “3/4/2024” might mean March 4 to Americans but April 3 to Europeans. Similarly, the number “1,234.56” uses different separators in different countries; some use commas for thousands and periods for decimals, while others do the opposite. This is where internationalization comes in.

In this article, we’ll explore the Progress KendoReact Internationalization package and see how it handles the parsing and formatting of dates and numbers according to different conventions.

The KendoReact Internationalization package is part of KendoReact, an enterprise-grade UI library with more than 120 components for building polished, performant apps.

Internationalization vs. Localization

Before we dive in, let’s clarify the difference between internationalization and localization, as these terms are often used interchangeably but can serve distinct purposes:

  • Internationalization focuses on parsing and formatting dates and numbers according to locale-specific rules. It makes “1234.56” display as “1.234,56” in Germany or dates follow the DD/MM/YYYY format in the UK.
  • Localization handles translating UI text and supporting right-to-left (RTL) layouts for languages like Arabic. It sets button labels, error messages and other interface text in the user’s preferred language.

For an introduction into localization and the KendoReact Localization package, check out our article on Getting Started with KendoReact Localization.

Together, these two packages provide the complete globalization features of KendoReact. In this article, we’ll focus exclusively on internationalization.

KendoReact Internationalization

The KendoReact Internationalization package is built on the Unicode Common Locale Data Repository (CLDR), which provides standardized locale data for hundreds of languages and regions. The React Internationalization package exports an IntlProvider component that supplies formatting and parsing capabilities throughout a React app’s component tree.

Setting Up Internationalization

To get started, we’ll need to install the package:

npm install @progress/kendo-react-intl

For locales other than the default en-US, we’ll also need CLDR data, which can be found by installing the necessary packages:

npm install cldr-core cldr-numbers-full cldr-dates-full

These packages contain the locale-specific formatting rules that the Internationalization package uses to format dates and numbers correctly.

Formatting Numbers

Let’s start with a practical example of number formatting. Different locales format numbers differently; what appears as “1,234.56” in the US becomes “1.234,56” in Germany and “1 234,56” in France.

Here’s how to format numbers for different locales using the IntlProvider and the useInternationalization hook:

import * as React from 'react';
import {
  IntlProvider,
  load,
  useInternationalization,
} from '@progress/kendo-react-intl';

// Import CLDR data
import likelySubtags from 'cldr-core/supplemental/likelySubtags.json';
import currencyData from 'cldr-core/supplemental/currencyData.json';
import weekData from 'cldr-core/supplemental/weekData.json';

import enNumbers from 'cldr-numbers-full/main/en/numbers.json';
import enCurrencies from 'cldr-numbers-full/main/en/currencies.json';
import deNumbers from 'cldr-numbers-full/main/de/numbers.json';
import deCurrencies from 'cldr-numbers-full/main/de/currencies.json';
import esNumbers from 'cldr-numbers-full/main/es/numbers.json';
import esCurrencies from 'cldr-numbers-full/main/es/currencies.json';

// Load CLDR data
load(
  likelySubtags,
  currencyData,
  weekData,
  enNumbers,
  enCurrencies,
  deNumbers,
  deCurrencies,
  esNumbers,
  esCurrencies
);

const NumberDisplay = ({ value }) => {
  const intl = useInternationalization();
  
  return (
    <div>
      <p><strong>Standard format:</strong> {intl.formatNumber(value, 'n2')}</p>
      <p><strong>Currency format:</strong> {intl.formatNumber(value, 'c')}</p>
      <p><strong>Percentage:</strong> {intl.formatNumber(value / 100, 'p2')}</p>
    </div>
  );
};

const App = () => {
  const numberValue = 1234.56;

  return (
    <div>
      <h3>English (US)</h3>
      <IntlProvider locale="en">
        <NumberDisplay value={numberValue} />
      </IntlProvider>

      <h3>German (Germany)</h3>
      <IntlProvider locale="de">
        <NumberDisplay value={numberValue} />
      </IntlProvider>

      <h3>Spanish (Spain)</h3>
      <IntlProvider locale="es">
        <NumberDisplay value={numberValue} />
      </IntlProvider>
    </div>
  );
};

export default App;

In this example, we load the necessary CLDR data at the top of our file using the load function. Then, we wrap each section with an IntlProvider that specifies the locale. Inside the NumberDisplay component, we use the useInternationalization hook to access the internationalization service, which provides the formatNumber method.

The formatNumber method accepts a value and a format string. Common format strings include:

  • 'n2' - number with two decimal places
  • 'c' - currency
  • 'p2' - percentage with two decimal places

When we run this app, we see the same number value (1234.56) displayed in three different sections, each formatted according to its respective locale’s conventions:

Formatting Dates

Date formatting is equally important. The date November 6, 2000, can be written as “11/6/2000” in the US, “06/11/2000” in the UK or “6.11.2000” in Germany. Let’s see how to handle these variations:

import * as React from 'react';
import {
  IntlProvider,
  load,
  useInternationalization,
} from '@progress/kendo-react-intl';

// Import CLDR data
import likelySubtags from 'cldr-core/supplemental/likelySubtags.json';
import weekData from 'cldr-core/supplemental/weekData.json';

import enCaGregorian from 'cldr-dates-full/main/en/ca-gregorian.json';
import enTimeZoneNames from 'cldr-dates-full/main/en/timeZoneNames.json';
import deCaGregorian from 'cldr-dates-full/main/de/ca-gregorian.json';
import deTimeZoneNames from 'cldr-dates-full/main/de/timeZoneNames.json';
import esCaGregorian from 'cldr-dates-full/main/es/ca-gregorian.json';
import esTimeZoneNames from 'cldr-dates-full/main/es/timeZoneNames.json';

// Load CLDR data
load(
  likelySubtags,
  weekData,
  enCaGregorian,
  enTimeZoneNames,
  deCaGregorian,
  deTimeZoneNames,
  esCaGregorian,
  esTimeZoneNames
);

const DateDisplay = ({ value }) => {
  const intl = useInternationalization();
  
  return (
    <div>
      <p><strong>Short date:</strong> {intl.formatDate(value, 'd')}</p>
      <p><strong>Long date:</strong> {intl.formatDate(value, 'D')}</p>
      <p><strong>Full date:</strong> {intl.formatDate(value, 'EEEE, MMMM d, y')}</p>
    </div>
  );
};

const App = () => {
  const dateValue = new Date(2000, 10, 6); // November 6th, 2000

  return (
    <div>
      <h3>English (US)</h3>
      <IntlProvider locale="en">
        <DateDisplay value={dateValue} />
      </IntlProvider>

      <h3>German (Germany)</h3>
      <IntlProvider locale="de">
        <DateDisplay value={dateValue} />
      </IntlProvider>

      <h3>Spanish (Spain)</h3>
      <IntlProvider locale="es">
        <DateDisplay value={dateValue} />
      </IntlProvider>
    </div>
  );
};

export default App;

The formatDate method works similarly to formatNumber, accepting a date value and a format string. Common format patterns include:

  • 'd' - short date pattern
  • 'D' - long date pattern
  • Custom patterns like 'EEEE, MMMM d, y' for full control

Running this app displays the same date (November 6, 2000) formatted in three different ways across English, German and Spanish locales:

Interactive Locale Switching

We’ll now build a more interactive example that allows users to switch between locales dynamically. This demonstrates how the Internationalization package can adapt to user preferences in real time:

import * as React from 'react';
import {
  IntlProvider,
  load,
  useInternationalization,
} from '@progress/kendo-react-intl';
import { DropDownList } from '@progress/kendo-react-dropdowns';

// Import CLDR data
import likelySubtags from 'cldr-core/supplemental/likelySubtags.json';
import currencyData from 'cldr-core/supplemental/currencyData.json';
import weekData from 'cldr-core/supplemental/weekData.json';

import enNumbers from 'cldr-numbers-full/main/en/numbers.json';
import enCurrencies from 'cldr-numbers-full/main/en/currencies.json';
import enCaGregorian from 'cldr-dates-full/main/en/ca-gregorian.json';
import enTimeZoneNames from 'cldr-dates-full/main/en/timeZoneNames.json';

import deNumbers from 'cldr-numbers-full/main/de/numbers.json';
import deCurrencies from 'cldr-numbers-full/main/de/currencies.json';
import deCaGregorian from 'cldr-dates-full/main/de/ca-gregorian.json';
import deTimeZoneNames from 'cldr-dates-full/main/de/timeZoneNames.json';

import esNumbers from 'cldr-numbers-full/main/es/numbers.json';
import esCurrencies from 'cldr-numbers-full/main/es/currencies.json';
import esCaGregorian from 'cldr-dates-full/main/es/ca-gregorian.json';
import esTimeZoneNames from 'cldr-dates-full/main/es/timeZoneNames.json';

// Load all CLDR data
load(
  likelySubtags,
  currencyData,
  weekData,
  enNumbers,
  enCurrencies,
  enCaGregorian,
  enTimeZoneNames,
  deNumbers,
  deCurrencies,
  deCaGregorian,
  deTimeZoneNames,
  esNumbers,
  esCurrencies,
  esCaGregorian,
  esTimeZoneNames
);

const DataDisplay = () => {
  const intl = useInternationalization();
  const orderDate = new Date(2024, 2, 15); // March 15, 2024
  const orderTotal = 1234.56;
  const taxRate = 0.08;

  return (
    <div className="data-card">
      <h4>Order Summary</h4>
      <div className="data-row">
        <span>Order Date:</span>
        <strong>{intl.formatDate(orderDate, 'd')}</strong>
      </div>
      <div className="data-row">
        <span>Subtotal:</span>
        <strong>{intl.formatNumber(orderTotal, 'c')}</strong>
      </div>
      <div className="data-row">
        <span>Tax Rate:</span>
        <strong>{intl.formatNumber(taxRate, 'p0')}</strong>
      </div>
      <div className="data-row">
        <span>Tax Amount:</span>
        <strong>{intl.formatNumber(orderTotal * taxRate, 'c')}</strong>
      </div>
      <div className="data-row total">
        <span>Total:</span>
        <strong>{intl.formatNumber(orderTotal * (1 + taxRate), 'c')}</strong>
      </div>
    </div>
  );
};

const App = () => {
  const [locale, setLocale] = React.useState('en');

  const handleLocaleChange = (event) => {
    setLocale(event.target.value.value);
  };

  const localeOptions = [
    { text: 'English (US)', value: 'en' },
    { text: 'Deutsch (Deutschland)', value: 'de' },
    { text: 'Español (España)', value: 'es' },
  ];

  return (
    <div>
      <div className="locale-selector">
        <p>Select Locale:</p>
        <DropDownList
          data={localeOptions}
          textField="text"
          dataItemKey="value"
          value={localeOptions.find((l) => l.value === locale)}
          onChange={handleLocaleChange}
        />
      </div>
      <IntlProvider locale={locale}>
        <DataDisplay />
      </IntlProvider>
    </div>
  );
};

export default App;

In the above example, we’ve created an order summary that displays dates, currency values and percentages. When the user selects a different locale from the dropdown, all values automatically update to match the formatting conventions of that locale. The date format changes, decimal separators adjust, currency symbols update and percentage displays follow local conventions—all without any manual formatting logic.

Wrap-up

The KendoReact Internationalization package provides an effective way to format dates and numbers according to cultural conventions. By leveraging CLDR data and the IntlProvider component, we can enable our React applications to display data in formats that feel natural to users, regardless of their location.

For more details on the KendoReact Internationalization package, including more advanced formatting options and parsing capabilities, check out the official documentation.

Try the library for yourself:

Try KendoReact

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

Bun 1.3 Adds Frontend Development Support

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