Nathan's profileNates StuffPhotosBlogListsMore Tools Help

Blog


    June 16

    Nerd Quiz

    For now on you may address me as my proper title:

    NerdTests.com says I'm a Nerd God.  What are you?  Click here!

    I wish the title was a little less blasphemous; therefore you may alternately call me 'King Nerd'.  That would also match with my wife who is a "Slightly Dorky Nerd Queen".

     

    I also scored quite high on the version 1.0 test:

    I am nerdier than 92% of all people. Are you a nerd? Click here to find out!

    Remember, that is 92 percentile!

    --Nathan Zaugg

    June 12

    3D Modeling With Google

    Those who know me will tell you that Microsoft might as well just put me on payroll because I talk about their new products all day long.  I have even characterized myself as an "Unofficial, Unpaid, Microsoft Solutions Evangelist".  Having said that, I know what's good and bad about the products I love so much.  I also know when someone else has something worth taking a look at. 

    Google Defined

    Google: very successful Internet advertising company seeking to find, buy, and evolve technology that has promise and then figure out a way to turn a profit on the new technology. 

    And they are very good at what they do.  When Google purchased KeyHole (Google Earth) everyone started scratching their heads and wondered why!  I may not understand exactly how but I am almost positive that they have turned a profit on it. 

    Well, here is another interesting gem.  Google SketchUp is a armature 3D modeling tool.  It's easy to pick up and has some pretty cool features.  I created the sketch below of my back yard (or at least how I want it to be).  There is tons of detail from the landscape brick in the back to the translucent windows.  I did the below model in less than an hour and when I started I couldn't figure out how to add dimension to my square shape or how to move it around. 

     

    3D Sketch Yard-2

    Cool Features

    Some of the cool features are textures, and the 3D model community.  The textures makes these simple sketches look very life-like.  It has most of the common building materials and many basic outdoor shrubs & plant-life.  You can also capture an image from Google Earth and transpose it onto your work area.  You can even take a picture of something and mold it to your objects. 

     

    Google 3D Model Search

    I added my model to the Google search and now anyone can use my shop! 

    The Not So Cool

    It would be nice if there was more keyboard involvement.  I find my self switching between tools a lot and it's cumbersome.  While you can get results pretty quickly the interface is difficult to maneuver even after using it for a while.  Simple tasks like changing the size of a rectangle are complicated.  You also have an inability (or at least it seems to me for now) to make things exact.  I'd like to be able to enter the size of the rectangle and then enter the coordinates.  And although it's pretty fast for 3D modeling it does make you wait quite a while for some tasks and I think it could be a whole lot faster!  It seems to be written in Ruby and my guess is that it does not take advantage of hardware acceleration and that if it were written in a language like C++ or C# than it would be much faster!  Also, I hate the name!  Couldn’t they have named it Google 3D, G-3D, or even GSketch?

    All said, for a free pice of software it does help a lot in convincing my wife that a 30-35 shop will not look too big for our yard!

    http://sketchup.google.com/

    --Nathan Zaugg

    June 09

    Silverlight 2.0 Beta 2 Released & Installation Help

    Microsoft Silverlight 2.0 Beta 2 has been released.  This version is supposed to be pretty stable as I understand it.  The tools on the other hand, still feel very much like a beta!  I had a heck of a time getting this junk installed!

    The link to download Silverlight 2.0 Beta 2 for Visual Studio is here: http://silverlight.net/GetStarted/
    (note: This installation package includes all you need including Silverlight runtime and SDK)

     

    My Installation Isssues

    image 
    Installer splash, so far so good.

     

    image
    I got to know these dialogs pretty good as I'd tried this many times!

     

    image
    It makes you close all browsers!  Ok, sure!

     

    image
    DANG IT!  What now? 

     

    image
    So you're telling me that I can't have a patch?

     

    Here is the output of the error:

    Created new ExePerformer for Exe item

    [6/9/2008, 13:48:11] Action: Performing Action on Exe at c:\6472026481f78458c12aa62cd2\silverlight_uninstallrtmpatches.exe...

    [6/9/2008, 13:48:11] (IronSpigot::ExeInstallerBase::Launch) Launching CreateProcess with command line = c:\6472026481f78458c12aa62cd2\silverlight_uninstallrtmpatches.exe /q /uninstall
    [6/9/2008, 13:49:11] (IronSpigot::ExeInstallerBase::PerformAction) c:\6472026481f78458c12aa62cd2\silverlight_uninstallrtmpatches.exe - Exe installer does not provide a log file name
    [6/9/2008, 13:49:11] (IronSpigot::ExeInstallerBase::PerformAction) Exe (c:\6472026481f78458c12aa62cd2\silverlight_uninstallrtmpatches.exe) failed with 0x80070643 - Fatal error during installation. :
    [6/9/2008, 13:49:11] (IronSpigot::ExeInstallerBase::PerformAction) PerformOperation on exe returned exit code 1603 (translates to HRESULT = 0x80070643)

    [6/9/2008, 13:49:11] Action complete

    [6/9/2008, 13:49:11] (IronSpigot::LogUtils::LogFinalResult) Final Result: Installation failed with error code: (0x80070643), Fatal error during installation.

    so I hit the net and find these instructions: http://weblogs.asp.net/bradleyb/archive/2008/03/06/installation-tips-for-sivliverlight-tools-beta-1-for-visual-studio-2008.aspx

    try to uninstall the KB:
    image
    (found under updates)

     

    image 
    Kept asking me for some location!  Wasn't going to work....what is the backup solution?

     

    image
    Ok, extract the files in the installer...sure.

     

    image
    I put them in a dir called "Install"

     

    Then RUN: msiexec /uninstall VS90-KB949325.msp /L*vx VS90-KB949325-2.log

    image
    Double Dang!  Ok, whats up??

     

    Hit the web agian: http://silverlight.net/forums/p/17663/58925.aspx
    and download MSI ZAP: http://support.microsoft.com/kb/290301

     

    image
    Tripple Dang!  Updates are not listed!

     

    Downloaded tool: MSIINV

    Download Link:
    msiinv.zip

    RUN:

    msiinv.exe -p > Installed.txt

    No luck!  Still not giving me the GUID for KB949325! 

    RUN:

    msiinv.exe -v > Installed.txt

    Took SEVERAL minuets to run and created a 10MB text file!  When it was done I tried to run msizap but it wouldn't go.  I'm just going to install these packages seperatly now that I have them extracted from silverlight_chainer.exe.

     

    RUN THE FOLLOWING:

    1. Silverlight.2.0_Developer.exe
    2. msiexec /p VS90-KB949325.msp /L*vx VS90-KB949325.log REINSTALL=ALL
      image
      (gave me an error -- ok, I'm skipping it!)
    3. silverlight_sdk.msi
    4. VS_SilverlightTools_Beta2_Setup.exe

     

    image
    Sat here for quite a while!
    devenv.exe seems active though.

     

    image
    Install Completed!

     

    This is also a good resource:

    http://www.microsoft.com/downloads/details.aspx?familyid=50A9EC01-267B-4521-B7D7-C0DBA8866434&displaylang=en

     

    This seems to only be a problem if you were an early adopter of the Visual Studio 2008 SP1 Beta 1 fix. 

    Avoiding Circular Dependencies (Tangles)

    The term "circular dependency" may be foreign to some programmers (especially if you do Java as it is a pretty common practice).  However, anyone who has done some scripting for a referential database knows that you have to run scripts in a certain order.  Running scripts out of order causes errors when you run.  The interesting trick is that if you run that same incorrectly-ordered DDL script again and again you will eventually get it to run without errors.  If you were unaware of the order being incorrect and thought to yourself in that moment "Stupid database!" then this blog post is for you!

    What is a circular dependency?

    It is simply two libraries that use each other (either directly or indirectly) as shown below:

    image 

    Figure 1: Circular Dependency

     

     

    image

    Figure 2: Complex Circular Dependency

     

    The complexity of a circular dependency may vary.  If you are using Visual Studio and have all of your projects loaded into a single solution AND you add Project References (Right click on project -> Add Reference -> Projects Tab -> {Project Name}) then the IDE will not allow you to create Circular Dependencies.  In fact, this is a good practice as Visual Studio will ensure the correct build order. 

    Why are circular dependencies bad?

    Just like our Database example above, a circular dependency makes it so you can not guarantee that your application has the latest code.  That is a big deal!  Here is why:

    1. I make changes to Application 1 (in Figure 2)
    2. I build my project, The changes I made in Application 1 may or may not have gotten into Application 2 (depending on build order).  It may have taken a copy of the compiled code that was left over from the last time I built.
    3. Application 2 depends on this new functionality to provide services to Application 3; This functionality will not work correctly with this build.
    4. Application 3 may or may not depend on these same services to provide back to Application 1

    As you can see in this scenario, there is no such thing as a "correct" build order when there are these circular dependencies.  The only way you can arrive at the correct version of the code is to build it as many times as there are nodes in our circle.  That would mean for Figure 1 that we would need to build twice and three times for Figure 3.  Some of these dependencies can get really ugly!  Here is some actual code running in an actual company that I did analysis on some time ago using a tool called Structure 101.

    image image image image

     

    How do I fix circular dependencies?

    There are some steps to take to solve even the most complex tangles!  They all involve refactoring your code though.

    1. Refactor common code into a "base" dependency; I usually call this "Common" (figure 3).  BEST SOLUTION
    2. Remove code that is unused.  In the tangles shown above many of them are using deprecated/unused code.
    3. Duplicate the sections of code used.  This should be seen as a last resort but given the choice between code duplication and circular dependencies, I take code duplication ever time!

     

    image

    Figure 3: Refactor a Common

     

    Summary

    There are two kinds of design concepts for nTier (and other types of architectures as well) called Logical Layout Design and Physical Layout Design.  The Logical Layout is simply that your software occupies the same project/package but leverage different classes.  In contrast Physical Layout Design forces each tier to be separated into different Projects/Packages.  So long as we are careful to manage the dependencies between these packages from the start this is the preferable way to code.  While the logical layout does not suffer from the dependency problem eventually you may wish to break these classes apart and find that there are a lot of inner-dependency that should not exist simply because they occupied the same project.  Remember to keep it clean!