Thursday, December 23, 2010

Product Service down in holidays, a developer’s nightmare


Guess! Everybody knows now, Skype is DOWN ! since past 18 hrs. …. The businesses are affected, we couldn't make it to our daily calls, today we realized that the small world we experience everyday because of services like SKYPE is actually a big world.

Seriously, my blessings go to the developer's at skype, I hope they could fix the issue by this night, or in next few hours, or their holiday's may be ruined.

Update : - YES ! it's working again, coming back to NORMAL.
Ever wondered what kind of hell the dev's must've been through ?

Friday, December 17, 2010

More Old Posts


India momentum session at Taj ambassador

I delivered a session (2 hrs.) yesterday at Taj ambassador hotel, for the India Momentum Program.


The Program targets the enterprise customers, and is trying to penetrate into the enterprisem for letting them know about the capabilities and the functionailites that windows vista, and office 2007 offers.


I was accompanied by Dhaval chandra (Our Business development manager), and Mr. Tarun Anand (My Boss), and Mr. Govind Shekharan (Tech. consultant at tpf).


Tarun Sir, and Govind delivered a session on office 2007, and i delivered the windows Vista part.


alas, My Vista just couldn't get connected to the Projector, and i thought that i might not be able to show the demos (especially the CRIS demo), but once everybody seem toget ready for a personal show of the demos, i just swept them off their feets......i promise i had to find a way out for these logistics problems.


I see a lot of people are worried about the Business Desktop deployment, i'll surely go through it once i have some time from the cRIS thing.


Apart i am starting the VistaEvangelism.Com very soon....I am sorry i couldn't go to the meeting today, as i am frail...


PS - they made a video for my presentation, i'll give a link when i have it with me.






Dad Got Retired

