Small code with powerful results, the occasional opinion … and beer. 

15 Nov 2010
Clipboard Munger 1.2.0.0 Released

Clipboard Munger 1.2.0.0 has some improvements over 1.1.0.0, and some new default scripts.  The enhancements are:

  • The code editor now uses the ICSharpCode.TextEditor class and supports highlighting.
  • The GAC reference now uses split lists for included versus available assemblies to quickly determine what the clipboard code is referencing.

The project page is located here. I am working on getting the ITextEdit classes in use for all textboxes, and to also get intelli-sense working in the Code window… stay tuned.

09 Nov 2010
Folder Manifest 1.0.2.0

I’ve made a small enhancement to this application. It now has a check box to include the version number and build date for .NET exe and dll files.

Go to the download page for the new version.

31 Oct 2010
Rethinking the dogma of a “two” party system in America.

As election day approaches this Tuesday, I find myself in my usual pattern in the last week before an election. I’ve already done my research and marked my sample ballot: my unalterable voting guide for this Tuesday.  Regardless of any last minute revelations (which this close to election day are always B.S.), I won’t change my mind.

I am favoring DVD’s and Netflix streams… anything to avoid live or recorded shows from commercial TV which contain the inevitable mudslinging commercials by the candidates.  It’s always predictable that this will happen, and it’s the most disgusting part of the American political process to me. Quite frankly, if the candidates presented this material to me in a interview for getting the job, I would throw their resume in the trash. This is one time where the ability to fast-forward past commercials really makes a DVR priceless.

And what of the Tea Party this year?  Of all the third parties that have come and gone, and still exist, the Tea Party’s rise has been the most amazing.  The Tea Party candidates have actually been able to hold their own in some primary elections, defeating candidates considered quite strong.  But I see a familiar pattern in American politics emerging, one which has neutered many third parties in the past, and is endangering the Tea Party as well.  That pattern is absorption.

My high school history teacher spent two entire days in his class on understanding why third parties have only ever played an indirect role in America.  This is not the role they play in other countries.  In Germany, for example, there are a number of parties which are regularly elected to office: Christian Democratic Union, Free Democratic Party, Christian Socialist Union, The Green Party, and a few others.  After an election occurs, each party usually has a set of votes, and one will have a plurality.  It is rare when one party gets a majority.  As a result, the various parties will begin negotiations with each other to see if, together, they can find enough common ground to create a majority by combining their efforts.  They actually get an incentive to cooperate!  And an announcement follows of a coalition of two or three parties together, which will form the majority.

This method has its problems, but it has one big advantage.  Since the majority power is a coalition of parties, any one party in the coalition can break the coalition at any time, and vote its own way during their term of service.  In other words, the party can keep its identity and power structure. So there is a vested interest in each party to understand and meet the needs of each party participating to maintain power.

In America, it has always been hard for third parties to get elected.  When a third party’s cause becomes popular, one or both of the two major parties (Republican and Democrat) reaches out and negotiates with the third party to get their support in exchange for taking on their cause.  The problem occurs after the election: while the third party will have had influence on either the Democratic or Republican parties for support of their cause, the third party has no real representation in Congress or the Senate.  Therefore, if the third party feels their promises or cause are not being represented as promised, there is no recourse–other than to hope that the cause will survive for 2 to 4 years until the next election.  And if the cause does survive, it’s enthusiasm is usually watered down.  This is how the Republican and Democratic parties have become entrenched over the years, and any promise of “change” from either entrenched party is frankly… a joke.

So it’s time the people of the United States took third parties seriously as independent parties, not just as catalysts to bring change to the big two parties. To understand the effect this would have, imagine if the Tea Party gained 20 seats in the Senate, and the Republicans and Democrats each held 40.  If the Tea Party and the Republicans formed a coalition, and the Republicans stopped supporting the causes of the Tea Party, the Tea Party could change to supporting the Democrats or, at a minimum, join the Democrats in voting down the Republicans.  The pressure to keep in touch with the needs represented by other political parties would be real and constant, and it wouldn’t wait until the next election.  How much more attentive would the two existing parties be to members of a party they could not envelope under their control.

