Sign in

David K. 🎹

@davidkpiano.bsky.social
8.9K followers 116 following 34 posts

State machine. Building stately.ai

PostsRepliesMedia
David K. 🎹 @davidkpiano.bsky.social · 22/01/2026
The "you're falling behind on AI" crowd is weird. The whole point of this tech is that things get 10x easier, not harder. Complicated agent/prompting patterns get replaced by better models, simpler patterns, and plug-and-play tools. Catching up takes a day, not months.
4661
Reposted by David K. 🎹
Sandro @sandroroth.com · 02/10/2025
🧩 Code Puzzle, a little side project I made. Each level gives you a JS snippet split into pieces. Arrange them in the right order with drag and drop to solve the puzzle. ➡️ code-puzzle.sandroroth.com Built with #React and #XState
061
Reposted by David K. 🎹
CSS-Tricks* @css-tricks.bsky.social · 29/08/2025
A dash of modern CSS accomplishes so many things that used to require abstractions, dependencies, and tricks (wink, wink). This one from Christian Sabourin is a great example: custom properties, clamp()-ing, calc()-ing, counters, relational pseudo selectors, etc. css-tricks.com/css-elevator...
css-tricks.com
CSS Elevator: A Pure CSS State Machine With Floor Navigation | CSS-Tricks
In this article, author Chris Sabourin walk through how modern CSS features can build a fully functional, interactive elevator that knows where it is, where it’s headed, and how long it’ll take to get...
0142
Reposted by David K. 🎹
Jason Lengstorf @jason.energy · 15/07/2025
the latest Web Dev Challenge is available to everyone! @algolia.bsky.social asked 3 teams of devs to imagine what the UX of an AI-native web app might look like. featuring @davidkpiano.bsky.social, @shaw.city, Nadirah, @aguywhocodes.com, Syscily, and Camille, with @chuckm.bsky.social
codetv.link
Build the Future of AI-Native UX in 4 Hours | Web Dev Challenge Season 2
How will websites evolve if it's all powered by AI?
0137
Reposted by David K. 🎹
Jason Lengstorf @jason.energy · 14/07/2025
new Web Dev Challege is up early for supporters! watch Syscily, Camille, Nadirah, @aguywhocodes.com, @shaw.city, and @davidkpiano.bsky.social as they imagine what UX might look like in an AI-native app, sponsored by @algolia.bsky.social with @chuckm.bsky.social as our advisor codetv.link/wdc/s2e6
codetv.link
Build the Future of AI-Native UX in 4 Hours | Web Dev Challenge Season 2
How will websites evolve if it's all powered by AI?
1133
Reposted by David K. 🎹
Jason Lengstorf @jason.energy · 18/06/2025
helping the Keyframers reunion happen over here @davidkpiano.bsky.social @shaw.city
Stephen and David of the Keyframers working at desks in CodeTV Studio
4293
David K. 🎹 @davidkpiano.bsky.social · 13/05/2025
⚛️ XState Store now has atoms, and they're *really* simple. → atom.get() → atom.set(…) → Derived atoms (reactive) → Async atoms → Stores are atoms too! npm i @xstate/store stately.ai/docs/xstate-...
// Regular atoms
const countAtom = createAtom(1);
countAtom.get(); // 1
const flavorAtom = createAtom('chocolate');

// Derived atom that combines both
const donutMessageAtom = createAtom(() => {
  const count = countAtom.get();
  const flavor = flavorAtom.get();
  return `${count} ${flavor} donut${count === 1 ? '' : 's'}`;
});

console.log(donutMessageAtom.get()); // "1 chocolate donut"

countAtom.set(3);
console.log(donutMessageAtom.get()); // "3 chocolate donuts"

flavorAtom.set('strawberry');
console.log(donutMessageAtom.get()); // "3 strawberry donuts"import { createAsyncAtom } from '@xstate/store';

const donutOrderAtom = createAsyncAtom(async () => {
  const order = { flavor: 'glazed', quantity: 12 };
  const data = await submitDonutOrder(order);
  return data;
});

