Damon Payne: Hand waving software architect

103db signal to noise ratio at < .03% total harmonic distortion
Solution Architect, software developer, geek
Damon Payne at Blogged
2009 Microsoft MVP - Client App Dev
2007 Microsoft MVP - Solution Architecture
 Friday, November 14, 2008

This article on Engadget HD today greatly amused me.

Research finds that people still heart physical discs, greatly prefer Blu-ray to streaming

While the "HD streaming rulez!one11!1!" bandwagon was quickly filling up after Netflix announced that it would be bringing such a service to the Xbox 360, the numbers just don't substantiate the claims that physical discs are doomed anytime soon. Sure, for the budding technophile, streaming is just the next great thing, but for the average joe / jane, the tried and true disc still holds a great deal of importance. A recent study by market research firm SmithGeiger found that out of over 2,000 surveyed, "HDTV owners familiar with Blu-ray favor the format over downloading and streaming by a margin of nearly 10-to-1, with about 70% of respondents citing the fact that there's a physical disc to keep as a key factor in their decision to buy Blu-ray." It also found that 96% of BD users were "familiar with downloading and streaming services, but that two-thirds believe watching a movie on Blu-ray is a better overall entertainment experience." Sure, BD has its flaws, but not having to re-rent an HD film after a remarkably short 24-hour window sure is nice, huh?

No kidding.  The cries that physical media was dead reached their highest volume as it became clear that Blu-Ray was going to win over HD-DVD.  The people making these claims were either:

  1. Analysts who must not watch many movies at home (ergo are relatively clueless on these dynamics)
  2. HD-DVD supporters/fanboys trying a little et tu coque to ease the pain of their loss by saying BD's days were numbered as well.
  3. HD-DVD supporters with huge vested interests in media streaming
  4. Random outfits not necessarily associated with HD-DVD, but with huge vested interests in media streaming

Media streaming has such a long way to go it's not even funny.  I am certain that we'll get there, but consider the following facts and anecdotes:

  1. I have yet to see a streaming solution that offers basic DVD features: chapter selection, audio selection, special features, multiple audio streams, multiple subtitle options.  This takes bandwidth and increases technical complexity of this delivery mechanism.
  2. Ditto #1 but for the advanced interactive features of Blu-Ray: online features, PiP, advanced programmability, etc.
  3. Quality.  Last time I checked HD Cable bitrates top out at around 9mb/s for audio plus video.  Right now this is overwhelmingly Dolby Digital and MPEG-2, with some outfits moving to MPEG-4 for better video compression.  While not bad compared to normal TV, this is a far cry from the 40+ mb/s I have on numerous Blu-Ray discs or even the relatively lean 18+ mb/s on say the King Kong HD-DVD encode.  Some people will not be able to tell the difference, and some won't care, but a lot of people do.  If you have a sound system you care.  The larger the TV you have, the more you'll be able to notice the flaws.
  4. Delivery.  While some people have the option of 10mb/s U-Verse, 18mb/s cable, or 150mb/s fiber in their home, that is still a relatively small # of people and not increasing very fast.  A lot more folks are still slumming it with 3mb/s or 5mb/s cable because they either can't get or won't pay for the faster options.  Where I live, 1.5mb/s DSL is my best option.  I could literally get a Blu-Ray from Amazon.com with 2-day shipping before I could download even half of a high quality movie.

The convenience of just instantly grabbing a movie over the PSN or Netflix, or even queuing it up while I make dinner has appeal.  I will not, however, pay money to watch something of less than DVD quality in my home theater on my 106" screen.  Those of you who will, enjoy your mediocre entertainment! 



Friday, November 14, 2008 4:19:51 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [1]  |  Trackback
 Monday, November 10, 2008

I will be speaking next week at the Silverlight Special Interest Group, a subset of the Wisconsin .NET user's group.  The topic is Control Templating, Styling, and the Visual State Manager.  For more details check out:

http://www.wi-ineta.org/DesktopDefault.aspx?tabid=192

 

 