For years, in fact decades, I have been listening to people blindly advocating that voting for a third party is wasting a vote.  If recent history teaches us anything, it is that voting for the existing parties, either Republican or Democrat, is the real wasted vote.  As long as the two parties can do or say the minimum to subdue or silence the third party candidates from obtaining an actual seat in a governing body, their power base remains unaltered, they can drop or dilute the promised support for the third party’s causes… and the same chronic, destructive patterns of government will continue.

17 Sep 2010
Raising Hell… just to burn some books…

Be self-controlled and alert. Your enemy the devil prowls around like a roaring lion looking for someone to devour.
1 Peter 5:7-9 (NIV)

In your anger do not sin; when you are on your beds, search your hearts and be silent. Offer right sacrifices and trust in the LORD.
Psalm 4:3-5 (NIV)

Bless those who persecute you; bless and do not curse. Rejoice with those who rejoice; mourn with those who mourn. Live in harmony with one another. Do not be proud, but be willing to associate with people of low position. Do not be conceited.
Romans 12:14- 16 (NIV)

* * * * * * * * * * * * * * * * * * * * * * * *

It is rare to see the Lord discipline a follower, especially a pastor, so openly as he has done with Pastor Terry Jones (of the Dove World Outreach Center in Gainesville), who organized the planned September 11 book burning causing such international attention. Yet, that is exactly what is happening.

Book burning has a decisively bad reputation. It has historically been, and continues to be, an act of people who are in a weak and desperate position, and acting on pure emotion. Sadly, that is always apparent to everyone except the people themselves involved in the book burning. The act is always designed to incite strong emotions in others: boldness and confidence in the supporters of the cause, and fear in the people it targets. It’s always been used by people who choose hysteria over rationality and reasoning. History shows that the act may have some short term gain, but is always costly in the long term.

Many organizations throughout history have burned many sorts of books they felt threatened by. Religious organizations, dictators, tyrants and even oppressed people have had organized book burnings. The one common result of these actions: over time, rational thinking prevailed. If their motives were to subdue people under their way of thinking, it was only a matter of time until the people who fervently followed the leaders came to their senses: sometimes with the help of an unstoppable invading army.

There are also people who hold these events with another agenda: to capitalize on unvented anger to further a cause. Pastor Jones is one I put into this group. He could have scheduled this for any time. Yet the convenience of timing the  Sept 11 memorials with the heated debate over the planned muslim cultural center in New York proved just too tempting. When national leaders chimed in with their warnings about the planned burning, I’m sure they were pleased at the attention. And when a muslim cleric offered to negotiate with the pastor to stop the burning, I’m sure things seemed to be going the way he wanted.

And then, it all falls apart. The things the muslim cleric supposedly promised during the negotiations didn’t come to pass, and the pastor finds this out within 24 hours of the scheduled burning. And he still postpones it.

Did Pastor Jones fall into a classic trap? Because the planned book burning event was capitalizing on the emotions of Sept 11, any negotiator could tell you the time frame for any value from it was extremely narrow.  All any negotiator would have to do is… stall, to wait for that time frame to pass. And once it passed, not moving forward with the act says one of two things: either the plan to burn the books was a front to draw attention, or pressure from national leaders… worked. I lean towards the former.

Whatever the outcome, it was a bold step for a small church in Gainesville. Whether it was the right one or not, I won’t say. I won’t judge Pastor Jone’s motivations, or if God really did tell him to do this. I’ve seen the Lord make some amazing Lemonade from some really sour lemons. Only time will answer this.

