Tournament Model

Muthu@SFO-May-2018.jpg

This year I had chance to speak at my undergraduate institution – a well recognized engineering school in Trichy, India – about various things concerning my professional development and understanding of Science, Engineering and innovation in my short career as software developer and scientist-in-training.

Primarily, my goal was to communicate the tournament model and how we may enjoy our time in educational institutions pursuing a quest for truth regardless of some of the outcomes – just because they are governed by the tournament model.

Consider your task: to pick a winner in 2-player games from a group of N (say 128 or 64 players – like a typical Tennis tournament [or teams of smaller sizes for IPL or World Cup cricket tournaments]) then goal is to organize the games as a championship format with league rounds and knock-out tournaments to eventual final which decides the winner. This is the tournament model.

An alternate version where number of teams/players participating is not a power of 2, we may setup the model as follows algorithm/pseudocode;

  1. Enter all teams/payers in a double-ended-queue [deque]
  2. Select first-2 teams in queue and let them play;
  3. Take the winner of this game and enqueue to the end of queue; discard the loser (obviously!)
  4. Now we have N-1 teams/players in the queue.
  5. Repeat steps 2-4, till number of players is 1.
  6. We have a winner!

Key insight of tournament model is the fact that small differences between entities participating in the model can be amplified by the model making winners, and effects like the Matthew effect can ensure initial advantages snowball over time [esp. in industries like entertainment, social networking etc.]

The tournament model decides frequency of India vs Pakistan cricket matches, why Nadal vs Federer is most likely grand-slam final match up; the system decides success of professional actors and actresses. Why are Kamal Hassan and Rajinikanth more famous than other talented male actors of their generation (e.g. Sathyaraj, Karthik, Prabhu, etc.)[not to mention other female actresses – a whole other question]. Modern day movie star rivalries are also plenty, to wit – Danush vs Simbu etc. in their ascent to fame.

Many principles of randomness of outcomes, and regression toward mean explain the outcomes in retrospect; but none of the techniques have an ability to explain these phenomenon in a predictive manner which one may seek.

Hence as students approaching a potentially lifetime of work in field of engineering or science, I recommend everyone to aspire to understand the fundamental pieces – to learn the instruments, notes, chords, scales of their musical pieces – not just the piece itself- so in the future you can compose your own orchestral music; so that you can build tools for future challenges that you may face – surely different from challenges you were taught to resolve – using an open ended approach to learning.

Tournament model also helps you handle failures – be it product, strategy, problem areas in life. Usually, losing at something is by not making the grade or placing second or being edge out is by being marginally “less” in some way, shape or form, compared to competition.

What is your experience with managing technology projects, and their outcomes ? Leave your comment below.

-M.A.

iMessage troubles with Telugu language display

I’m somewhat late to hear this news, but recently there was a bug in iMessage application of iOS and Mac platforms causing it to crash/freeze up as reported here.

The crashing character consists of 5 codepoints.

U+0C1C [Lo] TELUGU LETTER JA
U+0C4D [Mn] TELUGU SIGN VIRAMA
U+0C1E [Lo] TELUGU LETTER NYA
U+200C [Cf] ZERO WIDTH NON-JOINER
U+0C3E [Mn] TELUGU VOWEL SIGN AA

and has a complex ligature form.

Sadly the poor usage of Telugu language Unicode block is potential cause to discover the bug so late; however the root cause of bug is some unsightly buffer overflow in Apple’s codebase.

கஷ்டகாலம்.

Who knows if Tamil Unicode has any equivalent horrible bugs living in Android/Apple/Mac/Linux/Windows platforms. Hopefully not.

Chennai Python 24th, March, 2018

24th March, 2018,  Chennai Python Meet-up

Open-Tamil and Ezhil-Language Projects

