If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!

tariquesani on September 1st, 2010
  • [CakePHP] How to re-size images at run-time
    This is a helper + controller combo for CakePHP which I often use. It helps to re-size images at run-time and also aid display them. Oh yes! once the image is resized it also caches them. First let’s look at helper method. PLAIN TEXT PHP: class MyHelper extends AppHelper {     function getImageUrl($path, $size, [...]
  • SQL data source in Sphinx
    These days I am getting more and more into Sphinx and falling in love with it . In this post we will see how to make use of SQL data source to create indexes. Sphinx has inbuilt support for MySQL and PostgreSQL databases. The drivers for these databases can connect to the database using its [...]
  • Namespaces in PHP 5.3 – Part 2
    Welcome back! In Part 1 of this post we discussed how to create namespaces and use them for classes, functions and constants. If you have not read Part 1 I strongly recommend you read it before we move on to some of the advanced parts related to namespaces. Lets start from where we had left. [...]
  • Adding security to your CakePHP application – Part 2
    In the Part 1 of this post, we’ve discussed how to secure your CakePHP application by following some thumb rules and using Sanitize class. Now, in the second part, we’ll discuss how to add some more security to your application by using the nice Security component of CakePHP. Before coming down to the nitty-gritty of [...]
  • [iPhone] Parsing RSS with NSXMLParser
    One of the test apps I created while learning iPhone development was a FeedReader app using UITabbarController. Using TabbarController in combination with NavigationController, TableViewController and WebViewController was challenging enough for someone who just began with iPhone development. But more on that later … One of the problems I faced in this app was parsing the [...]

Tags: ,

tariquesani on August 17th, 2010

The boy who harnessed the wind

A thought that struck my mind as I was finishing this book was – How would the story of Wright brothers and their One day at Kitty Hawk be if they lived in an era with internet?

I read the Wright brothers story when I was in school and at that time all I was interested in was the journey of scientific discovery. The human part or the adversities faced by the brothers were totally lost on me. Now thirty years later I had in my hand a book which I felt was similar in spirit and I found myself lingering more around the parts where the life in the African village has been described – that is where the true story lies indeed.

The book tells the story of  William Kamkwamba, a poor but clever boy in Malawi Africa . The story is very recent and all the incidents depicted happened in last 9 years, in fact I remember reading the blog post which made William famous.

The book can be divided in three parts . The first part paints the background of the canvas in which the story is set. Talking about Malawi, a small poor country where most people live as subsistence farmers, a race of people who have not changed for scores of years, about their lack of basic health care, superstition, a brutal incompetent government,  lack of free public education, dangers of from animals and famine! In the year 2001 the maize crops failed leading to a devastating famine. The simple but vivid narrative of the hardships faced by the people during the famine is gut wrenching. The famine sets the scene for the second part of the story.

This second part is the story of William’s technological triumph. William is forced to drop out of the school because, after the famine, his parents cannot afford to send him to school. Deeply disappointed at this set back he does not give up. Always fascinated by mechanical things Willaim is particularly enamored by the dynamo of the bicycle, with very little theoretical knowledge and zero guidance he finds out that by putting the wires from the dynamo into the AC socket of a radio and turning the wheels you can get the radio to play. In the local library he finds a book called “Using Energy” which has pictures of windmills. The story continues on about how he constructs a windmill out of junk parts, a bicycle frame and flattened PVC pipe which can finally turn a dynamo and power a couple of light bulbs in his poor home. Charge mobile phones for people (in turn earn him some money) Interwoven in this in second part is a heroic story about human perseverance and brotherhood. William did not give up despite being ridiculed and not having proper tools just drove him to innovate. A heated wire served as a soldering iron, money from a friend served to buy a few parts – too many to enumerate here….

The third part is about the reward of being discovered by the world and of course the power of internet. Mike McKay wrote a blog entry about the Malawian Windmill which ultimately led to William being  invited to speak about it in TED Global. It is amazing to read how a boy who had never stepped out of his village, never seen a laptop let alone internet traveled across the globe, thanks to generous sponsorships and the goodness of human kind.

After I finished the book, I started drawing parallels to the situations in the book closer home – specifically Melghat- barely 350km from Nagpur, 90% of the children are suffering from some grade of malnutrition. I had visited Malura there were Mobile phones but no electricity to charge them. They had a school but no examination center.

On a broader scale there is no dearth of small innovators in India, in fact the Discovery Channel ran a complete series on them but what really became of them? Have they been relegated to just youtube videos? May be I am being a bit pessimistic here. India is huge and things consequently are slower to change but things do change….

Tags: , , ,

tariquesani on August 1st, 2010
  • [Zend Framework] Slug filter
    While studying for my Zend Framework certification, I tried to build a small application to test my knowledge. One of the tasks in that project was to try and build a slug filter which converts a particular string to slug, for example, ‘My Test String’ to ‘my-test-string’. It also checks for slug duplication if you [...]
  • Namespaces in PHP 5.3 – Part 1
    One of the most significant and welcome features added in PHP 5.3 was that of namespaces. While this has been around in other programming languages, namespaces have finally found their place starting with PHP 5.3. If you are not new to namespaces and have worked on them in other languages don’t go away, you might [...]
  • [HowTo] Google Calendar API : PHP – Manage events (Part 3)
    Earlier we saw how to install Zend’s GData library and retrieve list of calendars and events. Now its time to manage events i.e. create, update and delete events. First we need the Calendar service instance, so lets instantiate the Zend_GData_Calendar class. PLAIN TEXT PHP: $path = ‘/home/abbas/ZendGdata/library’; $oldPath = set_include_path(get_include_path() . PATH_SEPARATOR . $path); require_once [...]
  • Adding security to your CakePHP application – Part 1
    Ben Parker once advised his young nephew Peter, whose super-hero alter ego is Spider-man, that “With great power comes great responsibility.” CakePHP framework provides us a rich tool-set to build high performance web applications. The applications built using CakePHP are secure at much extent as long as it comes with some nice features such as [...]

Tags: ,

tariquesani on June 30th, 2010
Yawn!!!

Yawn!!!

With so many pictures from our Tanzania trip I wanted to something different than my usual wildlife photography style. I have tried to compile a series of five pictures which I call “Animal Portraits”. Each of these animals are from a group referred to as the African Big Five. Continue reading and grab the other 4 too!!

Tags: , , ,

tariquesani on June 21st, 2010
Lion Lessons: Yes my love you did well!!

Lion Lessons: Yes my love you did well!!

On the morning of our departure from Kirawira, western Serengeti it was cloudy and we had almost given up all hopes of seeing anything but then as it can happen with any jungle safari our luck changed. Just 20 meter form the road was sitting a part of a lion pride three lioness with two cubs. Initially the cubs were just content to suckle but then one of the lioness took upon herself that it was time to teach a few things about hunting to the young ones. So she cajoled them into play and what looked like a lot of fun for the cubs she proceeded to teach them some moves about how to hunt! I won’t bother with much verbal details and will let the pictures do the talking. Continue reading 9 photos after the link

Tags: , , , , ,

tariquesani on June 5th, 2010
  1. It is heavy and does not lend itself well to being held in a single hand due to the smooth metal back – I remedied this by ordering a silicon rubber sleeve.
  2. Safari for iPad does not offer search within a page. This can also be remedied by following the instructions here
  3. Screen should have been widescreen a 16:10 ratio is pretty much it these days. The widescreen option in the setting sucks!
  4. The look of apps like the address book, calendar and iBook is cheesy and not customizable
  5. Takes longer than expected to charge but on the flip side has a long battery life
  6. The built in Photo frame application is so basic that it will not even allow to set time between photos. Tapping will pause the slideshow but that is it!
  7. No printer support even in iPhone OS4 Will have to wait for iPhone OS4 for printer support (my accountant needs printed receipts of all purchases)
  8. Missing apps – Clock, Calculator, Weather, Stocks, I know that substitutes are available for free or very cheap but still….

OK! that is a list of just 8 and that said I absolutely love using my iPad. I use it most for reading, browsing Flickr and at times for viewing video using Air Video. Apple in past has heard its consumers so hopefully most of my gripes will not be there in next versions of the apps. The one which I am really doubtful about is getting a widescreen iPad but hey! one can always wish…..

I have listed my gripes – what are yours gripes about the iPad?

Tags: ,

tariquesani on June 3rd, 2010
Secretary-bird - Sagittarius serpentarius

Secretary-bird - Sagittarius serpentarius

As we drove towards the Central Serengeti plains a head bobbed up from behind a rising – I immediately exclaimed – Vulture!! But as the bird continued to come towards us it became apparent that the bird was taller than any vulture I know of, as the legs came into view they were more like that of a Stork or a Crane. This was my first encounter with the Secretary-bird. Continue reading has 2 more pictures…

Tags: , , , , ,

tariquesani on June 1st, 2010
Grey Crowned Crane - Balearica regulorum

Grey Crowned Crane - Balearica regulorum

Lake Manyara was our first game drive destination on our 9 day travails through Tanzania. After landing at Nairobi we traveled for nearly 7 hours before we could reach here. Even though we were very tired the abundance of birdlife and wildlife made up for everything. Continue reading there are 20 more pictures!!

Tags: , , ,

tariquesani on May 27th, 2010
  1. Carry a good bean bag, Even with a small lens your wrists can get tired pretty soon and tripods are not very useful inside a vehicle.
  2. Do not overlook taking wide angle shots – carry a good wide lens – a 10-20mm Sigma is a nice starter lens.
  3. A 400mm lens is mostly reach enough, you will not miss much if you do not have a longer lens – but do carry your big guns if you can.
  4. Do not ignore the birds there are plenty of them in Manyara, Serengeti as well as Ngorongoro.
  5. Use the biggest vehicle you can find and afford and do not fill it – have one photographer per row of seats.
  6. Pick up cans of Insect repellent sprays, they will be there in your rooms, wear full sleeves shirts. Avoid wearing blue and black – the Tsetse flies can be very irritating though the Serengeti ones are not disease carrying.
  7. Learn the Swaheli words for the common animals – the guides and drivers keep up a constant chatter on the radio and won’t share unless you specifically ask.
  8. Do day long game drives – unlike in India they are allowed in Tanzania and most resorts will give you packed breakfast as well as lunches.
  9. Rhinos in Ngorongoro are always very far off – get hold of a friendly Ranger who has the authority to go on “Ranger only” tracks and somehow convince him to take you in his vehicle.
  10. Carry enough storage cards for your camera and also spare batteries – you will certainly shoot more than you anticipated. Do not delete pictures in the field.

And this last one is a general tip for travelers using Kenya Airways – board early. Kenya airways has a monopoly in the sector and treat passengers like shit. You may want to read what we went through while flying back

Tags: , ,

tariquesani on May 25th, 2010
Hamerkop - Scopus umbretta

Hamerkop - Scopus umbretta

So you have been waiting for the first image from my trip to East Africa. I could have put in many other dramatic things like the Lion, Rhino, Cheetah or the Hippo but I felt that those mammals are rather cliched. So I decided to put a common but unique bird Read more about the Hammerkop

Tags: , , ,