tl;dr A Vite plugin that brings client-side MCP tools to allow your coding agent to see your app in action. Uses your existing Vite development server, so you don't have to run a separate MCP server. Short story I've been enamoured with getting coding agents to self-improve by telling them to write MCP servers for themselves. This is the outcome of one such experiment where I was getting…
What follows is the first electronics mod I did as a child, with no artifacts to show for it. Circa late 1980s. We didn't have digital cameras back then and I didn't have the foresight to take process photos using a regular camera, and didn't even think of preserving the modded monstrosity as a keepsake. You'll just have to take my word for it. The priming Growing up, we had an Atari 2600 Video…
I'll share a mathematical approach to discounting the loop overhead when looping over a piece of code in order to measure how long it takes (as compared to some alternative piece of code). This might be a well-known approach, and there might be better methods, but it is nevertheless a method I independently came up with and have used in the past. The premise We have a piece of code, method1() ,…
This is a breakdown of one of my older dweets , introducing a dweet rendering technique and a few general JavaScript golfing techniques. It's a follow-up to: A Short Introduction to Dwitter and JavaScript Golfing Dweeting Outside the Box The subject Suppose we want to render a specific bitmap image in a Dweet. As an example, I'll nostalgically pick the mouse pointer icon of the TOS operating…
This is a continuation of my previous post on Dwitter, where I gave an overview of Dwitter and a few JavaScript golfing tricks. The subject was the "default dweet", which renders 9 bars swaying back and forth. I'll keep the subject the same, but show rendering those 9 bars in different ways. Changing up how you render a scene often opens up new opportunities for visual effects because it's like…
This is a brief introduction to JavaScript golfing — not the competitive kind, but the kind on Dwitter : a community for sharing visual JavaScript demos in 140 characters. The Dwitter community has a friendly and collaborative remix culture (where users "fork" each other's works and build on them). And there's also a culture of sharing tips and tricks. Sidestepping the numerous online resources…
In web development, 'responsive' typically refers to layout. Adjusting the layout of a page based on the dimensions of the renderable area. A more formal definition from Wikipedia : Responsive web design (RWD) or responsive design is an approach to web design that aims to make web pages render well on a variety of devices and window or screen sizes from minimum to maximum display size to ensure…
The movement constraints of all 8 drag handles of a crop rectangle can be implemented by reusing the implementation of one corner. The complexity of a crop rectangle Oh man. Have you ever tried implementing a draggable crop rectangle from scratch? To give it all the flexibility you'd expect from a mature crop rectangle implementation there are many constraints to solve: Drag the rectangle itself…