Diablo 3

by Administrator 28. June 2008 15:19



by Administrator 26. June 2008 15:42

Anyone who's read this blog long enough to see some of the larger articles can tell that I am carrying the torch for UML.  I know a lot of people who model things, but not a lot who use what I consider to be the canonical real-deal modeling language: UML.  Even when I'm whitboarding, I'm drawing actual UML constructs for classes, interfaces, packages, and components.  If you draw boxes with lines connecting them to other boxes, people will often get the idea you are trying to convey, but there's something compelling about an industry standard modeling dialect with the ability to express some more subtle semantics than "this thing somethings with this thing".  Why don't we hear that much about UML in the blogosphere?  Why is Microsoft developing its own modeling language?  To some degree I blame the round-trip engineering folks who want to keep code and models in perfect sync, and there are some idioms in CLR languages that just don't succinctly map to UML: The Terski brought up the example of delegats.  My response is and has always been that I'm not interested in modeling at the implementation level: that's what code is for.

I still keep tabs on the DSL tools team at MSFT, so it was nice to hear from Steve Cook that UML tools are going to find their way into Architecture Edition.



Silverlight 2 Beta 2 Event Handler Bug

by Administrator 25. June 2008 17:54

So, I am building a Silverlight 2 application related to my trip to Klipsch in Indianapolis this year, and found what seems to be to be a terrible bug in Silverlight 2 beta 2.  Multiple UIElements  cannot share event handlers.  What do I mean?  In my case, I have varous Paths inside a canvas and I'm creating hotspots.  When the mouse enters a given region, something slightly different will happen, however the exact same method is called for every single region when the mouse exits that Path.  So, suppose I have a Path called Damon, which happens to have some Damon-y things inside it and I'm going to display my name:

private void _damonPayne_MouseEnter(object sender, MouseEventArgs e)


AddCallout("D.R. Payne", "damonrpayne", "Hartford, WI", e);


When the mouse exists, I simply remove the UIElement representing the callout, which is the same for all regions on the page:

private void _damonPayne_MouseLeave(object sender, MouseEventArgs e)




Now, it would seem that I could make the functionality in RemoveOldCallout a MouseEventHandler and share the same method among the various paths:

protected void RemoveOldCallout(object sender, MouseEventArgs e)




Now, if I have another Path, I should be able to write code like _someOtherPath.MouseLeave += new MouseEventHandler(RemoveOldCallout);  This code, however, bombs with the following BadPropertyValue error:


Now, I have to write a different MouseLeave event for every single path on my page, and there's a lot of them.  I'll submit to Connect and hope this issue is fixed!


Geek dinner

by Administrator 25. June 2008 16:57

I went to a Geek Dinner last night at Botanas restaurant in Milwaukee.  This was different than the Nerd Dinners that we used to have.  The Nerd Dinners boiled down to people from the User Group socializing in a more free-form fashion than is practical before/after user group presentations.  The Geek Dinner we did last night was different.  The goal here was to bring together technologists, business people/entrepenuers, and people looking to invest/veture capitalists.  The result was a very cool time, for me at least.  There were several "idea" people there with something they were trying to accomplish.  It was fun (and I hope useful for them) to bring up potential pitfalls in the ventures they are trying; I believe I may now be a tech advisor for some neat things going on in Milwaukee.  I hope this becomes a regular occurance.


Not for profit? Morally Bankrupt!

by Administrator 24. June 2008 20:58

“The Man creates - the parasite says ‘Where’s my share?’ ” - Bioshock

In cities all over America, state and local governments are continually demanding that working, home-owning citizens shoulder an ever increasing tax burden.  These taxes come in the form of state income taxes, gasoline taxes, sales taxes, and more.  No single burden is as heavy as the property taxes levied on home owners.  These taxes are ostensibly to provide services such as waste removal, public schools, and the like.  Beneath the seemingly benign veneer of Public Service is a rotten core of income redistribution, rights violation, and political pull for sale.  The offenses are particularly grievous in the theory and practice of Not for Profit Organizations (NPOs) in America.

NPOs are able to apply for tax exempt status, which tends to be universal in nature once granted.  Revenues generated in excess of operating expenses are not taxed, sales tax is not paid, and property tax on land and buildings owned by the entity is not collected.  Given the relatively large amounts of money, we will focus on property taxes here.