Monday, November 10, 2008 10:46:45 AM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Thursday, November 06, 2008

The AGT (Argentum Tela) series of articles is an effort to do two things. Usually an idea is presented only in its finished form. The first goal is to do some Reality Blogging, to show an idea evolve over time without pulling any punches. The second goal, and the example vehicle for the evolution aspect, is an extensible Design Surface for Silverlight similar to what we have in Visual Studio 2008. This type of application has all sorts of interesting uses. My example is a Home Theater layout tool. Read the entire saga: http://www.damonpayne.com/2008/09/14/RunTimeIsDesignTimeForAGT0.aspx

Yes, I've switched to Live Writer full time now.  The VSPaste plug-in is excellent.

Editing Properties

The theory is baked and the anticipation is high, it’s time to edit Properties inside the designer. I add the DesignablePropertyDescriptor type to the solution and add the GetDesignProperties method to the IDesignableControl interface. With this added I need to go about providing implementations. This project is going to start and end with the purple Couch.

public Color FillColor { get; set; }

        public List<DesignablePropertyDescriptor> GetDesignProperties()
        {
            return new List<DesignablePropertyDescriptor>();
        }

I need to implement this for the FillColor property.

public List<DesignablePropertyDescriptor> GetDesignProperties()
      {
          List<DesignablePropertyDescriptor> props = new List<DesignablePropertyDescriptor>();
          
          DesignablePropertyDescriptor fillColor = new DesignablePropertyDescriptor();
          fillColor.PropertyInfo = GetType().GetProperty("FillColor");
          fillColor.DisplayName = "Color";
          fillColor.DisplayType = typeof(TextBlock);
          fillColor.Editable = true;
          fillColor.EditorType = typeof(ComboBox); 
          fillColor.SupportsStandardValues = true;
          fillColor.StandardValues = new List<object>( new object[] {Colors.Purple, Colors.Red, Colors.Gray, Colors.Brown, Colors.Gray});
            return props;            
        }

I’m already questioning the decision not to use attributes, that’s a lot of code for one property. Still, I’ll follow this through for now. Later I’ll dig up some WinForms designer code for comparison. Now I need to provide my default implementation for IDesignableControlInspector.

    public interface IDesignableControlInspector : IService
    {
        List<DesignablePropertyDescriptor> Inspect(IDesignableControl idt);
    }
    public class DefaultInspector : IDesignableControlInspector
    {
        public System.Collections.Generic.List<DesignablePropertyDescriptor> Inspect(IDesignableControl idt)
        {
            if (null != idt)
            {
                return idt.GetDesignProperties();
            }
            return null;
        }
    }

Refactor: At this point, I can see that my IService interface is broken. I’m forcing myself to implement Startup() and Shutdown() methods that I have yet to use in any meaningful way. Removing Startup from the IService definition gives a single compiler error from ServiceManager. The methods are gone until I need them. Of course, this leaves IService as a simple “marker” interface with no methods. Not terribly evil, but there are better ways to supply what is essentially metadata in .NET.

Now I create the IDesignEditorService interface:

public interface IDesignEditorService:IService
{
    Control Visual { get; }
    void Edit(IList<IDesignableControl> targets);
}

For now, I will leave IDesignablePropertyEditor alone.  I need to create a PropertyGrid control and wire up the code needed to use it.  The specifics of making the templatable PropertyGrid will be in the next article.  The PropertyGrid must implement IDesignEditorService.

public Control Visual
{
    get
    {
        return this;
    }
}

public void Edit(IList<IDesignableControl> targets)
{
    //TODO: something
}

Now, in order to begin doing our work of displaying and editing properties, we need to get whatever IDesignableControlInspector has been registered.

public PropertyGrid()
{
    DefaultStyleKey = typeof(PropertyGrid);
    Inspector = ServiceManager.Resolve<IDesignableControlInspector>();
}

IDesignableControlInspector Inspector { get; set; }

And now we can begin doing some work inside Edit. 

