A cacophony of ramblings from my potpourri of notes
 Friday, January 23, 2009
Visual Studio Keyboard Shortcuts Wrap-up (MSDN Flash - Feb. 2, 2009)

In this edition, I am going to wrap up a few loose ends with a selection of miscellaneous keyboard shortcuts and links to a summary keyboard shortcut poster.

Debugging:

I realize that none of you would write bugs, but in case you meet someone that does or perhaps on occasion you need to debug some code in order to explain a complex algorithm, here are some invaluable debugging keyboard shortcuts.

  • F9 and CTRL+F9
    F9 creates or removes a breakpoint based on the cursor's current location. CTRL+F9 toggles whether a breakpoint is enabled or not.
  • F5, CTRL+F5 and SHIFT+F5
    CTRL+F5 launches the application or begins running the tests.  If there are multiple projects in the solution, which project is launched depends on the solution's configured startup project.  Using F5 will launch the application in debug mode.  After encountering a breakpoint, F5 will continue execution until the next break point.  SHIFT+F5 will stop the application from debugging all together.
  • F10, F11 and SHIFT+F11
    Executes the next statement one method at a time.  If not currently at a breakpoint, debugging will start at the first statement.  F10 will execute the method without following execution into the method.  In contrast, F11 will step into the method, allowing you to debug it line by line (assuming you have the source code).  SHIFT+F11 executes all remaining statements within the currently executing method, allowing you to jump out of a particular call rather than stepping over each line.
  • CTRL+ALT+I
    Displays the Immediate Window.  Used when debugging a method, this window allows you to write code (frequently with intellisense) and evaluate/evaluate the code line by line as though it was inline within the method you are debugging.  I find it extremely helpful when learning about a new .NET API.  After instantiating a particular type, I can examine various members on the type and learn more about their behavior.

Adding files to Project

  • SHIFT+ALT+C
    Displays the Add New Item dialog with the Class template selected.  Initially I wanted this to work without the dialog but I need to supply the class/file name and there are no additional keystrokes to placing it in the dialog.
  • SHIFT+ALT+A
    Displays the dialog for adding an existing item to the project.

Summary

As I wrote this series, I was amazed at how frequently I still found myself forgetting some of the new keyboard shortcuts I learned while writing (CTRL+Break to stop a build).  Fortunately, there are posters available with many of the top shortcuts listed.  I recommend using one as a mouse pad for a few months so that you can get them down.

This ends the series on Visual Studio Keyboard Shortcuts.  Next I plan to start a series on the Entity Framework.


Friday, January 23, 2009 7:23:22 AM (Pacific Standard Time, UTC-08:00)  #    Comments [7]  Computer Related | .Net | Headlines

 Friday, January 16, 2009
Guilty as Charged

image


Friday, January 16, 2009 10:05:35 PM (Pacific Standard Time, UTC-08:00)  #    Comments [1]  Computer Related

 Saturday, January 03, 2009
Visual Studio Keyboard Shortcuts for Editing (MSDN Flash -Jan. 19, 2009)

Knowing all the keyboard shortcuts for editing shows off our programming prowess, just like it would it did for programmers that could use VI.   Rather than describing the well known ones like CTRL+F and CTRL+H, I am going to review some that are more unique to Visual Studio Programming:

Find

  • CTRL+I/CTRL+Shift+I
    imageIncremental Search: Turns on incremental search so that characters typed next will be search for in sequence within the file.  Use CTRL+Shift+I to search up and ESC to cancel.
  • CTRL+Shift+F and Ctrl+Shift+H
  • Find in Files:  Displays the find dialog with Look in: set to Entire Solution, so that a search will look across all files in the solution and display the results in the Find Results window.  Using the up and down arrows, you can select which result to navigate to and then press ENTER to go there.  Similarly, Ctrl+Shift+H will perform a search and replace across files in the solution.
  • CTRL+K, CTRL+R
    Find All References: Takes into consideration the fact that you are navigating source code and, therefore, looks for all references for the item the cursor on.  F3 and Shift+F3 will navigate back and fourth between all the references found.

Editing

  • CTR+Shift+V
    Cycle Clipboard Ring:  Did you know that Visual Studio has a clipboard ring?  With this keyboard shortcut you copy different text areas, one after the other, without pasting the text in between.  After copying you can paste using CTRL+Shift+V - each time will cycle back through what you copied, allowing you to select what to paste, from the set of copied items you placed into the clipboard ring.
  • CTRL+Shift+L
    Delete the selected line.  CTRL+L cuts the selected line into the paste buffer. 
  • CTRL+Shift+T
    Transpose Words: Transpose the current word with the following word, pivoting on the operator separating them.  For example, given FirstName = firstName, the transpose keyboard shortcut on FirstName would switch the code to firstName = FirstName.  Similarly, Multiply(x,y) would switch to Multiply(y, x).

Outlining

  • CTRL+M, M
    Toggle outline expansion for the current context.

Ctrl M, M

  • CTRL+M, P
    Turn off outlining entirely.  Reopening the file will re-enable the outlining.

