Ahmed Bhaila - Chronicles

Sunday, May 27, 2007

Zombies: Pakistani Style

These days I am trying to kill some time by playing resident evil 4, a zombie game series. I am not a big zombie fan but then 28 weeks later compelled me to search on zombie movies out there thats when my google search directed me to this page http://www.variety.com/article/VR1117951886.html?categoryid=13&cs=1. Apparently, there is a pakistani effort for a zombie movie its called "Hells Ground" with a urdu title "Zibakhana". Heres a clip that I found on youtube

Sunday, May 20, 2007

why leo why?

Of all the movies that I have seen featuring Leonardo Di Caprio he dies in the end. why??

1. Titanic - freezes to death
2. Departed - gets killed by matt damon
3. Blood Diamond - is bleeding badly at the end and presumbly dies

Not sure whether he lives in "Gangs of New York".
The Beach is the only movie I remember where he lives. any other movies where he
doesnt die?

btw I didnt know Zimbabwe has its own version of English In Blood Diamond, Leo could be heard repeatedly saying huh after every 2 sentences or so

Labels:

Thursday, May 10, 2007

A .net webservice story

What a week this has been. Monday I was asked to write a zip code proximity calculator for one of our products we agreed on using an existing web service to do the calculations and store them in our local database then our application would just query the database for that and would never have to call the webservice again neat eh well so since we wanted to do this quick I decided to make the call from perl. Perl has a soap package called SOAP::Lite so after googling a bit I went on to create a client that consumed this webservice and got no results hmm something is wrong here after looking at the SOAP request/response messages I found out that the web service doesnt like the SOAP envelope and complained about soap version mismatch cant do much tried searching on the forums groups nothing thats when I decided ok lets switch to python so wrote a 3 line client :) to test against some other webservice and guess what it worked so theres hope so then I queried the webservice that I wanted to use and it failed damn pythons SOAPpy package failed to create proxies for the webservice and died something is very wrong either its me or the webservice. So let me reveal to you the webservice if you still havent guessed this was a webservice written in ASP.NET so much for interoperability all lies!!!. SOAP an xml based technology that the Redmond folks have been trying to push so hard and I have no problems I like the idea of transporting xml programs talking to each other independent of architecture or language but if two client libraries cant communicate with a webservice then its just bad I had one other option go for PHP and try NuSOAP but all my hopes were down when both Perl and python failed but since I had to show some result to my supervisors I wrote a small client program in what else... C# yes giving the ASP.net webservice a taste of its own medicine this should work otherwise this whole SOAP thing with Microsoft would be laughable. And it worked woo hoo finally I got a response but wait this doesnt end here what the heck is the webservice returning a DataSet according to the wsdl schema it should return rows of data with columns containing the info but what the heck is a DataSet. DataSet is an ADO.NET class that you can use to automatically render it to a grid view neat but what if I wanted plain results just a class containing the properties but the designer of the webservice had other plans since my idea was to just put this data on the database I had no interest in rendering it but now I have a DataSet so I had to live it. Mind you I am not really familiar with C# or the net framework these days the last C# code I wrote was in early 2005 I am sure things must have changed. On further research I found out how to retrieve the values from the DataSet. Heres are the algorithmic steps.

1. Iterate through table objects present in DataSet
2. On each table iterate through all rows
3. For each row determine the column info
4. Pass column name to row to retrieve value

Simple aint it. This is overkill too much object orientation is a dangerous thing and this is precisely what the developer of this webservice had in mind. However, we ended up not using this webservice at all since the server this webservice is hosted is not so good and at times would return null responses something that we really wouldnt want I had to search for 38,000 zip codes and I was only able to get data for 3 zip codes within a span of 1 hour just poor.

Sorry for being too anti .net but this is what I have observed I have used .net webservices before and always had problems with it maybe its luck other webservices from other platform seem to do quite well. You cant have interoperability with this Both perl and python failed.

Oh and btw REST is another emerging framework for web services they are trying to correct the things where SOAP messed up.

finally, after a couple of bad days with SOAP I ended up writing a proximity algorithm on my own.

Labels: , , , , , , , , ,

Wednesday, May 09, 2007

Java fx - Java's take on AJAX

AJAX has a new competitor - Java FX. The name sounds kinda cool so I had a brief look of what it is really. Basically its another scripting language but its java style and wont be stupid link javascript as one article pointed out I dont know what that means so I had a look at the syntax and a sample launch pad program. Basically the syntax used by this particular scripting language is declarative and it reminds me of ML - a function programming language rather I would say its very to close to the Relax NG/DTD syntax. The application LaunchPad is a good demonstration and the changes I made to the script were instantaneous so I enjoyed that bit this also means that interested developers would go on to learn this but whether its an AJAX killer or not we will have to wait and see. For the curious ones checkout
http://java.sun.com/javafx/
and an interesting article here http://www.internetnews.com/dev-news/article.php/3676226

Tuesday, May 08, 2007

Joost - First Impressions

By now you might have heard about Joost. Joost is a peer to peer video software that allows you to watch tv shows right on your PC yep thats true and no its not another youtube. First its in beta and right now signing up to this service is by invitation only I got my invitation from a pk blogger http://www.salambazar.com/ thanks buddy. So you install this software and then you can view content from vh1, mtv, natgeo among others. The video quality is not what you get on your tv but its not bad and its free to watch on demand tv what more can you ask :)

Tuesday, May 01, 2007

Mac and PC: Vista Upgrade

Apple has been running these mac and PC ads for quite sometime now ofcourse its pc bashing more specifically windows bashing but this one is my personal favorite enjoy!!!