Tuesday, June 9, 2026

a thought on nintendo hard game design

Sometimes it's fun to apply vaguely UX thinking in terms of things like game design...

His design rules for Mega Man 2 were specific and deliberate. Enemies appeared in small waves, three or four at a time, using the same attacks, so players could actually learn the pattern. Terrain and placement adjusted the challenge, not random enemy behavior. And here's the detail that reveals everything. The last enemy in each wave was easier than the ones before it. I'll say that again on purpose. The final enemy in a wave was easier. Why? Kamura explained the psychology this way. He'd notice that people don't replay games, even good ones, because when they think back, their minds go to the hardest parts, and that memory makes replaying feel like work. He didn't want players remembering Mega Man 2 as a slog. He wanted them to remember feeling like they were getting better. And then he said something that is essentially the entire point of this video. I quote, "I wanted the player to feel like he was improving at the game, too."

Although it calls out "Battletoads" as being brutal relative to Mega Man in part because of having 3 continues / no passwords (along with punishing "gotcha"/ MUST memorize design) it underplays the addition of continue password grids as being a HUGE quality of life improvement in Mega Man 2 over 1.

I remember my pride in beating the original "Nintendo Hard" Mega Man, telling my mom about it - an early lesson in standing up and getting through a big challenge.

Also I think about Mega Man in the sense of novelty. Not only was it a master class in terrain and enemy placement as "something new", but of course it was one of the first to give you an array of weapons with different mechanics. Later games (such as Kirby) would expand that so that it let the player control novel mechanics and interactions (often by capturing those of enemies) as the game progressed - now it's one of the biggest tools Nintendo has, from Kirby's inhales, to Mario Oddyssey's Hat Capture, the new animal transformations, etc.

So there probably is a split - most games provide some kind of novelty as they progress. Some games, like RPG, it's gradual and cumulative, and intrinsic to the character or the inventory. Other games, it's closer to a temporary toy (or in the case of GTA, knowing where the good toys are.)

Saturday, May 30, 2026

