Wednesday, April 15, 2009

Whither the constitution?

I generally don't talk politics, but I am astonished at what came out today.

The department of homeland security released a report this week labeling all sort of people as right wing extremists that should be on the watchlist of the federal government. Besides the amazing amount of chutzpah of declaring veterans a threat to homeland security, it also declares that "Rightwing extremism in the United States can be broadly divided into those groups, movements, and adherents that are primarily hate-oriented...and those that are mainly antigovernment, rejecting federal authority in favor of state or local authority, or rejecting government authority entirely."

Compare this to the ninth and tenth amendments to our constitution:

Ninth Amendment – Protection of rights not specifically enumerated in the Bill of Rights.
The enumeration in the Constitution, of certain rights, shall not be construed to deny or disparage others retained by the people.

Tenth Amendment – Powers of States and people.
The powers not delegated to the United States by the Constitution, nor prohibited by it to the States, are reserved to the States respectively, or to the people.

Apparently the founding fathers should now be classified as right wing extremists. Personally, I am appalled at this. Janet Napolitano should be fired.


Sunday, April 12, 2009

The magnificent rules of baseball

Today's Dodger - Diamondbacks game was a wonderful lesson in the arcane rules of baseball. Baseball is a simple sport, but there are an amazing number of circumstances that require complex rulings. Today's game had one of those instances, and Joe Torre did an outstanding job of being sure that the Dodgers came out on the right side of the equation.

Here's what happened: Runners on Second and Third, one out. Line drive to the pitcher who throws to second. The second baseman skips the bag and tags the runner out. Prior to the tag, the runner from third crossed home plate. Double play, inning over, the Diamondbacks leave the field. No run scored. Right? After all, the runner on third didn't tag up.

Well, not quite. See, here's what section 7.10 has to say:

7.10 Any runner shall be called out, on appeal, when—

Ok, first off, the runner is not automatically out. There has to be an appeal to the umpire. Thus, running from third to home before the ball is caught doesn't mean you are out automatically. So under what circumstances are you out? Let's keep reading:

(a) After a fly ball is caught, he fails to retouch his original base before he or his original base is tagged;

Ok, he is out if he doesn't run back to the base, wait for it, _before he or his original base is tagged_.

So, because the Arizona Diamondbacks did not throw the ball the third and appeal to the umpire for the out, the runner is safe. But that shouldn't matter right, because there were already three outs. Wrong. The runner from second was tagged after the runner from third ran home. According to the rules of baseball, the run counts because it scored before the third out was made in the inning.

So why couldn't the Diamondbacks just throw the ball to third during Joe Torre's argument with the umpires? Keep reading...

Any appeal under this rule must be made before the next pitch, or any play or attempted play. If the violation occurs during a play which ends a half-inning, the appeal must be made before the defensive team leaves the field.

Ok, the defensive team has to appeal before they left the field. They are clearly in the dugout while Torre is arguing this point, so they have left the field. But have they? What if a coach is still on the field. And is it really fair to require them to basically record four outs? Yes, it is. Keep reading:

Appeal plays may require an umpire to recognize an apparent “fourth out.” If the third out is made during a play in which an appeal play is sustained on another runner, the appeal play decision takes precedence in determining the out. If there is more than one appeal during a play that ends a half-inning, the defense may elect to take the out that gives it the advantage. For the purpose of this rule, the defensive team has “left the field” when the pitcher and all infielders have left fair territory on their way to the bench or clubhouse.

So there it is. In cases like this, the team really has to make a fourth out to end the inning. Thus, if Arizona had thrown the ball to third and appealed to the umpire, the run would not have counted and there would have essentially been four outs in the inning. But because the infielders and the pitcher had all crossed into foul territory, and they did not appeal for the out at third, the runner is considered safe, the run scores, and the Dodgers tied the game up 1-1.

Amazing stuff, and for a geek like me, very cool. Reading the rules of baseball is a bit like studying scripture. You have to read carefully and pay attention to the details. At least I don't have to work as hard to read the original languages with this stuff!

In the end, the Dodgers won 3-1.



Rocked. Our 11am service was as full as our building has ever been. The energy was amazing. The best part was that virtually everyone around us were visitors. The gospel was proclaimed and God was glorified. What a marvelous day!


Friday, April 10, 2009

ChMS - The Power of SQL ... and the importance of backups

SQL is awesome. Things that used to take hours to do by hand can be done in seconds with a few commands. Today we discovered that an account had been created that should not have been, and there were 51 records that had been entered in there erroneously. Going into each transaction and manually making the change would be time consuming and tedious.

Thankfully with SQL this can all be done rather quickly with an update statement. With one simple update statement I can move all fifty one of those gifts into the proper account, allowing me to delete the erroneous account. Key point here: when using the update statement in SQL, DO NOT FORGET THE WHERE CLAUSE!

For those of you that read the second half of the title of this entry, you can see where this is going.

I did a select (with where) followed by an update, and forgot to include the where clause in the update statement. Yes, yes, I know... For those of you who don't, in one instant I moved every single financial transaction into the database into one account.

Um... oops?

Thankfully we back the database up every night at 2am, and we had not entered contributions today. So after a little learning on how to restore one table from a backup (and restoring the account I had deleted earlier today) we have our contributions allocated to the right accounts again...



PS - Even with a really fast box, it takes a while to delete and restore 700,000 rows from a table...

Thursday, April 9, 2009

ChMS - A compelling reason to host it yourself

This article in Wired provides the most compelling case to host your data yourself of anything I have ever read.

Here's what happened: Last week the FBI raided Core IP Networks, and seized all of their equipment.

The problem is that entire businesses were hosted on that equipment. A company called Liquid Motors has effectively been put out of business by this seizure. They sued the FBI for the return of their servers and lost. The excuse? Their servers "could" have been used in the crime.

They are one of about fifty companies that are collateral damage to the wrongdoings of another.

This is why I have serious reservations about having my data hosted somewhere else, no matter how secure they are. Core IP Networks provided duplicate servers, a hardened building, with multiple power sources and their own power generation. But all of that is irrelevant when the servers have been seized by the FBI. Based on past history you can count on several things:

(1) The FBI tends to be quite clueless when dealing with technology matters and
(2) They are in no hurry to get your data back to you.

If you host your data yourself there are still many dangers, and you still could be in trouble if you have a staff member using your servers for illicit activities (you check for that sort of thing, RIGHT?) but at least you are less likely to be collateral damage in someone else's FBI investigation.