All I will say is this: every time I talk to people about the Lord’s love for us and his desire for us to get right with him, they ask how a Christian Pastor, who claims to know and follow God, can do something like book burning. So Pastor Jones… because of your actions, you are making the job of helping people discover Jesus Christ as the one true Savior unnecessarily difficult. This includes Muslims especially, one of the largest groups of people currently turning to Him.

20 Jul 2010
Storm Warning… the Bush tax reprieve is coming to an end

In case you haven’t heard it mentioned, there are some major tax changes coming for the 2011 tax year. It’s time to start reviewing the potential impacts, and come to the sad realization that Congress has practically zero-incentive to make changes to it.

Click here for a starting point. This is Jack Cafferty’s blog entry (CNN) which has a bullet list of the changes.

13 Jul 2010
What bothers me about soccer…

I enjoyed watching a few games in the FIFA World Cup this year, but it was the final game between Spain and the Netherlands that reminded me of why soccer is not my favorite game to watch.  I personally see the game as a microcosm of a communist system, and here is why.

It’s like working for peanuts.

Soccer games sometimes seem endless before someone scores.  This year’s finale between Spain and the Netherlands was a case in point.

The core problem is that the field is so HUGE !   Frankly, when I watch a sport, I want to see accomplishment, not activity.  A bunch of guys running up and down the field passing the ball among themselves 5 or 6 times, then losing it to the other team who repeats the same thing, and the whole cycle repeating endlessly with no score change, … that’s a sleeping aid.

And while the shots may be exciting, there are far too many misses.  Only hockey rivals this sport in the large time gap between actual scoring.  It just creates frustration.  And when enough frustration builds up, it’s no wonder that a single goal appeases the crowd with so much excitement.  It’s more of an expression of relief.  “Only one point? Who cares… we’ll take it!”

There is only one way to score: no matter how you shoot, or where you shoot from.

Compare that to basketball, where getting the ball through the hoop can get you one point (free throw), two points, or three points for a long-distance field goal.  In football, you get six points for a touchdown, one point or three points for a field goal, or even two points for a safety or a end-zone completion after a touchdown.  The various ways of scoring (reward) are associated with the degree of risk taken, and add an extra dimension of strategy to the game.

Why is it that a player who scores a goal by kicking the ball from the middle of the soccer field, or even from outside the goalie’s box, doesn’t earn two or three points for the achievement, compared to the player who scores from only 5 foot in front of the goal.

You see, in communism or any collective system in its most ideological form, all work is seen as having equal value to the whole.  So if you produce more than someone else, there is no extra reward.

So with this equal value system, it would actually make sense to always take the ball to within several feet of the goal and shoot from there.  The chances of getting past the defenders are better, making an accurate shot is easier, and ultimately … the reward is the same.

The referee always gets an earful when any little hardship is encountered.

I have never seen a sport where the referee so often gets the “what, are you crazy!?!?  what, are you stupid!?!?” look from a player for almost every penalty called, or not called.  I especially love this, when the player is blatantly faking a foul  (like rolling on the ground and grabbing a shin).

It’s part of a problem with the game.  The players spend so much time, working so hard for so little reward, they turn to the referee (i.e.government) to help them out in any way they can get it.

Oh, and I especially love the approach a referee uses for serious penalties: documenting the “incident” on a yellow card and slipping it back into his pocket, as if he is going to file that away in some secret government record against you.  In every other sport, the referee makes the call and an official on the sidelines documents the call.

Also, when do you ever see a soccer coach come out and argue with a referee for his players?  I’ve never seen it.  Football, baseball and basketball coaches will always back up their players and give the referees an earful when the penalty calls start getting out of line.  I guess in soccer, when the authority dishes it out, you have to just “take it” as if it’s from God.  Soccer always adds a few extra minutes to the game to compensate for stoppage, but some of that has to be for the time the ref spends writing stuff down while he is on the field.

Sometimes I think the referee should just hand the player the yellow card and tell the player to see the principal after the game.  The last time I saw this system of enforcement was in kindergarten, so it would seem to fit.

