Posts

Showing posts from April, 2010

COMET for Chirp User Streams - II

After almost giving up I finally figured out a way to use the Chirp User Streams . Not the best way to use it but I guess it just might work. Create a XHR request and abort it ever other minute. It will complete the request and make a new request. Try and keep the connection alive. This is something that facebook does in its chat. Thought there the connection is aborted by the server. In this case make sure that you abort and make the connection the very next second. It should be possible to use the same connection to reconnect to the server. But I have not tested it extensively to see how it will work in a real world situation. For now it works and hopefully when I again get to work on it I will write something more about how I use the ChirpUserStreams.

COMET for Chirp User Streams

Image
First there was AJAX and to give it company there was COMET . Incidentally both names of popular disinfectants in North America. In JavaScript AJAX allows the client to PULL information from the server and COMET is the technology where the server PUSHES down information to the client. I got interested in COMET after going through Chirp User Streams . Thinking it would be a trivial task to call a XHR and keep listening to it. In my mind I kept thinking that it would be stuck on readyState 3 and it will never get to 4. Since it would be stuck at 3 I could use a timer and after every few seconds keep checking for the change in length of xhr.responseText.length . Technically it should work like that.. BUT.. the way IE has implemented XHR it is not possible to check the responseText till it reaches 4. Which means that the request has timed out or ended. That somehow makes no sense at all. I figured out it was time to investigate and see how Facebook and GTalk were able to work on IE if i

Moving from Basic Auth -> OAuth -> xAuth

Twitter will remove the option to use Basic Auth from June onwards and the only option left is OAuth. But the problem with OAuth is that its a UX nightmare to implement in a Desktop application. After trying to figure out how to use OAuth all day long I finally figured out that I was looking for xAuth all along. Cutting a long story short I found a blogpost which helped me get a hang of it. Using xAuth, an alternate OAuth from Twitter . Also found a little bit of help on the twitter wiki on using xAuth . Its quite simple to use once you get a hang of it. But since it mentions headers in most of the places I assumed HTTP headers but you need to provide all the parameters when you POST it to twitter. I have sent out a mail to enable xAuth on my account lets see how long that takes and I can finally start using xAuth instead of the cumbersome OAuth to log into twitter.

Adobe Stratus - P2P networking using your webbrowser

With the launch of Flash 10 there is a P2P technology Stratus built right into flash. When it was launched I was not really interested in it as it takes time to deploy the latest flash runtime. But in less than an year Flash 10 has been deployed on more than 90% of the systems worldwide (According to these stats on adobe.com ). I personally don't like flash but flash is not just about animations and videos. Its a lot more than that. And these things are what will keep flash alive even after the onslaught of "HTML5". The problem is HTML5 is made out to be this magical solution that will rid the world of Flash. Unfortunately with people like Steve Jobs promoting HTML5 as the solution to all Flash problems most people blindly start to believe it. The reason Flash really works is that the deployment is so large and most people have it installed even if they don't know about it. iPhone got away without using flash as they had partnered with Google when they first launched

Dynamic GUI and console windows application

Running the same executable as a GUI as well as console application. This is one problem I had come across a few years back. But I soon realized that its decided while linking if an executable will be GUI or console application. But given the amount of time its been I thought of searching online and I came across this article " How do I write a program that can be run either as a console or a GUI application? ". It kinda had a solution but in the end its still better to have two separate executables. One for GUI apps and the other for console apps. After all these years Java also has two executables. java.exe for console apps and javaw.exe for GUI apps. There are two bytes in the executable file which tell the OS if the file is Console or GUI app. Change those bytes and you can run it as a console or GUI application. For more information about the PE format visit http://wotsit.org . Hopefully this is the first in the series and hopefully I will be writing more about it soon

Quick update for April 2010

Its been a few weeks since I've been working on my personal projects. I need to manage them a little better. Will be setting up a bugs database and also a project management system to better manage the workflow. All that happens tomorrow morning. I also want to blog on a more regular basis and I am learning quite a lot these days. And it always helps to write it down. I guess I should start that with the next post in a few minutes.