"Be peaceful, be courteous, obey the law, respect everyone; but if someone puts his hand on you, send him to the cemetery" - Malcolm X
Tuesday, February 5, 2008
Atlast a new Header
Currently Listening To - Ajeemo shan - JODHA AKBAR
Monday, February 4, 2008
The Great Debaters
All actors, specially the team members that participates in debates are awesome. Scenes where negro team competes with white students is overwhelming. I am sure this movie will be voted for Oscars. This movie is a must watch for everyone out there. Gandhi's non co-operation movement is also mentioned in the debate that occurs in Harvard. In simple words:
Amazing Movie
Saturday, February 2, 2008
Bill Gates speaks on Creative Capitalism
Views expressed by Gates are quite noble. His idea of large companies contributing a fraction of their great minds on innovations focusing on developing nations is great. As an economics novice, I think the steps Bill is putting forward under the umbrella of 'Creative Capitalism' are quite effective. I am also proud of the fact that India, being a developing country, is contributing so much for this. Bill mentions India more than 2 times in his 25 minutes speech. Isn't that great?
Currently listening to - But it rained-PARIKRAMA
Sunday, January 27, 2008
IL Generator
Just to get you started let me tell you soemthing about these tools:
- .NET Reflector - This is a tool which allows you to browse thought constituents of your assemblies. You can reverse engineer all the classes that are part of your assembly in any .net compliant language like C# or VB.NET
- ILDasm - Let's you dis assemble your IL code. You can check out complete IL code with all opcodes. Apart from this IlDasm also let's you check assemblies manifest for metadata
Let us start with some IL generation:
- Class ILGenerator
[assembly : mscorlib.dll] [namespace: System.Reflection.Emit]
This class generates Microsoft IL instruction. It contains a large number of methods that are used to emit appropriate IL instructions. There are methods to emit calli instructions, methods for exception handling stuff etc. Large portion of this class s occupied by Emit method overloads. There more than 10 overloads available for emit method.
Emit method takes a OpCode structure object. There is another class in System.Reflection.Emit namespace known as OpCodes. This has all the opcodes that you find in you IL. Almost all of these OpCodes are declared as readonly variables and initialized with some specific values.
This is OpCode structure and as you can see it has variables mostly of some enum type. Like StackBehaviour is an enum. OpCodes class is given below. Just look at the constuctor used for initializing readonly fields. After combining all these things together an IL instruction is pushed to a MSIL stream of instruction.
There is a method InternalEmit which almost all Emit methods in ILGenerator class calls. Let us look at this method: if opcode.m_size == 1 This checks weather opcode size is 1 bytes or 2 bytes long. If opCodesize is 1 then opCode byte is added to MSIL Stream byte array and its length is incremented by 1. But if we have 2 byte opcode then both bytes are added to MSIL byte stream array and its length is increased by 2 i.e. one after each addition. At last InternalEmit calls UpdateStackSize method which I'll leave for readers exploration.
Knowing about IL and metadata has helped me a lot in solving issues related to performance. I recommend knowing few things about IL to all .net developers.
References
- OpCodes : http://msdn2.microsoft.com/en-us/library/system.reflection.emit.opcodes_members.aspx
- ILGenerator : http://msdn2.microsoft.com/en-us/library/system.reflection.emit.ilgenerator.aspx
EnJoy Coding
Currently listening to: Who I am- Eminem
Sunday, January 13, 2008
My Hibernation is over
- Intel Core 2 Duo 2.2 GHz [Santa Rosa platform]
- 2 GB DDR2 RAM
- 240 GB 7200 RPM HDD [120Gb dual hard disks]
- NVIDIA GS8600M GPU 256 mb DDR3 Dedicated vedio memory
- 17" Ultra bright screen [Best in market]
- Finger print reader
- DVD writer with Label Flash
- ALTEC LANCING speakers
- HDMI port
- WebCam 1.3 MP
Amazing power and great looks. Check out the picture