My Dad (Mr. V.P Singh) got retired from Kendriya Bhandar ( A Co-operative dept. estd. by Govt. Of India in 1960's), on dated 31st Of August.


I took an off from work to accompany him on his last visit to the office.


we reached there at about 2 PM, everybody was there, all the old time frnds,his boss,and relatives as well. I was wondering my Dad will really feel very disturbed, but he was indeed feeling good about all this....he only talked with me once during whole day and said "watch this all with your whole concentration, we should feel good when we are getting love from people no matter at what cost....if it's my Retirement that could bring my loved ones at one place, i should go throught it gracefully. Some day you are going to need me, and i was preparing for it, now it's the time that your businesses need me, and i am available to you all".


I am going to count his achievements with us and his dept.


1. He married a good Lady "My MOM"

2. He took care of his DAD very well, though we couldn't share much time together "He died in 1985".

3. He was the only employee ever to join KB directly as Incharge of the Store.

4. He saved KB from getting dissolved, talked with the then President of India Mr. Gyani Jail singh, and convinced him that the dept. would not only take care of its own, but will also give the share from profit as well.
5. He was the first union leader, who pushed the KB officials to arrange the clothes for Junior officers 'They still get one suit length every year'.

6.  He initiated a new section "stationary and computers" and made the business of 100 Cr. in one year, which was alone equal to the total income of KB, got appreciated by Govt. Of India for his management capabilities.

7. He's the one for whom people at KB think that "you can send him anywhere, he manges so well that even a dull store with the sale of Rs. 15 thousand Per month can jump to 60 th. Per day".


I Love you DAD, and I promise i'll always obey and take good care of you and my mom.


Thanks for everything



Webcast session at Microsoft

Hi Friends,

                Last week was hectic, as well exciting, i was suppose to deliver some 5 webcasts, "All about WPF" at Microsoft, With Tarun Sir, and know what, he just couldn't turn up for anyone of them, so i was having a chance to go forward and prove my skills...


The details, and On demand webcast is available at


I'll improve this post later, with ppt's and code demo links...but this is just like keeping a log.....





Vista Beta2 installed, with AERO effects

Today morning Boss delivered me the Vista Beta2 DVD, and asked me to get my hands dirty with this, i was struggling with Vista March CTP since 3-4 months, and was never been able to get the AERO installed, not even on my new Lenovo Laptop, we invested a lot on this laptop.


It'a a cool machine (vista rates is No. 1), Lenovo 3000 N 100, with 1 GB RAM, and intel Centrino Duo processor, I tried a lot of hacks but i just cud never crack it...


Today everything just went fine.... The Voyage Milestones


1. I already had Vista Over Vista, so deleting the windows.old dir. was oooooof! so i just found a hack...


restart Vista 
at the boot screen hit the <f8> key 
boot into "safe mode with command prompt" 
rename windows.old to windows.old1 

use the following command to delete the folder and it's contents 

del windows.old1\*.* /F /S /Q 

/F : force delete on read-only files 
/S : include subfolders 
/Q : suppress confirmation prompts 

2. Started installation of Vista.


3. when Vista is installed, go to Control Panel -> System, and try updating the Graphic Driver, Select "Let me browse my cmputer", and then select "Let me choose from the drivers" remove the check from "Show compatible", and select "Lakeport drivers" from Intel driver's list.


restart the system.


Then when sys. is restarted go to themes, and change the theme to AERO.....


Who aaaaaaaaaaaaaaaaaa ooooooooowwwwwww


i am attaching the pics also 








Windows Vista Pres. at Vertex, Gurgaon

we presented at Vertex technologies, gurgaon...


This time, i just didn't used the ppt, and we (me, and Tarun) talked with demos only, all in all this one was pretty cool presentation..


I always have lack of words while talking... and i am tryin to improve myself with it...

watching a lot of Don Box Videos to improve my talking style...


MS is giving away a set of MUG (with office 2007 logo) ,and a cool small drinking bottle (With Windows Vista logo)...they are really coool, i got a pair for Vandana also, she was delighted to have them...


But, Man ..... Saurav did his pres. (Office 2007)  like a GOD, i must say he was perfect with everything, i m trying to create my own style......





WPF Webcast at Microsoft


     I am just coming back from the WPF webcast session ( from the Microsoft, all in all it was hectic to setup my lappy in the netwrok, so i decided to give the presentation by ppt only; and i miss giving the demos to the dear audience.


Tarun, started the presentation, and we ended on a +ve note that we r coming with a new series of WPF webcasts for a week, and got a positive nod from the managers also.


Here i am providing the temp. link of my ppt's, and some demo.



Follow the link and download the ppt.


Please let me know, if you have any questions, or difficulties downloading it.


Thanks guys






WinFX Renamed to .net Framework 3.0

The First email, that i got today from Microsoft, said this............whhhhhhhhaaaaattttt?


"WinFx is renamed as .Net Framework 3.0, and InfoCard is renamed as CardSpace", i am not against renaming, and Somesagar judges the point of renaming well, but don't you think that it's too fast of we to develop so many frameworks one by one, when did developers get a breath, to stay still and say 'Ok i am pretty done with this tech."


first Ms launched 1.0, then 1.1, then 2.0, and now 3.0, 3.0 is built over the top of 2.0, and obviously stands a chance to be called a new framework, but it's too early, first MS should freeze the Vista, and then it should quote onto the new framework for it.



Never Mind, guys, that's the life of a developer, keep studying.........






My Session at MICROSOFT

Last Month i was at MICROSOFT, Delhi, Presenting a session of One Day on Windows Vista (Windows Presentation Foundation exactly :))


The Session was cool, and i am hereby providing the pics of my great audience, you guys were really supportive





I'll surely put up a post, regarding who is who, once i got to know all of them, by name, and by personality.








refer to a namespace in XAML


    I have been through many problems while mapping a namespaces to a prefix, so that it culd be used in XAML, i figured out how to do it properly, and here is what i found.


Some tips -


1. do not depend upon "Local" keyword, each book, blog discusses mapping with the same leading you to the confusion.


so there are basically two styles to map to a namespace



   <?Mapping XmlNamespace="<The XAML name for this namespace>" ClrNamespace="<the name of actual clr namesapce>" ?>


then you can provide the prefix



     xmlns:my="<the XAML name for the namespace>"


For ex.

    <?Mapping XmlNamespace="myapp" ClrNamespace="Lap" ?>
<Window xmlns=""


and to refer to an object of a class under this namespace u'll write somewhat like this


<DataTemplate DataType="{x:Type my:Patient}">


here datatemplate is nothing but  a template for listbox, for which the datatype is an object of a Class Patient; it's nothing but difining the binding, anyways, we ain't discussing binding here.


2. Shortcut method to refer to CLRnamespace, and provide the prefic at the same place


   xmlns:my = "clr-namespace:<TheNameOfClrNameSpace>"


for ex: -


<Window xmlns=""
  xmlns:my = "clr-namespace:Lap"



i doin't think now, u'll face any problem ever with mapping the namespaces


Happy Coding


Old Post – Written on HOLI – WPF Perf and 3D


WPF Perf and 3d - Part 1 - Ecosystem of applications

Happy Holi!

I never want to start my conversation with that word "Sorry" which shows any kind of regret…but that's how I feel to make myself wait for writing this long awaited post.

So I was supposed to post about the 3D with WPF and the ecosystem of tools

When I started with learning WPF , that first professional designing tool that I came across with was Aurora…an awesome tool at that time (don't know how it's performing  this time, as you had to put in your email id and wait for the download email for each months CTP..which is a pain and the tool was worst with its performance).

The bracket talk must have told by now that I was longing to see other tools come by my way, the Evolution took its course and there it wasMicrosoft Expression Interactive designer ® Now called Microsoft Expression Blend ®, meanwhile I also saw some 3D tools coming up and people working over some converters to convert a 3D file made in 3ds max, or a file with flash animations to the compatible WPF code with animations.

I have two cases / kind of work that people / designers are with while working in WPF.

  1. You are a designer who is supposed to come up with the snapshot design of forms, and you are also supposed to generate styles out of it, once the design is selected AND all thedesign could expect to have is a li'l bit of 3d objects and 2d animations.
  2. You are a designer and are supposed to design an application, which has nothing, but 3D all around, may be some products to show, or some other kind of representation but 3D.

What about Developers?

Ans. I expect developers to use Microsoft Visual Studio 2005 with Orcas. No more talks about developers, I'll talk to them only in later posts.

So …let us take the First Case.

Design snapshots and Generate styles

Note – the table is in order of usage





Microsoft Expression Graphic Designer

Generate the snapshot picture for the form

Xaml, png, jpg and all basic picture formats

Microsoft Expression Blend

Take the xaml, and pic out the styles to create the style resources for yourself

Xaml – obviously

Microsoft Expression Blend

For animating the objects

Animations are default as resources in xaml, but give them keys if you want the developer brothers to control them


The Second Case

Note: - the 3D graphic tools are with options and usage is limited to the kind of formats they generate, use as per your own budget and case. Optional are marked with  Green color, chose at least one 




Microsoft Expression Graphic Designer

Generate the snapshot picture for the form

Xaml, png, jpg and all basic picture formats

Electric Rain ZAM 3d

Excellent to work with fresh, as well imported formats, the files are not structured properly though when you import from other formats like 3ds, but the tool is good


Autodesk 3ds Max

They are not players in xaml, but indeed they are the BOSS of 3D world, you can get to them for generating awesome 3D effects, and port them using ZAM

.3ds files


A small but powerful tool, can't say more didn't worked much with it.


Microsoft Expression Blend

Use the xaml pieces generated using blender or ZAM and animate / place them accordingly, it's fairly simple



Alright the ecosystem doesn't end here, there is more.

The project that you create with Blend, is a normal Visual studio project for Orcas, and your developer friend would easily be able to code with the project that you "The Designer' has designed. To make sure that design is not generating any errors you can also run and test you code in blend itself, and can even do a bit of coding as well, though the coding editor matches nowhere to the ease with Visual Studio, but what more a designer can ask for…….

I am exhausted by colors today! Ah ! it's such an awesome festival, one of its kind, I am proud being born as Indian, and human.


Old Post - WPF


WPF Perf and 3D - A New Fake Dimension

WPF has lured the public by showcasing the ultimate UI rendering capabilities....


GLASS, Bitmap effects, Brushes, 3D, Animation almost every sort of UI related tech. is mapped in the WPF (Windows Presentation Foundation).

as this is just a blog  post i won't go into detail over how WPF works, but would tell you a punch line "WPF bypasses the UI related work directly to Graphic Processor (your graphic card)".


you might ask, what if it doesn't ? / what happens if my super powerful / ultra speedy CPU does it, won't that do ?


answer is Dear, your Graphic processor is especially meant for it, the point was Windows applications were not being able to make use of it, you could have used it earlier, but then go on use GDI / DirectX....that unmanaged kinda sucks




Answer - dudes, it has certain algorithms as hardware logic on the Graphic board, which does some really complex calculations, that if you leave them to a software process (CPU), they might take 100% more time for getting rendered.


So, now you've got WPF .....


A Dev - "Alright Brij...I'll start coding my new Racing Game in WPF, 3D is there, ANimation is there...what else, and easily programmable....."


Brij - "Boss! it ain't possible first, second you'll require 3 times more better Machines to run the game thus developed"


"Then what WPF is there for"


WPF - is just a UI development tool for win apps, and the animations or such vital gaming operations are not clock bound for WPF, WPF reaches direct to conclusion if the animations are not done in given time, your animation will be skipped to reach the conclusion of storyboard.


We just couldn't even expect photorealism from a WPF scene, no matter how hard youw work.....some things are missing, and they are indeed missed to achieve the goal of performance - How many times do MS had to tell people, it ain't made for GAMES


Well, i'll talk some solid points related to WPF 3D, and it's perf. one by one in the next post meanwhile, if you are ineterested check out the given links to know more about WPF and 3D technologies.....a whole series is coming up just stay tight....i can assure the series won't just be a repetition of these links....they will have more details then these links.....


The best whitepaper over WPF perf. yet


The WPF 3D team blog


The Hardware knowledge for better rendering in WPF


Here is the plan for my upcmoing posts


1. Ecosystem of applications for 3D developement in WPF.

2. Know how of 3D, and some key functions / algorithms

3. Hardware required / and WPF competence in Computer Graphics (3d, animations)


meanwhile i prepare my contents for these posts, i'll also write up some posts about the contents that people sometime forget to use while coding with WPF.

Old Post - Biometrics


Biometrics, how do they work?

Last Night! my sister called me up and asked how does the biometric systems work, and she wanted to understand it before buying a biometric device and start working with it on a project.


so, i wrote a whitepaper over how biometrics work, here is an excerpt of the same......


There are actually 3 phases in the lifetime of an application meant to work with any kind of biometric technology

  1. Installation and configuration of the biometric device
  2. Initialization of device on the basis of parameters
  3. Passing your biometric data and matching with the biometric print of device


I'll discuss each step one by one in detail

But prior to this you need something to work with, and these are:-

  1. A biometric device.
  2. A signing dll, which can be incorporated with your application, so that you can use its functions to initialize the device, enroll the users with the device, prepare the user database, and later use the same database for login etc.

Now, let us get on with our discussion

Installation and configuration of the biometric device

Any biometric device when installed in your system must follow a procedure, in which your application initializes the device and then enrolls the users with it. You can either call it enroll or simply you can call it "Configure".

Enrollment is a procedure in which your device makes a database of user and user's PRINT. User is nothing but an id, but User's PRINT is something interesting, to understand the print you can also compare and say it's the FingerPrint (Which is unique), but see is it always possible that the angle with which your biometric device might be taking the picture of your finger will always be the same, obviously NOT, so what you need is not the picture but some other smart information about the USER'S PRINT.

For ex –

When you enroll a user with the system, you store his / her name and a character based password (in case something goes bad with that biometric identity, like your finger is hurt).

And then your device asks for your user's Print, a PRINT is nothing but a Defer data structure A defer data st. is not made at one go, so what it asks for is to user to give his print at least 3 times to the device, as 3 times is enough to collect all the possible sets of that biometric identity (which could be your face, fingerprint, eyes, speech). You can say user is training the device to understand him / her.





Now let us see how a defer data st. might look like



User Name brij raj singh      Password    momitaraj


Defer ds1























Defer  ds2























Defer ds3























So when a user gives his identity 3 times to the device for ascertaining his / her identity, the device actually creates these 3 data structures.

Initialization of device on the basis of parameters

Device initialization is pretty straight forward by calling some simple API's and then the device waits for the event of user's print by user, till the user provides his / her print to the device.

Passing your biometric data and matching with the biometric print of device

When the user provides a PRINT to the device, the device again makes a defer ds and then matches this defer ds with the earlier provided defer ds for the users existing in the database, now this process is pretty critical, and because we have 3 defer ds for one user, it's very much possible that though the user is genuine but the defer ds doesn't match with either one of them.

There is a simple yet effective way to solve this problem, and that is

Make Hash keys for all the 9 combinations possible, and when the user provides his defer ds, make its hash key and match it up with the defer ds hash keys already with you.

This is how the device actually works but if you are buying a commercial Biometric device they usually come with an API set which you can always plug in and use without thinking how it works.

Old Post - asterisk for java - installation


asterisk for java - installation

Now a days i am playing with Asterisk, and now I needed to integrate a Java based application with asterisk.

I started searching, and found about JAsterisk, but later i found that JAsterisk was made with Asterisk 1.0.0 while I am running with Asterisk 1.4, and 1.2 installations.
Then I found 
Asterisk for Java ; this package is built on top of Maven [a project management API for Linux],  the pre-requisites were as follows

1. JDK above version 1.5
2. Maven

Now, JDK has a significant style of it :) ... but As I am a .net developer I'll say it sucks....I tumbled a lot with installation sof JDK's and JVM' and environment variables, let me simplify it for you....

