Dev.to WebDev πŸ›  Dev πŸ‘ 0 πŸ“– 2 min read

I Wrote the Conversation Before I Wrote the Code, and It Saved Me a Rewrite

Last year I built a small chat feature for a side project. I started the way most of us do: pick a library, drop a chat bubble on the page, wire up some responses, and figure out the β€œconversation” part later. Later nev

Last year I built a small chat feature for a side project. I started the way most of us do: pick a library, drop a chat bubble on the page, wire up some responses, and figure out the β€œconversation” part later.

Later never went well. The UI worked fine, but the conversations felt awkward. Users asked things I hadn’t planned for, my replies were either too long or too vague, and I had no idea how to handle someone who just typed β€œhelp.”

So I scrapped it and did it the other way round. I wrote the conversations first, on paper, before touching any code. Here’s what I learned.

  1. Write three real dialogues first

Not flow charts, just dialogues. Pick a user, pick their goal, and write both sides like a script. It sounds silly, but you’ll find gaps within five minutes. Things like β€œwait, what does the bot say if they don’t know their order number?”

  1. Plan the β€œI don’t get it” moment

Every conversational interface fails sometimes. What matters is how it fails. A good fallback does three things: admits it didn’t understand, offers two or three concrete options, and gives a way to reach a human. A bad one just repeats β€œSorry, I didn’t get that” in a loop.

  1. Keep replies short enough to read on a phone

If a reply needs scrolling, it’s probably a help article pretending to be a message. I try to keep each message to a couple of sentences and put the long stuff behind a link.

  1. Don’t pretend to be human

People forgive a bot that’s upfront about being a bot. They don’t forgive one that pretends and then gets caught. A friendly tone is great, fake personality isn’t.

  1. Test with someone who didn’t build it

I asked a friend to try it with no instructions. Within two minutes they typed something I’d never considered. That one test found more problems than a week of my own clicking around.

What I’d do differently

I’d start even smaller. One conversation, one goal, shipped and tested, before adding a second. I also wish I’d logged the messages people sent that I couldn’t handle, since that list turned into my to-do list.

If you’re curious about conversation-focused projects, I’ve been following what the team at Talkative Labs is working on. It’s a good place to see how others think about this space.

What’s the weirdest thing a user has typed into something you built? I’d love to hear it in the comments.

πŸ“° Read the original article on Dev.to WebDev

Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes β€” full credit and traffic to the original publisher.