An Interesting Bug and the Importance of Diverse Engineering Teams
We had a really interesting bug come in the other day that we would not have been able to solve were it not for the fact we had a native Mandarin speaker in the team.
The bug was that Korean language users, in certain areas of the platform, were losing the final character of the comments they were typing. This seemed like a real head-scratcher.
My initial thought was that we were truncating a multi-byte character, or perhaps there was some encoding difference between the frontend and the database.
Luckily for us, we have Jing on the team. Jing is a native Mandarin speaker. Looking at the bug, he immediately suspected, correctly, that the issue would be with how users input the comments when the user is inputting a character based language such as Korean or Chinese.
When Jing is typing in Mandarin he uses Pinyin to find the correct character, and then selects it. You type some characters, which show in an “unconfirmed state”, you can then “confirm” those characters by either selecting from the selection menu or hitting enter. If you are unfamiliar, you can see how it looks below1.
This is similar to how a user inputs Korean, but the characters are built up in a different way.
You will notice in both examples, when the text box loses focus, the unconfirmed characters remain.
In our problematic text box, the unconfirmed characters were deleted when it lost focus, due to a rich text editing library we are using. This was not obvious to the user, especially if you scrolled down the page and selected a new text box to type into.
Once we knew, we could resolve it, but without having a wide breadth of experience and backgrounds in the team we may have never found the root cause.
Another day, another reason why diversity in engineering teams is so important.
Special thanks to Jing Zhang for checking over this post for me and helping me understand how different Asian languages input text with a keyboard.
I speak neither Korean nor Mandarin, so apologies for what I presume is absolute nonsense text in the gifs. ↩︎