For some reason, there's been a lot of interest in my ".NET Delegates: A C# Bedtime Story" on CodeProject.com lately, in spite of it being almost two years old. My favorite comment compares me to a "hard-drinking" Pope (which is especially ironic, since I'm an adamant ex-Catholic : ).
Christine Morin, a fellow Microsoft employee, came to my rescue when I went looking for a sol.exe implementation (I love working at Microsoft...).
I found the original C implementation (which can still compile for 16 or 32 bits!) and hers, the very nicely done WinForms version (from scratch!). Christine's implementation is not quite perfect yet, but it's very, very close.
I did some coding on it and then talked her into opening the source up in a GotDotNet Workspace. The project has two goals:
1. Perfectly recreating sol.exe in managed code
2. Separating the UI completely from the data
The 1st goal is to provide homage to the world's most popular Windows application (!), although I've already violated it while keeping to the spirit (Undo needs a Ctrl+Z mapping!).
The 2nd goal is to enable other UIs to be placed on top of the sol.exe data model for future versions of Windows which may or may not have amazing new UI capabilities (and which may or may not be discussed in glowing details at the PDC [1]) and about which I may or may not be writing about in the future (vague enough? : ).
Got some time? Instead of firing up the existing sol.exe, help us finish our .NET version!
[1] http://msdn.com/pdc
"Joining us in this episode will be Brad Abrams and Anders Hejlsberg to discuss the overall architectural issues involved with Managed Code, as well as Nick Hoddap and Chris Sells to show us some of the programming benefits that are gained by using Managed Code."
Dr. James McCaffrey provides a nice introduction to “permutations” along with some .NET to generate them. He further goes on to use permutations for security purposes, but that's not all they're good for.
In a recent debate over writing the n very similar algorithms by hand (one for each number of inputs) vs. writing a data-driven algorithm to handle any number of inputs, Peter takes the middle route using the .NET CodeDOM to generate the simple algorithm for the required number of inputs at run-time.
What makes this interesting isn't the result, which didn't turn out to be the most efficient, but the approach itself, which is unique to metadata-enabled systems and something I completely forgot even existed. Thanks for the reminder, Peter!
Apparently cbrumme was backed up after two weeks fighting the blaster virus internally, because he lets loose with a tour de force of details about managed and unmanaged startup and shutdown as well as a trailer on writing secure code in general. Fun to read if you like this level of detail (and the part about secure code at the end should be read by everyone).