public virtual void Edit(IList<IDesignableControl> targets)
{
    if (null != targets && targets.Count > 0 && null != targets[0])
    {
        if (targets.Count > 1)
        {
            EditMultiple(targets);
        }
        else
        {
            EditSingle(targets[0]);
        }
    }
    else
    {
        ClearProperties();
    }
}

I've decided it really would be nice to handle editing multiple items with the same Properties, so we'll do that too.  In order to keep methods small and readable and provide some extra support for alternative implementations of IDesignEditorService I have created EditServiceHelper to assist with the various reflection and control instantiation operations.  In order to more easily see how well this is working, I start by wiring up Selection events with the PropertyGrid.  This means that my DesignSurface control now needs to get an IDesignEditorService injected and we need to handle selection events.

private ISelectionService _selectionSvc;

public ISelectionService SelectionSvc 
{
    get
    {
        return _selectionSvc;
    }
    set
    {
        if (null != _selectionSvc)
        {
            _selectionSvc.SelectionChanged -= new EventHandler(SelectionSvc_SelectionChanged);
        }
        _selectionSvc = value;
        _selectionSvc.SelectionChanged += new EventHandler(SelectionSvc_SelectionChanged);
    }
}
void SelectionSvc_SelectionChanged(object sender, EventArgs e)
{
    List<IDesignableControl> idtList = new List<IDesignableControl>();
    foreach (var idt in SelectionSvc.GetSelection())
    {
        if (idt is DesignSite)
        {
            idtList.Add(((DesignSite)idt).HostedContent);
        }
        else
        {
            idtList.Add(idt);
        }
    }
    EditSvc.Edit(idtList);    
}      

Ok, nothing crazy so far, then things got interesting.  How to generically have some kind of binding between "some visual representation of a property" and "some property on an IDesignableControl" ?  I went back and added another property to my Couch, namely the "DesignTimeName", in order to illustrate this better.  This is where things stand now inside Couch.GetDesignProperties()

public List<DesignablePropertyDescriptor> GetDesignProperties()
{
    List<DesignablePropertyDescriptor> props = new List<DesignablePropertyDescriptor>();

    DesignablePropertyDescriptor name = new DesignablePropertyDescriptor();
    name.PropertyInfo = GetType().GetProperty("DesignTimeName");
    name.DisplayName = "Name";
    name.Editable = true;
                
    DesignablePropertyDescriptor fillColor = new DesignablePropertyDescriptor();
    fillColor.PropertyInfo = GetType().GetProperty("FillColor");
    fillColor.DisplayName = "Color";
    fillColor.DisplayType = typeof(TextBlock);
    fillColor.Editable = true;
    fillColor.EditorType = typeof(ComboBox); 
    fillColor.SupportsStandardValues = true;
    fillColor.StandardValues = new List<object>( new object[] {Colors.Purple, Colors.Red, Colors.Gray, Colors.Brown, Colors.Gray});

    props.Add(name);
    props.Add(fillColor);

    return props;            
}

Inside PropertyGrid.EditSingle, we build up our Grid rows & columns using the EditServiceHelper I mentioned earlier.

protected virtual void EditSingle(IDesignableControl idt)
{
    List<DesignablePropertyDescriptor> props = Inspector.Inspect(idt);
    var propCount = 0;
    foreach (var descriptor in props)
    {
        _propertyPart.RowDefinitions.Add(new RowDefinition());
        TextBlock tb = new TextBlock();
        tb.Text = descriptor.DisplayName;                
        tb.SetValue(Grid.RowProperty, propCount);
        tb.SetValue(Grid.ColumnProperty, 0);
        //
        FrameworkElement displayElement = EditServiceHelper.GetBoundDisplayElement(descriptor, idt);
        displayElement.SetValue(Grid.RowProperty, propCount);
        displayElement.SetValue(Grid.ColumnProperty, 1);
        displayElement.GotFocus += new RoutedEventHandler(displayElement_GotFocus);
        //
        _propertyPart.Children.Add(tb);
        _propertyPart.Children.Add(displayElement);
        ++propCount;
    }
}

That's not too bad so far.  Here's a screenshot with my so far, so lame PropertyGrid template.