The first problem with this arrangement is that there is no solid rational or moral foundation for giving favorable tax status to one type of organization over another.  The fact that many NPOs operate charitable ventures as their primary activity does not change this.  The activities undertaken by an organization are the concern of the business, their clients, and owners as long as the business is not breaking any laws or violating anyone’s individual rights.  It cannot be rationally supported that it is “in the public interest” to redistribute income from for-profit businesses to NPOs so that they can run public-funded charities.  As Ayn Rand stated in The Virtue of Selfishness:

…there is no such entity as “the public,” since the public is merely a number of individuals, any claimed or implied conflict of “the public interest” with private interests means that the interests of some men are to be sacrificed to the interests and wishes of others.

The income redistribution happening in favor of NPOs is obvious.  No taxes of any kind are paid, and yet taxpayer funded services are still consumed by these entities.  Consider the example of a church in a small town.  Does the garbage still get picked up?  Will the fire department show up if the church is on fire?  Do the police answer 911 calls from the church?  Is there running water?  Is waste water treated?  All of these things are funded by property taxes and various extra fees on service bills presented to normal citizens who lack the political pull and legal knowhow to create a special status for themselves.  If a small city of 10,000 people containing various private residences as well as churches spends $100,000 per year on waste pickup services, the citizens who pay taxes are directly paying for the NPOs.  Citizens who belong to the churches likely don’t mind, but what about everyone else?  In the same example town, should the hindu(1)  family really be subsidizing the services consumed by the evangelical christian (1) church?  Should the atheist family be subsidizing either?  Of course not, except for the threat of force, no one would choose to pay.

In a true free market society, one would be able to opt out of any service provided by the government and also no pay for it, or ideally these services (fire, waste, etc.) would be provided by competing private enterprises who had to convince me to use their service with a solid value proposition. This is not the case in any municipality I know of, and it gets worse. As in every case where the government tampers with the market and takes away freedoms, there are unintended side effects that distort the original intention of the laws that had no moral foundation to begin with. Wealthy retirees in Milwaukee with legal and financial pull are forming communities within the city (2) in order to avoid property taxes.  If a resident having a heart attack calls 911, the costs associated for this necessary and life saving service will be passed on in the form of ever-increasing property tax burdens.  Because the tax exempt status is near universal and practically unconditional, it is not restricted to the core aims of the organization.  In the same example town of 10,000 and countless other municipalities across America, religious organizations are using excess donations to purchase large tracts of land for speculation.  A private citizen doing so would be saddled with a hefty property tax bill, thereby forcing them to carefully consider the risk and reward possibly by buying land.  The market is therefore severely distorted because the rules are not the same for all participants.  It is impossible for this situation to continue, as Ayn Rand put it:

In any compromise between food and poison, it is only death that can win. In any compromise between good and evil, it is only evil that can profit.

In the ever-escalating practice of making a smaller group of people support the lives of others, only evil can win and the process cannot go on forever.  Eventually, those who produce and pay will either opt-out of participating in this civilization or die as they are unable to sustain their own lives.  Where will the parasites get their free lunch then?  In the mean time, the happiness, goals, and values of some people are sacrificed to further the happiness, goals, and values of others.  This is a morally bankrupt practice and indefensible state of affairs.

The example town of 10,000 is in fact where I live and not a theoretical example at all.  In 2008 the property taxes for a 2,500 square foot home in this country town 35 miles from Milwaukee will work out to be around $600 per month.  There are no services to opt out of and no special status that most citizens could qualify for – the sacrificers must outnumber and out produce those collecting the sacrifices as a simple matter of mathematics.  The picture for retirement is particularly bleak and puts modern American life into perspective: a retiree could responsibly save for retirement over the course of their career, pay off their home mortgage, and still be forced to pay $600/month in today’s dollars for the privilege of having property that is already rightfully theirs.  Of course, the value of their home will adjust upwards for inflation every year, the actual tax rate can go up any time for any reason, and their hard earned savings can be eroded by the fiat currency policies of the Federal Reserve at any time by any amount.

One cannot help but feel that in America in the 21st century, one does not actually own property, but rather one can lease it from the government for a non-negotiable and never ending extortion amount.

The root cause of these issues is the government’s ability to tax any group for any reason and for any amount.  Besides expanding government power far beyond protecting individual rights it creates an environment where some citizens gain a protected and elevated status and all other citizens are the losers who must pay the price for the lifestyles of others.  Citizens are free to use their time and money to support any cause they favor, in other words to work to gain and keep that which they value.  Waste removal services are free to give away services to a charitable institution favored by the ownership, and even though religious claims are not rationally supportable one must support the right of private citizens to donate to these institutions if they choose to do so.

