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.
Tuesday, Jun 18, 2002, 7:24 PM
A clickable button
Here. "As useful and as popular as Chris Maunder's "An unclickable button" article and class is, I thought that a clickable button might also be useful. While my ClickableButton class is implemented specifically for .NET, the very same techniques can be used in nearly every object-oriented windowing library."
Tuesday, Jun 18, 2002, 6:33 PM in .NET
The .NET Cost: Who Pays? (3 of 3)
Here. "The .NET platform provides developers with an unprecedented level of language interoperability—at a price. Luckily, it won't cost you an arm and a leg to participate. Part 3 of 3."
Tuesday, Jun 18, 2002, 6:32 PM
Achieving Interoperability (2 of 3)
Here. "A .NET-savvy compiler can help you to get the best of all worlds: Continue using your language as before, yet take advantage of valuable components from other languages. Part 2 of 3."
Tuesday, Jun 18, 2002, 6:32 PM
Polyglot Programming (1 of 3)
Here. "While some question the need for multilanguage support, .NET proves that such strange bedfellows as Fortran, Eiffel and C# can interoperate. First in a three-part series."
Monday, Jun 17, 2002, 10:32 PM in .NET
The ASP.NET Web Matrix Project
Here. "ASP.NET Web Matrix is a community-supported, easy-to-use WYSIWYG application development tool for ASP.NET. It can be installed via a quick 1.2 MB download (about 5 minutes using a 56Kb modem). Best of all — it's absolutely free!"
Sunday, Jun 16, 2002, 8:43 PM
Add #Region Macro
Here. From Harry Pierson - DevHawk.NET: #Regions are one of the coolest new features of the VS .NET IDE. Here's a macro to make it easy to add them to existing code by simply selecting a block of code and running a macro.
Thursday, Jun 13, 2002, 1:36 PM
CS CODEDOM Parser
Here. "CS CODEDOM Parser is utility which parses the C# source code and creates the CODEDOM tree of the code (general classes that represent code, part of .NET Framework - namespace System.CodeDom)." If a CodeDOM-complete C# parser could be constructed, than C# could be the universal codegen language, using the CodeDOM at the intermediate format and any CodeDOM language provider could be used as the output. In other words, one C# codegen template could generate any .NET language.
Wednesday, Jun 12, 2002, 11:18 PM
Updated Typed DataSet Generator
Here. "This new version has fixes to the installer and the generator. This generator includes the following features: -Inheritable Typed DataSets -Added Annotation Namespace to Typed DataSet Template -New codegen:useNamespace Annotation to support setting the namespace of the Typed DataSet -New codegen:classModifier Annotation to support changing the visibility modifier (e.g. you can now make your Typed DataSet internal!) -New codegen:addCodeComments Annotation to create simple C# Code Comments to elimintate warnings on building your project while generating the documentation XML file -New Typed DataSet Template that includes all these new annotations with default values."
Wednesday, Jun 12, 2002, 6:06 PM
Karma
Here. Just me discovering that I am, in fact, superstitious after all. Pay no attention...
Wednesday, Jun 12, 2002, 12:00 AM in The Spout
Karma
While I definitely do have faith that there is a higher power in the universe (although I haven't yet decided if the universe is a good place to be or if it's just a simulation solving some higher level non-deterministic finite state automata), I'm not a religious man. If fact, I consider myself a completely recovered Catholic (I've been clean and sober for more than a decade and I never feel the need to go back for another hit off the body of Christ) [1].
Likewise, I'm not a superstitious man. I understand that going under a ladder may cause pain if something drops on me, but not for some other mystical reason. Similarly, breaking mirrors could cut you, but only the most serious of cuts could last for 7 years.
Still and all, I do believe in karma, otherwise stated as "what goes around, comes around." It's happened many times in my life that a lot of bad luck eventually yields to a lot of good luck. Likewise, when you do bad, bad comes back at you and when you do good, good comes back. Of course, these phenomenon can be explained by statistics and human nature respectively, but I prefer to think of a giant celestial scoreboard that I can affect by doing good for people. Or, and this happened just today, if I do something to cause harm, even if there's nothing I can do to make it up to the person involved, I often find myself feeling better if I do something good for someone completely different. Oh, wait, maybe I am superstitious... Still, I find it a comforting way to run my life, so I'm going to stick with it. : )
[1] I've known practicing Catholics that are offended by the idea that Catholicism is a disease to be recovered from. Sorry.
Tuesday, Jun 11, 2002, 6:14 PM
Windows Developer News RSS Feed
Are you into RSS? The link is the WDN RSS feed, which I use to report news on this site and in the world for Windows developers.
Tuesday, Jun 11, 2002, 5:29 PM in .NET
Adding Ref-Counting to Rotor
"Microsoft has granted Sells Brothers, Inc. a research grant to add ref-counting to Rotor and to study the performance effects. There's been a lot of speculation about just how we're planning to add ref-counting to Rotor."
Tuesday, Jun 11, 2002, 12:43 PM
Powers of Ten
"View the Milky Way at 10 million light years from the Earth. Then move through space towards the Earth in successive orders of magnitude until you reach a tall oak tree just outside the buildings of the National High Magnetic Field Laboratory in Tallahassee, Florida. After that, begin to move from the actual size of a leaf into a microscopic world that reveals leaf cell walls, the cell nucleus, chromatin, DNA and finally, into the subatomic universe of electrons and protons."
Tuesday, Jun 11, 2002, 12:42 PM in .NET
A compiler-writer's guide to C#
"Plan:
- Give overview of language from point of view of compiler writer
- Code generation for CLR is trival, so we'll focus on type checking
- Specification is 410 pages, almost no formal methods, and frustratingly verbosely written
- We'll boil much of it down to five parts"
Tuesday, Jun 11, 2002, 12:00 AM in The Spout
Adding Ref-Counting to Rotor
Microsoft has granted Sells Brothers, Inc. a research grant to add ref-counting to Rotor and to study the performance effects. The proposal that lead to that grant is available here. There's been a lot of speculation about just how we're planning to add ref-counting to Rotor. Here are the highlights:
- It's not just "me," it's "we." I've already have very useful input
from several folks, including Jason Whittington, Ted Neward, Ian
Griffiths, Serge Lidin, Craig Andera and Bill Conroy. Also, Chris
Tavares will be spending most of July doing the actual implementation.
If anyone else wants to dig in, feel free! I'm happy for the help and
anyone that provides insight will get credit.
- The goal of adding ref-counting to Rotor is to measure the
performance effects of a deterministic finalization-like model that we
gave up when moving from COM/C++/VB6 to .NET. I say "DF-like" because
we're not getting DF, because the price of determinism is that
sometimes an object is never finalized, e.g. cycles. We can do better.
- We will not be replacing the existing GC's ref-tracking. It does a
fabulous job managing memory and managing cycles and we won't touch
that.
- The ref-counting implementation's sole job will be to call an
object's finalizer ASAP. Note that this is in no way "deterministic."
Plain ref-counting is deterministic in that it calls an object's
finalizer just as soon as there were no more outstanding object
references. Cycles meant that this would never happen
(deterministically). A hybrid ref-counting/ref-tracking system
improves "never" to "eventually" in the case of a cycle and maintains
the ref-counting's guarantee for ASAP in their absence.
- Even objects that don't have finalizers will need ref-counts, as
they maintain references to objects that have finalizers (and so on).
- Value types will not need reference counts, but when they go out
of scope, there will need to be a Release on any object references the
value objects contain.
- When the GC kicks in and finally breaks a cycle, it would be nice
to release all objects held by the cyclic objects so that they could
return to normal ref-counting determinism. However, since we've
already blown determinism by being in a cycle, this seems unlikely to
be very helpful. Also, by skipping this we can keep all of our changes
in the JITter and out of the GC, which simplifies the initial
implementation.
- We'd plan on adding ref-counting at the runtime level in the
JITter so that all languages gain the benefits w/o updating the
compilers (or mandating anything special in any language). The real
work is figuring out which IL instructions require AddRef/Release
calls and getting those calls into the instruction stream. Because of
this, we're not likely to be able to handle tail calls (at least,
initially). Anyone with advise in this area would be welcomed with
open arms.
- We plan on working nicely with existing IDispose-based code. Since
our ref-counting is all about calling the finalizer, if the ref-count
gets to zero and there is no finalizer to call, no finalizer will be
called. That means that Dispose implementations that call
GC.SuppressFinalize will not cause any problems with the ref-counter.
Of course, the goal is that the IDisposable.Dispose protocol is not
necessary at all.
- As a potential optimization, I have found a nice place to store a 7-bit ref-count in the existing space allocated to every object, so there will be no space overhead, only CPU overhead. However, this narrows the number of objects per process with synch blocks and/or hash values from 134 million to 1 million. It also narrows the number of referencing objects from the traditional 4 billion to 127. Anecdotally, 127 seems like enough, but it will necessitate the need to abandon ref-counting on any object that reaches 127 extent references. Since most data structures where more than 127 references could happen are parent-child, e.g. every child in a tree with a reference to the root, and this indicates a cycle that can't be handled by the ref-counting anyway, turning these objects over to the ref-tracking portion of the algorithm seems reasonable. However, we won't know 'til we look how many object references an object is going to have, so we'll track maximum reference counts during our tests to see if this optimization makes sense at all.