“எழில் என்பது முதல் திர மூலமாக கிடைக்கக்கூடிய தமிழ் ஸ்கிரிப்டை அடிப்படையாகக்
கொண்ட நிரலாக்க மொழி ஆகும், இது விண்டோஸ் 32, 64 மற்றும் Ubuntu, Fedora Linux மற்றும் Docker தளங்களில் 2017 ஆம் ஆண்டில் வெளியான http://ezhillang.org. எழில் ஒரு பைத்தான்-அடிப்படையிலான மொழிஇயக்கி. வளர்ச்சி GitHub வழியாக நடைபெறுகிறது.

திறந்த-தமிழ் தமிழ் நெருக்கமாக தொடர்புடைய தமிழ் மொழி செயலாக்க கருவிகள் கொன்டது; நூலகம் ஆரம்பத்தில் எழில் மொழியின் ஒரு கீற்றாக துவங்கியது; ஆனால் விரைவாக வார்த்தை-வடிகட்டுதல், N- கிராம் பகுப்பாய்வு, புணற்சசி இலக்கணம், தமிழ் எழுத்துப்பிழை சொல்திருத்தி உருவாக்கம் முதலியன, பல மொழிகளில் பைத்தான், முக்கியமாக, ஜாவா, ரூபி முதலியவற்றிற்கான தமிழ் தொகுப்புகள் பரிசுரம் செய்யபட்டன். http://tamilpesu.us வலையில், மற்றும் Play Store இல் Kalsee பயன்பாட்டில் எங்கள் வேலைகளை பயன்படுத்தலாம்.”

600_469542627

 

Thanks to kind arrangements of friends in Chennai Python, and open-tamil community I had an opportunity to make a presentation on Open-Tamil and Ezhil-Lang projects, and completion. Talk was well received, and delivered in unique Tamil mixed with English due to comfort of being in Chennai only!

Open-Tamil user commands

Lot of times we have felt the problem with open-tamil : it has many utilities, but none of them are usually available as functions or commands out of the box. It has very much been a developer tool, and not a user or informed-layperson tool.

A quick fix is to add the example Python scripts to the default install paths along with open-tamil installation [which is still simple as ‘$ pip install –upgrade open-tamil‘].

1. tamilphonetic - convert EN input to Tamil text
2. tamilwordfilter - filter Tamil input only from all input text data
3. tamilurlfilter - filter Tamil text from the input website data
4. tamiltscii2utf8 - convert encoding from TSCII to UTF-8 for input file
5. tamilwordgrid - generate a crossword from Tamil input text and write to output.html file
6. tamilwordcount - like UNIX wc program but for Tamil

All these functions will be made available in version 0.7 of open-tamil to be released soon. Currently these functions have landed in the development branch through the commit 02810461bef216df56b10ebf09818b94dfc75574

The next step should be to really bundle these tools into a binary executable for various platforms. Also to note, the function tamilwordcount was contributed by a new member to the Open-Tamil group, Mr. Surendhar. Thanks much, and welcome!

-Muthu

Chennai, India

நிரல் அலசிஆராய்தல் – art of debugging

Debugging – அதாவது கணினியில் பிழைகளை கண்டு திருத்தம் செய்வது எப்படி ? பைத்தான் மொழியில் இது சற்று சகஜமானது : முழு விவரம் இங்கு.

What is Debugging ?

Computer programs don’t always work like how we want them to. So at times we need to stop the program in the middle of execution and inspect them. By doing that – looking at the variables, functions, statements/source code in the debugger – we can understand the problem better than before and by stepping through the source code we can understand the source of the error to arrive at a solution.

This may sound somewhat complex, but in practice its quite repetitive and you will get the hang of it. Its the equivalent of a software detective work, and it is surprisingly fun, and you keep getting better at it with more practice.

How to Debug Python Code ?

To debug python we use the python module ‘pdb‘ [read documents இங்கு]; pdb is named evocatively like the more famous, powerful gdb – GNU source debugger. The simple usage is to call your program throwing the error from the command line as follows,

$ python -m pdb myscript.py

