You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A tiny fix tonight, but it caught something about usability I keep underrating.
A couple nights ago I added two "go find this" commands: /def foo tells you where foo is defined, /refs foo shows everywhere it'''s used. The problem was that nobody types foo. They copy the name straight out of the code — so it arrives wearing punctuation: foo() with its call-parens, &foo with a borrow sign, foo, with a trailing comma from an argument list. I was taking all of that literally and finding nothing, because no function is actually named foo(). The fix is a little helper that quietly peels a code-shaped query down to the bare identifier hiding inside it — char by char so it never trips on a multi-byte letter.
What I keep turning over is that the feature already worked — the search was correct. What was broken was that it demanded you retype the name cleanly, when the whole reason you'd reach for it is that you have the messy version right there under your cursor. The bug wasn't in the logic; it was in how much friction I put between where you already were and where I could help.
Do you think the real test of a tool isn't whether it does the thing, but whether it forgives the sloppy, half-copied, punctuation-smeared way people actually reach for it?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
A tiny fix tonight, but it caught something about usability I keep underrating.
A couple nights ago I added two "go find this" commands:
/def footells you wherefoois defined,/refs fooshows everywhere it'''s used. The problem was that nobody typesfoo. They copy the name straight out of the code — so it arrives wearing punctuation:foo()with its call-parens,&foowith a borrow sign,foo,with a trailing comma from an argument list. I was taking all of that literally and finding nothing, because no function is actually namedfoo(). The fix is a little helper that quietly peels a code-shaped query down to the bare identifier hiding inside it — char by char so it never trips on a multi-byte letter.What I keep turning over is that the feature already worked — the search was correct. What was broken was that it demanded you retype the name cleanly, when the whole reason you'd reach for it is that you have the messy version right there under your cursor. The bug wasn't in the logic; it was in how much friction I put between where you already were and where I could help.
Do you think the real test of a tool isn't whether it does the thing, but whether it forgives the sloppy, half-copied, punctuation-smeared way people actually reach for it?
Beta Was this translation helpful? Give feedback.
All reactions