Vision12

I'm going to skip over the implementations inside EditServiceHelper for now, it's in the code if you're curious.  Suffice to say it contains some Property to Control mappings for some basic supported types.  For example, a Property of Type string will be both displayed and edited using a TextBox element and a Two Way Binding. When we get into more complex Visualization and Edit scenarios in a later article.

The next thing we need to do is handle a couple of simple edit scenarios when the display element gets focus, as shown above in EditSingle.

void displayElement_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
    VerifyEditVisualization(sender);   
}

void displayElement_GotFocus(object sender, RoutedEventArgs e)
{
    VerifyEditVisualization(sender);            
}

private void VerifyEditVisualization(object sender)
{
    if (null != _targets && _targets.Count > 0)
    {
        FrameworkElement element = (FrameworkElement)sender;
        Type t = sender.GetType();
        DesignablePropertyDescriptor descriptor = _descriptorMap[element];
        Type editType = EditServiceHelper.GetEditElementType(descriptor);
        if (!t.Equals(editType))
        {
            FrameworkElement editElement = EditServiceHelper.GetBoundEditElement(descriptor, editType, _targets[0]);
            editElement.SetValue(Grid.RowProperty, element.GetValue<int>(Grid.RowProperty) );
            editElement.SetValue(Grid.ColumnProperty, 1);
            _propertyPart.Children.Add(editElement);
            _editElement = editElement;
        }
        //else do nothing, the Editor is the same as the Displayor
    }
}

One thing you can see immediately is that my colors are listed using their Hex #s, so I need to introduce the value converters into the mix.  I also need to fill in a better look and feel for the PropertyGrid, handle Multiple IDC Edit,  and invent a scenario where I can test out the IDesignablePropertyEditor idioms.  This article is already getting a bit long, so I will do some more cleanup and stop here for now.

Making Property Registration Easier

I'm still thinking that writing code for this property edit scheme this will be easier than the current WinForms equivalent, but I realized immediately that it could be better.  I have created a couple of new methods in EditServiceHelper:

/// <summary>
/// Returns common props from IDesignableControl : DesignTimeName, 
/// </summary>
/// <returns></returns>
public static List<DesignablePropertyDescriptor> GetDefaultDescriptors()
 
/// <summary>
/// Return default <code>DesignablePropertyDescriptor</code> objects for each Property name
/// </summary>
/// <param name="names"></param>
/// <returns></returns>
public static List<DesignablePropertyDescriptor> GetDescriptors(IEnumerable<string> names, IDesignableControl idc)

The default can be merged with any custom list a control author wishes to return.

 

Updating the Existing Controls

Refactor: The Couch, Chair, Center channel speaker, and Tower speaker controls were all refactored to use the new convienience methods to return their own properties.  The descriptions no longer say "red chair" or "purple" couch, since we can actually edit the properties of items on the surface now!

Here's what the application looks like now:

Vision13

Yes, we left Property Editing half done in order to keep each article shorter.

 

Conclusion

If you're following the source code, there were several tiny refactorings made that weren't mentioned here.  Speaking of code, as I previously blogged, the project is in CodePlex now at http://www.codeplex.com/agt. The current source code for this article, then, is the 0.7.16.1 Release.  Tune in next time to see Property Editing reach a more finished state.

The live demo has been updated at http://www.damonpayne.com/agt



Thursday, November 06, 2008 5:20:51 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [0]  |  Trackback

The various source drops were taking up a lot of space on my server and I promised to open source this tool, and now it's done.  The AGT project has moved to Codeplex.

http://www.codeplex.com/agt

I have not published an actual Release yet, but from this point forward I'll be tagging a release at the end of each article.  Parts [16] and [17] are in progress now.



Thursday, November 06, 2008 10:14:17 AM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [0]  |  Trackback

So, I was at Drinking Right throughout election night.  It was a good time and I met various "right leaning" area bloggers.

As I had been saying for quite some time, unless the polls were outrageously skewed, Obama was going to be our next president.  Fairly early in the night, when Fox news an CNN called Pennsylvania for Obama, I said it was a done deal.

