Monday, August 2, 2010

Firefox 4 Beta - IndexedDB API

A few days ago, I had written about the hack that won us some cool prizes at the Yahoo Hack day India. Apart from FlickSubz, we also submitted a few more hacks. One hack that I started working on, but was unable to complete was trying to enable Indexed Database in YUI Storage.
Firefox 4 Beta 1 has a lot of interesting features for developers and one of the interesting ones was IndexedDB. Unfortunately, there is not much written about it on Firefox's blog. I could find just these articles.
I started to play around with IndexedDB and thought that it I could convert the code I wrote to examples for TrialTool. The example is located at and it has been pulled into TrialTool example list.

To see it working, download Firefox 4 Beta and hit in Firefox 4.
The examples are self explanatory and with the examples, you can look at the API of IndexedDB that is supported by Firefox.
If you want to create your own examples, use this link.

Tuesday, July 27, 2010

Yahoo! Openhack India 2010- FlicksubZ

After a long time, one more occasion to use my blog. Yes, we(Me, Sudeep, Parashu) won "Best in Show" award in Yahoo's Openhack India 2010. Yes!! once again!! Like previous years, 24hrs coding, Beer, Food, Tea, Redbull etc etc.. One good change this time was increase in number of hackers. Yes, there were 430 hackers flooding Taj Residency.

What we did this time?

Automatic, Real-time close captioning/translation for flickr videos.


We captured the audio stream that comes out to speaker and gave as input to mic. Used Microsoft Speech API and Julius to convert the speech to text. Used a GreaseMonkey script to sync with transcription server(our local box) and video and displayed the transcribed text on the video. Before displaying the actual text on the video, based on the user's choice we translate the text and show it on video. (We used Google's Translate API for this).

Some of the speech recognition frameworks that we tried are sphinx 4.0, Windows SAPI, Julius. None of these are 100% accurate. but definitely better than just watching videos with out any captions. Have read that Nuance Dragon is really doing good in this space but its very costly.

Extension and usefulness

There are infinite number of video's on internet, we cant manually caption everything. We use this hack to auto caption it. It might not be accurate, but we can store the auto generated caption as srt(close caption standard) file and provide simple UI for users to edit/correct the captions if they think the auto generated caption is wrong. in this way the speech recognition system can train itself. Over a short period of time, by using the internet crowd, we can get a good speech recognition engine.

What all did we get as award?

1. Chris Heilmann's complement !!!
2. Certificate signed by David Filo !!!
3. XBOX 360 Elite and 3 IPod nano 4G 8gb :) :)

Wednesday, June 24, 2009

Windows7 NIC on VMware

This week i tried installing Windows 7 on a Virtual Machine(VMWare) and all the installation went fine without any issue. But once the installation is complete and I tried to connect to my network and there I found that Windows 7 was not detecting the NIC. After debugging and googling a while, I found that NIC emulation is not proper. So I edited the .vmx file of the machine to have ethernet0.virtualDev = "e1000" at its end and still problem persisted. Then I found a silly mistake that i didn't install VMWareTools :( after installing that, everything started working fine :)

Tuesday, April 14, 2009


ThoughtWorks hosted Devcamp-2 last weekend and here are some interesting sessions.


This session was on web testing tool called SAHI. Ram Narayanan, Author of this tool presented this session.

This will be useful for both Dev and QA

This is an automated web testing tool. You can replace QTP, Selenium with this tool. It handles SSL also very well, the author demoed the capability of this tool on Gmail(which is on SSL and has many ajax calls).

Key features:

  • Record and Playback
  • Has easy integration with ant or cmd line scripts.

Visualization on Code Metrics

This session was on using visualization tools to maintain code. Neal ford, an architect of ThoughtWorks discussed about all the following tools.

Source Monitor

  • lets you see inside your software source code to find out how much code you have and to identify the relative complexity of your modules. For example, you can use SourceMonitor to identify the code that is most likely to contain defects and thus warrants formal review.
  • Measures metrics for source code written in C++, C, C#, VB.NET, Java, Delphi, Visual Basic (VB6) or HTML.


  • A project dedicated to making code metrics so widely understood, valuable, and simple that their use becomes ubiquitous, thus raising the quality of software across the industry.The Panopticode project provides a set of open source tools for gathering, correlating, and displaying code metrics.


