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.
Wednesday, Apr 14, 2004, 10:35 AM in .NET
Fundamentals #2: The New Registry
Karsten continues his dig into the Fundamentals Pillar of Longhorn by describing the 3 main points of the new configuration settings infrastructure of Longhorn:
- Configuration schema, which allows settings to be schematized based on XML
- Configuration engine that has a suite of APIs for reading and writing configuration settings
- Optimized configuration store that can be synched with legacy stores such as the registry, INI files, etc.
Karsten also points out a tool (wcmedit.exe) for browsing the configuration store and a sample (Longhorn SDK->Samples->WMI->WMI.Configuration Sample 1).
Personally, I've never been happy with the various configuration settings stories of any of the Windows OSes, so I'm happy to see this problem tackled again. And if this new way of handling application and user configuration settings doesn't meet your needs, let us know!
Wednesday, Apr 14, 2004, 10:16 AM in .NET
Jeremey Mazner on the Real Status of WinFS
I've been silent myself on the real status of WinFS simply because I didn't know enough to really say (although I did ask some of my internal friends who knew more to speak out). One person I didn't even think to ask was Jeremey Mazner, a Longhorn Technical Evangelist who spends quite a bit of time WinFS.
Jeremey's bottom line: none of the cuts affect the message from the PDC or the slides or code samples that he uses to show off the benefits of WinFS. He goes on to provide supporting evidence from inside and to speculate on where the stories to the contrary came from in the press.
That doesn't mean that WinFS or any of the other Longhorn features we showed off at the PDC won't take cuts in the future as we drive for our ship date, but as of right now, Jeremey has detected any real cuts in WinFS.
Wednesday, Apr 14, 2004, 8:56 AM
Portland Nerd Dinner, Wednesday, 4/14, 6:30pm
Jim's running another Portland Nerd Dinner.
Also, if you haven't met Ward Cunningham, you'll want to come by tonight as he'll be there.
Wednesday, Apr 14, 2004, 12:00 AM in The Spout
More On The Quest To Kill Code
Wednesday, April 14, 2004
You're remember the last installment in my continued quest to find the next big leap in program producing productivity (the last two were OO and managed environments), where I thought I had it all figured out with generic algorithms. All we need is a sophisticated enough environment and wham self-writing, self-maintaining, self-debugging algorithms baby. However, after this evening's Portland Nerd Dinner (you didn't pass up a chance to meet Ward Cunningham, did you?), I'm thinking there's one step in the middle (at least : ).
So, picture the scene. After hearing about a guy that has a "fob" on which he has to enter a password to get a 6-digit number that changes every 60 seconds to that he could log into his company's VPN, declaring that that's what happens when you let Keith Brown run the world (I love you, man : ), and describing the CSSM (the Chris Sells Security Model -- which I can not only implement under .NET, but actually apply to code [maybe I'll start a workspace...]), I turned to Ward and asked him the same question that I had asked the group from the last PND, i.e. "What's the next big leap away in development?", being careful not to give him my thinking from last time.
Ward went a whole other way.
And he got me thinking it's a good idea.
So, Ward starts describing how to use loose typing (as in computer science "types" and what you do with your 101-Key Text Wizard) and TDD-style tests to infer types for your loose typing and I'm shaking my head, 'cuz I still gotta write the code.
Then a long-haired guy to my left who's name I never lernt (I meant to!), starts talking about how each leap in the past came from handling one detail that you don't care about, e.g. register allocation, memory management, etc, and I think that has the possibility of helping me, 'cept the thing I want to get rid of is the code (I mean, if I can't make a business on generating the stuff, then let's kill it altogether : ).
Then Jim Blizzard starts asking an interesting line of questions about whether a leap is really a leap 'til we're passed it and we can look back and decide it was a leap. While I think a leap is a leap because you can feel it (I can still remember the joy of my first program [leap 1], hear the ping in my head when I understood OO [leap 2] and feel the rush in my veins when I got managed programming [leap 3]), I was very interested in Jim's point because I think he was leading me somewhere [leap 4?].
Then, Ward jumped in again with another scenario where you start from nothing and have a programmer at your elbow to translate the next thing you want as you desire it (the first such scenario was Ward's Adventure Diet where you start with nothing, then add one kind of food/day 'til you pass the unit tests I guess [Ward actually put himself on this diet for a while -- man, we are nerds]) and that's when I nearly leap across the table so that I can get my own words in edgewise, literally telling Warm that he had to stop talking now so that I could.
Because that's when it all hit me.
What I want is X1 for programs. I've fallen in love with X1 because it gives me immediate gratification. It still finds the same things that Outlook search and Explorer Search finds for me, but X1 does it in such real time that I can narrow in several fields at once based on what I know about what I'm looking for, e.g. some of the body content and/or who it's from and/or what folder it's filed in and/or when I got it, etc, until I see a small number of choices from which to pick and I can click on one and say "aha! that's the one!"
I want X1 for programs. I want to start with nothing and keep refining it with commands like, "I want an app," "I want a grid" and "the data should come from here" and have my computer say, "Would you like an app like this, this or this" and "would you like the grid to look like this, this or this." And I want my computer to know about every feature that ever been built into 3 or more programs, e.g. from remembering the spot my window was the app last ran to dropping in pivot tables, from reading/writing to/from databases to providing theming. Anything that doesn't work in 3-6 choices, e.g. color themes do but individual colors don't, I want a Property Browser/Windows Forms Designer-like experience and only when I get to implementing something that hasn't already been implemented 3 times do I even want to think about writing a line of code.
'cuz here's the thing. I don't want to give up writing code. I love writing code. I just hate writing code that's already been written. What I want is for a customer to go through all of the stuff in the Codeless, Human-enabled, Realtime, Interactive System (or CHRIS*, if you will : ) as described in the previous paragraph, get to an actual working system except that it doesn't do some cool, unique thing that no one's ever thought of before and then send it to me in an email along with a PO for how much they're willing to pay for me to do the last bit.
When the last bit's been written 2 more times, it goes into the CHRIS and around we go again.
And I was all happy with that answer and I presented it the PND crowd just before the Sells Brothers (who had come along and been absolute angels for more than 2 hours while I geeked out with my friends), lost it and started throwing their shoes at each other in the Washington Square Mall food court, at which point I had to leave, before hearing what Jim's point was or what Ward was going to say after he said, "OK, wait, what about this..." which is usually what he says just before he tells you that he's already built what he's been warming up to for the last 30 minutes and you find that it rocks.
So, you guys damn well better tell me what happened after I left, especially if it's better then the CHRIS!
BTW, why isn't anyone filming these PNDs? They're the best techie conversations I have all month...
* I swear that 90% of that acronym (abbreviation?) came out naturally and was only tweaked slightly at the end for marketing appeal. : )
Monday, Apr 12, 2004, 6:56 PM in .NET
Karsten on The Fundamentals Pillar
Karsten J rebel's against the lack of coverage of the Fundamentals pillar of Longhorn, sketching an overview of why the Fundamentals in Longhorn are cool and also delving into a specific feature he likes (the nextgen Longhorn Event Log).
Also, if you're looking for more Fundamentals resources, check out the Fundamentals Pillar page on the Longhorn Developer Center, which lists the Fundamentals PDC Talks, several fundamentals articles (including a nice overview of ClickOnce for Longhorn) and the WinFX Fundamentals newsgroup.
Saturday, Apr 10, 2004, 8:51 AM in The Spout
I'm Loving the .NET Fx ARM
Here.
The one where I learn a bunch of interesting stuff reading all of the annotations from The .NET Framework Standard Library Annotated Reference in one sitting.
Saturday, Apr 10, 2004, 7:52 AM in .NET
Joe Beda on All Kinds of Avalon
Channel9 has some interesting quicky videos of Joe Beda covering a number of Avalon-related goodies:
- Managed vs. unmanaged, how much of Avalon was done that way?
- What 3D capabilities will Longhorn/Avalon provide?
- What hardware will Longhorn/Avalon need?
- How should developers prepare for Longhorn/Avalon?
- Managed vs. unmanaged, how much of Avalon was built in .NET?
- Are all of Avalon's APIs available to .NET programmers?
- Is Avalon a way to take over the Web?
I got all this from the Channel9 Video RSS Feed. You should, too.
Saturday, Apr 10, 2004, 12:00 AM in The Spout
I'm Loving the .NET Fx ARM
Saturday, April 10, 2004
I enjoyed the annotations in The .NET Framework Standard Library Annotated Reference so much that I read them all in one sitting (in the bathtub, if you must know...). The annotations are where the authors put in their 2 cents about a particular class, method or property and it was very interesting. Here's what I learned just from that part of the book:
- You shouldn't use ApplicationException for custom
exceptions. Derive from Exception instead.
- Because
ICloneable.Clone doesn't define whether it returns a deep or a shallow copy,
it's practically worthless.
- Prefer UTF-8 because it takes
up the same amount of space to represent ASCII characters as ASCII, but can
also represent all Unicode characters (I knew that UTF-8 took up the same
amount of space but hadn't yet jumped to "prefer").
- I was
reminded of the System.Convert class, which does all of the same conversions
that the various type-specific ToXxx and Parse methods do, but puts them all
in one place.
- There's another use for the private
interface method implementation syntax in C#:
class Enum : IEnumerator { object IEnumerator.Current { get { return this.foo; } } ... }
This syntax hides an interface method from general use unless you cast to the interface base class:Enum enum = new Enum();
The thing I never thought of that this enables is that it lets you override based on return type, which isn't normally allowed in C#:
object obj1 = enum.Current(); // compile-time error
object obj2 = (IEnumerator)enum.Current(); // this worksclass Enum : IEnumerator { object IEnumerator.Current { get { return this.foo; }
Foo Current { get { return this.foo; } } ... }This private method implementation syntax lets you return the generic type as part of the interface implementation so that you can plug into standard idioms, e.g. foreach, but a more specific type for users of the type directly, saving the cast:
Enum enum2 = new Enum();
This will be less interesting as generics take over, but still, it's a useful trick.
Foo foo1 = (Foo)((IEnumerator)enum.Current());
Foo foo2 = enum.Current(); // no cast required
- DateTime is always assumed to represent
local time, so if you convert to Universal time twice, you'll change the
value each time.
- Since it's possible to cast any number to
an enum value, e.g. TrueFalseEnum tfe = (TrueFalseEnum)42, make sure to
always check that an enum is a legal value. Theoretically this is a pain,
but in practice, I tend to check enum values with switch statements, making
the default case the error case, so it's good to know that my code does the
right thing.
- The Threading.Interlocked class.
-
Jim Miller has way more birthdays than we do. : )
-
Jeff Richter agrees with me that the ThreadStart delegate needs an object
parameter.
- I should be using CompareInfo instead of
ToLower for case-insensitive comparisons (although they don't show how):
using System.Globalization; using System.Threading;
...
CompareInfo compare = Thread.CurrentThread.CurrentCulture.CompareInfo;
if( compare.Compare("foo", "FOO", CompareOptions.IgnoreCase) == 0 ) {
Console.WriteLine("the same"); }
If I can get that much out of just the annotations, imagine what I could learn if I read the whole thing. : )
Friday, Apr 9, 2004, 4:53 PM in .NET
Longhorn Concept Video: Manufacturing
Carter's got another concept video for us, this time for manufacturing.
In general, if you haven't seen the concept videos, they're a fantastic way to see what the heck we're trying to enable with Longhorn.
Friday, Apr 9, 2004, 12:26 PM in .NET
Jason Olson on Threading in Avalon
Jason Olson, an enterprising 3rd party, posts a look at the benefits of knowing about threading when building an entire UI stack from scratch. Instead of requiring you to transition from a worker thread to the UI thread to talk to a control, Avalon lets you grab the UI context that owns the control and party on:
void ShowProgress(int secondsElapsed) {
try {
this.Context.Enter();
txtSeconds.Text = secondsElapsed.ToString();
}
finally {
this.Context.Exit();
}
}
This is far simpler code than what would be required in code based on User32. Nice.
UPDATE: Ian Griffiths points out that the code can be even sweeter!
Thursday, Apr 8, 2004, 6:15 AM in .NET
"Avalon Is Not Going To Replace The Browser"
There seems to be a common misconception that since Avalon windows/pages are/can be declared in markup (XAML), it must be a web killer/reach solution. It's not.
In this short video, Joe Beda, answers the question of whether Avalon is meant to replace HTML/the web (it's not) and what's Avalon's message of "best of the web/best of Windows" message is really about, e.g. ease of deployment for Avalon apps like web apps, accessing central services for data and functionality (using web services instead of client UI generation), etc.
Thursday, Apr 8, 2004, 6:05 AM in .NET
Longhorn Blogs Wiki Page
Channel9 has a Longhorn Wiki and on it, Adam Kinney has started a list of Longhorn Blogs. Want to add your own? Click on the Edit link on the top left.
Tuesday, Apr 6, 2004, 2:24 PM in Tools
Son of Strike Debugging Inside Visual Studio .NET
Here.
In his June '03 Bugslayer column, John Robbins made a sideways comment when discussing Son of Strike (SOS), a debugging extension from Microsoft for doing all kinds of low-level, mixed native and managed code debugging.
What Jon said was this: "Interestingly, starting with Visual Studio® .NET 2003, you can load SOS when doing mixed-mode debugging." And then he didn't say how to load SOS into VS.NET, even after spending the rest of the article telling us how cool SOS was.
Luckily, Mike Stanton, an SDE on the CLR team, has created a set of instructions for loading SOS into VS.NET. Actually, he posted those instructions in December of last year, but it wasn't 'til today that they were accurate because it wasn't 'til today that I tried them and couldn't get them to work. Now they are and I can and I have all kinds of low-level goodness to explore with Son of Strike.
Tuesday, Apr 6, 2004, 2:07 PM in The Spout
Filling in Missing Computer Science Knowledge
Here. The one where I ask a professor friend how to help my wayward, non-computer scientist friends up to speed on the foundation of our industry (which would be computer science, not greed : ).
Tuesday, Apr 6, 2004, 10:02 AM in .NET
Looking For the .NET Source Code Crawling Guy
I gave a talk at the Twin Cities .NET User Group in Minneapolis in January and I met a guy there building a web sit to crawl .NET source code on the web. I didn't get his contact info and he didn't email me, so I don't know how to get a hold of him. If that's you, please drop me a line. Thanks!