I am a developer at Microsoft and work in the .NET Common Language Runtime (CLR) team. For the last 4 years I have been working on virtual machine technologies on a variety of form factors including desktops (Windows, Linux), tablets (Win8), gaming-consoles (Xbox 360), mobile devices (Windows Phone 7, Windows CE, Symbian).I have worked on various core pieces of the runtime including Garbage Collector, memory manager, platform abstraction layer, runtime-performance, etc.Before working on .NET I worked on Visual Studio Team Foundation Server, Visual Studio Team System, Adobe Framemaker, Adobe Acrobat, Texas Instrument's Code Composer Studio.
The well known (or moderately known fact): C# enums can contain any value supported by its base type and not just the ones specified in the enum. Lets consider the following enum.
Monday = 1,
Tuesday = 2,
Wednesday = 3,
Thursday = 4,
Friday = 5,
Saturday = 6,
Sunday = 7
Even though the enum supports values from 1 to 7 you can do the following.
WeekDay day = (WeekDay)40;
This prints out 40 without any error.
Now comes the lesser known fact: C# 1.2 spec sez "An Implicit enumeration conversion permits the decimal-integer-literal 0 to be converted to enum-type". This means the following is valid code
WeekDay day = 0;
Note that even though 0 is not supported it is implicitely casted to the enum!!! No idea why this is supported.
http://ie7.com is owned by a Firefox fan and advertises FireFox, recently I found out http://www.msfirefox.com/ which talks about Microsoft FireFox 2007 :) and it has a Microsoft copyright notice at the bottom.
Ok I'm super confused now!! Looks like IE 7 is a browser from Mozilla and FireFox is from Microsoft. Hope I got this right :|.
Otherwise why do I have the registry key HKEY_CURRENT_USER\Windows 3.1 Migration Status on my Clean XP SP2 box?? I later found that others have also found this earlier and were equally puzzled.
HKEY_CURRENT_USER\Windows 3.1 Migration Status
Check any XP machine and you'll see this key. The burden of backward compatibility on Microsoft products is often too great :). Interesting to note that my Vista box doesn't have it. So I guess Windows 3.1 can finally RIP.
I found it as I was moving through the registry using PowerShell. Manipulating the registry has become extremely simple using PowerShell. You can move into the registry using something like cd HKCU: and then do a dir to see all the keys!! To find the above key try the following sequence.
C:\>cd HKCU:HKCU:\>dir | select-string "3.1"
WPF is slowly catching up and revolutionizing the way we design and create UI. Check out the new Yahoo Messenger for Vista being developed with WPF at http://messenger.yahoo.com/windowsvista.php
The worst part about new years is that you need to remember to write the new year in all dates you enter. Last time my credit card payment bounced because I entered 2005 on the cheque instead of 2006 and I had to pay late payment charges :(
Ok, now since I'm over my crib session Happy New Year to everyone...
It's a common custom to douse lights at 12:00 as the year changes. The funny part is that in Hyderabad the state owned electricity company actually shut off power at that time!!!!
This is no coincidence as they did it last year too (that's when I had thought that it was coincidence). I guess there is some fun-loving official in that company whose sense of humour needs to be fixed....
Fortunately it hit only a very small set of people and was much less scary than the Y2K problem and we figured out in advance that flights need not be gounded nor schools closed down.
Y2K7 was to do with how assembly versions are stored. The file versions are stored as two 32-bit integers defined by four 16-bit integers. So the version number is of the form A.B.C.D. Visual Studio 8.0 used the numbering scheme 8.0.YMMDD.NN. Where the YMMDD is the day the build is churned out and NN is the increment counter. Visual Studio 8 finally shipped as 8.0.50727.42.
We have build labs that churn out builds every day and the one to be produced on 1th Jan this year was 8.0.70101.00. The problem is that the largest number that can fit into a 16-bit int is 65535 (0xFFFF) and hence the above number couldn't be produced and the build failed. Nothing much happened other than we changed the numbering scheme to not include the year prefix.