The power of yams

Filed Under teknolojia by | Comments Off on The power of yams

The Olympics may be gone but the sense of wonder at some of the feats of athletic ability still remain. For me, the two that stand out especially are the doings of Usain Bolt, Jamaica’s 21 year old star sprinter.

The first was his seemingly effortless win of the 100 m final. He did not look to strain as he led the pack in world record time. He let off before crossing the finish line (taking time to thump on his chest and look around to his adoring/amazed fans) – yet he still broke the world record and won gold! It was a sight to behold! Later on, when the NBC interviewer caught up with him, the conversation could not have been scripted better (paraphrased liberally).

Commentator: Congratulations on your victory. Winning Jamaica’s first men’s gold in this event. How does it feel?

Usain: It feels good. I came out here to win and have fun and I did.

Commentator: You let off a few meters there before crossing the finish line yet you still broke the world record. How much more time do you think you would have shaved off the record if you hadn’t let off?

Usain: hey, I’m not worried about that. I came here to win and have a good time and I did.

Commenator: [look of disbelief] but, the world record. Don’t you think you would have taken off some more time off it?

Usain: [even more amusing look of disbelief] yeah, but I won.

 

In my words, the last statement would have been “Dude, didn’t you notice I won?” He did win and he did have fun. In fact, it looked like every other contestant treated the race as the run of his life – huffing, puffing , strain showing on their faces – but Usain couldn’t wait for the race to be done. He wanted to show off his golden shoes (of which he had two pairs: a 100m version for the 100m race and a 200m version for the 200m race). He also needed to perform a jig and pose by he clock showing his world-record-setting time.

I can’t say I was totally shocked by Bolt’s performance in the 100m final. I had watched his semi-final heat for the same race the day before. In that, he had let off at about the 50m mark and taken the rest of the time to look into the stands, wave his hands around and generally trivialize the race. By his standards, winning against the fastest sprinters in the world was like taking candy from a bunch of babies.

As expected , the look of effortless ease did not go unquestioned. The press was first to hear voices “there are suspicions that doping might be involved”, “he might be taking performance enhancing substances”. Bolt’s dad faced those suspicions face on. “I know what my son takes to be strong and fast. ” He took a suspenseful pause then added,  “It is a healthy amount of yams from Jamaica’s Trelawny region.” [Reuters]

I hope bolt’s dad has a Yam farm somewhere – this thing could become huge. In today’s hyper-engineered sports industry, yams could well become the next protein shake. We’ll see supermarket aisles with yam-extract products right next to the soy stuff.

Mr. bolt sr. I want to get in on the action too. That’s why I’m announcing today the secret behind Simon Wanjiru’s gold medal winning (and Olympic Record setting) performance at the Marathon. Its all about arrowroots. A healthy dose of Nyahururu arrowroots and you can run 40kms non-stop. You can place orders here.

Kenya is currently in the grips of a wave of student riots. In the last month alone, about 300 secondary schools have shut down as a result of the unrest. The timing of the riots is not surprising: national exam season is just around the corner. The month of July is when most schools would sit for their Mock examinations – internal exams designed to simulate the national exams. Performance in Mocks is taken as a good indicator of expected performance in the national exam – a fact that makes the exams stressful.

 Given the high tension atmosphere, it is quite likely that events that would ordinarily draw minor reactions from students get blown out of proportion. So what is it that most students are complaining about?

 “The exams are hard.” (according to an investigation by Nation)

 Exams have always been hard and there have always been schools that went on strike on this grievance. I remember an eruption of school strikes in my district when I was in form 2.  Four schools went on strike in close succession around Mock time and they sent emissaries to our school urging us to boycott the exams. The following year, when national exams results were released, one of the schools went on strike over their performance. This time, they marched to the District Education Board office carrying banners that asked “Why did we fail?” in big bold letters. It was a study in irony. The students alleged a plot by district officials to favor certain schools, evidenced by those schools good performance. Incidentally, the ‘favored’ schools had not boycotted mock exams in the previous year.

 Thinking back to this incident led me to some conclusions on the force behind the current wave. Read more