First, I am happy that the victory was decisive, much more decisive than the past couple for certain.  I'm glad to see that we won't be wasting time on recounts and "hanging chad" type nonsense.  I thought McCain's concession speech was gracious and appropriate; it may have been the best speech of his campaign.

Taking Obama on his word, I expect him to greatly increase the size of the government.  While my wife and I make less than $250,000/year I expect that # to change.  Through this and various other hidden items (such as the extra payroll taxes I previously identified) I expect my own tax burden to increase significantly by no later than Q2 2009.  The degree that his various other plans are implemented will be the degree to which we move towards Germany-style chronic 12% + unemployment and zero GDP growth year to year.  GDP typically grows even with your population plus a little extra for technology-driven per-hour productivity gains.  If your GDP is staying "flat" but your population is still growing 3% a year or so, that's a chronic decline folks.

We'll see what we'll see. 

The Republican Party and the Religious Right have taken some serious losses here.  I attribute this to the Republican Party hitching its wagon to the various would be Theocrats in the evangelical christian population and to laying down their former mantle.  The republicans clearly no longer stand for small government.  As many pundits are saying, it will be fascinating indeed to see what comes next for the GOP.  Will they

  1. Try to return to small government, low taxes (without deficit spending), and some semblance of individual rights?
  2. Simply move to the Left since a populist platform seems to be  getting democrats elected?
  3. Decide that they didn't go far enough and that Sarah Palin and those like her are the future of the GOP?

Obviously I'm hoping for #1 but I wonder what the chances are.

This election season has taken far too many mental cycles for too long.  I'm glad it's over and I sincerely hope the nonsense about Obama being an assassination target is indeed fear mongering nonsense.  Among other things, America needs some stability right now.



Thursday, November 06, 2008 10:09:48 AM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [6]  |  Trackback
 Sunday, November 02, 2008

Every once in a while, someone will post something that really resonates.  Seth Godin's latest post nails it. (emphasis mine)

Wealth is not created by financial manipulation, the trading of equities or the financing of banks. They just enable it.

Wealth is created by productivity. Productive communities generate more of value.

Productivity comes from innovation.

Innovation comes from investment and change.

The media lemmings, the same ones that encouraged you to get a second mortgage, buy a McMansion and spend, spend, spend are now falling all over themselves to out-mourn the others. They are telling everyone to batten down, to cut back, to freeze and panic. They're looking for stories about this, advice about this, hooks about this.

And of course, the paradox. If, in the middle of some sensible budgeting and waste trimming, we stop investing in the future, stop innovating, stop finding the breakthrough that leads to the next round of productivity gain, then in fact they're right, it does last forever.

I believe that we're on the verge of some exponential increases in productivity. Productivity in marketing as the waste of reaching the masses goes away. Productivity in energy as we figure out how to make a renewable process that gives us incremental units of power for free (think about the impact of that for a moment) and productivity in group work and management as we allow the network to do more than let us watch stupid YouTube videos at work. The three biggest expenses of most endeavors (the energy to make it, the people who create it and the marketing that spreads the idea) are about to be overhauled.

What a tragedy it will be if we let defensive thinking hold us back.

As Seth said in a previous article, a lot of successful, growing businesses were started right after 9/11.  I don't think Seth is anything like an Objectivist, but he does correctly identify that wealth is created by production.

http://sethgodin.typepad.com/seths_blog/2008/11/the-economy-the.html



Sunday, November 02, 2008 10:17:54 AM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [2]  |  Trackback
 Saturday, November 01, 2008

I was driving home one day, when I saw a logo similar to this one.  Complete logo failure.

QualityRemoval

A lot of times, businesses suffer from a surplus of Quality.  Some people are afraid of the commitment needed to maintain quality, and choose instead to get rid of it.  If you or your business are being smothered by Quality, we can take care of it for you.  Our current and past clients include:

  • Charter Cable
  • General Electric corporation
  • Bose Audio
  • The US Federal Government