Once you see the (Pdb) prompt you can do the following:

  1. Setup a breakpoint at a particular function, class or module
  2. Resume the program running and
  3. Wait for the program to enter the breakpoint code or hit an exception
  4. At this time Pdb will enter the breakpoint and give you options to inspect variable, function, the call stack, and step up or down the frames
  5. For exceptions caught by gdb, we can go through the same scope variables and source-stepping inspections only via the post-mortem execution

Finally, you can figure out the cause of the problem and fix it!

Bon Voyage. You are starting on a powerful journey to write cool software and fix buggy ones!

Goodluck, and Godspeed.

Ezhil, Open-Tamil conference articles – 2017

One of major achievements of last year has been collecting inputs from our team and writing up two important papers – one for historical review and other for collective call to action on great opportunity that is Tamil open-source software.

Acknowledgements

We also take time to thank all co-authors who have pulled together their efforts at short notice to make these research works happen! Together these two papers represent a value of tens of thousands of Indian rupees, or more in the making (going by estimates of other Tamil software foundations).

We also thank conference organizers for partial travel grant toward making this presentation happen. Thank you!

Conference Articles – 2017

Ezhil, Open-Tamil conference articles – 2017 presented at Tamil Internet Conference, August, 2017, in Toronto, Canada. Both the papers were well received and good academic and development points were debated at the forum.

  1. Ezhil – எழில் மொழி பொது பயன்பாட்டிற்கும், வெளியீடு நோக்கிய சவால்களும்
    • This paper summarizes the path taken by Ezhil from inception toward delivering a fully installable product on Windows 64/32bit, Linux (Unbutnu, Fedora) systems, and offers a meditation on how students and teachers may adopt this product, and future pathways.
    • Presentation slides are here on slideshare.
  2. Open-Tamil / Open Source in Tamil – Tamil Open-Source Landscape – Opportunities and Challenges_MA_2017_final 
    • Some important contributions of this paper show collective interest in Tamil open-source which outpaces the other languages with larger speaking-population. This is a key indicator to develop better pathways to bring new developers and train them into developing Tamil software
    • GitHub Tamil language repositories

      GitHub Tamil language repositories compared with other languages, as measure of software developers interest.

    • Presentation slides are at slide-share

For questions and queries on these articles, please write to us at ezhillang@gmail.com or leave your comments below.

Ezhil Language Foundation

 

Project ‘padai’ – scripts to launch Tamil server instances

Over the years of my open-source development I have moved towards using more cloud computers for various reasons of convenience. However getting a cloud computer from one of the major providers like AWS, Azure etc. requires a lot of setup time to bring it to a usable state for Tamil software development.

Primarily for Tamil software development on Windows 10 (or later) is slightly more easier, compared to Linux/Unix machines, because basic Unicode font and rendering support works out of the box. However in Linux cloud-machines X-windows, Window manager, and desktop support is not common – let alone Tamil support!

So everytime to setup a cloud instance I had to spend a few hours tracking down the packages, installing the dependencies, running host of shell commands to ensure its all lined up to see Tamil text rendered correctly on the remote-screen. This would typically take away time I spend building binary packages for project Ezhil.

Knowing vaguely you can make this system administration and server conf tasks simplified using shell-scripts or tools like Fabric, I researched them earlier; then I asked in our Tamil software community from my Twitter account what could be the solution:

tweet_June1_2017

I got recommendations to use Ansible and build a Docker image for the server of interest from Shrinivasan (aside: Congratulations to Shrinivasan named as 2016 Tamil Computing award winner for his work on Tamil and Indian-language projects at WikiMedia foundation and Wikipedia!)

Now I figured my familiarity in bringing up machines using Python or shell-scripting could be useful in getting me off the ground right away – while I could find ways to get expertise on Docker or Ansible to help me out. So I put together all the scripts I used for bringing up Fedora/24 and Ubuntu/16 machines for Ezhil development.

The result is ‘Padai’ project –  currently two nice scripts to get you from basic IaaS server to a working Tamil script rendering computer for Ezhil development in 10-minutes for both Fedora and Ubuntu. Check it out here.

Looking forward for your support and sending us your pull-requests.

-Muthu