Nerdy t-shirts

Filed Under sayansi, tarakirishi by | Comments Off on Nerdy t-shirts

Working at a software company, I’ve gotten to see a fair share of nerdy t-shirts. There are the those celebrating various video games, software launches etc. Then there are the programming references (“Wanna grab a byte?”).

Probably nobody does programming humor better than XKCD – their “my code is compiling” and “sudo make me a sandwich” shirts are pretty common. This week, I saw two shirts that are in contention for the title of “Most Awesome T-shirt Ever”.

The first had a decidedly complicated looking equation on the front, giving the value of Vs. The caption read “Airspeed velocity of an unladen swallow“. Priceless. I was tempted to ask if the swallow was African or European.

The second had a big bold “i2” on the front with the caption “keeping It real“. That made my day!

Microsoft does a poor job of advertising new products, especially those in beta. Often this leads to the impression that Microsoft does not innovate. Here are some new products I’ve been playing with/using that are pretty cool.

  1. PowerPoint Plex (pptPlex) from Office Labs ( you’ve ever wished your slideshow could be something more than a linear series of slides, this is for you. You can can arrange your slides on a canvas, zoom in and out of slides and set your path for navigating through the slides. This means that you can have long code samples in your presentations and zoom into the sections you need as you need them. I can’t imagine going back to linear slides.
    An earlier version of Plex was used in this demo of Touch Wall.
  2. Script# ( is the result of an independent project by Nikhil Kothari, an software architect in the .Net developer platform. Using the script# compiler, you can compile C# code into JavaScript (it does with C# what Google Web Toolkit does for Java). Here’s a blurb from Nikhil’s site.

    Script# brings productivity to Ajax and JavaScript development. Script# is a free tool that enables developers to author C# source code and subsequently compile it into regular script that works across all modern browsers, and in doing so, leverage the productivity and power of existing .NET tools as well as the Visual Studio IDE. Script# empowers you with a development methodology and approach that brings software engineering, long term maintainability and scalable development approaches for your Ajax applications, components and frameworks.

    With Script#, you can design your AJAX applications just as you would .Net applications – complete with object inheritance, namespaces, interfaces, event receivers, private methods etc. The JavaScript produced is browser independent, meaning that you get insulated from all the little browser quirks.

    You also get a lot of code re-use, just as with regular OOP. Script# provides its own base libraries for Ajax development, mirroring the libraries provided in the .Net platform. Alternatively, you can use base libraries from ASP.Net AJAX, or third party platforms like ExtJS(via Ext#). Script# produces a DLL with the JavaScript at compilation so your DLLs can be used in future projects as reference assemblies.

  3. Photosynth( product from Microsoft Live Labs takes  set of photos and constructs a 3D model. The effects are pretty astounding.
  4. Songsmith( falls neatly into the toy category. This product from Microsoft Research allows you to hum or sing a tune and it generates an accompaniment. ArsTechnica had a really good article on this. There are some YouTube videos providing songsmith re-arrangements of classic tunes. My favorite is the remake of Roxanne by the Police.

Here’s a gem from the Ars mathamatica blog.I don’t think I could put it better if I tried.

You know, mathematical terminology cannot be parodied. Mathematicians have invented groups, semigroups, quasigroups, pseudogroups, and two mostly-unrelated concepts both known as groupoids. They have invented both formal groups and quantum groups, neither of which are kinds of groups. And while the study of groups is a branch of algebra, most groups are not, in fact, algebraic.

Check out the comments for the post

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.

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.






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.

Maswali na majibu baada ya Gödel na Turing

Neno sayansi linatokana na neno “scio” la kilatini lenye maana ya kujua ama kufahamu. Hivyo basi, masomo yote yanayochukuliwa kuwa aina ya sayansi yanajihusisha na kutafiti ukweli wa mambo – iwe ni kwa kufanya majaribio (ambapo inakuwa sayansi tendeshi) au kwa kukisia kanuni za ukweli na kuzithibitisha (ambapo inakuwa ni sayansi nadharia).

Nitakayoyazungumzia hapa ni historia fupi ya utafiti wa sayansi ya kompyta, haswa maswali yaliyoanzisha usomi huu. Kwa watu wengi, masomo ya tarakirishi huchukuliwa kuwa miongoni mwa masomo ya uhandisi. Ni kweli kwamba sehemu nyingi za somo hili zinazojihusisha na kifaa tarakirishi chenyewe – iwe ni hadweya au softweya ya vifaa – na sehemu hizi huwa ni uhandisi. Lakini pia, somo hili linajihusisha na mengi zaidi ya haya – ukiangalia asili la neno kompyuta utapata linatokana na neno “compute” la kiingereza ambalo lina maana ya “kupata jibu, hasa kwa swali la hisabati, kwa kutumia kanuni fulani”[1] . Tutakavyoona sayansi hii inahusika na maswali ya muundo wa “Je swali hili linajibika kwa kufuatia kanuni?”,”Linahitaji kanuni ngapi?” n.k. Read more

I attended a talk titled “Confessions of a Nerd Herder” given by someone who had been a Program Manager in Microsoft Research for twenty years or so. The talk itself was somewhat disappointing – he painted too rosy a picture of MSR, making it out to be a utopia where brains walk unbriddled; where only the brightest of the bright get hired and ,once there, they go about changing the world and saving puppies.

The most interesting thing I took out from the talk was the question “How would you design a computer for people who can’t read?” The idea is not novel. It sounds like the kind of design question you would get in an interview. But taking this after the Hamming talk on great ideas, I translated it into a challenge – how would you design a computer for the developing world, for Africa in particular? Sure enough, there are many people in African can and do use computers in their present incarnation. However, the overwhelming pool of potential users is locked out as a result of poor infrastructure (power and communication) as well as the fact that barely any software or content is currently provided in African languages. Working within these constraints gives an interesting challenge. Read more