Coding

  • CTRL+. and CTRL+K, S
     image
    Whenever a smart tag appears (for example after renaming a method or variable), use CTRL+. to display the smart tag menu and then ENTER to select which menu to use.  (I can't imagine coding without rename anything significant without rename and this keyboard shortcut.)  Similarly, CTRL+K, S displays the surround with context menu, allowing you to surround the selected text with a region for example (C#).
  • CTRL+K, L and CTRL+K, P, also CTRL+K, I
    List Members: I frequently see other people (okay, I do this myself) deleting the period so that they can see the listing of IntelliSense options again.  CTRL+K, L is the keystroke to do this without deleting.  Similarly, rather than deleting the left parenthesis, use CTRL+K, P to display the parameter info for the function you are calling. CTRL+K, I will display the help tip for the method you are calling.
  • CTRL+K, C and CTRL+K, U
    Comments out the currently selected code.  These shortcuts are for end-of-line comments rather than block comments.  Use CTRL+K, U to un-comment the selected text. 
  • Shift+ALT+ENTER
    Full Screen: Toggles in and out of full screen mode.  Great for when you are heads down coding a method and want the most real estate you can get on a single screen.
  • CTRL+E, W
    Toggle Word Wrap:  If you frequently find lines within the code editor going beyond the screen you can toggle on word wrap so that lines wrap.  (Personally, I suggest a coding standard that encourages developers not to write 200 character lines).  In my books the limit is 72 (a little too small for comfort :)
  • CTRL+Shift+F12
    Next Error:  I should have mentioned this one last week.  After compiling, you can navigate between errors using CTRL+Shift+F12. 

Saturday, January 03, 2009 11:48:10 AM (Pacific Standard Time, UTC-08:00)  #    Comments [2]  Computer Related | .Net

 Friday, January 02, 2009
Starting out the Year with a Run and a (Polar Bear) Swim

This new year is the second one for me that I start out with a run and a swim in the morning.  There is nothing particularly special about either of these events except it has a kinda symbolism for starting out the year right.

New Year's Day was a little more challenging this year.  It started out with a weather advisory from the National Weather Service for Spokane, WA area:

HEAVY RAINFALL COUPLED WITH MELTING SNOW WILL RESULT IN FLOODING OF SOME CITY STREETS AS WELL AS SMALL STREAMS AND LOW LYING RURAL AREAS. SNOWFALL THIS MORNING WILL CHANGE TO RAIN THIS AFTERNOON AND CONTINUE OVERNIGHT. RAINFALL IS EXPECTED TO BE HEAVY WITH AROUND 1 INCH OF RAIN EXPECTED BY FRIDAY MORNING. CITY STORM DRAINS COVERED WITH SNOW AND ICE COULD QUICKLY RESULT IN STREET FLOODING.

Well... at least everywhere that I went, it wasn't rain but snow!  As has been the case for most days over the past two+ weeks, I start out by shoveling the drive way (I secretly still enjoy starting the day this way).  However, the result was that I was a little late picking up John Martinek.  Fortunately, he had paged me earlier suggesting that we cancel so he wasn't quite ready anyway.  Glad I didn't get that page or the day wouldn't nearly have been as fun since I probably wouldn't have left the house.  Along with John's wife, Kelly, we drove down to Coeur d'Alene for the Hangover Handicap.

Hangover Handicap

The Hangover Handicap run is put on by TESH, Inc, a non-profit rehabilitation organization helping those who are disabled and/or disadvantaged to reach their highest level of independence.  The course runs along lake Coeur d'Alene, ID, an exact match for a portion of the Coeur d'Alene Ironman run section. 

image

There was certainly nothing special about my time.  In fact, we arrived a few minutes late so we didn't even start until only the walkers could be seen in the distance.  I knew a a few folks from Itron in the race (Doug Dominey and Fran Johnson) so once I was able to catch them, I doubled back a few times to say, "Hi" and run with John some.  In total, I stats were as follows:

Distance (including doubling back): 5.24 miles
Time: 42:32
Pace: 8:07 min/mile

Nothing to write home about but we ran on snow the whole way, it was snowing heavily, and I can say I even enjoyed myself (not the usual poking yourself in the eye type of experience. :)  After grabbing an apple cider from a local restaurant, we headed down to the lake for a swim.

John and Mark

2009 Coeur d'Alene Polar Bear Swim

It seemed we were going to be just in time for the plunge but on the way there a truck (4X4) go stuck in front of us - I was driving a Honda Odyssey.  We of course stopped and once they got going we were stuck too.  Traffic started to line up quickly behind us.  Eventually, we got the line to reverse and we rolled back for a running start.  We got to the top of the hill and started sliding down the other site, narrowly missing a parked car on the way down.  I slowly rushed to the plunge area to join the other 1,000 or so "crazies."  Unfortunately, the bell went off just as we were entering the area.  Bummer.... I pushed through the watchers, raced down the beach, stripped, and dived in after everyone was already out.  (Heck, I had come all that way, I wasn't going to miss it now.)

Once I got out, John and Kelly came over to see if I was still alive.  John's doing the Ironman this year so he had no choice but to pressure him to go for a swim. He reluctantly agreed, and to ensure I wasn't asking him to do something I wouldn't do - I joined him for a my second swim of the day.  (I think that credits me for having done the polar bear swim 3 times in two years.)

CDAPress had a great description of the event in the newspaper the next day.  I say great because it does a good job of having absolutely no explanation of why people do this type of thing but that they do it anyway. :)

I highly recommend this experience.  Really, it sounds stupid (in fact, it is stupid) - however, having done it now, I can say it is actually pleasurable - really!  The coming up for a breath isn't great - you feel almost short of breath.  However, once you stand in the snow and soak up the experience - there is just something inside you that makes you want to yell... YEAHHH!!! 

(P.S.  Don't do it twice on the same day like I did, that isn't so great.)  


Friday, January 02, 2009 5:30:16 AM (Pacific Standard Time, UTC-08:00)  #    Comments [1]  Personal | My Sports

 Saturday, December 20, 2008
Visual Studio Keyboard Shortcuts for Compiling (MSDN Flash - Dec. 29, 2008)

There is not much point in writing code if you can't compile it so, in this edition's keyboard shortcut tips and tricks, we are going to discuss compiling your code.  For both Visual C# and Visual Basic schemes, you can compile the entire solution using Ctrl+Shift+B.  However, three keys (requiring two hands and an elbow) is a little unfriendly for what should be a relatively frequent operation.  Fortunately, the Visual C# scheme also allows F6 for the same activity and you could map the same key for Visual Basic (unless splitting the window is a frequent occurrence for you :). 

This works well when you only working with one or two projects in a solution, but what about when you solutions has 20+ projects in (a common occurrence if you have test projects for each production assembly).  Fortunately, you can use Shift+F6 (in the Visual C# scheme) if you only want to compile just the current project.  A great way to check for compilation issues on recent changes - perhaps removing squiggles that are not cleared up by the just-in-time compiler (an issue considerably reduced in Visual Studio 2010).

Another useful build related keyboard shortcut in the Visual C# scheme is Ctrl+Break.  This shortcut cancels the currently executing build - a useful command, especially when a single syntax error is generating a plethora of errors and you want to go back and fix it quickly.

For those of you with one of the Visual Studio Team System SKUs that included code analysis, there are are commands for running it.  Visual Studio Team System's code analysis analyzes the compiled assemblies for suspicious code (a bad code smell) and then flags the issue using a warning.  (I have found this to be invaluable for my team in automatically catching issues even before the point of code review - frequently issues that are hard to spot with the naked eye.)  You can turn on code analysis within the project properties:

image

However, there are two potential issues.  Firstly, turning on code analysis adds noticeable time to you build - this is worth it before checkin, but sometimes a distraction from the task at hand.  Secondly, warnings in dependent projects will no longer appear in an incremental build, causing them to be lost until you perform a rebuild all.  One work around for both of these is to assign a keystroke to code analysis (perhaps Ctrl+Alt+F6):

image

One more minor note:  If you install VMWare 6.5, it will re-map F6 to "Start debugging in a virtual machine," causing an "Unable to detect the current startup project" error dialog to appear.  To correct this, re-map F6 back to Build.BuildSolution.

Posted for MSDN Flash: Keyboard Visual Studio Tips & Tricks for Dec 29, 2008


Saturday, December 20, 2008 7:16:19 AM (Pacific Standard Time, UTC-08:00)  #    Comments [0]  

 Monday, December 15, 2008
Unattended Installation of Team Foundation Server 2008 on Windows 2008 with SQL Server 2008

The following are my instructions for installing a new Team Foundation Server 2008 with SP1 onto Windows 2008 with SQL Server 2008.

Throughout, I followed the TFS install guide and tried to automate where it didn't distract me too much from the task at hand.  I followed the Single-Server Team Foundation Server Installation.

Folder Layout

For the scripts to work successfully, you need the following placed into a local directory (probably without spaces in the name):

.\dotnetfx35.exe
.\SQLServer2008\   (SQL Server 2008 install)
.\TFS2008\             (TFS 2008 install)
.\TFS90sp1-KB949786-ENU.exe
.\TFSSetup.exe         (A custom TFS 2008 Setup utility I created for unattended installation)
.\WSS3wSP1.x86.exe

Prerequisites

Start with a mostly virgin Windows 2008 server.  I say mostly because I joined the machine to the domain and installed all Windows Updates.  In addition,  I created a single TFSSERVICE domain account.

Installation

  1. Turn on remote administration. [Optional]
      REG ADD "hklm\system\currentcontrolset\control\terminal server" /f /v fDenyTSConnections /t REG_DWORD /d 0
  2. Install IIS 7.0
      ServerManagerCmd -install Web-Server
      ServerManagerCmd -install Web-Http-Redirect
      ServerManagerCmd -install Web-Asp-Net
      ServerManagerCmd -install Web-Windows-Auth
      ServerManagerCmd -install Web-Mgmt-Compat
  3. Installed the .NET Framework 3.5 Service Pack 1 (Full Package) 
      // use /norestart to prevent autorestart
      .\dotnetfx35.exe /qb
  4. Installed SQL Server 2008.
      .\SQLServer2008\Setup.exe /ACTION=Install /FEATURES=SQLENGINE,FULLTEXT,AS,RS,SSMS,ADV_SSMS /INDICATEPROGRESS 
      /QUIETSIMPLE /ERRORREPORTING=1 /INSTANCEDIR="%ProgramData%\Microsoft SQL Server" /SQMREPORTING=True
      /INSTANCENAME="MSSQLSERVER" /AGTSVCACCOUNT="NT AUTHORITY\NETWORK SERVICE" /AGTSVCSTARTUPTYPE="Automatic"
      /ISSVCSTARTUPTYPE="Automatic" /ISSVCACCOUNT="NT AUTHORITY\NetworkService" /ASSVCACCOUNT="NT AUTHORITY\NETWORK SERVICE"
      /ASSVCSTARTUPTYPE="Automatic" /ASDATADIR="C:\ProgramData\Microsoft SQL Server\MSAS10.MSSQLSERVER\OLAP\Data"
      /ASLOGDIR="%ProgramData%\Microsoft SQL Server\MSAS10.MSSQLSERVER\OLAP\Log"
      /ASBACKUPDIR="%ProgramData%\Microsoft SQL Server\MSAS10.MSSQLSERVER\OLAP\Backup"
      /ASTEMPDIR="%ProgramData%\Microsoft SQL Server\MSAS10.MSSQLSERVER\OLAP\Temp"
      /ASCONFIGDIR="%ProgramData%\Microsoft SQL Server\MSAS10.MSSQLSERVER\OLAP\Config"
      /ASPROVIDERMSOLAP="1" /ASSYSADMINACCOUNTS="BUILTIN\Administrators" /SQLSVCSTARTUPTYPE="Automatic"
      /SQLSVCACCOUNT="NT AUTHORITY\NETWORK SERVICE" /SQLSYSADMINACCOUNTS="BUILTIN\Administrators"
      /BROWSERSVCSTARTUPTYPE="Automatic" /RSSVCACCOUNT="NT AUTHORITY\NETWORK SERVICE"
      /RSSVCSTARTUPTYPE="Automatic" /RSINSTALLMODE="FilesOnlyMode" /FTSVCACCOUNT="NT AUTHORITY\LOCAL SERVICE"
    The only customization I made was to move the data storage to C:\ProgramData\... rather than the default C:\Program Files\....  I prefer this because I like to keep all data separate from the program executables themselves.  One other thing to note is that my log files are on the same disk as the databases - consider improving for your scenario.
    NOTE: The first phase of the SQL Server 2008 install is to install Windows Installer 4.5 if it isn't already installed.  Unfortunately, this requires a reboot after which you need to re-run the SQL Server 2008 setup.  Consider running an autologon.exe utility at the beginning of your installation (so that the password prompt occurs before you leave the computer to do the install) in order to set the computer to automatically logon after rebooting.  You will also want to use the Runonce registry setting to re-run the SQL Server 2008 install.
  5. Installed Windows SharePoint Services 3.0 with SP1
      IF NOT DEFINED TFSSERVICEPASSWORD ( SET /P TFSSERVICEPASSWORD=Enter the TFS Service password: ) 
      
      WSS3wSP1.x86.exe /Extract:"%TEMP%\WSS3wSP1" /passive /quiet
      "%TEMP%\WSS3wSP1\setup.exe" /config "%~dp0Wss4TfsSingleServerConfig.xml" 
      CHOICE /T 1 /D Y /M Waiting...
      RD /Q /S "%TEMP%\WSS3wSP1
      
      SET PSCONFIG="%COMMONPROGRAMFILES%\Microsoft Shared\web server extensions\12\bin\psconfig.exe"
      %PSCONFIG% -cmd configdb -create -server localhost -database SharePoint_Config -user %USERDOMAIN%\TFSSERVICE -password %TFSSERVICEPASSWORD% -admincontentdatabase SharePoint_Admin_Content 
      %PSCONFIG% -cmd adminvs -provision -port 2500 -windowsauthprovider onlyusentlm 
      
      SET STSADM="%COMMONPROGRAMFILES%\Microsoft Shared\web server extensions\12\bin\stsadm.exe" 
      %STSADM% -o extendvs -exclusivelyusentlm -url http://%COMPUTERNAME%.%USERDNSDOMAIN% -ownerlogin %USERDOMAIN%\tfsservice -owneremail "tfs@%USERDNSDOMAIN%" -sitetemplate sts -description "Team Foundation Server" 
      %STSADM% -o siteowner -url "http://%COMPUTERNAME%.%USERDNSDOMAIN%" -secondarylogin %USERDOMAIN%\%USERNAME% 
      
      %PSCONFIG% -cmd adminvs -provision -port 2500 -windowsauthprovider onlyusentlm
    This script extracts WSSwSP1 to a temp directory and then executes the setup unattended using the Wss4TfsSingleServerConfig.xml file with ServerRole Web Frond End (WFE).  The WSS setup doesn't perform any configuration.  Instead, the psconfig.exe and stsadm.exe configure the server following the install.  Note that I use port 2500 as my SharePoint central administration port (something I have standardized on).  In addition, I use a fully qualified name for the WSS url.
    The Wss4TfsSingleServerConfig.xml contains the following:
    <Configuration>
        <Package Id="sts">
            <Setting Id="REBOOT" Value="ReallySuppress"/>
            <Setting Id="SETUPTYPE" Value="CLEAN_INSTALL"/>
        </Package>
        <DATADIR Value="%ProgramData%\Microsoft SQL Server\MSSQL$SHAREPOINT\Data" />
        <Logging Type="verbose" Path="%temp%" Template="Microsoft Windows SharePoint Services 3.0 Setup(*).log"/>
        <Setting Id="SERVERROLE" Value="WFE"/>
        <Setting Id="UsingUIInstallMode" Value="0"/>
        <Display Level="none" CompletionNotice="no" AcceptEULA="Yes" />
    </Configuration>
    
  6. Slipstreamed Team Foundation Server SP 1 into the .\TFS2008wSP1 directory.
    .\TFS90sp1-KB949786-ENU.exe /extract:"%TEMP%\TFS2008SP1"
    msiexec /a .\TFS2008\at\vs_setup.msi /p "%TEMP%\TFS2008SP1\TFS90sp1-KB949786.msp" TARGETDIR="%CD%\TFS2008wSP1\AT" /L*vx c:\temp\install.log
    CHOICE /T 1 /D Y /M Waiting...
    RD /Q /S "%TEMP%\TFS2008SP1"
  7. Since there are no unattended command line switches for the Team Foundation Server install, I created a custom executable called TFSSetup.exe that I created to automate an unattended install of Team Foundation Server SP1.  A few things to note about the custom executable:
    • It accepts the license terms and assumes the product key is defaulted.
    • The deployment directory is the default directory for the TFS setup.
    • It assumes a Single Server TFS deployment and uses the default database server name (%COMPUTERNAME%)
    • It assumes the TFS Service name is %USERDOMAIN%\TFSSERVICE and that the password is stored in the environment variable TFSSERVICEPASSWORD (if it is not, the program will prompt for the password).
    • The SharePoint settings are http:\\%COMPUTERNAME%:2500 for the admin site and http:\\%COMPUTERNAME%.%USERDNSDOMAIN%/Sites for the Sites URL.
    • Alerts are not enabled.

Possible Errors:

Error: This installation package could not be opened.  Contact the application vendor to verify that this is a valid Windows Installer package.

Verify that the source directory (with the RTM version of TFS) is pointing to the AT directory.

Error: The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2203.

This is caused because some of the files are read-only.  Run Attrib -R .\* /S /D on both the SP1 and TFSRTM directories.

Error: The upgrade patch cannot be installed by the Windows Installer service because the program to be upgraded may be missing, or the upgrade patch may update a different version of the program. Verify that the program to be upgraded exists on your computer and that you have the correct upgrade patch.

Error: The server parameter specified with the configdb command is invalid. Failed to connect to the database server or the database name does not exist.  Ensure the database server exists, is a Sql server, and that you have the appropriate permissions to access the database server.  To diagnose the problem, review the extended error information located at C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12LOGS\PSCDiagnostics_12_14_2008_18_24_58_443_440016503.log.  Please consult the SharePoint Products and Technologies Configuration Wizard help for additional information regarding database server security configuration and network access.

This error occurred because I included both the dbuser and dppassword when executing psconfig.exe configdb.  Upon removing both those parameters, the error was avoided.

Error: The SQL Server Browser service is stopped.
Error: The SQL Server Browser service is not set to start automatically.

Error: TF220041: The specified Windows SharePoint Services site URL (http://<DefaultSiteURL>/Sites) is not the default site collection site: (Sites).
The default site collection site might have been renamed or removed. Make sure that the site exists and verify the correct URL,
and then attempt installation. If the problem persists, you can choose to install and configure Windows SharePoint Services as
part of the Team Foundation Server installation process.

This error occurs when you specify the Windows SharePoint Server URL without the "/Sites" suffix.  Team Foundation Server 2008 does not work correctly against the root.  You must specify includes the "/Sites" suffix to avoid this error.


Monday, December 15, 2008 4:31:04 AM (Pacific Standard Time, UTC-08:00)  #    Comments [2]  Computer Related | .Net

 Monday, December 08, 2008
SQL Server 2008 Install Nightmare

It all started with an installation of Visual Studio 2008 SP1, which included SQL Server Express 2005.  From there I wished to install SQL Server 2008 Standard on the default port and upgrade SQL Server 2005 Express to SQL Server 2008 express.  Unfortunately, this proved to be a troublesome desire.  I have no idea what the cause is exactly, except that I was not the only one on my team to have issues.

At this point, I am not sure the order that things occurred exactly, but I have a host of error messages and ways to handle them.  I can't say it will work for you - I sure hope you didn't have to go through all these to install SQL Server 2008 - but I did so I decided to share the experience.

Uninstall procedure:

The most important step with any failed SQL Server 2008 installation is uninstalling the failed attempt - yes, SQL Server 2008 needs to be uninstalled if an installation fails as it doesn't automatically roll back. 

At the moment there is no complete knowledge base article on how to manually uninstall SQL Server 2008.  However, there are instructions for how to uninstall an instance of SQL Server 2005 manually and there is a lot of similarity with SQL Server 2008, so review and follow those instructions were it makes sense.  Below is a list of the steps I followed:

  1. Uninstall the the installation from Programs and Features/Add Remove Programs, selecting Microsoft SQL Server 2008 and double clicking to run the uninstaller. (You always need to begin with this step or the command line equivalent.)  Do not use the Windows Installer Cleanup Tool to remove SQL Server 2008 without first trying to do so from Programs and Features/Add Remove Programs. During the uninstall, you can choose (via series of check boxes), which components of SQL Server 2008 to uninstall - including any shared components for when you have multiple instances.  In the case of multiple instances, each instance needs to be uninstalled independently.
  2. Run
         SC.EXE query | find /i "SERVICE_NAME: MSSQL" 
    to verify that there are no services instances for SQL Server that should have been deleted but weren't.  Any items that appear unexpectedly, should be removed with the command
         SC.EXE delete <service name> 
    Where service name is the name of the service returned by sc.exe query.
    If SC.EXE fails to uninstall the services and there are no other instances of SQL Server installed, delete registry keys HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer, HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSSQLSERVER and HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SQLAgent
  3. Search for <Instance Name> in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall.  If you find any, usually on a value called InstanceId, run
         MSIEXEC /X <GUID>
    where the <GUID> is the key name containing the InstanceId value.
  4. Delete the following registry keys/values if they exist
    • HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\<Feature>.<Instance Name>
    • HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\<Instance Name>
    • HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names\SQL\<Instance Name>
  5. Delete %ProgramFiles%\Microsoft SQL Server\<Feature>.<Instance Name> if it exists.
  6. Finally, search for the <Feature>.<Instance Name> in the registry and consider deleting any remaining items. In some cases this involves deleting the value because the other values within the same key are for a different instance.  In other cases, the entire key will need to be deleted because there is no other instance data within the key.  Hopefully, you won't encounter anything significant, but this is a good final step.

<Feature> has a value like MSSQL10 or MSAS10
<Instance Name>
is the name of the SQL Server instance you are trying to uninstall.

 

Pheww, now that we have completely uninstalled, lets review potential errors you might encounter:

Error: A later version of Microsoft SQL Server Compact is already installed.

Strange, since all I wanted was to install the SQL Server 2008 Tools.  Here are the steps to correct:

    1. Uninstall all parts of the SQL Server Compact Framework 3.5 SP1. 
    2. Rerun SQL Server 2008 install. 
    3. After installing SQL Server 2008 Tools, downloaded and reinstalled the SQL Server Compact Framework SP1.  The tools are located here:

Error: The following error has occurred: Could not open key: UNKNOWN\Components\CBFF54E0ED12B0946A1C52E5E82ABC38\E7BEEF5F746F8AB9076051A5574.  Verify that you have sufficient access to that key, or contact your support personnel. (Errors could be for other GUIDs as well)

The following error has occurred: Could not open key: UNKNOWN\Components\CBFF54E0ED12B0946A1C52E5E82ABC38\E7BEEF5F746F8AB9076051A5574.  Verify that you have sufficient access to that key, or contact your support personnel.

Errors could be for other GUIDs as well including UNKNOWN\Components\493032C95B52CBD448DD2B5A52C50E9A\3EC761FD7E06AE4499CE52705CF173EA.

This error is a permissions error in the registry.  If you search the registry for the first GUID you will find the key is likely mapped to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\<user SID>\Components\<GUID>.  Beneath this key is a sub key for the second GUID.  However, selecting the subkey will result in an access denied message.

To correct the problem:

1. Verify that you are running RegEdit as administrator (to avoid UAC issues with Windows Vista and Windows 3008+).

2. Edit the permission of the parent key(HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\<user SID>\Components) and click the Advanced button. (Optionally, you could edit the permissions on the parent GUID (CBFF54E0ED12B0946A1C52E5E82ABC38 in my example) but the same problem is likely to exist with other keys so you may as well deal with this in mass.)

image

3.  From the Advanced dialog, select the Owner tab and check the Replace owner on subcontainers and objects check box.  Also, verify that System is the owner (else add System and be sure to select it so it will become the owner). 

4. Next click Apply.

4.  You may be presented with an error dialog, "Registry Editor could not set owner on the key currently selected, or some of its subkeys."  You can safely ignore this warning as long as you are then able to view the subkey.  If not :(, you may have to follow the same process but in safe mode or download Process Explorer and search for any process that is holding onto the key so that you can shut it down.  (The idea that a process is preventing you from viewing the key is a stretch in my mind but I have had heard the Platform team of Microsoft's product support group suggest this.)

5.  Lastly, select the "Effective Permissions" tab and verify that both your own User Id and the System user have Full Control.  If not, add both users via the Permissions tab.

If this still fails, consider resetting registry permissions back to the default settings using the following command:

    Registry security: secedit /configure /cfg %windir%\inf\defltbase.inf /db defltbase.sdb /verbose /areas REGKEYS

Error: SQL Server setup has encountered the following error. sku

Manually uninstall SQL Server 2008 installation and try installing again.

Error: Error 1316.A network error occurred while attempting to read file ssceruntime-enu.msi.

Connect mentions this error.  I followed a similar procedure.

  1. Extract the ISO file or copy the SQL Server CD onto the local drive. 
  2. Copy the .\<platform>\Setup\SSCERuntime.msi file to SSCERuntime-enu.msi within the same directory.  This seemed appears to work around the error.  I haven't tested this exhaustively, but I suspect this is a 64-bit problem only so the <platform> directory is most likely x64. (Please comment and let me know if you see this on other platforms.)

Error: Error result: -2068578301

Manually uninstall SQL Server 2008 installation and try installing again

Error: SQL Server installation failed. To continue, investigate the reason for the failure, correct the problem, uninstall SQL Server, and then rerun SQL Server Setup.

Sometimes, the error log points to a message indicating there was a network error.  During the occasions that I encountered this error message within the log, my installation failed with two red X icons in the concluding dialog, only one of which had a corresponding message (I wish I had taken a screen shot.)  The solution for me was to manually uninstall.

Error: Could not find the Database Engine startup handle.

This error appears after an installation completes unsuccessfully and a different error dialog appeared earlier in the installation.  Manually uninstall all the instance related installations items, address the previous dialog, and re-attempt the install.

Error (during repair): The SQL Server feature 'SQL_Engine_Core_Inst' is not in a supported state for repair, as it was never successfully configured. Only features from successful installations can be repaired. To continue, remove the specified SQL Server feature.

This error appears if you attempt a repair of a failed installation.  The work around it to manually uninstall the all items related to the instance, and re-attempt the install by addressing the original error.

Error: A MOF syntax error occurred.

Manually uninstall and then re-attempt the install.

Error: SQL Express 2008 ERROR: Failed to generate a user instance of SQL Server and
Error: Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance. The connection will be closed."

Okay, admittedly this error doesn't appear during install, but it is an install related error none the less.

Recently I upgraded my SQL Express 2005 instance (installed by Visual Studio 2008) to SQL Server Express 2008.  (Visual Studio 2008 Express editions will automatically be upgraded when installing Service Pack 1, but not so with all other instances.)  After upgrading, none of my data driven unit tests were successfully passing.  Instead, they were failing with the message:

The unit test adapter failed to connect to the data source or to read the data. For more information on troubleshooting this error, see "Troubleshooting Data-Driven Unit Tests" in the MSDN Library.
Error details: Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance. The connection will be closed."

It took some sleuthing to determine the solution.  Firstly, I checked the error files located in my %USERPROFILE%\Local Settings\Application Data\Microsoft\Microsoft SQL Server Data\SQLEXPRESS (the connecting user's SQL Express data directory) directory.  That indicated errors were in loading the modal.mdf and corresponding log file within afore mentioned directory.  However, when connecting to the SQL Express instance from SQL Server Management Studio, there were no such issues.  This was because the instances connected to by SQL Server Management Studio were in the %PROGRAMFILES%\Microsoft SQL Server directory. 

Generally, when a new MDF file is connected to by SQL Express, it copies the master, model, MSDB, and tempdb databases (mdf and log files) into the connecting user's SQL Express data directory.  (This is frequently why the first time connecting for each user takes longer.)  Such a copy was unnecessary in my case because the databases already existed.  Unfortunately, the databases were from the SQL Server Express 2005 instance, and not the upgraded database from SQL Server 2008 Express.

To correct the problem, I

  1. Shut down SQL Server Express
  2. Deleted the users SQL Express directory "%USERPROFILE%\Local Settings\Application Data\Microsoft\Microsoft SQL Server Data\SQLEXPRESS"
  3. Restarted SQL Server Express:

Here's a cmd script for what is needed:

SC.EXE stop "MSSQL$SQLEXPRESS"
CHOICE /C:N /D:N /N /T:5
RD /S /Q "%USERPROFILE%\Local Settings\Application Data\Microsoft\Microsoft SQL Server Data\SQLEXPRESS"
SC.EXE start "MSSQL$SQLEXPRESS"

More Errors:

Unfortunately, this is not anything even close to an exhaustive list of errors.  If you have other messages I have not covered, the key place to check is %Programfiles%\Microsoft sql server\100\Setup bootstrap\Log\<DateTime>.  To begin, open the Summary_<computername>_<DateTime>.txt file to see an overview of the results.  If that doesn't help, consider reviewing one of the Detail*.txt files.  These errors are all addressed in KB909967 - How to troubleshoot SQL Server 2008 Setup issues.

Another item that seemed to cause instability in my SQL Server 2008 installation was mounting the SQL Server 2008 iso file (especially mounting it over the network).  I recommend that you extract the ISO into a local directory and then installing from the local directory.

Overwhelmingly, the correction is to manually uninstall the attempted install instance.


Monday, December 08, 2008 8:56:10 PM (Pacific Standard Time, UTC-08:00)  #    Comments [24]  Computer Related | .Net

 Friday, December 05, 2008
MSDN Flash: Keyboard Visual Studio Tips & Tricks for Dec 15. 2008

Originally, I was going to focus on shortcuts for the various build/compilation options within Visual Studio 2008.  However, things become a little more complicated in terms of which keyboard shortcut to use because it depends on your keyboard mapping scheme.  In this edition, therefore, I am going to discuss the Keyboard Options dialog - where different keyboard schemes are available for selection. 

During the first launch of Visual Studio 2008, you are prompted with which keyboard scheme to use.  The typical options are (Default), Visual C# 2005, and Visual Basic 6. Fortunately, you can change your selection via the Tools->Customize... menu and the Keyboard... button on the ensuing dialog (Alt+T, Alt+C, Alt+K). The same dialog is available from Tools->Options... and the Keyboard node of the environment.

image

The first dropdown on the right hand side of the dialog is where you can change your keyboard mapping scheme.  (In this write-up, we will ignore the left hand tree of the dialog except to say the same dialog is used for the rest of Visual Studio's options as well.)  After selecting which scheme you want, push Reset (Alt+E) to have all the keyboard settings for the selected scheme mapped. 

Once you have the scheme you want, type within the Show commands containing text box.  Notice that the commands list automatically filters down to those which contain the value entered anywhere within the name.  In the screen shot above, "build" is used to filter the commands to those that have "build" in them.  There are numerous functions within Visual Studio that do not map to menu options and, therefore, there is no intuitive way to know of their existence except from the Keyboard Options or the Customize... options dialog.  The Show commands containing text box makes finding commands relatively easy, however. Consider, for example, determining the keyboard shortcut for deleting the current line.  In the Show commands containing text box, type "delete" or "line" and then browse through the available commands to discover that such a command exists (Edit.LineDelete) and that by default Ctrl+Shift+L will invoke it.

Within the list of commands, you can select one of the commands and view the shortcut it is mapped to, if any.  Build.BuildSelection is shown here to map to Shift+F6 (Global), where "Global" here means that this keystroke will work regardless of the context within Visual Studio (such as whether the Text Editor or Class Designer windows are active).  It is helpful to browse through the various commands and see what they are mapped to.  Furthermore, if you wish to map a new or different keystroke, you can type it in the Press shortcut keys text box.  What is helpful, is that if the key typed already has a mapping, the existing mapping will show up in the Shortcut currently used by text box, allowing visibility as to whether you want to change the mapping or perhaps select a different keyboard shortcut.

In summary, the Keyboard Options dialog is a great technique within Visual Studio for determining what commands are available, what commands are mapped to which keyboard shortcuts, and for mapping new keyboard shortcuts to the commands.


Friday, December 05, 2008 1:44:03 PM (Pacific Standard Time, UTC-08:00)  #    Comments [0]  Computer Related | .Net

 Monday, November 17, 2008
MSDN Flash: Keyboard Visual Studio Tips & Tricks for Nov 17. 2007

Frequently, while browsing code, we want to drill down into a method to see the implementation and then jump back out again to continue browsing code at the caller. One invaluable keystroke for doing this is F12. Placing your cursor on any identifier, you can use F12 to drill into its declaration. This works both for types as well as their members. In fact, you can use the same keystroke to jump to the definition of types in the .NET Framework. This is a great way to browse through the type's members to see header information, including the documentation of the parameters. To jump back, you can use Ctrl+-. In this way you can navigate back and forth through your code.

image 

 image

image

 image

image 

As quoted from a post by me on MSDN Flash, Nov 17, 2007.


Monday, November 17, 2008 6:49:32 PM (Pacific Standard Time, UTC-08:00)  #    Comments [0]  Computer Related | .Net

 Monday, November 03, 2008
Dynamically Typed Objects with C# 4.0

One of the announcements that emerged from the PDC is C# 4.0's support for dynamically typed objects.  These are objects whose type is not determined until runtime.  Variables that point to such types are declared with a new contextual keyword, dynamic.  Support was added so that API calls into dynamically type languages (such as scripting languages) could be supported.  Another example where dynamically typed object support is useful is calling into IDispatch objects (something supported by VB but not C# until now).

In order to investigate how dynamic objects worked I decided to create a working sample that dynamically went against an XML element. Working with Michael Stokesbary, I was able to put together the following sample:

Consider the following XElement:

XElement element = XElement.Parse(
    @"<Person>
             <FirstName>Inigo</FirstName>
             <LastName>Montoya</LastName>
        </Person>");

From here we can assign it to a dynamic variable and read out the data as follows:

dynamic personXml = new DynamicXml(element); 
Console.WriteLine("Hello, my name is {0} {1}", personXml.FirstName, personXml.LastName);

and

personXml.FirstName = "Bob";

As this code shows, with a dynamic type over XML, you can use XML element names as the property names to retrieve data from the XML element.

To implement the DynamicXML type, all you need to do is define an type that implements System.Scripting.Actions.IDynamicObject with its one MetaObject GetMetaObject(Expression parameter) method.  The easier way to do this is to derive from Dynamic, a class that is currently available in the Iron Python implementation.  (In the future, we should expect that Microsoft will provide such a class in the framework but no specific plans on this have been announced.)  Once deriving from Dynamic, the only remaining task is to override the object GetMember(GetMemberAction action) and void SetMember(SetMemberAction action, object value) members.  Rudimentary implementations are shown below:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Scripting.Actions;
using System.Xml.Linq;
using System.Xml.XPath;
public class DynamicXml : Dynamic
{
    private XElement Element { get; set; } 

    public DynamicXml(System.Xml.Linq.XElement element)
    {
        Element = element;
    } 

    public override object GetMember(GetMemberAction action)
    {
        object result = null;
        XElement firstDescendant = Element.Descendants(action.Name).FirstOrDefault();
        if (firstDescendant != null)
        {
            if (firstDescendant.Descendants().Count() > 0)
            {
                result = new DynamicXml(firstDescendant);
            }
            else
            {
                result = firstDescendant.Value;
            }
        }
        return result;
    } 

    public override void SetMember(SetMemberAction action, object value)
    {
        XElement firstDescendant = Element.Descendants(action.Name).FirstOrDefault();
        if (firstDescendant != null)
        {
            if(value.GetType() == typeof(XElement))
            {
                firstDescendant.ReplaceWith(value);
            }
            else
            {
                firstDescendant.Value = value.ToString();
            }
        }
        else
        {
            throw new ArgumentException(string.Format("Element name, '{0}', does not exist.", action.Name));
        }
    }
}

That's it... that's all that is needed to understand how to implement a dynamic object.

Caveats:

  • Multiple elements with the same name are not supported in this implementation.  To do so we wanted to use the index operator with the dynamic type but this is not supported in the PDC 2008 CTP bits - it will be.
  • This example does not work with attributes.  What would the syntax be if it did?  One cool idea of Mike's was to use the verbatim identifier as in personXml.@FirstName. - the XPath like way to retrieve attributes. Unfortunately, this wouldn't work work since the @ sign is removed at compile time so the IDynamicObject.GetMember() call receives FirstName for the action Name.
  • There is no support for reading the root element name.  The example assumes you only navigate into the children (to avoid infinite recursion) when navigating.

In the process of writing this dynamic XML implementation, I found a few idiosyncrasies in the current dynamic type support found in the PDC 2008 CTP:

  • There is no type checking for dynamic arguments.  Consider the sample code below:
         string text1 = "Text";
         dynamic text2 = text1;
         Assert.AreEqual<string>(text1, text2);

Not only does the code sample compile (by design), but it throws an exception of type ArgumentNullException (not by design - Mads agree's this probably isn't correct).


Monday, November 03, 2008 11:14:16 PM (Pacific Standard Time, UTC-08:00)  #    Comments [8]  Computer Related | .Net | Headlines

 Tuesday, October 28, 2008
My Favorite Windows 7 Features

I am a pretty tough critique when it comes to Microsoft Software announcements (perhaps because in many cases I hear about what is happening before it goes public).  However, there are some cool Windows 7 features that I am very excited about:

  • Multi-monitor Support including screen orientation, accelerator keys for projection to multiple monitors (mirror/dual), multi-monitor projection support, and multi-monitor support for remote desktop (Wahoo!)
  • Mounting VHDs as a drive or (more amazing) booting from a VHD - Impressive!

1 Disappointment:  Support for mounting ISOs?


Tuesday, October 28, 2008 8:48:34 AM (Pacific Standard Time, UTC-08:00)  #    Comments [1]  

 Sunday, October 12, 2008
Running Spokane Half Marathon

This morning I did the Spokane Half Marathon - a fairly hilly course especially with Bloomsday (doomsday) hill at mile 9.  This is my second time doing it but I was a long ways from my 7 min/mile goal with a time of 1:34:44.  I thought last year I did it faster but it turns out I was mistaken (last year my time was 1:35:28).

Summary:

Total Time: 1:34:44
Average Mile: 7:11
Placed overall: 43
35-39 Age Group: 7

The temperature started cold (I recall 24 on a bill board as we drove into town) but it warmed up by race time.  Immediately before the race I decided to abandon all my layers and strip down to just shorts and a non-cotton T-Shirt.  Good Choice!  For me, this was perfect attire for the race - I was never hot or cold.

Over all, I had a really tough race.  By the time I reached the bottom of Bloomsday Hill I had enough and was ready to start walking.  By the top, I was wondering why I participated in such a crazy painful sport in the first place.  Then I remembered what I learned in high-school, "It is like poking yourself in the eye.  It feels good to stop."  The rest of the race was slow going.  However, my Garmin 405 was showed me significantly slower than I was.  Next time I need to have it set for lap time, total time, and total distance.  Not having the total time made it difficult to know where I was overall in regards to my goal.

Lap times varied by as much as 1.5 minutes.

Lap Time
1 0:06:52
2 0:06:45
3 0:06:38
4 0:07:04
5 0:06:38
6 0:07:16
7 0:07:37
8 0:07:05
9 0:08:06
10 0:07:54
11 0:07:43
12 0:08:14
13 0:06:53

I haven't run since my last race and I suspect this really made a difference.  My last hard training week was the week of Sept. 15.

Well... I think that is it for races until Jan 1 and the Coeur d'Alene Hangover Handicap.  I will take much of next week off (from running) and then pick up with a 3 day a week run schedule (one of which is over 10 miles).


Sunday, October 12, 2008 9:39:10 PM (Pacific Standard Time, UTC-08:00)  #    Comments [0]  Personal | My Sports

 Tuesday, September 30, 2008
"Are We There Yet?s" 2008 Adventure Race Has Plenty of Room For Improvement

Summary:

Most years, team "Are We There Yet?" attempts a 36 hour adventure race.  This year we did the Berryman Adventure in Van Buren, MO.  Team members were: 

image

Andrew Michaelis - Austin, TX; George Koburov - Woodridge, IL; Karen Seacor - Cleveland; OH, Mark Michaelis - Spokane Valley, WA

Final status for team Are We There Yet: Withdrawn  (we only did a single checkpoint on the bike course.)

Disciplines:

Trail Running: 20 miles
River Canoeing: 31 miles
Mountain Biking: 61 miles (which we didn't do)

More Photos

The Good, The Bad, And the Ugly

Given the distances from the race, we all had significant travel times.  Karen had 12 hours (8 on Friday) and I started out on a red eye at 12:40 AM on Friday morning.  The result is that all of us to some extent started the race with sleep deprivation (Lame Excuse #1).  One way George and I coped was to use Benadryl so as to increase the chance of sleeping on the way to the race.  Having never done this, I can say I was glad I did as I think it helped me get some good rest in.  George picked Andy and I up from the St. Louis airport, we picked up a bike for Mark at the Alpine Shop, and headed down for the race, George and Andy taking turns driving and sleeping.

During the drive down, I searched for GPS tracking software so that we could record where we went (in contrast to the actual check point location).  GPSes are not legal but I have one built into my phone (required gear in this case), so I figured I had one anyway, I just couldn't (and didn't) use it.  The program that seemed to be all I needed and at the right cost was Luis Espinosa's TrackMe.  Unfortunately, batteries and other technical details caused this not to work for us in this race, but conceptually, this seems like it would be a great way to track where we actually went.

We all arrived at the race site, Big Springs - MO, at around 3 PM.  This gave us plenty of time to unpack and setup before the pre-race spaghetti dinner at 5:15 PM.  We unpacked, set up a screened-in canopy, completed gear checks and verified bikes were in working order.  After dinner we had so little to do we napped for a few min before heading out to the race meeting, a short drive to the landing.

Besides the raffling off of several very nice prizes, Garmin GPSes, Kayak, Soloman trail shoes, etc., the race meeting was short and sweet.  We learned that we would be traveling North by bus to race start.  The race would begin with 9-15 hours of trail running followed by 6-8 hours of canoeing.  We were sure to get wet and there would be a gear check along the way.  That was pretty much it.

We headed back to the race headquarters/transition area to take care of any last minute details and then we even attempted a brief (30 min) nap before race start pictures and boarding the bus.  We were the first ones on the bus, but five minutes before driving off, we realized bike gloves would be handy for the paddling so Andy and George dashed off to grab some (during the paddle I was glad he did).  We left at about 10 PM and arrived at race start, Two Rivers (along the Current River), at about 11:15 PM.  We made our best attempt to nap on the way up but none of us really did.

800IS_2471

The race began with one team member from each team (Andy in our case) running a quick quarter mile up the road to grab a clue sheet with coordinates.  It was around this time that we learned the race would begin with a four to five foot river crossing in what was brisk and chilly water.  Nice!  The rest of us picked up our maps and tried to orient ourselves to the area as best we could.  Andy returned quickly and we began plotting the coordinates.  George led the effort.  The maps were slightly confusing because one side had longitude lines that were slightly off (from the rest of the map) but this only mattered for the Check Points #1&#2, so we were able to stumble through. 

image

After plotting we ran down to the boat launch and undressed down to our race underwear for the river crossing.  I wasn't particularly excited to begin the race this way but the worst of the crossing was sore feet as we walked on the rocks.  We linked arms so that we didn't lose anyone and carried our bags above our heads.  Overall, it was a fun start and quickly got us into the right attitude for an adventure race.  Dressing on the other side we checked our time and began a slow trail jog.  A couple times we looked at the possibility of a turn off but it was too soon.  While plotting, we had decided to take the first trail and then cut up to Check Point #2, but once on the course, we missed the first turn off so we went up the second - purposely over shooting it so that we could cut back via the more gradual nose of the hill.  On the way up we came across an old Jeep trail that led us straight to the check point.  We followed the same trail down but, once we hit the dirt road, stayed on that to Check Point #3, rather than taking a short cut and bush whacking across.  As we learned at the end of the race, this was not the most efficient, taking the shortest route even with bush whacking is generally the most efficient in this area.  (Not our experience in races elsewhere).

image image Check Point #4 was baffling.  There was a trail most of the way there until we had to cut across into the brush along a flat ridge but we missed the cut across entirely.  In fact, we thought  we were on it but determined later, that we had overshot it entirely and instead we were on a trail further on.  This baffled us several times but after several false attempts to relocate, we eventually found a trail which led us all the way around.  In the end we had made a full circle along the trails bordering Check Point #4.  Once we relocated ourselves, we made an attempt to cut across, up a creek to find Check Point #4.  We took a bearing and headed up but ended up wandering around aimlessly for 2 hours before drifting back down to a known point.  At this point we gave up and decided to proceed on to the next check point.  In hindsight, don't (rarely) skip a checkpoint you are near in favor of one you don't know anything about.  The one you are at and know something about, is likely to be easier than any later on ones you haven't spent any time on and know nothing about.

Check Point #5 was our first significant error.  We headed out to it along a trail.  After removing our shoes and crossing a river and a brisk hike, things didn't quite seem right.  We re-plotted the check point and discovered we had misplaced it by more than 10 km.  Yikes!  We headed back and began searching the hillside for our newly located Check Point #5.  On the map it was clearly along a reentrant, geographically a small valley frequently with water funneling into it, possibly starting in a marshy area at the top.  (By definition, reentrant is a series of angles pointing inwards.)  We split up along the hillside, frequently unable to hear a brisk yell from one person to another.  This made it difficult to regroup and strategically attack again.  We should always remain within clear ear shot, if not closer.  Finally we congregated back at the river and replenished our water supplies (purifying with iodine).  We again attacked the check point, this time following a compass bearing or trying to follow the reentrant more closely.  Again, we came up empty.  Arghhh!!!  Another two hours were lost and again, we didn't find the endpoint.  We quit our search for a second time and headed up and over in search of Check Point #6. 

imageCheck Point #6 was interesting because it required us to switch from our 1 to 24,000 topographical map to a print out of a Ozark Trail topographical map.  Unfortunately, we never reconciled the two maps and lazily tried to just come across the trail.  The result was that we ended up on a dirt trail at the bottom of a hill with little to no idea where we were.  We wandered along the road meeting 4 other two person teams - one of which had been searching for Check Point #6 for three hours without any luck.  We commiserated and even attempted a phone call but there was no coverage.  We also considered the idea using a iPone GPS but we didn't know how to translate the coordinates to UTM coordinates.  As a group, we decided to march back along the road and, if failure continued, to skip the Ozark Trail and instead follow the river.  As a team we stayed behind a little longer, reexamining the map.  However, we still had no idea where we were so we eventually decided on a similar tactic.  Fortunately, one of the two person teams did see the trail logo (on left), obviously an O.T. once you pay attention.  Anyway, several yards in was the orienteering flag and we were back on the map. 

Check Point #7 was easy to find.  We just followed the Ozark Trail which was clearly marked all the way.  We briskly walked up the initial part, following behind the other two point teams.  At the summit, they took a break  800IS_2477and we continued, now in a slow jog for most of the remainder of the trail.  It was beautiful, the altitude changes relatively minor, and overall, we were in good spirits.  Glad to again know our location and motivated to move faster by the teams behind us.  After stamping at Check Point #7 we walked past on along the trail, planning to check our next steps away from the check point.  This was silly as it turned out we headed in the wrong direction.  Check Point #7 wasn't along the trail but rather, across the stream and up to the top of the hill. By this time, George, who didn't have long pants, was pretty cut up from all the bush whacking.

Mark led the navigation along a bearing.  Rather than leap-frogging each other to keep the bearing, he used the trees to find the next point.  This proved to be fairly accurate but when we reached the top portion of the hill, the brush became extremely dense and we had to begin leap-frogging again.  However, the bearing took us away from the ridge and we eventually abandoned it in favor of following the contour lines.  Andy found the first summit and then we moved from one high point to the next, following along where the check point led us.  Soon after the first high point, we encountered a clearing and a trail and we were able to follow this.  We briefly miscounted how many high points we had encountered but after a short while we were back on track and came across the orienteering flag right on the trail.

800IS_2476

Next we followed the trail to Check Point #8.  We used time to estimate distance and this proved to be accurate for Check Point #9 as well.  It was somewhat surprising how far #9 was off the trail and we all wondered how hard it would have been to find the check point in the dark. 

Check Point #10 was reasonably straightforward.  However, we did run briefly off track by assuming it was along a road that it wasn't.  Mark identified there was an issue and we headed up the nose of the next hill to find the next checkpoint.  Check Point #10 was accessible via road but this meant a considerable detour so the direct route was selected.  This proved to be fairly easy.  In fact, George located an old logging trail which he was able to traverse fairly quickly.

imageimageimageimage 

Check Point #11 looked challenging.  We headed down along the road and reached the bottom of the hill.  The hill looked to be very dense and there was no trail.  We decided to locate an intersection and then take a bearing from there.  Once at the intersection, we were feeling a little discouraged and decided to take a 5 minute nap.  This was energizing and appreciated even though it was short.  We fell asleep without issue (besides brief naps, we had all been up for 30 or so hours by this time).  We discussed whether to skip Check Points #11 and #12 and eventually decided to simply head for Powder Mill and the canoes.  Although there were misgivings about giving up on the last two check points but, since we had already skipped 2, it wasn't nearly as big a deal.  Instead, we were surprised at how far away the canoe launch seemed.

At the canoe launch, Check Point #13, we were amazed to learn that two teams had been able to navigate all the trail check points in six hours while it had taken us fifteen and we had skipped four.  Wow!!!  How on earth had they done that.  It is unfathomable to us.  Truly remarkable!

    800IS_2497 800IS_2496 imageimage

We didn't dilly-dally at the transition area, sticking to refreshing our water supply, grabbing our transition bags, and heading to the water.  The water felt great on our tired feet.  Andy and Karen took one canoe while George and I took the other.  Andy and Mark were in the rear (steering).  It didn't take long to get into the rhythm of paddling and the river was incredibly beautiful.  If it wasn't for the pressure of the race, this would make for a leisurely trip along a gorgeous part of Missouri.  We saw fish eagles, blue herons, and pied king fishers along with Andrew's favorite, a snake.  There were frequent camp grounds and boat landings along the way and we frequently checked with the locals on distance to the next point on the map.  Just prior to dusk we came across some tough rapids and saw another team on the shore.  Mark and George were already past them as they entered the toughest waters so far.  Karen and Andy took the other side of the island and ended up landing so that they could pick up the other team.  The other team had capsized and their canoe was pinned.  They were soaked through and less than happy to say the least.  A ranger showed up within the half hour and took the additional crew back on a motor boat.  (He didn't think it would be quite fair to tow us although we did ask. :)

We got to Waymeyer (Check Point #14) just as it was getting dark.  There we did a gear check, potty break, and put on additional clothing.  Once we started out again, things were significantly more difficult.  There was fog coming off the water and our light reflected off the haze making it very difficult to see the water.  We could hear the rapids, but couldn't see obstacles until we were on them almost.  Wow.... it was some tense canoeing (but exciting/fun).  At the time we thought it was dangerous and questioned the fact that we were not pulled out of the race.  However, after a discussion with the race director, we agreed with his choice to leave it to us.  Really, the worst that could happen was capsizing and getting wet - it wasn't really life threatening.  At one point Andy and Karen hit a strainer but their experience avoided any incident.  As they discussed a little later, leaning into the obstacle (rather than away from it as instinct would lead you) is key.  This way, you are tipping the bottom of the boat up river so the water doesn't flow over the side.  About a mile from the end George and Mark hit a rapid which threw them to the outside of the river and into a strainer.  Yikes... They hit the tree at virtually full throttle; Mark backpaddled one way while George furiously fought to untangle himself from his flashlight so that he could paddle on the other.  Fortunately, they hit a pivot point at the right angle and it simply swung the boat around rather than tipped them over.  It was intense for a few short moments and Mark was clobbered on the head by a branch hitting his paddle.  However, this was the worst of it and for this we were all grateful.

Back at race headquarters and our transition area, we replenished our supplies, changed our clothes and put on warmer clothing (we were cold) and checked the bikes were ready to go.  We also took a 30 minute nap - this really helped replenish us - although perhaps not our minds.  After our nap we plotted out one or two of the bike check points and headed out.  We followed the map and were able to make it fit the terrain perfectly.  The clue was that the check point was next to a barn but we couldn't find the barn.  Strange?  We proceeded to check every building we could find in the two mile stretch of road as though every building was a barn.  We went up and down the road for more than two hours trying to find a the check point but it was nowhere to be found.  Did it get taken down?  Why couldn't we see it?  Was our distance measurement off?  What gives?  Confused and frustrated, we headed back to the camp, sneaking in the back way, humiliated at our defeat.  No less than 10 minutes later, it occurred to us that perhaps we had gone the wrong way.  We checked our compass (what a novel idea), and sure enough, we had headed out South instead of North?  Wow!  How could we have navigated the last 24 hours straight and now, when the check point was along the road, we just assumed and didn't even check the compass once before heading out.  Mental exhaustion?  Not sure..  Lame?  Undoubtedly!  We headed off in the right direction and found Check Point #15 within less than 10 minutes.  From there we simply headed back to camp tired and dejected.  I think biking, especially fun, challenging single track (at night even) is our favorite event and we didn't do any. :(

It is interesting how our minds are able to bend the truth to fit with what we want rather than the way things are.  For us, everything was a barn, the valleys all fitted with the map perfectly, and trails all lined up with what we wanted.  In reality, we were not even close to where we needed to be.  Interesting... how often in life do we do similar things?  We project our feelings on to others or try to change truth to what we want rather than change our minds to conform to Truth.  How often do we say, do, believe what we want rather than allow the Truth to dictate reality for us.

image

At this point, we were beaten mentally, physically and emotionally.  We affirmed what we had already expected when we plotted only a few bike check points, we were done.  We headed back to camp, crawled into sleeping bags, and crashed.  In the back of our minds we were grateful especially since this meant we would sleep before driving the 3 hours back to St Louis on no sleep -  a ludicrous idea that was likely to kill us.  Next year, we make sure a plan is in place to have a designated non-racer driver, or a good several hours (night) sleep before driving.

Before leaving the race site, we sat down with Jason Elsenraat for a lesson in navigation.  It was very helpful.  Here is a list of pointers:

  • Use a map wheel to mark out the mileage on the intended path
  • Use a 3mm roller ball to mark check points rather than the Sharpe which frequently hid contour lines.
  • Use a hi-lighter to mark dotted lines of the intended path between check points
  • Draw arrows using a hi-lighter across the map indicating North (otherwise you have to unfold the map to check)
  • Use contour lines to get into the general location, rather than rigid following of the compass for long distances.
  • When one set of contour lines are not distinct, move to a different one for navigation close to the target and then compass navigate from that point.
  • Feel free to take short cuts rather than a long way round just to stay on the trail.  (Interestingly, our experience from other races was the opposite - take the trail rather than bush whack the unknown)
  • Use the altimeter for judging distances - especially from a peak of valley
  • Have a designated time keeper other than the navigator (Similarly for the altimeter says Mark)
  • Place markings on the compass for distance (both 1 in 24000 and 1 in 25000)
  • Carry a pipe cleaner to measure distances on the route (or use string on compass)
  • Two AR roamers: Basic Roamer AR and Adventure Racing Corner Rulers (The Ozark Extreme site has list as does maptools.com.)  Online there is also a slot style tool which looks the best because you can write along the border of the scale - a significant problem with the other two roamers which you have to lift up in order to plot a point.
  • *Use contact paper to waterproof your map
  • *Write the clues on the map near the check point, rather than depending on a separate piece of paper.

*Team Are We There Yet's idea

On the drive back Andy and George again switched drivers.  After a brief nap, Andy took over from George in order to speed things up in hopes of catching an early flight rather than waiting until Monday morning - especially since everyone else was leaving.  He succeeded.  I spent the bulk of the trip examining various GPS tracking logs and discovered that none of them really worked so we had virtually no tracking record of the race - disappointing, but there is always next year.

 Shout Outs from CheckPoint Tracker - Thanks for all the cheering everyone!


Tuesday, September 30, 2008 12:36:57 PM (Pacific Standard Time, UTC-08:00)  #    Comments [1]  Personal | My Sports

 Tuesday, September 16, 2008
Downloading Team Explorer 2005/2008

While at Microsoft today, I was talking with a fellow developer who was complaining that they couldn't download Team Explorer 2005 from MSDN, even as a VSTS subscriber.  They wanted v2005 because, although they had Team Foundation Server (TFS) 2008, they were still using Visual Studio 2005.

As it turns out, this isn't this isn't quite true.  If you download Team Foundation Server 2005 (either Trial or Workgroup editions), there is a TFC directory on the ISO file for the Team Explorer install.  However, there is a better solution and it doesn't even require logging on to MSDN.  It turns out that to connect to codeplex you also have the option of using Team Explorer.  Since developers won't necessarily have MSDN subscriptions, codeplex links to downloads of img/iso files for Team Explorer:

  • Team Explorer 2008 (387 MB iso file)
  • Team Explorer 2005 (246 MB .img file)

    By the way, in VSTS 2008, Microsoft includes Team Explorer on the VSTS media.  It is located in the Team Foundation Client directory, TFS\.

  • UPDATED 2008-09-30

    Brian Keller emailed me today to let me know that Microsoft has added a details page for Visual Studio Team System 2005 Team Explorer, making the download easier to find.


    Tuesday, September 16, 2008 8:25:04 PM (Pacific Standard Time, UTC-08:00)  #    Comments [0]  Computer Related | Miscellaneous

     Thursday, September 11, 2008
    Turning Off IE Enhanced Security from the Command Line

    For the most part I have much of the install for Windows 2008 operating system and programs automated (unattended).  However, one thing that I found a little more difficult to find was a command line way to turn off IE's Enhanced Security (manually turned off from Server Manager -> Configure IE ESC.

    I found an unattended method and created a batch file:

    :: Backup registry keys
    REG EXPORT "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components\{A509B1A7-37EF-4b3f-8CFC-4F3A74704073}" "%TEMP%.HKEY_LOCAL_MACHINE.SOFTWARE.Microsoft.Active Setup.Installed Components.A509B1A7-37EF-4b3f-8CFC-4F3A74704073.reg"
    REG EXPORT "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components\{A509B1A7-37EF-4b3f-8CFC-4F3A74704073}" "%TEMP%.HKEY_LOCAL_MACHINE.SOFTWARE.Microsoft.Active Setup.Installed Components.A509B1A8-37EF-4b3f-8CFC-4F3A74704073.reg"

    REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components\{A509B1A7-37EF-4b3f-8CFC-4F3A74704073}" /v "IsInstalled" /t REG_DWORD /d 0 /f
    REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components\{A509B1A8-37EF-4b3f-8CFC-4F3A74704073}" /v "IsInstalled" /t REG_DWORD /d 0 /f

    Rundll32 iesetup.dll, IEHardenLMSettings
    Rundll32 iesetup.dll, IEHardenUser
    Rundll32 iesetup.dll, IEHardenAdmin

    REG DELETE "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components\{A509B1A7-37EF-4b3f-8CFC-4F3A74704073}" /f /va
    REG DELETE "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components\{A509B1A8-37EF-4b3f-8CFC-4F3A74704073}" /f /va

    :: Optional to remove warning on first IE Run and set home page to blank.
    REG DELETE "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main" /v "First Home Page" /f
    REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main" /v "Default_Page_URL" /t REG_SZ /d "about:blank" /f
    REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main" /v "Start Page" /t REG_SZ /d "about:blank" /f

    This seems to work well for Windows 2008.  I haven't tried it on other operating systems.


    Thursday, September 11, 2008 8:55:54 PM (Pacific Standard Time, UTC-08:00)  #    Comments [2]  Computer Related | Miscellaneous | Headlines