Wikifunctions:Status updates/2024-04-19
◀ | Wikifunctions Status updates | ▶ |
Welcome, Sharvani!
We are happy to welcome Sharvani Haran to the team! Sharvani is currently an engineer on the Mobile Apps team, and joining us temporarily to explore the role of the Product Manager. I will let Sharvani introduce herself in her own words:
"I come from Mysore, India. Being born and raised in this city of palaces, world-renowned for its Dasara celebrations, I have always been in awe of India’s ancient wisdom, diverse culture and peace-loving temperament. I'm fascinated by different cultures and traditions - marveling at our similarities and celebrating our differences.
Growing up with my head in books, I spent all my childhood imagining all things that were so foreign to me like the British cultural references in ‘The Famous Five’, or stepping into Huckleberry Finn’s St. Petersburg, or wondering how children of the world would feel if they read ‘Malgudi days’ and its cultural references to India. I have been a lifelong fan of literary exchange.
Graduating as a computer science engineer, I have had the opportunity to work on various interesting projects in diverse roles for 18 years. This amazing adventure on the Abstract Wikipedia team feels like a natural final destination for all such linguistic and literary passions that have been a part of me. Thrilled to be here with an amazing team of people who are trying to make knowledge sharing easy and seamless across languages."
You already met Sharvani when she had taken care of Newsletter #150 two weeks ago. Please join me in welcoming Sharvani on the team!
Recent Changes in the software
This week has been one of our regular "Fix-It" weeks, where we mostly focus on technical debt and smaller feature improvements.
When you get an error when publishing an edited or new Object, we now show the error's message and its context in a simpler way, so it should be easier to understand, especially when multiple errors are returned (T345557).
The internal APIs which filter by language now list and validate the requested language against all the known languages to Wikifunctions, rather than giving no guidance or validation (T362193).
We improved our test coverage for several of our custom base Vue components (T358207), and corrected an issue with our test code to ensure it works with asynchronous DOM actions (T358204).
Finally, we created a new language, now supported by MediaWiki: Z1229/zgh-latn.
Team meeting next week
Next week, the Abstract Wikipedia team is going to have our annual team meeting. This time we are meeting in the office of the Wikimedia Foundation in San Francisco. Among other things, we will be planning the next few months of work. Because of the meeting, we are going to skip the regular update next week, and will report on the results of our planning afterwards.
Function of the Week: Encode in Morse code
In the 1840s, electrical telegraphs became the standard system to allow for fast communication. Two stations, connected with an electrical wire, would send electric pulses along the wire. In order to be able to send and receive messages, the stations had to agree on how to turn messages into pulses, and how to interpret a series of pulses as messages again.
For this, Morse code was developed. It consists of two types of pulses, a short and a long one, and breaks between the letters as well as longer breaks between the words. The encoding was meant to roughly support efficiency in English: letters that are frequent in English, such as E or I had short codes, letters that are less frequent, such as Q or J, had longer codes.
There are a number of slightly different codes. Wikifunctions provides function Z10944 for the international Morse code. Enter a text, using the 26 letters of the English alphabet plus the letter é, and you get the Morse code back: for example, the word Wiki will be encoded as ".-- .. -.- .." - a pattern you might recognize in the Wikidata logo. Besides the letters, the international code also covers some punctuation characters and digits.
The function has two implementations, one in Python and one in JavaScript. Both implementations consist of a dictionary respectively a map with all the covered codepoints, and some short code that uses these on the input. A total of seven tests cover a number of different cases;
- A simple input such as Hello World
- The whole set of letters, both uppercase and lowercase
- Digits
- Punctuation marks
- Dropping characters which are not covered
- Collapsing multiple spaces
Wikifunctions has also function Z10956 for the inverse operation, decoding Morse code. It can be used to take a text in Morse code and turn it back into the usual letters. .... .- ...- . / ..-. ..- -. / .- -. -.. / .-- . / .- .-. . / -... .- -.-. -.- / .. -. / - .-- --- / .-- . . -.- …