Saturday, November 01, 2008 12:11:36 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [2]  |  Trackback
 Thursday, October 30, 2008

The AGT (Argentum Tela) series of articles is an effort to do two things.  Usually an idea is presented only in its finished form.  The first goal is to do some Reality Blogging, to show an idea evolve over time without pulling any punches.  The second goal, and the example vehicle for the evolution aspect, is an extensible Design Surface for Silverlight similar to what we have in Visual Studio 2008.   This type of application has all sorts of interesting uses.  My example is a Home Theater layout tool.  Read the entire saga: http://www.damonpayne.com/2008/09/14/RunTimeIsDesignTimeForAGT0.aspx

Choosing an Approach to Editing Properties

One of the last top level pieces to begin fleshing out is Property Editing.  I don’t want to see “Red Couch” in the toolbox anymore: I want to see “Couch” and to change its color at runtime by editing his properties.  Having had a lot of experience writing things like this so as to fit neatly within the framework Microsoft gives us, I felt very familiar with the benefits and drawbacks of these approaches.  I had to ask myself some questions:

1.       Is the PropertyGrid really the best way to go about changing attributes of objects on a design surface?

2.       Is a Visual Studio style grid the best route?  Maybe a smaller gird that appears right next to a Component (ala Visio) is better?  Maybe there should be more interaction with the Component itself?

3.       How important is it to support the editing of a Property for many Components at once?

4.       How important is Undo?  Redo?

5.       What is the best contract between IDesignableControl and “the design time environment” for determining which properties are editable and how they should be edited?

When writing custom controls for the Visual Studio designer, it always bothered me that the Contract between my Controls and the Designer Time Environment was simply some attributes on public properties.  Now that I’m in a position to change it for my own world, I’m having trouble thinking of something better.  My ideas on what is the most “correct” in terms of Object- and Component- oriented semantics is not the only thing at play here.  As a component creator, what do I want my software development experience to like?  Is placing eight attributes on a property the easiest and most sensible way?  If I diverge from what’s present in the Visual Studio design time environment, how much extra work am I creating?

What design-time support is present in Silverlight anyway?

Designer Support native to Silverlight

What namespaces, classes, interfaces, and attributes we are accustomed to from “full framework” design time support have made it into Silverlight?

System.Web.UI.Design.SilverlightControls

This namespace only contains things related to a Silverlight plug-in control on ASPX pages.  There’s nothing useful for us here.

System.ComponentModel

Many of the familiar friends are here:

·         CategoryAttribute – Place this on a property indicating what category the property belongs to in a categorized PropertyGrid.

·         DefaultValueAttribute – specify the default value for a property

·         DescriptionAttribute- a Description for a property or event

·         DesignerProperties class.  This one is interesting.  At the time I started this article, RTW was not quite out and the documentation on MSDN didn’t really say anything about what this actually did.  The description now says “The DesignerProperties class provides attached properties that can be used to query the state of a control when it is running in a designer. Designer tools will set values for properties on objects that are running in the designer.” Ultimately, though, this is an attached property for “IsInDesignMode”, which I don’t know if I’ll need or not.

·         EditorBrowsableAttribute – In what situations should this property be shown by designers or intellisense

·         TypeConverter – TypeConverter is missing some things from the full framework. The MSDN documentation still says it supports “standard values” but those methods (to return a standard values collection) are missing in Silverlight.

·         TypeConverterAttribute –present and accounted for!

Missing in action:

·         System.ComponentModel.TypeDescriptor – In the full framework, TypeDescriptor is extremely important to the design-time environment.  TypeDescriptor is used to augment Reflection to specify what attributes a Component has. 

o   TypeDescriptor tells us what kind of Editor is used to modify an instance of a Component

o   TypeDescriptor tells us what kind of Designer a particular component uses

o   TypeDescriptor is used to create design-time instances of a type

·         TypeDescriptor is extensible via IExtenderProvider, ITypeDescriptorFilterService, ICustomTypeDescriptor, all missing.

·         System.ComponentModel.Editor

