Scott Hanselman

I am SO sick of PC Gaming - I HATE IT

June 28, '04 Comments [25] Posted in Gaming
Sponsored By

I'm so frustrated.  I've got a P4-3gig, 1 gig of Dual Channel RAM, with a very nice 128 meg NVidia FX 5200 card that I bought LAST YEAR for $150, and my new 1600x1200 Dell LCD Monitor and I can't get a freaking PC game to work worth a damn on my machine.

Case in point:

I picked up a Saitek P880 Dual Analog Joystick and figured I download the latest round of game demos to see what's hot.  I got FarCry, Rainbow Six, Thief 3, and Return to Castle Wolfenstein.

The Results:

  • Far Cry: Unacceptable performance even at 800x600.  I could BARELY pull 20 frames per second (fps).  Additionally, as I didn't feel like being an "inverted-T: ASDW" keyboard and mouse first-person gamer (God Forbid) I tried to use the Saitek.  I messed with it's remapping software for an hour, because apparently while DirectX 2199 understands that dual analog sticks exist, most games don't care. 
    Result: Disappointment and 3 hours wasted.
  • Rainbow: Totally unusable at anything other than 640x480 and even then, iffy.  Again, messed with the joystick.
  • Thief3: Gorgeous game, as along as I didn't try to move.  Got about 10 fps at 1024x758, and it was WAY to blocky to play at 640x480 on such a big LCD.  All these tests are with Anti-aliasing turned off.
  • Return to Castle Wolfenstein: The ONLY game with GOOD Video performance at 1024x768, which I think is the minimum comfortable resolution for FPS gaming.

Seems to me that the only games that are useful or even playable on the average machine are Real Time Strategy games like Rise of Nations or not-very-graphics-intensive games like Dungeon Siege. 

What I'm confused about is why a game like Castle Wolfenstein performs so nicely, but Thief can barely move at the SAME RESOLUTION?  Perhaps my video card (and most) are so tied to whatever version of DirectX is in vogue at the time, that my little DirectX 8 Video Card is a pariah in the world of DirectX 9.

What's frustrating about all this is that I'm actually considering getting one of these new fangled NVidia G-Force Ultra 6800's, just so I can get ahead of the game and stop worrying if my sad little 3Ghz system can run Pole Position.

And the irony of all this?  My XBox works fine.  Picked up a steering wheel controller for $25 at Fry's and have been happily driving the hills of Scotland, multiplayer with a guy in Scotland without trouble.  No install, no key remapping, just play the game.  Hm.  The PC may have 1600x1200 DOOM 3 for only $4000US and a Water Cooler, but my $149 XBox plays fine. 

Someone tell me why PC gaming matters?

Addendum: Looks like my current video card IS crap:

CardArchitectureClock SpeedMemory SpeedMemory SizeMemory BandwidthRAM-DAC Fill Rate Pixels/s
Geforce FX 5200256-bit250Mhz 400Mhz (DDR)128Mb6.4Gb/sDual 400Mhz1 Billion
Geforce 6800 Ultra 256-bit400Mhz 1.1Ghz (DDR)  256/512 Mb35.2Gb/sDual 400Mhz6.4 Billion

Well, maybe the 6800 card will be enough for Longhorn.  Wonder if I should get it and water cool my system while I'm in there?

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Another VS.NET Add-in enters the Fray...."Solvent" for Solution Explorer

June 26, '04 Comments [6] Posted in Programming
Sponsored By

Very cool, Travis has created a Solution Explorer-specific Visual Studio.NET Add-In to make the Solution Explorer "suck less."

Let's hope the innovation keeps coming.

I'm digging Command Prompt Here from within Solution Explorer as well as the ability to Recursively Open all Folders (Though, I've gotten pretty good doing it myself with two fingers and cursor keys, over and over again. :) )

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

How to load HTML into mshtml.HTMLDocumentClass with UCOMIPersistFile and my ignorance

June 25, '04 Comments [6] Posted in PowerShell
Sponsored By

What a weird one.  I'm looking at the source for NDoc.Document.HtmlHelp2.Compiler.HtmlHelpFile.  It uses the Microsoft.mshtml interop Assembly to load an HTML file into the HTMLDocumentClass for easy parsing.

It's code looks like this (DOESN'T WORK):

private HTMLDocumentClass GetHtmlDocument( FileInfo f )
{
  HTMLDocumentClass doc = null;
  try
  {
    doc = new HTMLDocumentClass();
    UCOMIPersistFile persistFile = (UCOMIPersistFile)doc;
    persistFile.Load( f.FullName, 0 );
    int start = Environment.TickCount;
    while( doc.body == null ) 
    {
      if ( Environment.TickCount - start > 10000 )
      {
        throw new Exception( string.Format( "The document {0} timed out while loading", f.Name ) );
      }
    }
  }
}

I went searching as it was taking up 100% CPU for an hour and never completed.  Now I know why! :)

What's weird is this, the only way I could get it to work (as IPersistFile is loading on another Thread) was with this change (NOW IT WORKS):

