Wednesday, January 28, 2009

IRCTC again

In the republic day quiz at office they asked, what does IRCTC stands for? Indian Railways Catering and Tourism Corporation Limited. This year many of the holidays fall either on a Monday or Friday. So effectively for souls like me I would get change to be at home for 3 continous days. (but for that first you should plan to go..) You need to book ticket for these weekends as soon as ticket booking opens 90 days in advance in train. 

But be carefull when you book at real crunch times. Take this scenario.
7:45: Out of bed, ticket booking opens at 08:00 hrs.
7:50: Logged into IRCTC site. Waiting...
7:59: Ok, I remember the details and I will type everything fast and say book. 
8:00:30: Ok started typing and clicked book. 
MessageBox("Tickets can be booked only after 08:00 hours.");
8:05: Try again
 MessageBox("Tickets can be booked only after 08:00 hours.");
8:07: Logoff
8:09: Login again. :)
8:10: Show availability of tickets.. It said WL 120. 

Thanks to Srihari to debug and find this design issue. Problem was... Once you Login, the client browser pulls the system time and stores it. So Login into IRCTC at 7:50 is same even after 10 minutes. The clock does not ticket. So it fails on the client side validation on the browser. Ideally, it should be tied up with Sys Clock after getting the initial time from server. Fix it boss. Work around for now is to refresh the browser.

No comments: