davejs
Hi everyone,
I’ve been building BetterTyping (https://bettertyping.org) on and off since 2021. It’s a free typing game: practice alone, race other people, do a daily challenge where everyone types the same text, or run a timed test. No account needed, English and German.
The part I enjoyed most is the bots. On a small site there’s often nobody to race, so if you’re alone in a lobby for 15 seconds, a bot joins. It’s a small GenServer that subscribes to the lobby like a player’s LiveView would, types one character at a time at roughly your average speed of the last 100 races, and sends its progress through the same path as a human player.
Getting there took three bugs: two bots joining the same lobby (a check-then-act race between timers), bots coming back after the race (the default restart: :permanent restarts a GenServer even after a normal exit), and a deadlock once the lobby process started the bot itself while the bot called the lobby from init/1. Moving every lobby into its own process made the first one impossible, restart: :temporary fixed the second and handle_continue/2 the third.
Most of the code was written with AI coding agents. I’d like feedback on the game and on the design. And if you have ideas on how to make the bots feel more human, I’m all ears.
The full post, with what else changed this year:
Trending in Blog Posts
Other Trending Topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #ai
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #blog-post
- #ecto-query
- #elixirconf-us
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #elixirconf-eu
- #api
- #forms
- #security
- #hex











Showing Posts 18 to 9- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
AstonJ
Awesome, started one of those threads here
linusdm
Ha! Nice. I’ll see if I can get him to try it. Thx for adding it.
davejs
Your comment got me thinking, and I couldn’t resist: BetterTyping now speaks Dutch.
The translation hasn’t been checked by a native speaker yet, so if you and your son give it a try, I’d love to hear what sounds off. And of course whether it actually helps him learn.
linusdm
I’m in Belgium indeed. I speak Dutch. Multi-language support is a big thing here (Dutch, French and German are the three official languages in our small country, and English spoken by most too).
I think it intertwines with the locale support you already have (I saw you have German already). But if kids are not in your target group, I think English support suits a lot of people already.
davejs
yeah i can see that for kids especially their native tongue would make a lot of sense. What is your mother tongue, Belgium?
linusdm
My kid also wants to learn touch typing, but for his age (13) and not being native English, exercises in his mother tongue would be more appealing. Not a feature request, but just thinking out loud
davejs
That’s great to hear! Challenging each other works well for that: after a race, “Challenge a friend” gives the other person the exact same text to beat. Let me know how the kids like it, I’m curious what kids think of it
davejs
Thanks, that really means a lot! 111 WPM with crab technique is seriously impressive
davejs
Thanks again, that’s a really helpful perspective. I hadn’t thought about it from the admins’ side. It’s live now: “Share image” opens a small dialog like Speedtest’s, with the image link first, then the link to the challenge, and BBCode that links the image back to the challenge. Copying the image itself is still there at the bottom for chats.
Your comment also made me look at the WPM badge in the profile: it’s now available as PNG too, with BBCode for forum signatures, since a lot of forums don’t allow SVG.
nathanl
Great site! I’m going to have my kids use it to practice typing. I love the idea of getting them to challenge each other.