Thursday, October 9, 2014

Niche performance tip for developers

Make sure Fusion log viewer (fuslogvw) is disabled. Only Enable it when you are debugging and switch it off once done.

Saturday, October 4, 2014

Some core system tools for Windows

1) Process Moniter (procmon)
If you need to moniter whats happening with your file system or registry, just open this tool and this will record all events at OS level. You can filter them according to your needs. I used this to debug one of installer issue where the installer is supposed to read from registry but was reading from wrong location because it was a 64bit OS machine.

2) Fuslogvw (Fusion log viewer)
Use this tool to check assembly bindings at runtime.

3) Debugview  (DbgView.exe)
Use this tool to debug traces that you can write in your .NET applications using System.Diagnostics.Trace.Write(“IIS site activated”). This will helpful in debugging application in UAT and PROD environment.

Increase your chances of a successful Tatkal booking in Indian Railways

1) Login 15 mins in advance before 10 AM

2) Keep the session active by refreshing every 2 mins.
Do not click "Refresh" button. Instead keep on clicking "Home" link.

3) Sync your laptop time with IRCTC time for accurate results. IRCTC time can be found from this link (type a train number and submit. You will find IRCTC time in the bottom)

4) Fill all the form data (Name, Age etc) in advance using
Then click "I m feeling lucky"
Then Drag the "Magic Autofill" button to the IRCTC form fill window.
("Magic Autofill" button could also be dragged to Chrome Bookmarks bar to save, so in IRCTC page, just click it)

5) Most importantly have patience, Do not press "refresh" or "back" button or any other link while booking process is on.

6) Use the best network possible (office/home/remote desktop). Remember using "Remote Desktop" can cause UI lag and using
   using networks other than Home network can add to Bank validation steps.

7) Put Trains Start Point as "From" and Final destination as "To" for TATKAL. Use Station code as they are shorter.

8) Ask someone else to do the same (above) with their irctc username.

9) Don’t click on any option unless the page is fully loaded

10) Searching trains and staying on your selection before 10:00 would spoil everything. After logging in if you search your trains and stay on your preferred train selection, when you click Book option it would show a pop up “tatkal ARP not allowed before 10:00″ something like that. And It would not allow to book ticket even after 10:00.

So, exactly at 9:59/10:00 search train and do the rest of the process.

11) Keep all the payment related information (Card number/Net Banking Password/Security Ques) ready.

12) Make sure the capcha is correct in the first attempt itself.

Thursday, October 2, 2014

Digital Signatures

Digital signatures

Digital signatures are based on asymmetric cryptography which means – a message encrypted with one key is decrypted by a different key. Both keys in the scenario are mathematically related. So in other words – a message encrypted with public key can only be decrypted by its corresponding private key and a message encrypted with private key can only be decrypted by its corresponding public key.

In a general case a message is encrypted with public key (by the sender) and the receiver decrypts it with the private key (owned and held by him ONLY). This way all the intermediaries, even after getting hold of the message cannot decrypt as it can only be decrypted by the PRIVATE KEY (only held by the intended receiver).

In case of digital signature, the scenario is opposite. Here the intent is not encryption but rather AUTHENTICITY and INTEGRITY.  Explanation – I have a document. I make a hash out of it (called message digest). I encrypt the hash with my PRIVATE key. I send the original un-encrypted document along with the encrypted message digest. Explained with diagram below.

After receiving the pack (A and C). The receiver decrypts C (encypted hash) with his PUBLIC key. (Remember anything encrypted with PRIVATE key can be decrypted by its corresponding PUBLIC key and vice-versa).
If the decryption is successful then the authenticity of the sender is established as ONLY the SENDER had the private key.
Then the receiver hashes the original message and compares it with the decrypted hash (above step). If they are same it means the message is not tampered. Hence integrity is also established.

In the above process C (Hash encypted with PVK) is called the DIGITAL SIGNATURE.