You've reached the internet home of Chris Sells, who has a long history as a contributing member of the Windows developer community. He enjoys long walks on the beach and various computer technologies.
Sunday, Sep 18, 2005, 8:49 AM in Tools
Tracking exceptions thrown by your apps worldwide
This is an interesting, and free, service that you hook your app up to and when it throws an exception, it'll log it w/ the service so that you can track it from afar.
These kinds of services are exactly what web services are wonderful for. Does anyone know of any other such services? I'm embarrassed to say that I don't actually know, but does MS provide one in this space or other developer-oriented web services for other than development?
Saturday, Sep 10, 2005, 8:39 AM in Tools
Remove the slow "Compress Old Files" option!
I love CleanMgr.exe's ability to clean out my temp folder, my internet cache and my recycle bin in one swell foop, but that damn "Compress Old Files" option drives me crazy! Luckily, Scott Hanselman got a .reg file from Shawn Van Ness and now I don't have to put up with that option. Wahoo!
Monday, Aug 29, 2005, 12:55 PM in Tools
Early WinFS beta posted for MSDN subscribers
Not too far behind Indigo and Avalon's beta 1, WinFS posts their own beta 1 (although Tom Rizzo, Director in SQL marketing says it may be a tad early). Since their "endgame" is "that WinFS will be in beta when Windows Vista ships," so long as they don't move past beta to RC or RTM (or back to alpha), they've hit it. Congrats! : )
Friday, Aug 12, 2005, 8:34 AM in Tools
Very Cool Nullable Fix
.NET 2.0 has the idea of a "nullable" type built right in, e.g.
Nullable<int> x = null; // legal
This adds nullability to value types as well as reference types. Further, C# adds direct support with this syntax:
int? x = null; // legal
However, while the C# language was updated to support nullability, the CLR was not, which lead to problems with boxing:
int? x = null;
object y = x;
// a boxed Nullable<T> was never null
if( y != null ) Console.WriteLine("Doh!");
This problem was fixed this late in the .NET 2.0 game by getting a bunch of folks together to rejigger things so that the following works the way you expect:
int? x = null;
object y = x;
// a boxed Nullable<T> can now be null
if( y == null ) Console.WriteLine("Wahoo!");
Thursday, Aug 11, 2005, 4:05 PM in Tools
What should I do w/ the metadata?
Imagine I've got some "metadata" that describes some functionality of my system, e.g. the command line parameters to a tool:
<args description="Two wrongs don't make a right, but three lefts do">
<arg name="lefts" description="Number of left turns" type="int" default=4" />
<arg name="attitude" description="Driver attitude" required="true" type="string" />
</args>
Once I have this "metadata" in place, should I a) use it to generate a class at compile-time that implements the command line parsing, or should I b) use it to drive a command-line parsing framework at run-time?
If I do a), generate the code, the result might look like this:
class Args {
public void Parse(string[] args) {...}
public string Usage { get {...} }
public int Lefts { get {...} set {...} }
public string Attitude { get {...} set {...} }
}
I've got better perf, but I have to generate the code in some way and .NET doesn't come with any built-in tools to do that (no, I don't count ASP.NET or XSLT as good codegen tools). Plus, the command-line args are now baked in and require a re-compile to change and who cares about perf to parse the command line? Finally, I'm much more likely to have most of the work done in a base class, e.g.
class Args : ArgsBase {
public void Parse(string[] args) { return base.Parse(args, ...); }
public string Usage { get {...} }
public int Lefts { get {...} set {...} }
public string Attitude { get {...} set {...} }
}
In my experience, most of the work of code-gen is generating the smallest possible bit of code to provide a nice wrapper around a base class that does most of the work in a very interpretive manner.
If I do b), have a run-time interpretter of the "metadata," I've got to build a command-line argument interpreter, but, as I've said, you almost always have that anyway. However, I also give up a develop-time wrapper aka "Intellicrack" which will be pried from my cold, dead fingers.
What do you guys do?
Wednesday, Aug 3, 2005, 3:36 PM in Tools
WinFX Beta 1 Online SDK Docs
I think the title says it all...
Friday, Jul 22, 2005, 5:14 PM in Tools
Cool Avalon Default Style Trick
Karsten shows a cool trick for pulling out the default style of an Avalon lookless control. This is super useful if you want to replace an existing control's look, but you don't want to have to start from scratch.
Saturday, Jul 16, 2005, 7:20 PM in Tools
My First MsBuild Task
Here. The one where I built my first custom msbuild task.
Tuesday, Jul 12, 2005, 1:13 PM in Tools
Eric Sink: The Game is Afoot
I don't know if Eric understands the ISV industry or not, but certainly seems to. Luckily, I'm on a real product team now, so I get to try to channel Eric into my work.
Eric's latest writing is The Game is Afoot, in which he describes various games and then draws lessons from them for ISVs. It's fabulous. He concludes by apologizing for the length and then teasing us with the analogies he left off. It wasn't too long, Eric! I wanted more! (I also want your blog to have comments, but that's another thing entirely...)
I think now I understand the public outcry when I suggested that I might cut down on the material in the Windows Forms 2.0 book...
Tuesday, Jul 12, 2005, 12:45 PM in Tools
Looking forward to the Portland Code Camp, 7/23-24
The session list for the Portland Code Camp, July 23-24, has just been posted. I'm especially looking forward to the following:
- .NET Windows Forms Tips & Tricks
- Forensic Development
- Implementing Creature AI
- Introduction to Inform
- Introduction to Python
- Introduction to Ruby
- Ruby on Rails
- MonoRail - ASP.NET on Rails
- Web Unit Testing with Ruby and Watir
That's only if my wife doesn't have my working on the house (we're prepping it for sale). Of course, I don't know if she'll understand that I've volunteered to give my own session: "Some Cool Avalon Stuff"...
Tuesday, Jul 5, 2005, 11:43 AM in Tools
Register for COM Interop and VS05b2
I was helping a colleague work through a .NET COM interop issue. He'd found my article on the topic ("Hosting Windows Forms Controls in COM Control Containers"), but couldn't get it to work. He'd set the Register for COM Interop setting and adding the Guid attribute to his .NET type, but nothing was registered at build-time.
The problem was that, unlike VS03, the wizard-generated AssemblyInfo.cs has the assembly-wide ComVisible attribute set to "false" which causes regasm (the command-line version of what VS is doing to register your .NET assembly with COM at build-time) to skip the registration of all of the .NET types in your assembly, defeating the purpose of the Register for COM Interop option pretty thoroughly.
The trick, of course, is to set ComVisible to "true".
Tuesday, Jul 5, 2005, 11:04 AM in Tools
Grid: The King of Avalon Layout
The Grid is by far the most useful, powerful and general purpose layout tool in Avalon. As a demonstration of that, Amir Khella, a Microsoft PM on an Avalon-related team, plays with the Grid to build a fish eye effect, duplicating the behavior of the scaling OSX toolbar with 8 lines of C# code. He then goes on to implement the trick in 2D to scale images as you mouse around. Cool stuff.
Tuesday, Jun 28, 2005, 12:34 PM in Tools
Avalon and ASP.NET, Together At Last
"What we’ve set out to do is to make it dramatically easier for anyone to build AJAX-style web applications that deliver rich, interactive, and personalized experiences. Developers should be able to build these applications without great expertise in client scripting; they should be able to integrate their browser UI seamlessly with the rest of their applications; and they should be able to develop and debug these applications with ease.
"For this work, we’ve been working on a new project on our team, codenamed 'Atlas.' Our goal is to produce a developer preview release on top of ASP.NET 2.0 for the PDC this September, and then have a website where we can keep updating the core bits, publishing samples, and building an active community around it.
Then Scott says:
"We see Atlas as the best way to write a whole new generation of richer, more interactive, more personalized experiences in browser applications. Avalon is the next generation presentation model for Microsoft, and will let you build the richest user experiences on the Windows platform. Avalon will deliver phenomenal graphical experiences that use the latest in media integration and hardware acceleration. And Avalon will also let you provide persistent, immersive experiences that go beyond the browser.
"Of course, when you’re building Avalon applications, you can reuse the programming model investments you make today with ASP.NET and Atlas. For example, the ASP.Net Building Block Services and Client Building Block Services will also be accessible from any Avalon client. This model gives you a smooth path to the next generation of applications."
And then I say:
"Cool!"
Monday, Jun 27, 2005, 12:25 PM in Tools
New Monad Build Available
You have to stand on one foot, wait for 48 hours and wave a dead chicken over your monitor, but assuming you have the foot and the dead chicken, it don't cost nothin' to download the latest beta of Monad. Enjoy.
Saturday, Jun 11, 2005, 8:46 AM in Tools
Ajax.NET
If I were doing AJAX work in ASP.NET, Ajax.NET is the kind of thing I'd want to use.