‘Sikate Tamaa ni jina la diwani ya kwanza ya mashairi ya Said Ahmed Mohammed. Niligundua diwani hii siku moja maktabani nilipokuwa kidato cha tatu. Kilichonivutia kwanza ilikuwa ni muundo wa mashairi ya diwani hii – mengi yalikuwa mafupi na, tofauti na nilivyozoea, ni machache tu yaliyokuwa tarbia. Nilianza kusoma shairi la kwanza huku nikijitayarisha kukumbana na misamiati.

Shairi lenyewe lilitirirka – maneno pia na mawazo. Hili lilikuwa shairi lililopendeza kusoma, lenye maudhui dhabiti na lenye lugha isiyoficha maana. Halikuvunja urari wa vina au kanuni zingine zilizotawala ushairi – idadi ya vina katika kila mshororo. Hii ilikuwa ndio sanaa iliyokamilika.

Ilikuwa ndio mara yangu ya kwanza kupata shairi la kiswahili lililopendeza hivi. Baada ya kusoma mashairi mawili au matatu yaliyofuatia nilijua kwamba lazima ningenua kitabu hiki. Malenga huu alipata mfuasi.

Shairi hilo la kwanza, ‘Sikate Tamaa, limenipa moyo mara nyingi pale nilipokaribia kufa tamaa.

Umeanguka, inuka, simama kama mnazi
Umechunika, inuka, tia dawa kwa ujuzi
Sasa inuka, inuka, kijana ianze kazi
Sikate tamaa

Usife tamma, nyanyuka, ni muweza wa kutenda
Kuna hadaa, nyanyuka, anza tena kujipinda
Dunia baa, nyanyuka, anza tena kujiunda
Sikate tamaa

Sivunjwe moyo, dunia, hivyo itakunyanyasa
Futa kiliyo, dunia, hiyo idhibiti sasa
Ipe kamiyo, dunia, kamwe, siache kufusa
Sikate tamaa

Una nguvu, simama, wewe upambane nao
Una werevu, simama, uzepuke njama zao
Usiche kovu, simama, ujifunze vumilio
Sikate tamaa

Shairi hili ni aina ya tarbia lakini si tarbia ya kawaida. Ingawa kila ubeti una mishororo minne, tunapata kwamba kila mshororo umegawa kwa vipande vitatu badala ya kawaida ya vipande viwili. Vipande vyenyewe bado vinadhihirisha urari wa vina na kipande cha kati kinarudiwa kwa kila ubeti. Kurudia huku kunachangia utamu/ladha ya shairi kwani kuna usawa fulani. Pia kurudia huku kunahimiza ujumbe wa shairi hili.

In senior year of college, I took an class that blended information theory, algorithms and networking. It was called “Algorithms at the end of the wire”. My project for that class was an application that finds links for articles in Wikipedia.

Working off the ideas presented in class on search results ranking and vector space models, we proposed that given a query article (an article to add links in), we can find some k articles already in Wikipedia that are most similar to it. We can then we can use the links in those articles to infer the links to create in the query article. In particular, each of the neighboring articles could suggest links for text that they had in common with the query and the set of neighbors would vote on the link with weighing applied based on how close the particular voting article was to the query article. As the mechanism for determining the k nearest neighbors, we would fetch articles from the Wikipedia corpus that had text occurring in the query article then rank the results and pick the top k. Ranking was done separately using PageRank and using Latent Semantic Indexing then the rankings were aggregated.

You can download a prototype of an editor implementing our algorithm here . The editor depends on a web service so you need to be connected to the internet to use it. This is a C# application so you can run it in windows or in Linux using Mono.

kappa_01_prelinking.jpgkappa_01_postlinking.jpg

 

 

 

 

Read more

Kenya is slowly recovering from the effects of the post-election violence that rocked the country for the first two months of the year. One of the parties in the conflict, ODM, is calling for amnesty for those arrested for participating in the violence and various crimes around it. This, they say, is necessary for national healing. A blanket amnesty, in my opinion, is neither necessary nor conducive for the goal of national healing. Read more