Organizations with ideas that have merit will be able to succeed on their own, and those that do not will rightfully fail.  Stop using government force to make citizens subsidize protected organizations.



(1)    A note on grammar:  I have decided to refuse to capitalize names of religious bodies, etc.  Such habits only serve to reinforce the notion that religions are somehow special entities deserving elevated status and beyond rational criticism.  I do not share this opinion.

(2)    Please see this Milwaukee Magazine article for information on these communities: http://www.milwaukeemagazine.com/currentIssue/full_feature_story.asp?NewMessageID=11063


Spawning Threads

by Administrator 23. June 2008 18:05

Dan has an article showing some nice syntactical sugar for spawning threads.  Dan has been studying the model of CCR, currently part of Robotics Studio.  The article specifically mentions the Compact Framework, but if you are doing full-framework development I would encourage you to check out the Parallel Extensions library as well.  It was mentioned at TechEd that the CCR might be refactored to use the TPL, so it'd be worth taking a peak at.  Using System.Threading.Tasks you could write code that starts to look less like the traditional ThreadStart code and more like what Dan is doing.  Without spending more than 30 seconds on this idea:

TaskCreationOptions tco = TaskCreationOptions.Detached;

TaskManagerPolicy tmp =

new TaskManagerPolicy(1, Environment.ProcessorCount,1,0, System.Threading.ThreadPriority.AboveNormal);

TaskManager tm = new TaskManager(tmp);

Task t = Task.Create(

(a) => { Console.WriteLine("doing some work"); },

tm, tco);

If we start to see some multi-core mobile processors, it might be an interesting excercise to port a subset of PFX to the Compact Framework.


Blogged.com rating

by Administrator 18. June 2008 16:45

It looks like blogged.com has labled me "great".  I'll take it!

Damon Payne at Blogged


Racing a Jet engine

by Administrator 12. June 2008 18:20

While looking on Reggie's blog for news on MySQL support for the Entity Framework, I enjoyed reading this article.  I continue to be amazed at the performance of the CLR.  Some people are absolutely baffled that managed code could be faster than native code, and the low-level reasons why have been blogged by people far smarter than I in the past.  Since someone just asked, A couple of the better-known reasons:

1) The managed heap rules:  If I say "object* foo = new object();" in C++, the OS looks around to find some memory it can give me.  CLR programs use a managed heap, however.  Despite the fact that calling "new()" is always expensive, the managed heap gives a huge advantage.  Instead of searching for free memory, the next chunk on the managed heap is returned immediately.  C developers writing games have used similar tricks for years, using malloc to get a big chunk of memory and managing bits of it themselves as needed.

2) JIT rules: C# is always JITified before execution.  JIT compiling turns your C# into machine code.  So what, you say, my C/C++ code is pre-compiled for the platform and doesn't pay the JIT penalty on application startup.  The advantage of the JIT is that it can be compiled each time the program is ran, and potentially take advantage of different situations and things specific not just to a processor architecture, but on each individual machine.  (I need to find a link to cite this appropriately) 

Anyway, read the article on Reggie's site, and thank him for the work he's doing.  Hey Reggie, when is that preview of Connector 5.3 come out?


TRUE deregulation is the only answer for the cable industry

by Administrator 10. June 2008 18:55

In an article on Ars Technica, a lobbyist for the cable industry is quoted as saying that deregulation allows vendors to innovate faster and is a pro-consumer move.  The article’s author, however, cries that past evidence shows that deregulation has always brought higher prices to customers.  In addition, the absolutely abysmal customer service record of every major cable provider is pointed to as a need for government interference. 

I can personally provide a number of anecdotes to speak to the utterly shameful service and support I get from my own cable provider, but as is almost always the case when deregulation (free markets) is blamed for a supposedly undesirable effect, the ostensible deregulation is incomplete or tainted and therefore does not accomplish its aim. 

In the case of cable, consider the history.  Buried wire cable TV and Internet providers have had to deal with censorship and invasive oversight from the FCC and have been granted exclusive contracts by local and state governments.  These contracts usually take the form of the provider promising to build out the service to a high percentage of homes even if running wire there is not profitable and kick backs to the municipality in question in exchange for a guarantee that no competitors will be allowed to offer a comparable service in the same geographic area.  When Kyle McSlarrow says he wants deregulation, it would seem he wants to be free from any oversight, but of course keep the government’s barrier to any competition.