1. Download JDK from   you need to download the self extracting binary .. with a name somewhat like this jdk-6u6-linux-i586-rpm.bin
2. Copy it into a directory; I copied it in /opt , extracted it there by command

Note - it should install automatically, but if it doesn't or it says some Java Package is already installed you'll have to remove it
yum remove <packagetoremove>

3. Now we need to create environment variables
My JAVA is installed in directory /usr/java/jdk1.6.0_06
this is how you can persist your Java environment variables for good in your linux machine, be it on root OR on user
           open the directory /etc
          Find the file profile open it type these lines, one for PATH, one for JAVA_HOME, and one for CLASSPATH
Note - remove my comments from here before copy pasting these lines, also put them at end of file
//for the directory path where JAVA imnstallation resides
export JAVA_HOME=/usr/java/jdk1.6.0_06            

//For the path where compiler resides, the bin dir contains javac which is the compiler
export PATH=PATH=$PATH:/usr/java/jdk1.6.0_06/bin

//For the PATH where classes may reside,m in our case they may reside in any directory

Now, you should restart your machine, raise the terminal window [command prompt] and cross check
type these commands, and you may see the results like this
[root@localhost ~]# java -version
java version "1.7.0"
IcedTea Runtime Environment (build 1.7.0-b21)
IcedTea Client VM (build 1.7.0-b21, mixed mode)
[root@localhost ~]# which java
[root@localhost ~]# which javac
[root@localhost ~]# echo $JAVA_HOME
[root@localhost ~]# echo $PATH
[root@localhost ~]# echo $CLASSPATH