·         System.Drawing.UITypeEditor

In some cases I’ve already made design decisions that negate the need for some of these missing things.  Other’s I’ll have to introduce or replace.

Design Goals

Property editing is complex.  Now that I see the lay of the land, I can state some design goals and some approaches to achieving them.

1.       The items on the design surface (IDesignableControl) need to be able to be inspected for a list of Properties that are displayable and editable.  It should be painless for Control authors to do this.

2.       When a property is found to be displayable, we must be able to determine what type of visual Control should be used to display the property value.

3.       When a property is found to be editable, we must be able to determine:

a.       The type of the property

b.      The category of the property

c.       What type of visual Control should be used to edit the property value

4.       We should be able to display all of this in a PropertyGrid-esque fashion.

In order to reach these goals, I decide on the following:

1.       I’m going to try replacing the attribute based Component-Designer contract mechanism with new and modified interfaces.

2.       I’m going to make the Component inspection mechanism pluggable, in case someone really wants to fall back on Reflection.

3.       I’m going to come up with some better named interfaces and types to use to modify property values.

4.       I’m going to build some helpers/extension methods to make this painless for IDesignableControl authors.

5.       I’m going to build a PropertyGrid from scratch.

Working on these ideas, I have come up with this:

Since no code was written as part of this article, the most updated code is still AGT[14].

In the next article we’ll look into implementing this approach.



Thursday, October 30, 2008 1:40:30 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Wednesday, October 29, 2008

I love the auto generated Google ads:

AtheistPrices

I didn't know the 13th Amendment had been repealed?



Wednesday, October 29, 2008 2:43:22 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [1]  |  Trackback

I really will get back to technical blogging tomorrow, but politics are consuming too many mental cycles right now.

As I said here, one monumental failure of the current political "share the wealth" thinking is that they simply seek to avoid reality.  We cannot pretend that there are no consequences to taxing wealth.

From this article on Corey the well driller, it would seem that the current political Left feels that people who "fall through the cracks" because they didn't have health care are of utmost national concern.  People like Corey who finally turn a profit after 30 years of struggle and "fall through the other cracks" are not their concern.  After all there are precious few people in America like Corey the well driller and while we as a nation need them, politicians don't need their votes.

As I have said often enough in the past, our notion of the "wealthy" that we "need to tax more" is astoundingly unhinged from reality to begin with.  In addition to my previous thoughts on how horribly dishonest it is to say that Obama's plan will only tax those making more than $250,000 per year, there are some other concerning aspects of this mentality.

First, the plan is a broad stroke.  Even if one bought into the horribly flawed idea that we should tax these "wealthy" people we have used a poor metric with which to delineate them.  In, say, Missouri, $250,000 is a fortune because the cost structure there is cheap compared to other areas of the country.  In Wisconsin, $250,000 doesn't go quite as far but is still a very nice income.  In Manhattan where the cost of living is something like 400% higher than in Milwaukee, a salary of $250,000 may very well include plain old "working middle class professionals". 

The goals and methods of the would-be wealth re-distributors can be even more suspect (if such is possible) using another mathematical method of evaluation.  Let us suppose that the range of income in the United States is from $Zero to $5billion per year.  We have defined the "wealthy", the point at which we should take an extra pound of flesh from people, as $250,000/year.  $250,000 is .005% of $5billion.  If I'm making $250,000 per year and in the same tax bracket, in the same "Abused, eat the rich, they've got plenty" demographic as people making 20,000 times what I make what does that tell me about the nation?  If I'm middle management at an insurance company do I feel that those economic powerhouses are my Peers?  I'm in the same class as Warren Buffet and Bill Gates?  Really?

We have not only demonized Wealth in this nation, we have hijacked the term to mean "anyone making more than I expect I ever will".  Many employees no doubt consider their direct supervisors a member of this privileged upper crust, people who at best make perhaps 30% to 50% more than they do and are already being punished for it via higher marginal tax rates and loss of various categories of deductions. 

