Scott Hanselman

.NET and Mono: The Libraries, the Framework and the Very Big Fish

June 10, '04 Comments [1] Posted in Learning .NET | DasBlog
Sponsored By

Via Gordon, I see that Tim Bray pointed to Jeff Dillon's points on cross platform .NET.  Jim Blizzard chimed in as well.

I like Gordon's brief and complete summary:

The point? If you care about cross platform .NET, there are details you need to pay attention to, and you really shouldn't do dumb things like use the registry. As for "the cost of not being able to do native system programming in pure Java" we already know that pure .NET is a myth, too. [The 80/20 Solution]

With due respect, I'm not getting a few of Jeff's views:

The Java API writers have always been very careful not to introduce an API which does not make sense on all platforms.  This makes Java extremely portable at the cost of not being able to do native system programming in pure Java. [Jeff Dillon]

Which sounds just like the Least Common Denominator point I've made before.  However, while the Java API writers may try to support the LCD, the Java Application Server vendors explicitly promote vendor lock-in by introducing APIS that are App Server specific.  As Jeff wisely points out, there is a cost.  I say it's too high for most.

Microsoft is very open about their goals - Vendor lock-in is a good thing.  Exploit the platform.  Jeff says:

With .NET, Microsoft went ahead and wrote all kinds of APIs for accessing the registry, accessing COM objects, changing NTFS file permissions, and other very windows specific tasks. In my mind, this immediately eliminates .NET or Mono from ever being a purely system independent platform. [Jeff Dillon]

No, it really just eliminates the possibility of using a COM API on another platform.  This will lead to the rise of ".NET Code - Pure Enough for Mono" , and that suits me just fine.

If Microsoft were to truly virtualize the machine, they would have marginalized their investment in the Windows platform. [Me]

I'm not trying to promote bad feelings.  I worked at Nike getting Java over RMI on Solarious to talk to DB2 on a Mainframe - I love all religions, remember:

Scott's Rule of Programming 0x303b: Don't Player-Hate, Integrate.

I'm just trying to remind folks that, by definition, write once, run anywhere, means writing to Least Common Denominator APIS (or introducing "if (!IsMacIE)" code - You may have seen that before on a Write Once technology called HTML/ECMAScript?)

The only difference is that Mono has seen fit to raise the level of the Least Common Denominator API to a reasonable level.  That, combined with common sense like there's no Registry on Linux means that apps like dasBlog can happily be ported to Mono.

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

Version Independent ProgIDs in the .NET Framework and C#

June 10, '04 Comments [0] Posted in Programming
Sponsored By

Generating a Version Independent ProgID in a C# Component that is being exposed as COM is apparently tantamount to Voodoo.  Nothing has been written about it either in Google Groups or in Google proper.  Sam Gentile in his wisdom confirmed to me that there is no [VersionIndependentProgID] attribute or the like. 

So, sounds like I'll need it manually in my own "DllRegisterServer" functions:

[ComRegisterFunctionAttribute]
public static void myDllRegisterServer(string registrationLogic) {
   // perform my logic 
   Trace.WriteLine( "Registration is occuring ..." );

}

[ComUnregisterFunctionAttribute]
public static void myDllUnregisterServer(string registrationLogic) {
    // perform my logic
    Trace.WriteLine( "Dis-Un-registration is occuring ..." );
}

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

3D Graphics may NEVER achieve Human Realism? - The Masahiro Mori Uncanny Valley

June 10, '04 Comments [0] Posted in Gaming
Sponsored By

An interesting postulate, although the author forgets that there is a BIG difference in quality between the pre-rendered cut-scenes, and the in-game engine.  One day, we'll have pre-rendered quality in the game engine, and THAT will be the last 1%.

The screwiest part of this phenomenon is that game designers pride themselves on the quality of their sepulchral human characters. It's part of the malaise that currently affects game design, in which too many designers assume that crisper 3-D graphics will make a game better. That may be true when it comes to scenery, explosions, or fog. But with human faces and bodies, we're harder to fool. Neuroscientists argue that our brains have evolved specific mechanisms for face recognition, because being able to recognize something "wrong" in someone else's face has long been crucial to survival. If that's true, then game designers may never be able to capture that last 1 percent of realism. The more they plug away at it—the more high-resolution their human characters become—the deeper they'll trudge into the Uncanny Valley.

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

Getting ready for Mono, and The Importance of Being (Using) Constant(s)'

June 9, '04 Comments [1] Posted in Programming
Sponsored By

I was poking around in the nGallery site and found these gems, as nGallery is (stunningly) Mono Compliant.  I thought that #1 really hit home when it comes to the importance of using such (often thought silly) things like System.Environment.NewLine and System.IO.Path.DirectorySeparatorChar.  If there's a constant in the Framework, it's usually there for a reason.

Rule #1:  Never, ever, ever use the \ to seperate directories when doing any file I/O. Instead, use the System.IO.Path.DirectorySeparatorChar constant. This translates directly over to the *nix world and makes for a smooth transition in Mono.

Rule #2:  Just as most of us have learned case sensitivity in .NET, carry this forward to your file I/O operations, again, and make sure all files and directories are case sensitive.

Rule #3:  Make sure you don't compile your assemblies with the /incremental flag. Mono can't support incremental compilation. For more details on what "incremental compilation". [Jason Alexander

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

XBox Live still working out the MSN Messenger integration details...

June 9, '04 Comments [0] Posted in XML | Gaming
Sponsored By

Caught this as it happened.  Looks like the new Xbox alerts are still getting their kinks worked out, as this Blue Toast Alert didn’t look the way someone intended. :)

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.