Type inference != Dynamic typing

Local variable type inferencing is a new feature in C# 3.5 – a very “handy” one, in that it saves a lot of typing. Basically, it lets you do  var dict = new Dictionary<string, List<int, Dictionary<int, string>>>(); instead of  Dictionary<string, List<int, Dictionary<int, string>>> dict = Dictionary<string, List<int, Dictionary<int, string>>>(); That’s pretty cool, but remember, C# is still a statically typed language. dict is statically bound to the type Dictionary<string, List<int, Dictionary<int, string>>> and you cannot change it. You cannot do dict = Dictionary<int, string>(); in the same method. The compiler will complain that the type on the RHS is not … Continue reading Type inference != Dynamic typing

Greasemonkeying around with IRCTC

[Update 3/6/2010: Updated the script to handle availability URL change by IRCTC developers. If you’ve already installed the script, uninstall it (Tools->Greasemonkey->ManageUserScripts, select AJAXAvailability and click Uninstall), and install the updated script from the same location (http://senthilthecoder.com/software/irctcscripts/ajaxavailability.user.js)] For those of you who have not heard about Greasemonkey, it is a Firefox extension that “allows you to customize the way a webpage displays using small bits of JavaScript.”.  IRCTC (http://www.irctc.co.in/) is Indian Railways’s website for booking tickets. While a huge improvement over standing in queue at railway stations, I would not consider it to be a well designed site – it … Continue reading Greasemonkeying around with IRCTC