Scott Hanselman

TicTacToe in 3.1 Languages

October 21, '03 Comments [0] Posted in XML
Sponsored By

I was cleaning up and I found these demos I used to do when showing off .NET Framework multiple language support.

·        TicTacToe in C#, VB.NET or J#

·        TicTacToe in C# for the Compact Framework

Feel free to use them in presentations and demos with attribution.   

You know, it would be fun if folks started translating TicTacToe into other languages so instead of a bunch of HelloWorld’s we had TicTacToe in all the .NET Framework Supported Languages…Cobol.NET TicTacToe anyone?

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 always launch Firebird in a new window

October 21, '03 Comments [1] Posted in Musings
Sponsored By

I converted Patrick to Firebird recently.  Firebird 0.7 came out this week, and I mentioned a peeve of mine was that it reuses its window when launching URLs.  To which Patrick said:

To always launch Firebird in a new window, put this stuff in your user.js file.

 user_pref("advanced.system.supportDDEExec", false);
user_pref("browser.always_reuse_window", false);

If you haven’t come to enjoy the wicked fast speed and elegant simplicity of Firebird, now is your chance.

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

Multiple Monitors and Productivity

October 21, '03 Comments [4] Posted in PowerShell | Gaming | Bugs | Tools
Sponsored By

Preach on brother.  I started using multiple monitors a few years back when the ATI video card on my Compaq Laptop supported using both the LCD Panel and the external monitor together.  I blogged on a bit on it earlier this year as did John Lam

I spent some time looking for the perfect dual-head video card.  Although you can certainly line up PCI Video Cards from more than one manufacturer, you’re better of with IMHO with a dual-head card.  Personally, the best drivers for multiple monitors are NVidia’s, and a MUST HAVE piece of software for anyone with >1 monitor is UltraMon, if only for it’s second “Smart Taskbar.”  It sports tools for systems with even as many as 10 or more monitors and supports stuff as advanced (and useful) as scripting your many monitors

I’m currently running an NVidia Dual Head Card with a ViewSonic 17” LCD at 1280x1024 and a 17” Joe-Monitor at 1152x864 and believe me, I will take the Pepsi Challenge against anyone with a single monitor at 1024x768 is more productive. :) I really would LOVE to have more monitors although I’d suspect 3 is the ideal number.  

I first saw this on Rory’s blog and had to check into it.  Rory points to a news item on Slashdot which has the following entry:

"A systematic study conducted by NEC-Mitsubishi, ATI Technologies and the University of Utah has concluded that the use of multiple monitors in the workplace increases productivity. The study is discussed on Tom's Hardware, EE Times, and there's a detailed press release on NEC-Mitsubishi. For those of us who use multi-monitors, this is not shocking. But maybe now that it's official, IT managers will view it as a good investment and not just for gamers."

These articles all showed and discussed productivity while using flat-screen panels.  It makes sense that NEC and ATI would.  With a setup like the picture below, couldn’t you be more productive?  At the client site that I’m currently working, the customer provided a monitor for my usage.  So, combined with my DELL notebook which has multi-monitor support, I’m doing multi-monitor development.  I can run my mail client or Query Analyzer on one screen and VS.NET on the other doing debugging.  So, there is a benefit without dual flat displays.  But don’t they look good?  So, forward the article to your management and get more work done while your surfing.

 
[Jon Box's Weblog]

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

My Longhorn Analogy

October 18, '03 Comments [3] Posted in Longhorn
Sponsored By

Someone asked me to compare Longhorn to Windows 2000 and I said:

The difference between Lornhorn and Windows 2000 is like the difference between shooting a bullet...and throwing it.

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

DLL Hell - redux?

October 17, '03 Comments [1] Posted in NUnit | Nant | Bugs
Sponsored By

Patrick Cauldwell said something very wise today at work.  Here's the gist:

Sure, there's no more DLL Hell for the end user.  It's that they've made it hell for the developer.

It was immediately funny, but a few hours later, it was profoundly true. 

He and I are working on a really cool subsystem for our developers that offers a them clean SOA

As an aside, it also uses NAnt 0.8.4 for its builds.  I know I said I was doing command-line builds with DevEnv, but both Patrick and Chris Kinsman insisted I give it another look.  I was HUGE into NAnt a year ago, but got lazy and floated away.  I'm back with a vengance.  The mess of -contribs and bugs is gone and it's fantastic.  It includes a whole series of great new Tasks.  My favorites are foreach, nunit2 and the invaluable solution task.  I'm also using nunit2report which is great, but needs to support multiple input files.

Anyway, so this build of NAnt uses and includes assemblies for log4net and NUnit 2.1.3.  I also use log4net and have referenced NUnit 2.1.4 in our project.  We automated the entire build: codegen>build>test>report>email results.  We have a bootstrapper that gets the project into an empty dir and forks to the build file that just came out of CVS.  It's gloriously command-line and marginally Rube Goldbergian. ;)

However, a few weird things happened.  First, these NAnt binaries were compiled on the 1.0 framework, but the NAnt.exe.config was set to allow it to run on Framework 1.1.  However, the lib directory for NAnt had MULTIPLE directories (clever) with different versions of log4net, NUnit, etc, in each directory (frustrating).  I didn't notice this until NAnt tried to run the tests.  NAnt loaded a non-strongly-named NUnit 2.1.3, and by the time my tests tried to request my strongly named 2.1.4 I was getting all kinds of binding errors and stuff.  Same thing happened when my non-strongly-named build of log4net (compiled on 1.1 as version 1.0.13704 something) tried to load into the process space of NAnt's version of log4net (compiled on 1.0 as version 1.0.13704 ALSO). 

Needless to say, this all sounds obvious after the fact, but I needed to sync up my versions.  Certainly I could strongly name things and GAC them, but that kind of is orthogonal to the goal of a build-anywhere-relative-paths-xcopy kind of project.  So, the easiest and safest thing to do in order to maintain my goal of minimal dependancies was to rebuild NAnt on 1.1 with my preferred minor versions of log4net and NUnit via a shared lib.

So, back to Patrick's point.  The CLR offers some amazing improvements over COM-style and LoadLibrary/GetProcAddress DLL Hells.  Truly.   We have side-by-side assemblies, the GAC, and strong naming.  However, it does put increasing logistical pressure on the developer to define appropriate policies and procedures to balance ease of development with ease of deployment. 

It takes some serious thought to plan this stuff, and arguably it's not possible to get it right the first time. Or the third.  While the underlying support is there in the CLR, certainly the complex issues around dependancy management, both at compile-time and run-time are not going to be solved anytime soon with a nice Visual Studio.NET Add-In.  "File|New|Enterprise-Wide Dependancy, Version Control, and Deployment Management Project", anyone?

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.