home · projects · papers · blog · gallery · contact ·
anil madhavapeddy // anil.recoil.org


Book: The World is Flat

Posted by Anil Madhavapeddy Mon, 07 Aug 2006 21:32:00 GMT

A fellow passenger on a flight from New York to San Francisco was reading an interesting book called "The World is Flat: a brief history of the 21st century" (amazon). I'm on the same flight a few weeks later, so I picked up a copy to pass the time and have discovered one of the best books I've read in a long time!

The author, Thomas Friedman, works for the New York Times as their foreign affairs correspondent, and this book is packed full of references to interviews he has conducted with people ranging from the CEOs of multinational companies (e.g. the heads of Wipro and Infosys in India), all the way to small business owners in China and India.

His thesis is that the "world is flat" due to the convergence of factors ranging from the obvious: the fall of the Berlin Wall and the rise of personal computing, to the seemingly boring: supply chain management by Walmart. Where the book excels is its engaging presentation; rather than adoptic a polemic, argumentative style, Friedman instead quotes interviews with someone relevant to the field at hand. Books like this often annoy me with technical inaccuracies when they cover topics such as open-source software, but Friedman has great discussions with people such as Brian Behlendorf and Craig Mundie!

I'm still working my way through it (next hop: NYC to SFO), but the first half has been fantastic and has really changed my views (read: woken me up) to just how integral out-sourcing is to successfully conduct business today. The book, much like the content it presents, is studiously up-to-date as of 2006, and the author apparently plans to continue to keep it as a "presentist" publication which conveys a sense of the current state of the world and not the past or future.

Posted in ,  | 2 comments | no trackbacks

Recipe: chana masala

Posted by Anil Madhavapeddy Fri, 28 Jul 2006 13:29:51 GMT

Well, Nick posted his mum's Cashew Nut recipe, so after my mum cooked dinner for some friends here in Cambridge, I asked her for her famous Chana Masala recipe! And here it is...

Ingredients

  • 1 Chick peas (tins or fresh)
  • 1 Onion (medium size)
  • 1 Tomato (chopped tins or fresh)
  • 1 Cinnamon (small one inch piece)
  • 2 Cloves
  • Ground cumin (1/2 tea spoon)
  • Ground coriander (1 tea spoon)
  • Chilly powder or green chillies
  • Cashew nuts (handful)
  • Salt
  • 1/4 spoon of tamarind paste
  • Chopped fresh coriander leaves (1 tbsp)
  • Cooking oil (2 tbsp)
  • 1 tea spoon of ginger and garlic paste

Preparation

Heat the oil in sauce pan to medium heat and add cinnamon, cloves and cashew nuts. Add chopped onions and fry them till they are golden brown. Now add ground cumin, coriander, chilly powder and chillies, salt, garlic and ginger paste. Cook them on low heat for a few minutes until you get a nice aroma, and then add the rest of the ingredients and let it cook for a few more minutes. Serve it hot with poori or chapathi.

Posted in ,  | 2 comments | no trackbacks

My first Cocoa steps

Posted by Anil Madhavapeddy Sat, 15 Jul 2006 02:45:00 GMT

mlgalleryedit Ever since I got my first Powerbook back in 2000, I've been meaning to learn Cocoa and Carbon to hack on MacOS X GUIs. On the flight over to San Francisco, I finally found the uninterrupted time to knock up a simple GUI interface to my gallery meta-data files. Overall, the experience was pretty positive. It's definitely more satisfying than my experiences with Windows and UNIX GUI programming, mainly because the result is so pretty!

  • Objective-C has a really nice dynamic message dispatch mechanism, used to good effect by Cocoa. The autorelease mechanism plays well with C memory management to provide a reference-counted interface which is fairly well abstracted. My application still leaks memory like a sieve though; I miss OCaml!

  • Cocoa provides a huge number of ways to do the same thing. Bindings are the fancy new thing, MVC is the older "paradigm", and of course Carbon predates all of this. The documentation is a bit of a mess for a beginner to the framework, as crucial facts on how to get simple stuff done are scattered across a myriad of documents. Thanks Google.

  • Tiger has some funky new Cocoa controls. Check out the use of NSTokenField on the screenshot which lets the tag entry field auto-complete just like Mail does!

  • The APIs can be unfortunately verbose at times, as the following code snippet which does a little bit of simple string manipulation shows.

 NSArray *a = [tag componentsSeparatedByString:@" "];
    iter2 = [a objectEnumerator];
    while (s = [iter2 nextObject]) {
        NSString *e = [s stringByTrimmingCharactersInSet:
            [NSCharacterSet whitespaceCharacterSet]];
         if (![e isEqual:@""]) 
            [tags addObject:[e retain]];
    }

I'm quite looking forward to doing more work on this simple application now that the basics are mastered. Hmm... preferences panes next, then a bit of Cocoa bindings, and perhaps I feel OCamlCocoa coming on...

Posted in  | 2 comments | no trackbacks

Dr. Madhavapeddy I presume?

Posted by Anil Madhavapeddy Mon, 10 Jul 2006 11:43:40 GMT

