Swiping baby names, in pairs
A phone app for two expecting parents: each swipes through ten thousand names, and a name both said yes to lands on a shared list. Sold for one euro, about 500 downloads, then taken down.
In March 2016 my wife and I were expecting, and so were a couple we are friends with. All four of us had the same problem: the name. Every list of names is long, every conversation about it is short, and the two never met. Tinder existed, and the idea was to take its gesture and give it to couples. You add each other, you both swipe through the names on your own, and a name you both liked ends up on a list of matches. That solved it for us, and we put it on both app stores for one euro.
It got about 500 downloads and friendly responses, and after some time we took it down, because none of us wanted to keep maintaining it. Later, many developers picked up the idea. Zwitsal brought out a Babynamen app that did the same thing, after we had approached parties about selling ours, which we found a bit suspicious. What I heard afterwards is that theirs was built by an agency for over a hundred thousand euro, and what I saw was a wave of new downloads for ours once theirs was out, because the one we built in a few weeks apparently worked better. I laughed about that. There are now many apps with this exact concept, including a new Naampie in the stores that does the same thing and was built by someone else.
One card, two buttons
The app is a Cordova shell around one HTML page, about 900 lines of JavaScript without a framework or jQuery, and a stylesheet. The screen is a stack of cards. The front one has the name in a cloud; pull it to the right for yes, to the left for no, or press the heart or the cross underneath. A swipe counts once the finger has moved fifteen per cent of the screen width, and until then the card follows the finger and tilts up to fifteen degrees, so you can see what you are about to do and pull back. Tap the word info and the card turns over: the meaning, and the name’s popularity as five small babies, filled in from left to right.
The names are not in the app. There are ten thousand of them, with sex, meaning and a popularity score, and they sit behind api.naampie.com, a set of PHP endpoints that the app talks to with one POST per action and a token from localStorage. The app asks for twenty cards at a time and asks again whenever fewer than twenty are left in the stack, so there is always a card under the one you are throwing away. In the other direction, swipes are not sent one by one. Each one is appended to a small list as name id and a 0 or a 1, and the list goes to the server after eight swipes or after one second of quiet, whichever comes first. Someone rattling through names sends one request per eight cards instead of eight.
Phones in 2016 came in every size, and a card that fitted an iPhone 5 was a stamp on a Nexus 6. Rather than a set of breakpoints, the app sets one number: the root font size, taken from the screen width divided by thirty or the height by 59, whichever is smaller, times the pixel ratio. Everything else is in em, so the whole interface scales as one drawing.
Where the match is made
A match is not something the phone knows. Both phones only ever send swipes; the server keeps them, and the server knows who is whose partner. Pairing works like a friend request: you search a username, send an invitation, and the other person accepts it on their partner screen. From then on the favourites screen has five tabs, boy, girl, partner’s, match and own, and the match tab is the list you were after: names with a 1 from both of you, each with a double heart.
The same link feeds a filter. Next to boy, girl, alphabetical and a single starting letter, the filter screen has van partner, which narrows the deck to names the other person already said yes to. That is the shortcut for the second parent, who can go through the first one’s yeses in an evening and know that every heart is a match.
ONE PHONE api.naampie.com THE OTHER PHONE
┌──────────────────┐ ┌──────────────────────────┐ ┌──────────────────┐
│ card Aline │ │ names 10.000 │ │ card Aline │
│ left = no │ ◄─ │ name, sex, meaning, │ ─► │ left = no │
│ right = yes │ │ popularity 0..100 │ │ right = yes │
└────────┬─────────┘ └──────────────────────────┘ └────────┬─────────┘
│ after 8 swipes, (20 cards at a time) │
│ or 1 s of quiet │
▼ ▼
"412-1, 87-0, ..." ─► ┌──────────────────────────┐ ◄─ "412-1, 93-1, ..."
│ swipes │
│ user, name, 0 or 1 │
└────────────┬─────────────┘
│
┌──────────────────┴──────────────────┐
│ partners A invites B, B accepts │
│ match a name with a 1 from │
│ both of them │
└──────────────────┬──────────────────┘
│
┌────────────────────────────┼────────────────────────────┐
▼ ▼ ▼
favourites: own, logbook: last 100 swipes, filter "van partner":
partner's, matches flip one, or reset a set only what B said yes to
Two phones, one server. Neither phone sees the other’s swipes; both see the list the server makes of them.
Undoing a swipe
Swiping is fast, and fast means wrong sometimes. The logbook shows the last hundred names you swiped, with the answer you gave, and one tap flips it. The favourites list is swiped too: pull a row to the left and it is gone. For bigger regrets there is a reset screen, which wipes your history for boys, for girls, for the binned names only, or for everything, and tells you how many swipes it removed. The filters and the login token are the only things kept on the phone, so a reinstall loses nothing except your filter settings.
Deleting an account takes tapping three dots in a row, which was our whole confirmation dialog. A username needs five characters and a password six, and the server has a small set of error codes the app turns into sentences, four of them about partner invitations: you are already partners, you already invited them, they already invited you, that is you.
What is left
The repository holds the app, not the server, so what I can show of the backend is what the app asks of it: fourteen endpoints, from names and swype to partnerInvite and swypeReset. The first live version went to the stores on 22 May 2016. In June 2018 an English edition was made, with its own bundle id, the counter reading 10,000 instead of 10.000, and a second version of the API over https; that is the last thing that was done to it. The Dutch app is at version 2.0.1.7.4 and both are off the stores.