This populist class warfare goes hand-in-hand with another phenomenon unfolding over the past decades in America.  When Americans observe a candidate who is well educated, articulate, intelligent, and cultured, we call them an Elitist.  We say that it's bad to be an Elitist.  We say that the other candidate who has few or none of these desirable qualities is "more like me", "down to earth", "someone I could have a beer with", and we want them to call the shots instead of the Elitist.

We exalt the common and seek to elevate the mediocre to the level of the Good.  We have declared, as a nation, that those who Do have fewer rights than those who Can't or Won't.   We seek to punish our betters precisely because of their qualities that we ourselves have identified as Good and Admirable.

America is currently engaged, on all possible fronts, in a War on Excellence.



Wednesday, October 29, 2008 9:20:51 AM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [2]  |  Trackback
 Tuesday, October 28, 2008

I read Obama's "Blueprint for change" plan from his website, all 64 pages of it.  I am not reading McCain's plan because at this point I highly doubt he'll be elected.  Regular readers know that I don't have a horse in this race, being neither a McCain nor Obama supporter.

My first observation about Obama's plan is that he seems to have everyone covered here, at least everyone who matters to someone who's most likely about to ride a populist vote into office.  Every special interest group has a message for them.  He has something to say to women, minorities, the poor, immigrants, the Green movement, the Labor Unions, people without Health Insurance,  people who can't survive on social security, veterans, people who can't pay their mortgages, the "middle class", people who want to go to college but can't, single parents, and farmers. 

Suspiciously missing is any statement to business owners small and large, to the people in this country legally, to Doctors and Nurses, to the people who are paying their mortgage, to the people saving for their own retirement, to the people who have health insurance, the people who did pay (and are still paying) for their higher education, to the people who saved, to the people who didn't make bad decisions during the housing bubble, to the people without credit card balances.  These people don't count.  These people can not be appealed to give up more of their freedom and offer more tax dollars to the government for the illusion of security.  These people are less likely to have usable sympathy for their less responsible fellow citizens.   No doubt we can expect these people to be sacrificed for the sake of providing for everyone in the first group.  But, wait, says Obama:  Any family making less than $250,000 per year can expect that their taxes won't go up!  Well, I've seen that said in the debates and such, but his plan has some sneaky ways around that fact.

  • Currently we only pay social security taxes on income up to $97,000.  Obama's plan calls for removing this cap to help meet the obligations of Social Security.  So, if you make more than $97,000, you and your employer can count on a 13% tax hike on that income.  Obama is pretending this tax isn't a tax?
  • Employers who can't or won't provide health care for their employees will be taxed (via payroll) so that their employees can participate in his Federal plan.  Some businesses may just absorb this new cost.  Some may not be able to and will pass it on to their customers, or from their employees in the form of smaller raises; some will have to spend less money elsewhere and hire fewer employees.  Lacking specifics on what "qualifying" businesses are, the plan seems to operate on the assumption that business owners are Fat Cats who have plenty of margin in their business to do anything we pass a law forcing them to do.  What about the additional cost in time and money of all the paperwork required to meet these obligations?
  • Obama plans to raise the minimum wage.  Once again, he assumes that the money is just sitting there and needs to be spread around.  Business owners who can't or won't sacrifice their profits to accomplish this will simply hire fewer employees, spend less money rewarding the employees they already have, and pass the cost on to their customers.   We cannot simply declare the Mediocre the equivalent of the Good and walk away.

Like so many politicians, Obama is pretending he can make laws that will "spread the wealth" with no negative side effects.  We need only look at the chronic 12% unemployment rate in Worker's Paradise countries like Germany to gain insight as to where these policies will lead us.  Sure they have health care and 5-weeks of vacation, but the cost is a near-zero GDP growth for a decade and more than double the unemployment of our "broken" system here in America.  When we simply declare that people ought to behave a certain way without regard for Reality and Rights the historical result has always been bread lines and homes that aren't warm in the winter.

If I get time, I will post a more detailed analysis of the Obama plan, possibly before Election Day.



Tuesday, October 28, 2008 10:39:54 AM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [1]  |  Trackback