Skip to content
Rabat, Morocco
Posts

Coding Without AI

November 24, 2026
Two search requests on a timeline. The request for ru starts first and finishes after the request for rust.
Type ru, then rust, into a search box that matches package names by prefix. For a moment the results look right. Then Ruby appears at the top of the list. The input still says rust. Where would you put your first breakpoint? I build Umide, a workspace for coding with agents. For this particular bug I’d close the chat and turn off generated completions. I want a chance to write down what I think happened while I can still be wrong about it. Once I’ve read a plausible explanation, it’s surprisingly easy to convince myself I would have spotted it. My first suspect is the filter. Maybe it only compares the first two characters. If that’s true, pasting rust into an empty box should also turn up Ruby. In this example, pasting works. Only typing produces the flicker. Those two ways of entering the same word give me a reason to look at the requests. I’d log the query in two places, when the request leaves and when its results reach the screen. I’d keep the query that started the request in the log. Reading the current value of the input both times would label both replies rust and hide the detail I need.
send   ru
send   rust
render rust
render ru
Now Ruby makes sense. The server can answer both questions correctly and the screen can still be wrong. Slowing down the rate of requests might make the bug harder to see. Two requests can still finish in either order. I’d replace the network in the test with a lookup whose replies I can release by hand. Start both searches. Release the reply for rust and check the screen. Then release the reply for ru and check it again. That second assertion does the work. If I stop after the first one, even the broken implementation passes. Here’s the change I’d make for one search box. Call makeSearch once when the box is created and use the returned function for each edit.
function makeSearch(lookup, show) {
  let revision = 0

  return async function search(query) {
    const mine = ++revision
    if (query === '') {
      show([])
      return
    }

    const results = await lookup(query)
    if (mine === revision) show(results)
  }
}
Try moving the increment below the empty-query check. Start a search, clear the box, then release the reply. The old results reappear under an empty input. That little experiment explains why even an edit that sends no request needs a revision number. It’s also a regression test worth keeping. In a code review, “this fixes a race condition” leaves the next person quite a bit to reconstruct. I’d describe how to see it by typing two queries and letting the older one finish last. Before this change it overwrites the newer results. Clearing the field counts as an edit too. A teammate can use those sentences to test the patch or write a different implementation. If you usually work with AI, try leaving it off until you have one failing test you can explain. Keep the debugger, the documentation and a scratch file open. If you get stuck, write down the one observation you need next. That gives you a precise question to take to a teammate or an agent. On a real deadline I’d happily ask an agent to find the other search boxes that share this code. I’d hand it the two failing cases. The next time a list flickers, though, I want the first question to come to mind on its own. What happens if I paste the whole word?

Enjoyed this blog?

Seriously, thank you for spending your time here. If you made it to the end, you’re the kind of person who cares about craft, not just quick fixes.If you’d like to support my work, pick one (no pressure). It genuinely helps me keep writing and improving these blogs.
Subscribe to get a heads-up when I publish the next one. I keep it low-volume, and I only send what I’d personally want to read.

Subscribe to Josias's Newsletter

I occasionally write about software engineering, technology, and share thoughts on innovation and engineering.
One last thing: if you know someone who’d benefit from this, sharing it with them is one of the best compliments you can give. I appreciate you.