Back to work

Turtle

A Wordle clone — same six-guess, five-letter word format — built in 2022 with React and Firebase. Still live, still played by a few of my relatives.


The problem

There wasn't one. Wordle was everywhere in 2022 and I wanted to see if I could build it. That was the entire brief.

This was before I started at Durham, before I had any framework for thinking about projects, before AI coding tools existed in any meaningful form. I picked React and Firebase because they were the names I'd heard most often, and I'd never used either.

My role

Just me. No spec, no deadline, no one to ask when I got stuck.

Tech decisions

There weren't really any — at least not in the deliberate sense. React and Firebase were both new to me and I picked them because they were popular and had documentation. If I were choosing today I'd probably make different calls, but at the time the goal was less "pick the right stack" and more "pick a stack and finish something."

The one thing I did think about was hosting. Vercel was free and worked with React out of the box, which was enough.

The hard part: the daily word

The mechanic that took the longest wasn't the grid or the keyboard or the win/lose state — it was making sure every player got the same word on the same day.

The word list itself was the first problem. I pulled five-letter words from a dictionary API, but the raw output was full of stuff that wouldn't work as puzzle answers: proper nouns, character names, archaic words nobody would guess, plain nonsense. I ended up doing a long pass of filtering and manual cleanup to get a list that actually played fairly.

Then came the synchronization. I needed every user, regardless of timezone or when they opened the app, to get the same word for a given calendar day, and have that word roll over for everyone at the same moment. The fix ended up being to derive the day's word index from the date itself rather than store "today's word" anywhere — so the client computes the same index from the date, looks up the same word in the same list, and there's nothing to sync. Obvious in retrospect. Not obvious at the time.

Making it work on mobile

The other thing that took much longer than it should have was making the game actually playable on a phone.

CSS I could figure out. I'd heard of media queries and the concept of responsive design made sense. What I hadn't anticipated was how much of the layout was implicitly built around a mouse: click targets that were fine with a cursor were too small for a thumb, and the tap targets on the keyboard were uncomfortably small and I had to rework the sizing.

By the end I had something that worked on phones and I came away with a basic rule I've held onto: use the browser dev tools to help build the mobile UI from the start, don't fix mobile at the end.

What I'd do differently

Plenty, but most of it isn't interesting — it's the standard "I'd structure components better, I'd use TypeScript, I'd write tests." The version of me that built Turtle didn't know those things were options yet.

The one thing worth flagging: I'd think harder about state management. The game state lives in a tangle of useState calls that I'd untangle into a reducer or a small store today. It works, but reading the code now, I can feel where I was figuring things out as I went.

What I took from this

The thing I keep coming back to about Turtle is that I built it in the last window before AI changed how people learn to code. When I got stuck on the daily-word sync, I had to actually understand the problem — read docs, sketch the logic on paper, try things and watch them fail, eventually have the small realization that the date itself could be the source of truth. That kind of stuck-then-unstuck cycle is where I learned most of what I know about programming.

I'm not romanticizing the friction. AI tools are genuinely useful and I use them. But the muscles I built struggling through Turtle are the ones that let me use those tools well now — I can tell when an answer is wrong, when a suggestion is plausible but bad, when the framing of the question is the actual problem. I don't think I'd have those instincts if I'd started a year later with an AI assistant on my shoulder from day one.

That, more than the project itself, is what Turtle represents to me. It's also why it's still on this site three years later, even though I'd build it differently today.