Monday, October 16, 2006

I'm back now from a small and much needed hiatus.  We've been cranking on getting the next version of our product configurator code complete for the next version.  It's gonna rock and knock people's socks off - and it's only getting better.

I've been out of email/cell phone contact since Wednesday afternoon last week except intermittently having taken the family to Disneyland.  Oh what fun that was.  It actually felt good to completely take my mind off of things and not focus.  Now that I'm back I feel completely rejuvenated (despite being a little tired) and ready to rock.

I'll be posting more soon.

Monday, October 16, 2006 4:58:00 AM (Mountain Standard Time, UTC-07:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Wednesday, October 11, 2006

I would be remiss were I to not post this announcement:

Join us on Saturday, October 21st for Utah Code Camp!

The local .NET Users Group and SQL Server Users Group is conducting a "Code Camp" for local software programmers next month at Neumont University.  The code camp follows the Code Camp manifesto that it is for the community by the community and always free.  We are looking forward to excellent sessions on lots of different topics.

The event is scheduled from 8:00 AM to 5:00 PM. The conference is free, however we request that you please register at www.msutahevents.com and enroll for the event so that we can get as accurate a head count as possible.

We will have sessions for both Developers and DBA's. We will also have a Sponsors area with lots of giveaways!

If you would like to speak or are interested in speaking, please email Pat Wright at pat_wright@sqlpass.org - visit www.msutahevents.com for more information.

Please register and join us for what should be an exciting and fun day!

Wednesday, October 11, 2006 1:43:00 AM (Mountain Standard Time, UTC-07:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Wednesday, October 04, 2006

The PropertyGrid control that is provided with Visual Studio, while not the most powerful of controls, provides some pretty awesome functionality.  In a nutshell it permits you to bind an object to it via a .SelectedObject property.  The PropertyGrid will then, via reflection, discover properties on your object and display them for your viewing/editing pleasure.  In doing so, you can provide users of your applications with a UX (user experience) similar to what you would receive within Visual Studio's design time.

Doing this binding is trivial and quite enjoyable actually.

The PropertyGrid also allows you to further extend the design experience with UITypeEditor-derived types.  These types can provide custom dropdowns or popup dialogs that give you the ability to offer the user a rich experience in setting property values.  Often times these are used when a property value is more complex than a simple value (e.g. collection management, graphical color selections, etc).  These, too, are a lot of fun and quite easy to create.

If a property on your bound object is another non-simple type (such as a Customer), the PropertyGrid won't know how to represent the data and will simply call .ToString() on the property, thereby returning the class name.  This is usually not the desired behavior.  Perhaps you want to display some more palatable text or a particular property of the object.  This can easily be accomplished through a mechanism known as a TypeConverter.

A TypeConverter-based class provides a consistent manner of converting an object of one type to another.  Via the TypeConverterAttribute class, you can designate the TypeConverter-type to use to represent your property as in the following example.  Suppose that a Customer object is a property on some other object (such as an Order) that is bound to the PropertyGrid.

namespace Devstone.Samples.Objects {

   public sealed class Order {
      private Customer _customer;

      public Customer Customer {
         get { return _customer; }
         set { _customer = value; }
      }
   }


   [TypeConverter(typeof(CustomerConverter)]
   public sealed class Customer {
      //... additional code here
   }


   internal sealed class CustomerConverter : TypeConverter {
      public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType) {
         if ( destinationType == typeof(string) && value is Customer ) {
            // NOTE: we could simply cast value to Customer and return a string consisting
            // of property values if we chose to do so.
            // for simplicity sake, however, we'll return just some basic text.

            return "(Customer)";
         }
         else {
            return base.ConvertTo(context, culture, value, destinationType);
         }
      }
   }

}

Now, rather than 'Devstone.Samples.Objects.Customer' showing up as the value for the Customer property, we have the nicer '(Customer)' value.

This particular example is very straightforward and simple.  Tomorrow, I'll follow up with a more complex and robust example that takes the PropertyGrid and extends it further by dynamically creating properties on the fly that represent actual properties on the constituent objects.  This gives us the ability to view and edit hierarchical information directly within the PropertyGrid. :)  It's cool stuff.

Wednesday, October 04, 2006 6:13:00 PM (Mountain Standard Time, UTC-07:00)  #    Disclaimer  |  Comments [2]  |  Trackback

I received a fax today consisting of a form to be filled out and faxed back to the sender.  Not only did the fax include two copies of the form to be filled out (presumably one for me and one for the sender), but included the following instructions:

Hi,

Please sign both copies, keep one for your records, fax the other back to me.

Wednesday, October 04, 2006 2:13:00 PM (Mountain Standard Time, UTC-07:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Tuesday, October 03, 2006

This is making the rounds lately and it seems to have many developers up in arms - and semi-understandably so.  Somasegar recently announced that while Visual Studio version 2005 (with SP1) would be supported on Windows Vista, Visual Studio 2002/2003 would NOT.  When I first read that it took me aback.  What?  How could they not support them?  I use both VS 2003 and VS 2005 on a daily basis and am planning on moving to Vista promptly.

First of all, let me be clear about this (and this seems to be something of a point of confusion):  Visual Studio 2002/2003 (the products) will not be supported on Windows Vista.  This does not mean that .NET 1.1 applications will not be supported - they WILL.  Even then, that doesn't mean that VS 2002/2003 won't work on Vista...they just won't be supported.

As you're no doubt aware, the Microsoft Windows team has done a tremendous amount of work around security and the locking down of the operating system for the Vista release, many of the changes impact the way that applications (particularly debuggers) work on the OS.

Scott Guthrie has the following to say (taken from Dennis van der Stelt's blog) :

The big technical challenge is with enabling scenarios like advanced debugging. Debuggers are incredibly invasive in a process, and so changes in how an OS handles memory layout can have big impacts on it. Vista did a lot of work in this release to tighten security and lock down process/memory usage - which is what is affecting both the VS debugger, as well as every other debugger out there. Since the VS debugger is particularly rich (multi-language, managed/native interop, COM + Jscript integration, etc) - it will need additional work to fully support all scenarios on Vista. That is also the reason we are releasing a special servicing release after VS 2005 SP1 specific to Vista - to make sure everything (and especially debugging and profiling) work in all scenarios. It is actually several man-months of work (we've had a team working on this for quite awhile). Note that the .NET 1.1 (and ASP.NET 1.1) is fully supported at runtime on Vista. VS 2003 will mostly work on Vista. What we are saying, though, is that there will be some scenarios where VS 2003 doesn't work (or work well) on Vista - hence the reason it isn't a supported scenario. Instead, we recommend using a VPC/VM image for VS 2003 development to ensure 100% compat. Hope this helps - even if the answer isn't entirely what we'd all like it to be, Scott

I've been considering making my primary development environment on a VPC anyway - maybe this is the way I'll have to go in the Vista timeframe.

Tuesday, October 03, 2006 3:54:00 AM (Mountain Standard Time, UTC-07:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Saturday, September 30, 2006

As an avid proponent of virtual machines (e.g. Microsoft Virtual PC, VMWare, Virtual Server, etc), they play an integral part in my role as a software developer.  While I haven't yet made the switch over to have my primary development environment (which I may do at some point), I find them to be extremely useful especially for testing software or hosting services that I would not otherwise want to install locally.

A virtual machine does tend to get quite large.  I have several virtual machines where the VHD (virtual hard drive) file exceeds 10 GB.  Zipping a 10 GB file takes quite a while.  If I want to burn it to DVD, for example, I have to spend a while zipping it and copying it.  Extracting seems to take even longer and it's a lot of time that I don't really have.

Several months ago I had evaluated a product by Invirtus called the Invirtus VM Optimizer.  While I don't like their evaluation scheme (which only allows for one usage per VPC - and it's easy to do it wrong if you're evaluating the software, rendering it virtually useless), there are many raving reviews online about the product.  We recently purchased the Corporate Edition v2.5 and I took the time today (being that it's a weekend) to 'optimize' my set of clean images.

To expedite the process of building a new VPC I've assembled a collection of 'clean' images.  A clean image in this case has no additional software installed on it except the base OS and hotfixes.  I will periodically dip into the archive, open each VPC and update it to the latest of all hotfixes and patches and then rearchive it with the appropriate date stamp.  I optimized 5 VPCs today and achived an average size reduction on the VHD files of 58.7% (not bad at all).  :)

Now I can put all five back onto a single DL DVD without the need of zipping/rarring them up which makes the whole proposition even more exciting.  Here are my results:

Windows XP SP2:

5,113,091 KB before
1,362,287 KB after
73.36 % savings

Windows 2000 Professional:

2,757,316 KB before
1,163,583 KB after
57.80 % savings

Windows 2000 Server:

2,757,316 KB before
1,268,056 KB after
54.01 % savings

Windows Server 2003:

3,199,792 KB before
1,352,045 KB after
57.75 % savings

Windows Server 2003 + CRM 3.0/SQL Server/etc:

4,248,624 KB before
2,329,179 KB after
45.18 % savings

Total:

18,076,139 KB before
7,475,150 KB after
58.65 % savings

Saturday, September 30, 2006 8:43:00 PM (Mountain Standard Time, UTC-07:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Thursday, September 28, 2006

I know this is nothing new and that it's painfully obvious, but I've had it bouncing around in my head for months and months.

Perhaps my love of Greek Mythology coming to a head, but I absolutely love the theme of Greek names in the naming of AJAX, JSON, and Atlas.  Besides, they're just plain cool.  And then to tie it all together we have Atlas, one of the greatest of the titans.

Always a sucker for puns for clever plays on words, I enjoy the fact that we have the convenient acronyms such as AJAX and JSON.  There have been others in the past too.  SOAP and ROPE anyone?

Can anyone think of others?

Thursday, September 28, 2006 2:16:00 PM (Mountain Standard Time, UTC-07:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Tuesday, September 26, 2006

This has been a tad frustrating but ever since upgrading my computer to a Dell Precision M90 (Dual Core) from a Dell Inspiron 8600 my favorite virtual drive application (DAEMON Tools) has not worked.  This has been a known issue with version 4.03 and well documented in the forums on their website, but on a whim today I decided to check to see if there were any updates.  As it so happens 4.06 was released just today.

I downloaded it and installed it and I'm happy to say the dual-core issue has been fixed - it worked first try!  :)  I'm so happy.

[UPDATE: 09/26/2006]
As it turns out, because I run as a non-administrator there is a bit of an issue running DAEMON Tools 4.06 once I rebooted.  To remedy this, I had to alter the registry to run DAEMON Tools as an administrator rather than my account at startup.  As a side effect, I have to provide admin credentials at boot up, but I'm willing to do this in order to get the software to work.

1. Open the Registry Editor (regedit.exe or regedt32.exe)
2. Open to HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
3. Edit the string value called DAEMON Tools to have a value that resembles:

runas /user:MACHINENAME\Administrator "\"C:\\Program Files\\DAEMON Tools\\daemon.exe\" -lang 1033"

Tuesday, September 26, 2006 5:31:00 AM (Mountain Standard Time, UTC-07:00)  #    Disclaimer  |  Comments [0]  |  Trackback