After an invigorating 120 minutes of questioning, bright lights shining in my face, and general all-round cross-examination, my two examiners Ian Wakeman and Tim Griffin decided to pass me with minor corrections for my PhD! On top of that, it miraculously got nominated for a BCS Distinguished Dissertation award, which does motivate me to really polish it up before submitting the final version. At the Volta Lounge, we are planning to graduate together next summer, so there's no rush...

I haven't quite gotten used to it yet; while booking tickets to San Francisco for Thursday I bottled out to the sales lady and put my title down as "Mr." instead of "Dr."!

Posted in ,  | no comments | no trackbacks

Migrating blog to Typo

Posted by Anil Madhavapeddy Fri, 30 Jun 2006 18:25:24 GMT

I've migrated away from my custom-written blog (farewell mlblog!) to the very nice Typo based on Rails. This is mainly because I don't have the time to hack together all of the XML-RPC functions required to support the MovableType API in OCaml, and the live-search feature now present in the sidebar is very cool!

To summarise the last six months, I submitted my PhD, broke my knee, went to the OpenBSD hackathon, fixed my knee, released some OCaml code (still very low-key as it needs a lot of polish) and am happily working at XenSource in Cambridge now! PhD viva is next Friday...!

Posted in ,  | 3 comments | no trackbacks

Wanderings through Northern India

Posted by avsm Mon, 26 Dec 2005 14:38:00 GMT

When I visit India, I normally stick to the south where most of my extended family lives. In a miniature rebellion this Christmas, I took up my good friends' Seb and Sheree on their offer to show me around their towns of New Delhi and Kolkata. The trip has ended up being a huge amount of fun, as we combined tourism with a suitable dose of partying in such places as the Tolly Country Club for Xmas Eve (which has a waiting list of decades for membership!!!). I'm currently in Kolkata with my parents, and sadly heading back to Cambridge in a few days. I think this will be the first time I actually miss leaving India, as the North seems to be the distinct winner over South India in terms of being more modern and fun...

Seb and Sheree pose in Delhi
Seb and Sheree pose in Delhi
Mad Xmas Eve party in Calcutta
Mad Xmas Eve party in Calcutta
Mummy and a Xmas tree!
Mummy and a Xmas tree!

Posted in ,  | no comments | no trackbacks

Scotty and Eleanor get hitched

Posted by avsm Mon, 26 Dec 2005 14:05:04 GMT

I finally got around to uploading a few months worth of pictures to my gallery, and of course the first thing to highlight was the Robinson Wedding of the Century: Scotty and Eleanor! The wedding was awesome as it was held in Cambridge in the cozy Robinson Chapel (which is our College Chapel), and performed by the wonderful Maggie Dawn (who actually blogged about the event as well). Here is a short selection of pictures... I failed to capture any of the actual wedding itself, as I ended up ushering and almost missed it, woopsie.

It all began in a stag night which ended in a police station...
It all began in a stag night which ended in a police station...
The wounds were replaced by smiles by the wedding day!
The wounds were replaced by smiles by the wedding day!
The Battle of the Babies heats up with Imogen...
The Battle of the Babies heats up with Imogen...
... vs the obnoxiously cute Flynn Ludlam
... vs the obnoxiously cute Flynn Ludlam
Flynn wins Round 1 in the Separated at Birth contest vs Ed
Flynn wins Round 1 in the Separated at Birth contest vs Ed
... and he also drinks Kieran under the table!
... and he also drinks Kieran under the table!

Posted in ,  | no comments

Tony Hoare on bounds checking in 1980

Posted by avsm Tue, 08 Nov 2005 19:25:22 GMT

I've been majorly focused on finishing off my PhD Thesis recently, hence the lack of updates (but check out the sharp green gradient I'm posting on the thesisometer!). While researching the history of dynamic bounds checking in languages, I found this remarkable quote from Sir Tony Hoare in his 1980 Turing Award lecture about Algol-60:

A consequence of this principle is that every occurrence of every subscript of every subscripted variable was on every occasion checked at run time against both the upper and the lower declared bounds of the array. Many years later we asked our customers whether they wished us to provide an option to switch off these checks in the interest of efficiency on production runs. Unanimously, they urged us not to - they already knew how frequently subscript errors occur on production runs where failure to detect them could be disastrous. I note with fear and horror that even in 1980, language designers and users have not learned this lesson. In any respectable branch of engineering, failure to observe such elementary precautions would have long been against the law.

Bear in mind he made this statement in 1980, and nothing has really changed in the intervening 25 years as the Internet gets overrun by viruses and worms which take down hospitals and nuclear power plants.

Another amusing one is about Fortran, found on his Wikiquote page:

On October 11, 1963, my suggestion was to pass on a request of our customers to relax the ALGOL 60 rule of compulsory declaration of variable names and adopt some reasonable default convention such as that of FORTRAN. [...] The story of the Mariner space rocket to Venus, lost because of the lack of compulsory declarations in FORTRAN, was not to be published until later."

Posted in  | no comments

Older posts: 1 2 3 4 5 ... 12




Copyright © 2003-2006 by Anil Madhavapeddy. All rights reserved.
Original design used with kind permission from Jon Parise.
Valid CSS
Valid XHTML 1.0