Graphviz is open source graph visualization software. It has several main graph layout programs. See the gallery for some sample layouts. It also has web and interactive graphical interfaces, and auxiliary tools, libraries, and language bindings.


Vizant is an Apache Ant task to create Graphviz DOT source code from an Ant buildfile.

The image created from the DOT source code shows the targets dependency.


Configuration Visualization for Spring


CodeCrawler is a smart, web-based search engine specifically built for use by developers for searching source code. It combines ease of use, superb performance, and intelligent search capabilities in order to increase developer productivity and reduce source code learning time.


X-Ray is open-source software visualization plug-in for the Eclipse framework. Similar to codecrawler.


CodeCity is an integrated environment for software analysis, in which software systems are visualized as interactive, navigable 3D cities. The classes are represented as buildings in the city, while the packages are depicted as the districts in which the buildings reside.


Citylyzer is an open-source 3D software visualization plug- in for the Eclipse framework; it provides a visualization of a given Java Project like a city. Similar to codecity

Productive Programmer Mechanics

This article is really worth reading. It has all small and simple tools but which will improve our productive by multiple times.





Monday, March 2, 2009

How to remote debug .Net assemblies that are deployed in GAC

Usually when you want to remote debug a .Net assembly, you would just run vsmon.exe in target machine and connect to it using VS->Tools->Attach Debugger option, Which would list all the processes running under that machine and you would hook in your debugger into desired process.

But when u want to debug an assembly which is deployed as part of GAC, then its not as simple as external process, bcoz you cant load your .mdb(debug file) into GAC, you might load your mdb files files using "Load Modules" option but most of the time VS throws symbols doesnt match error in this case. To make easy there is another way, go to your target machine, open win explorer and type windir/assembly/GAC_MSIL, now this would list all folders that are deployed in GAC, search for your assembly name, open the folder, you would find your dll file. Now copy your .mdb file and paste here. Now connect your VS debugger to the process which is using this GAC assembly. You would be able to debug your GAC assemblies without any issues.

Tuesday, February 17, 2009

Openhack 2009 - Readact Mail

Last weekend I participated in Openhackday hosted by Yahoo! @ Taj residency and developed an application based on Redaction which won Best Confidential Messages award(an Ipod-touch :)).

The experience of coding continuously for 24 hr, Dance show, Bean bags all over the place, Delicious food, Redbull, Unlimited beer ;) all were good. Apart from fun part, I did learn many new things like YUI, OpenMail, JavaScript debugging, etc..

Also some unforgettable moments like working on YUI with help of Chris Heilmann ;)

What I did?

I developed a small mail application which can be integrated in to yahoo mail using Yahoo's openmail APIs.Instead of encrypting the whole mail, this application allows user to select a particular word that should be encrypted using a user's key and at receiving end other user can view those words only by providing same key.

Example use case
A Manager wants his mail to be formatted by his secretary but doesn’t want her to see all the sensitive data in that mail.

A 3 min demo on what I did is available @

Event wiki & winners list:
Other applications that were demoed :
Some pics from event :

Wednesday, April 9, 2008

Byte Ordering between java and C#

In many scenarios, there will be a server which is written in one language(c# or java) and there will be a client written in another language(c# or java). The client-server communication may be carried out via binary-stream requests and responses. In my case the server was java and i had 2 clients one in java and another in c#. When i constructed a binary request and from java client and sent to server, i got a proper response. But when i sent the same request from c# client, i got an internal server error. I was stuck for a day, then only i figured out very basic mistake of mine. By default c# handles data in little-endian format and java operates on big-endian format. When i sent request from c# client, it was in little-endian format but java server assumed it as big-endian format and while decoding from binary format, it gets invalid data, bcoz of that it was throwing internal server error. once i convert the request stream in to big-endian format manually, everything started working as expected. So when ever we want to make a binary communication between server and client of different languages we need to take care of the endianess .