Mathew Nolton Blog

Software dementia unleashed...

January 2004 - Posts

Repost.....ebay humor...i love this one.

Always in search of a good joke. A friend of mine sent me this "eBay Humor" and I thought I would share it with everyone. If you have a few moments, it is definately worth a quick read.

It will give you a good laugh

Click here for a good laugh

Posted: Jan 27 2004, 06:35 PM by MatiasN | with 2 comment(s)
Filed under:
Interactive TV---It is the future
I have been sitting in meetings the last couple of days in San Francisco. For the last 6 months, I have been in the throws of creating an n-tier application architecture for a series of webservices for a large cable company in Atlanta and we have been having a great deal of success.

The services are doing a great job of interacting with a myriad of systems including a 3rd party customer billing system running on an AS/400....argggg. Oracle, Microsoft SqlServer as well as some other homegrown systems. What is really exciting is that many of these services are now going to be consumed by an Interactive TV Systems.

Gang, this is some exciting stuff. Not just what I am working on, but the utter potential. It is already all over Europe and the US is playing catch-up, but the US will catch up (we always do ;) ). Gaming, purchasing, ecommerce...you name it. The whole world is still in the infancy of the mass potential of this market.

-Mathew Nolton
Posted: Jan 22 2004, 07:14 PM by MatiasN | with no comments
Filed under:
New Article on using enumerations.

My new years resolution was to get back into writing. Specifically, writing technical articles...and maybe a book someday. Here is a quick little diddy on “Repurposing Enumerations”.

-Mathew Nolton

Posted: Jan 15 2004, 02:15 PM by MatiasN | with 1 comment(s)
Filed under:
Writing Efficient Code

It is common knowledge that it is always best to write small and tight classes and class functions. Aside from the fact that it makes your classes easier to maintain and understand, your assemblies are lighter and easier to load and unload by the CLR. An interesting thread, on gotdotnet pointed to an interesting fact described on MSDN.

The quick gist of this is that the first 4 declared variables are the most efficient to access and will provide you the best performance. Here is a quote from MSDN:

The stack transitional behavior, in sequential order, is:

The local variable value at the specified index is pushed onto the stack.

The ldloc instruction pushes the contents of the local variable number at the passed index onto the evaluation stack, where the local variables are numbered 0 onwards. Local variables are initialized to 0 before entering the method only if the initialize flag on the method is true. There are 65,535 (2^16-1) local variables possible (0-65,534). Index 65,535 is not valid since likely implementations will use a 2-byte integer to track both a local's index, along with the total number of locals for a given method. If an index of 65535 had been made valid, it would require a wider integer to track the number of locals in such a method.

The ldloc.0, ldloc.1, ldloc.2, and ldloc.3 instructions provide an efficient encoding for accessing the first four local variables.

The type of the value is the same as the type of the local variable, which is specified in the method header. See Partition I. Local variables that are smaller than 4 bytes long are expanded to type int32 when they are loaded onto the stack. Floating-point values are expanded to their native size (type F).

The following Emit constructor overloads can use the ldloc opcode:

The stack transitional behavior, in sequential order, is:

  1. The local variable value at the specified index is pushed onto the stack.

The ldloc instruction pushes the contents of the local variable number at the passed index onto the evaluation stack, where the local variables are numbered 0 onwards. Local variables are initialized to 0 before entering the method only if the initialize flag on the method is true. There are 65,535 (2^16-1) local variables possible (0-65,534). Index 65,535 is not valid since likely implementations will use a 2-byte integer to track both a local's index, along with the total number of locals for a given method. If an index of 65535 had been made valid, it would require a wider integer to track the number of locals in such a method.

The ldloc.0, ldloc.1, ldloc.2, and ldloc.3 instructions provide an efficient encoding for accessing the first four local variables.

The type of the value is the same as the type of the local variable, which is specified in the method header. See Partition I. Local variables that are smaller than 4 bytes long are expanded to type int32 when they are loaded onto the stack. Floating-point values are expanded to their native size (type F).

Happy Coding
-Mathew Nolton

Posted: Jan 09 2004, 08:32 AM by MatiasN | with no comments
Filed under:
More Posts