Ok , Now lets get the runtime of Asterisk for Java, As I don't have any plans to play with source of asterisk for Java

download the Asterisk-java-03.jar from

for testing create a directory and copy this Asterisk-java-03.jar file in it
Now create a file and copy paste this code

import org.asteriskjava.fastagi.AgiChannel;
import org.asteriskjava.fastagi.AgiException;
import org.asteriskjava.fastagi.AgiRequest;
import org.asteriskjava.fastagi.BaseAgiScript;

public class HelloAGIScript extends BaseAgiScript
    public void service(AgiRequest request, AgiChannel channel)
            throws AgiException
        // Answer the channel...
        // ...say hello...
        // ...and hangup.

Save it in the same folder, I have saved both of these files at /root/MyAgiScript, now go to terminal window, and compile it
[root@localhost MyAgiScripts]# javac -g -cp asterisk-java-0.3.jar
Now, create a file copy and paste this code
//for mapping the agi script to the Java code we created
hello.agi = HelloAGIScript 

now go to your dialplan in asterisk  /etc/asterisk/extensions..conf
I have a dialplan like this, which I can dial from a SIP phone

exten => 1,1,Answer()
exten => 1,2,Wait(2)
exten => 1,3,Record(asterisk-recording%d:ulaw)
exten => 1,4,Wait(2)
exten => 1,5,Playback(${RECORDED_FILE}) 
exten => 1,6,Agi(agi://localhost/hello.agi)
exten => 1,6,Hangup()

Now open another terminal window, and run your AGI server
java -cp asterisk-java-0.3.jar:. org.asteriskjava.fastagi.DefaultAgiServer

and it should run like this
May 7, 2008 5:38:29 PM org.asteriskjava.fastagi.DefaultAgiServer startup
INFO: Thread pool started.
May 7, 2008 5:38:30 PM org.asteriskjava.fastagi.DefaultAgiServer startup
INFO: Listening on *:4573.
May 7, 2008 5:39:25 PM org.asteriskjava.fastagi.DefaultAgiServer startup
INFO: Received connection from /
May 7, 2008 5:39:25 PM org.asteriskjava.fastagi.ResourceBundleMappingStrategy loadResourceBundle
INFO: Added mapping for 'hello.agi' to class HelloAGIScript
May 7, 2008 5:39:25 PM org.asteriskjava.fastagi.internal.AgiConnectionHandler runScript
INFO: Begin AgiScript HelloAGIScript on Asterisk-Java DaemonPool-1-thread-1
May 7, 2008 5:39:25 PM org.asteriskjava.fastagi.internal.AgiConnectionHandler runScript
INFO: End AgiScript HelloAGIScript on Asterisk-Java DaemonPool-1-thread-1

This  output- comes when I dial a call from my sip-phone to the asterisk server; and it plays a sound file for me......