Removing any threat of competition, as well as allowing the cable provider to set their own prices, provides no incentive to offer good services at good rates and no incentive to help customers who are having trouble.  Right now, if I want better cable service, my only option is to move to someplace where a better provider is operating with their government-blessed monopoly.  Despite intense marketing spin to the contrary, Satellite is not an equivalent option in terms of bitrates, latency, and weather resiliency. Services such as Verizon’s FIOS and AT&T UVerse face an uphill regulatory battle at the State, Local, and Federal level as they seek permission to run fiber-optic wires into cities to compete with cable.

As usual the proponents of a Paternalistic State are quick to decry free markets as the cause of the issues that were in fact created with regulations.  If any company who wished to provide content was free to go out and negotiate with landowners to bury a transmission medium all the way up to individual homes, then we would see real deregulation.  Companies like Time Warner, Charter, AT&T, and Verizon would have to compete for the business of discerning consumers instead of competing for the favor of a small number of bureaucrats. Complete deregulation is the only sure way to drive innovation, bring down prices, and improve customer service.

Only complete and unconditional deregulation will set consumers free from high cable prices and bad service.


Software Development Meme

by Administrator 10. June 2008 16:21

Larry Clarkin called me out in a question on software development going around the blogosphere.  Here are my answers.

How old were you when you started programming?

I was 11, we were living in a town of 600 people in southern Missouri.  I was very into arcade games and the few games we had for the PC which was an 8086.  My father, a very technical man but very cheap at the time, was loathe to shell out for a new video game.  At some point in a stroke of intuition, I realized those guys must create these games somehow. 

Damon: “Dad, if I can’t have a new game, I’ll make one.  How do those guys do that?”

Dad: “Oh, that’s with programming languages son”

Damon: “Do we have any of that?”

Dad: “Here’s the GW-Basic book that came with the PC”

I did the basic infinite loop printing my name, then learned the power of GOSUB and created a subroutine that would draw a spaceship and a subroutine that would shoot lightning bolts out of said spaceship.   I didn’t understand anything about how game worlds were animated though, the “tick” concept, and though that every on-screen object must be a Thread or something.  I left it alone until years later, living in Waukesha, my Dad brought home a Turbo Pascal compiler for our massively powerful 386. 

What was your first language?

GW-Basic, later Pascal

What was the first real program you wrote?

Well, the spaceship game was vaporware so I can’t say that one, but I did briefly experiment with audio on the 8086.  There was some kind of PlaySound(frequency, duration) function in GW-Basic, and I thought I’d need to write music for my eventual spaceship game.  I painstakingly assigned every letter of the alphabet a frequency inside a subroutine and checked the key stroke to see what letter was pressed.  I would type out various things that are not fit to print here in an attempt to see what words and phrases might make cool game music.  This program worked and met the intended scope.

What languages have you used since you started programming?

GW-Basic, Pascal, C, C++, Dephi, Q-Basic, Java, Javascript, VB.NET, C#

What was your first professional programming gig?

My internship of my Junior year in college ended up lasting through my Senior year, so nearly a year.  I was a C++ developer at Great Lakes Higher Education Corporation.  We were doing code on DB2 and Solaris of the kind JSP developers would soon become familiar with.

If you knew then what you know now, would have started programming?

Absoultely.  There’s few other things I could picture myself doing.  That sounds like a good blog post “What would you do if you couldn’t create software?”

If there is one thing you learned along the way that you would tell new developers, what would it be?

I would tell them to take an interpersonal communication class, or to spend some time as a real professional consultant.  Many early times in my career I got in trouble, or nearly got in trouble, by being cocky or not recognizing when situations were politically charged.  Even if you just want to write code, you must be aware of these things.

What’s the most fun you’ve ever had programming?

There are lots of small things along the way where things were fun for 6 months or so, but when I think about times I was most looking forward to going to work, it was actually (and I can’t believe I’m saying this) a project I did at Assurant health.  They forced me to use VB.Net which I hate, they gave us slow computers with mandatory virus scanning, and the schedule required heroics and a lot of cleaning up bad offshore code.  However, I had some excellent people to work with that I still stay in contact with years later.  I am now a client of The Clarkinator.  DeMilde, Terski, VanDyke, and others: it was a good time.

Who am I calling out?

Aaron Staves

David Snopek

Dan Vanderboom

Matt Terski


About the author

Damon Payne is a Microsoft MVP specializing in Smart Client solution architecture. 

INETA Community Speakers Program

Month List

Page List

flickr photostream