just f***ing use html

 Funny rant domain: Just f***ing use HTML. (Is it weird that I'm "censoring" cussing?)

(Not to nerdily miss the point, but I think the PHP/JSON-on-Filesystem//HTML5/CSS/Vanilla JS stack  is the logical extension of that when you actually do need to get a little data onto or off of the server. Buildless, evergreen, runs for years, avoids package dependency hell...)

It reminds me of The iPhone is a piece of s***, and so is your face, extolling the virtues of the clever foldy keyboard Nokia E70 over the then new iPhone. Obviously iPhone-ish slabphones won - but it took iPhone a while to catch up to that -- recording video, an app store, even copy and paste weren't there at first...

(I suspect that second rant page - a "cgi" page still surviving like almost two decades now - has the same "technology should just work for years" attitude of the first rant.)

Monday, May 18, 2026

the new assembly

I've always liked Processing and P5.js as ways of... just having a little canvas to do cool low level graphics and interactions and small games in. He's got some kind of campaign going using this splash image:

It was interesting seeing the blob of code on the left. It reminded me that while I can still "live code" P5 ok I'm starting to get rusty about some of the bread and butter commands (like if "stroke()" was for color or width)

But then somehow it's like... there's that line that says "Javascript is the new assembly language of the web", that people will be coding in higher level things that turn into JS. But now with so many people coasting on LLM, it kind of feels like there might be a time when, any code whatsoever will have that "assembly language" vibe. 

Monday, May 11, 2026

text editing is hard

 79: Text editing with Michael … - Complementary - Apple Podcasts

Heh. Katie Langerman is a designer I worked with at CarGurus, and she's been working at GitHub, and she cohosts a design podcast... it was a little triggering - relivingsome things we're struggling with at my current job -  but they had a whole episode on "text editing". ProseMirror comes up a lot. And the issue of rich text editing are thorny for everyone. (Like if the user copies and pastes from inside a bullet item list, maybe not respecting item boundaries... what all should that even look like on paste, in terms of what structure should it assume or replace or ignore... )

Tuesday, May 5, 2026

AI doesn't replace best practices

 At work in our AI discussion forum someone posted this video:

https://www.youtube.com/watch?v=v4F1gFy-hqg

One thing I'm wrestling with is... how do devs/LLM-wranglers ensure we get good "value for money" in terms of the pre-prompting stuff? To a large extent, decent coding practices are built into LLM. (Admittedly, the LLMs have been more trained on toy example which might cause them to be more likely to take shortcuts.) So in theory, it might not make sense to stuff your context window with things the LLM already knows deeply. (Or maybe this is a false economy, and that the number of tokens spent compared to what can be saved is small... this is why non-deterministic programming might always have an aspect "as much an art as a science.")
 
Another topic I want to refine my thinking on is testing. The TDD (Test Driven Development) mindset makes a case for itself more strongly in this LLM world in versus what we had before - in part because of the "pain in the butt factor" of it all. In UI at least, most medium to low level tests depend on content pieces (page structure, test-ids) that aren't in place UNTIL implementation - real chicken and egg stuff, where you would have to architect fine grained structure while writing the test, which isn't really a comfortable way to work. But with an AI, that discomfort might not exist (or at least not felt by humans)
 
Finally I wonder about the "software fundamental" of unit test. Like, I LOVE that this video suggests "grey box" modularization - limiting coupling to specific points between higher level modules. To me that points to where the real value in testing is, at integration of those modules, and end to end testing. In the old world, it was difficult to get real value from unit tests, tests that were real canaries in the coal mine vs false alarms, so I was always in the camp that preferred higher level tests.
But I'm not quite sure what the answer is for the LLM world. Anecdotes suggest that sometimes LLM care about tests too much, will keep code around just because there's a test for it after a refactoring. I appreciate that at the very least LLMs have helped lower the cost of unit test creation.

Thursday, April 30, 2026

React tab-based component reuse as an anti-pattern

TLDR: If you have a React form where the same set of components shows up but with different content based on "tabs" or some other selector, consider keeping a 1:1 mapping between the component and its state and hiding the inactive tabs visually, rather than depending on rendering.

React-based design systems always have a weird decision to make about controlled components (where a component's value is constantly being updated by the parent as the component notifies the parent of key press and other events) vs uncontrolled (where the component handles its own affairs, but still has to notify the parent on each change)

My opinion of React slipped a little when I realized that the functioning of a normal controlled input box or textarea utterly depended on a rendering optimization - in the simple declarative UI model, when a user types a character into an input, React rerenders the input with the new value. But of course, if (and sadly, when) React actually rerenders the input, transient state like "cursor position" is reset, since that's not part of the state the parent is managing. So normal UI features like "entering text anywhere but the very end of the current content" depends on React being smart enough to know it doesn't REALLY need to rerender that input box. 

But uncontrolled components have always been weird as well... mostly because of the legacy of html5 syntax. If you just put in the value prop with no handler, the control would be locked to that value, so design systems like Material UI lean on "defaultValue=" for uncontrolled components.

(There's a third path that is sadly underused, IMO: you don't need any handlers whatsoever for basic form components if you wrap them in a <form> tag

 const handleSubmit = (event) => {

    event.preventDefault();

    const formData = new FormData(event.currentTarget);

    const username = formData.get('username');

    // or onvert all data into a standard JavaScript object

    const allData = Object.fromEntries(formData.entries());

   };

That gets a little messier in a TypeScript world, but I think the fixes for that still beat all those handlers... let html5 and the browser do what they were design to do! And of course there are other solutions to this problem like formik)

Anyway!

At work we have a component wrapping Kendo React Richtext Editor, and the company's legacy wrapper for it is in some need of refactoring. The editor is uncontrolled, its keeping a copy of its own state, and sometimes there's drift with what the parent thinks is being displayed and what's actually being shown to the user.

That kind of problem became especially acute on a few pages that used a tab component to display the same form, but with a different set of values based on the current tab selection. If you entered data in a field, swapped tabs, then went back, often that original data would be not show properly (like maybe the parent would be aware of the updated values, but on rerender, the KendoEdit would revert back to the original values it was set with.)

These problems would go away if our tab implementation kept a separate set of form elements in the DOM, and just hid all of those for the inactive tabs, and I'm going to pitch that as a future refactoring... In this world of uncontrolled components, not having a 1:1 mapping to something in memory is a whole armory's worth of foot guns.

(It's probably temping to reuse components with something like
<input value={mainData[currentTab].content}>
since it feels more "efficient" somehow, like costly to have components in the DOM but not shown... but the more I think about it, visual hiding and 1:1 mapping of component and state seems like the safer bet)


Tuesday, April 14, 2026

the mythos mythos

 Following up on the "Mythos Tracking" -- 

I know there's some sentiment that like, announcing "maybe THIS level of our exclusive new AI is just TOO POWERFUL for the world" is kind of an old ploy already - and as Fireship (one of the more enjoyable ways of absorbing tech news) points out, some of the metrics and test cases... even if Mythos is quantitatively better it's not clear how big of a qualitative change it is.

But, this paper has a lot of big names attached - The “AI Vulnerability Storm”: Building a “Mythosready” Security Program - and it does make the case for how the security landscape is changing.