Katika miaka ya sitini na sabini, kulikuwa na kipindi cha televisheni kilichoitwa “Let’s Make a Deal” kilichofana nchini Marekani. Katika kila kipindi hiki, kulikuwa na washiriki tofauti ambao Monty Hall, mtangazaji wa kipindi, aliongoza kwa michezo fulani. Mojawapo ya michezo hii ilihusisha kuchagua kati ya vyumba vitatu ambapo chumba kimoja kilikuwa na zawadi (kawaida gari) ilhali vyumba vingine mlikuwa na kitu kisicho dhamana (kawaida mbuzi). Ili kukanganya wachezaji Monty Hall aliwapa fursa ya kuchagua chumba kwanza (kwa kuashiria mlango wa chumba) kisha naye Monty Hall aliashiria moja kati ya vyumba viwili vilivyosalia. Monty Hall aliagiza wasaidizi wake kufungua chumba alichochagua yeye. Kwa kuwa Monty alijua awali chumba chenye zawadi, alipanga kwamba kila wakati mlango wake alionyesha chumba kisicho na zawadi. Hapo mchezaji aliulizwa ikiwa alitaka kubadili chaguo lake kufuatia ujuzi huu mpya.

Kwa watazamaji nyumbani, ambao hujiona kama ndio wachezaji, swali lilikuwa Je mpangilio upi ungezidisha uwezekano wa kushinda? Mwanahesabu mmoja aliamua kutumia mbinu zake kupendekeza mfumo uliofaa – alisema kuwa kubadili chaguo lako kunazidisha uwezekano wako kushinda. Read more

I have been yearning for a while for a device that would help me manage pdf files with the ease and convenience I currently manage my mp3 files. I searched around on the net for a while but didn’t find anything that would fit my needs (there was an interesting MacOS program though). I settled to build the program myself.

I identified the iTextSharp library as my tool for reading and writing pdf metadata. The library is counter-intuitive on some points and it took a while to figure out that the pdfstamper was the best object to use to edit metadata.

This project was my first foray into the world of winforms and it was pretty instructive in that regard. The main lesson learnt was that EventHandlers are your friend. The listview control came in in handy as it was my primary mode of displaying the files being managed. I had to tweak it to enable sorting by various columns and will have to tweak some more to get filtering of items by a query term.

PDF manager

 

 

 

 

Next steps

The whole search mechanism is missing. I could implement this by extracting text from the pdfs and sticking this in a lucene index. If the index returns filenames (and we assume filenames are unchanged) then I would have full text search of pdfs.

I would also like to implement bulk editing of metadata.

I have been reading up on Windows Presentation Foundation and some of the stuff being produced is amazing. I am especially impressed by Delays SilverLight demos. His “surface” demo and XPS reader to me are an indication of the possibilities in interface that are opening up. WPF allows one to write applications in C# that run on the web as well, and that is going to change the limitations of applications. Microsoft quietly launched a beta of a search engine interface I find absolutely impressive – tafiti. It’s about time someone allowed me to save my search results with ease. Here’s a screenshot.tafiti_beta.jpg

Be sure to check out the tree View utility.

Rem Acu tetigisti Gado!

Gado on Moi’s ODM comments

Ushairi wa Said Ahmed Mohamed umenielimisha na kunisisimua tangu niliposoma diwani yake ‘Sikate Tamaa nikiwa shule ya upili. Nilipozidi kutafiti nilipata kwamba mashairi yake yametumika katika mitihani ya kitaifa ya Fasihi mara si haba. Nilipofanya mtihani wangu 2001, tulitahiniwa “Nimeona”, shairi linalotoka kwa diwani hii.

Sina uhakika kuhusu kipindi cha ‘copyright’ cha mashairi haya lakini nitachukua kwamba ni sawa kutumia shairi hili kuelimisha. Hapa basi, ni shairi “Si Dunia ya Kulala” kutoka kwa diwani hii.

Umelala, bado umelala, huamki kwani?
Una dhila, bado una dhila, zitatoka lini?
Pa kulala, bado pa kulala, hujapabaini
Na chakula, hata na chakula, pia wakuhini
Si dunia ya kulala.

Naujuwe, wewe naujuwe, ndiwe mdhamini
Kama siwe, wewe kama siwe, ni dhiki baini
Jipekuwe, wewe jipekuwe, muhimu yakini
Uyajuwe, wewe uyajuwe, utoke gizani
Si dunia ya kulala

← Previous PageNext Page →