Time remaining is always a mystery, and other stats are not displayed to the crowd.

Other than the score for each team, there isn’t a lot of openness in the process.  In every timed game except soccer, the clock is part of the scoreboard, and it is the official game clock.  Everyone can see it, validate it and teams can adjust strategy to it.  If the operator starts the clock too early or stops too late, the referee openly requests that the clock be corrected for the error.  But both the occurrence of an error, and its correction, is seen by the public.  There is no mystery.

Now in soccer, in addition to the referee being the enforcer, he is also the official time keeper.  And no one but the referee gets to see the clock.  During the last several minutes of the finale between Spain and the Netherlands, it was clear that the Netherlands players (like any team in their situation would do) were repeatedly shooting frantically at the goal to score, because the whistle to end the game could sound at any second.

Imagine how this would have changed, if the final minutes and seconds were displayed on clocks that the players, coaches and fans all could see.  The shots would not be so desperate, until the final seconds… not the final minutes.

So even though I make these “tongue in cheek” comparisons  to communism, I hope FIFA some day embraces some of these observations: even if it is only to add some new dimensions to the game.

30 Mar 2010
Folder Manifest 1.0.1.0

This version of Folder Manifest fixes a small bug where the first sub-folder name might not be listed when using sub-folders as headers.   See the project page for more details.

22 Mar 2010
Folder Manifest 1.0.0.0

Folder Manifest is a utility linked into the Windows Explorer context menu. It builds a manifest of a folder’s contents. See the project page for more details.

17 Mar 2010
Getting the custom installation portion of a Visual Studio setup project to … well, work!

I was creating a Visual Studio solution with a Setup project, and needed to add a set of custom installation steps to the setup. The process for this (Custom Actions) is easy to find in Microsoft’s online documentation, and in many forums.

Yet one thing is common: the level of failure and frustration expressed in the forums is widespread. A lot of folks had problems getting the custom class to work.. and so did I. My initial test for the custom install was just to create a log file persisting the “savedState” contents to a file on the root of C:, so I could examine its contents. The custom installation section never ran.

No matter what I did, something was missing. A few people on the forums strongly advocated abandoning the custom installation, and just go to a batch file with scripts. I wasn’t ready to go down that path. I just sensed that something simple was missing.

The answer for this comes from my colleague, Patrick Thompson, who answered a seemingly off the wall question while we chatted in the hallway outside of the office. He evidently spent a lot of hours figuring this out sometime ago, and saved me a lot of grief. And it is simple…

I was able to create my Class library for the custom installation, and include it in the application folder in the setup project. In the custom actions panel, I added the custom project to the Install and Rollback folders: the two methods my code was overriding with custom code.

The original configuration

The code for the class is here. Note that the class does not use a namespace, so that it resides in the default namespace.

But, in order for the custom code to actually work properly… All of the folders (methods) in the custom action panel must be populated with the same assembly, even if the assembly isn’t doing any real overrides to the base method. So, the proper way this should be setup is…

The proper configuration

Sure enough after making the change, the next compile and execution of the MSI package generated my test file on the C: drive, just as it should have. So there you have the missing piece to custom actions, when it looks like all hope is lost.

And here is the output written to the log file, in case you wonder what savedState settings are available by default:

 
Install...
_reserved_nestedSavedStates = "System.Collections.IDictionary[]"
_reserved_lastInstallerAttempted = "-1"
Committed (Context.Parameters...
action = "commit"
installtype = "notransaction"
assemblypath = "C:\Program Files\Bits of Genius\Folder Manifest\FolderManifestCustomInstallation.dll"
logfile = ""

FolderManifest is a utility application tied to Windows Explorer context, which I will be posting shortly.

09 Mar 2010
Clipboard Munger 1.1.0.0 released

The Clipboard Munger application now has some new functionality, and user-friendly features added to it.  I’ve also added some new scripts to the default library.

The source code and an MSI install package are available on the download page.  For details, see the project page here.