donutOrderAtom.subscribe((state) => {
  if (state.status === 'pending') {
    console.log('🧾 Placing your order...');
  } else if (state.status === 'done') {
    console.log('🍩', state.data);
  } else if (state.status === 'error') {
    console.log('😢 Order failed:', state.error);
  }
});
1337
Reposted by David K. 🎹
Jason Lengstorf @jason.energy · 07/01/2025
I like state machines. I still struggle a bit to get my mind bent into state machine shape, but I’m always so happy with the quality of what I build when I do
5792
Reposted by David K. 🎹
Ben Holmes @bholmes.dev · 26/12/2024
That's it, I'm switching to xstate store
6653
David K. 🎹 @davidkpiano.bsky.social · 18/12/2024
How would you simplify XState? Planning for the next major version, and would love to hear your thoughts and ideas ✍️
7181
Reposted by David K. 🎹
The Angular Plus Show @theangularplusshow.bsky.social · 09/12/2024
Join us on today's episode as we interview David Khourshid @davidkpiano.bsky.social. We will learn about state machines and how XState plays nice with #Angular right out of the box! #ngconf 🍎https://apple.co/4ipNHcP 🟢 spoti.fi/3VxlGGq
The Angular+ Show logo. S8E811. “State Machines and XState in Angular with David Khourshid. Hosts  Q, Lara Newsom, Jan-Niklas Vortmann, Chau Tran and Brian Love."  Photos of the hosts. Photo of David .
083
David K. 🎹 @davidkpiano.bsky.social · 07/12/2024
I now *really* enjoy reading articles that are so obviously human-written, mistakes and all
61462
David K. 🎹 @davidkpiano.bsky.social · 05/12/2024
I don't like default exports. They exist in JS because they're "simpler", even though they're more verbose: export default Thing import Thing from './thing' vs. export { Thing } import { Thing } from './thing' Just use consistent naming & don't be afraid of typing curly braces.
12798
Reposted by David K. 🎹
Francois Laberge @seflless.bsky.social · 01/12/2024
Updated demo of Decode generating state-machines from diagrams, this time with streaming generation support Then I do the reverse, generating a diagram from an implementation. The diagram auto-layout is still rough. I'll work work on more robust auto-layout soon.
3326
David K. 🎹 @davidkpiano.bsky.social · 02/12/2024
🔲 Merge Conflict: Accept All Current 🔲 Merge Conflict: Accept All Incoming ☑️ Merge Conflict: Accept the things I cannot change, the courage to change the things I can, and the wisdom to know the difference
416118
Reposted by David K. 🎹
Tejas Kumar @tej.as · 28/11/2024
I wrote an essay about relationships that may be helpful for personal career development (and maybe devrel). Mentioned in the post (by name): @davidkpiano.bsky.social, @kentcdodds.com, @joshuakgoldberg.com, @jennytru.bsky.social, @acemarke.dev, and others tej.as/blog/how-to-...
tej.as
How to Grow Professional Relationships
A practical, science-backed model for growing quality professional relationships.
0418
Reposted by David K. 🎹
Kent C. Dodds 🌌 @kentcdodds.com · 21/11/2024
Component State Management in React: - useState - useMachine That's it. That's all I use anymore.
9534
Reposted by David K. 🎹
Matthew Phillips @fancypenguin.party · 09/11/2024
FSMs are the best way to model UI state. What can we do to indoctrinate people to this fact?
18322
David K. 🎹 @davidkpiano.bsky.social · 30/10/2024
Hello again, world This place seems cool
251771
David K. 🎹 @davidkpiano.bsky.social · 05/05/2023
Software estimation is hard
Flight delayed to estimated at undefined undefined
1264
David K. 🎹 @davidkpiano.bsky.social · 28/04/2023
I love TODO comments. They're like little reminders of the ambitious developer you thought you'd eventually become.
4342
David K. 🎹 @davidkpiano.bsky.social · 24/04/2023
I'm not actually a piano
10220