private HTMLDocumentClass GetHtmlDocument( FileInfo f )
{
  HTMLDocumentClass doc = null;
  try
  {
    doc = new HTMLDocumentClass();
    UCOMIPersistFile persistFile = (UCOMIPersistFile)doc;
    persistFile.Load( f.FullName, 0 );
    int start = Environment.TickCount;
    while( doc.readyState != "complete" )
  

     
System.Windows.Forms.Application.DoEvents();
      if ( Environment.TickCount - start > 10000 )
      {
        throw new Exception( string.Format( "The document {0} timed out while loading", f.Name ) );
      }
    }
  }
}

When I Reflector into DoEvents() I can see that it's doing more than a Sleep(0) (yield), it's actually running the message pump.  Am I missing something?  Apparently IPersistFile needs the message pump?  Well, it works, but it's gross.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Effective XML Document with C#, NDoc, Lutz's Documentor and the Microsoft HTML Help Workshop

June 25, '04 Comments [10] Posted in ASP.NET | Web Services | XML | Tools
Sponsored By

A lot has been said on this topic, but here's some stuff you might not know.

We use NDoc to document our API.  NDoc consumes the XML Documentation files created as a build artifact by the C# compiler. 

Most links online that talk about XML Documentation in stop at <summary> and the standard <param> stuff.  Method documentation is interesting, but the real meat happens at the top of your Class declarations.  That's where most of the prose is in MSDN documentation.  Take a look at the Remarks section of the Socket Class in the MSDN Help for example

To achieve such a rich structure, organize your XML help thusly on the top of each class declaration:

  • <Summary>
  • <Remarks>
    • <Note>(s)
  • <Example>(s)
    • <Code>
  • <SeeAlso>(s)

The XML Comment snippet below, along with NDoc produced the lovely MSDN-style documentation in the picture at right.

The <summary> tag explains the “point” of the class. A sentence or two is fine here.

/// <summary>
/// Encapsulates Thingie and a Connection to Thingie in a Service wrapper.
/// Other Services will be built with this building block.
/// </summary>

The <remarks> tag is where the real prose goes. Use this tag to describe the general use of the class, as well as any notes, gotchas, or significant design or architectural issues.

Note the use of <para> to separate paragraphs. Use <see> to refer to namespaces, classes or methods. If you don’t include the fully qualified namespace, the documenter will assume the current namespace.

/// <remarks>
/// <para>The ThingieService class contains a <see cref="IConnector"/>
/// that is pulled from the named element in the config/ThingieClient.config file. The config file
/// is loaded by <see cref="I"/>.</para>
/// <para>Note that the constructor is private, as your application gets a ThingieService by calling the static <see cref="GetThingieService"/> method.
/// From there, the ThingieService hides the <see cref="IConnector"/> and
/// is the primary interface to Thingie. The ThingieService shouldn't be used directly from an ASP.NET
/// page. Instead, it should be used from either a generated or hand-written proxy.</para>
/// <note type="note">ASP.NET developers should use <see cref="Corillian.Thingie.Security.SiteSecureThing"/> to property register a <see cref="ThingiePrincipal"/> with the system to effectively use the ThingieService.</note>
/// <para>There are two ways to call the <see cref="Execute"/> method.</para>
/// <list type="bullet">
/// <item><term>Pass in an object that implements <see cref="IRequest"/>.
/// The Thingie SessionID and UserID will be retrieved from the <see cref="ThingiePrincipal"/> on the current Thread.</term></item>
/// <item><term>Pass in an object that implements <see cref="IRequest"/> along with the Thingie SessionID and UserID as additional parameters.
/// Use this method if your Thread doesn't already have a ThingiePrincipal. One will be made for you temporarily.</term></item>
/// </list>
/// </remarks>
/// <example>
/// <code>
/// public class BankingExample
/// {
/// protected ThingieService thingie = null;
///
/// public BankingExample()
/// {
/// thingie = ThingieService.GetThingieService("BankingServiceProxy");
/// }
///
/// public virtual SignonResponse Signon(SignonRequest req, string userId, string somethingElse )
/// {
/// string sessionid = thingie.SomethingImportantToTheSession(userId);
/// string r = thingie.Execute(req, sessionid, userId);
/// SignonResponse retVal = SignonResponse.FixUpSomething(r);
/// return retVal;
/// }
/// }
/// </code>
/// </example>
/// <seealso cref="IRequest"/>
/// <seealso cref="IConnector"/>
/// <seealso cref="IConfig"/>
/// <seealso cref="ILoggingService"/>

public class ThingieService....

I also like to use Lutz Roeder's .NET Documentor to write my XML Comments in.  It has a split-pane view and a nice right-click menu that let's me see what the documentation will look like AS I TYPE.

Considering that I'd need to recompile the Application AND generate the MSDN documentation, this little tool is a big time saver.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Code, and Ninjas you can see...

June 24, '04 Comments [6] Posted in Bugs
Sponsored By

Patrick Cauldwell and I had lunch today and were talking about how funny it is when someone looks at code for hours trying to find a bug (or stray semi-colon) and the parallel was made with the Ninjas that The Tick couldn't see.  They would hold sticks in to disguise themselves as shrubbery.  As soon as they did this, they were immediately invisible to The Tick.  As soon as they moved the sticks, well, you get the idea.

I wonder what makes folks not see the Code that's right in front of them?

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.