Archive

Archive for October, 2010

Time traveler in Chaplin film

October 29, 2010 Leave a comment

I’m sure you’ve all read about it and seen the video by now. My theory? Definitely a time traveler. If we can send people back in time, why can’t we send radio waves too? No cell phone tower needed in 1928 if one exists in the time traveller’s present.

Advertisements

Unit Testing, PDC

October 29, 2010 1 comment

I just wanted to say again how much I like unit testing. I’m a total convert and will be strongly pushing for the company to start requiring them on new projects.

I just made a small addition to a piece of important code and didn’t have to worry if I broke anything because all of my tests still passed. Awesome! 🙂

Unrelated, I watched the key note from today’s PDC 2010 and it’s really eye-opening to see what people are using MS Azure for. It essentially takes the old mainframe model and abstracts the mainframe away. Pixar now does their rendering “in the cloud”. No need to maintain your own server complex, just tell the program to go and Azure assigns resources as needed. If they can provide a foolproof way to secure data, I can really see Azure-like services taking off. With all of your data in the cloud, you can access it from anywhere. Work on a document on your work PC, proofread it on your smart phone on the train home, look over suggested changes on your home PC, and send a link to it to a client across the country. Buy a movie from your TV, finish watching it on your tablet on the train. No need for special sharing software, or web streaming sites, just access to your files from anywhere, on any device. It really opens up a whole new world of possibilities.

Database design

October 22, 2010 Leave a comment

I’ve been doing some reading about the various key types in databases and have been playing around with them on our Oracle 10g database at work.

Basically you have three types of keys:
1. Primary key – this uniquely identifies each row in the table and must have a value.
2. Unique key – this uniquely identifies a row in the table but can be missing a value.
3. Foreign key – this ties a field in a child table to a key in a parent table.

So I was playing around with null values. I made two tables:

my_test
test_id, test_name, test_age

my_child_test
child_id, parent_name, child_name

  • test_id is primary key
  • test_name is unique key
  • child_id is primary key
  • parent_name is a foreign key to test_name
  • parent_name, child_name is unique key

If I put a couple rows in my_test with null parent_names, Oracle lets it go through, since nulls can’t be compared with each other. Just for fun I inserted some child rows with null for a parent_name. The child rows were inserted because the foreign key was valid, yet I can’t connect the children to their parents with any type of join clause because nulls can’t be compared.

Now the fun part: ADO.NET. Because SQL Server treats null as a distinct value, it only allows one row with a null parent_name. Apparently this behavior is translated to ADO.NET Relations, because all four of my null parents now have the same null children. Magically, null = null. (I also had to disable the unique constraint on my test_name DataColumn)

I’m surprised at this as it violates the fundamental rule of what null represents: something of unknown value. Null != null, but apparently Microsoft thinks it does. What can’t be done with a SQL statement can be done with an ADO.NET Relation object. Setting the unique flag on a DataColumn also prevents me from entering more than one row with null.

I’m curious why Microsoft went this way, which is against how the majority of database manufacturers operate. Even the ANSI SQL standard agrees with Oracle’s implementation and not ADO.NET’s.

Kohls, Penguins, and Fashion

October 14, 2010 Leave a comment

We went to the new Kohl’s last night after having dinner at Applebees. It is much larger and much brighter than the store in Park City. I even bought some clothes there! If you’re out that way, definitely check it out.

Penguins are winless in their new arena. Are the spirits of the Igloo angry? Is there some design defect preventing the team from playing well? No, they just suck. 😉

Is it just me, or has fashion now reverted to the mid ’90s? Plaid shirts, straight-leg jeans, long hair.

Categories: Random Thoughts, Sports

My response to some neo-con chain letter going around

October 12, 2010 Leave a comment

This was posted on the JCF and I typed up a response. I figured I’d share it here too. Apparently this is some email that’s going around.

WOULDN’T IT BE GREAT TO TURN ON THE TV AND HEAR ANY U.S. PRESIDENT, DEMOCRAT OR REPUBLICAN, GIVE THE FOLLOWING SPEECH?
‘My Fellow Americans: As you all know, the defeat of the Iraq regime has been completed.
Since Congress does not want to …spend any more money on this war, our mission in Iraq is complete.
This morning I gave the order for a complete removal of all American forces from Iraq . This action will be complete within 30 days. It is now time to begin the reckoning.
Before me, I have two lists. One list contains the names of countries which have stood by our side during the Iraq conflict. This list is short . The United Kingdom , Spain , Bulgaria , Australia , and Poland are some of the countries listed there.
The other list contains every one not on the first list. Most of the world’s nations are on that list. My press secretary will be distributing copies of both lists later this evening.
Let me start by saying that effective immediately, foreign aid to those nations on List 2 ceases indefinitely. The money saved during the first year alone will pretty much pay for the costs of the Iraqi war. THEN EVERY YEAR THEREAFTER It’ll GO TO OUR SOCIAL SECURITY SYSTEM SO IT WONT GO BROKE IN 20 YEARS.
The American people are no longer going to pour money into third world Hell holes and watch those government leaders grow fat on corruption.
Need help with a famine ? Wrestling with an epidemic? Call France .
In the future, together with Congress, I will work to redirect this money toward solving the vexing social problems we still have at home. On that note, a word to terrorist organizations. Screw with us and we will hunt you down and eliminate you and all your friends from the face of the earth .
Thirsting for a gutsy country to terrorize? Try France or maybe China .
I am ordering the immediate severing of diplomatic relations with France , and Russia . Thanks for all your help, comrades. We are retiring from NATO as well.
I have instructed the Mayor of New York City to begin towing the many UN diplomatic vehicles located in Manhattan with more than two unpaid parking tickets to sites where those vehicles will be stripped, shredded and crushed. I don’t care about whatever treaty pertains to this. You creeps have tens of thousands of unpaid tickets. Pay those tickets tomorrow or watch your precious Benzes, Beamers and limos be turned over to some of the finest chop shops in the world. I love New York.
A special note to our neighbors: Canada is on List 2. Since we are likely to be seeing a lot more of each other, you folks might want to try not pissing us off for a change.
Mexico is also on List 2. Its president and his entire corrupt government really need an attitude adjustment. I will have a couple thousand extra tanks and infantry divisions sitting around. Guess where I am going to put ’em? Yep, border security.
Oh, by the way, the United States is abrogating the NAFTA treaty – starting now.
We are tired of the one-way highway. Immediately, we’ll be drilling for oil in Alaska -which will take care of this country’s oil needs for decades to come. If you’re an environmentalist who opposes this decision, I refer you to List 2 above: pick a country and move there.
It is time for America to focus on its own welfare and its own citizens. Some will accuse us of isolationism. I answer them by saying, ‘darn tootin.’
Nearly a century of trying to help folks live a decent life around the world has only earned us the undying enmity of just about everyone on the planet. It is time to eliminate hunger in America . It is time to eliminate homelessness in America . To the nations on List 1, a final thought. Thank you guys. We owe you and we won’t forget.
To the nations on List 2, a final thought : You might want to learn to speak Arabic.
God bless America .. Thank you and good night.’
If you can read this in English, thank a soldier.
(Please forward this to at least ten friends and see what happens! Let’s get this to every USA computer!)

Here’s my response.

Before I start, let me say that I’m a registered Republican and tend to vote for Libertarian candidates. The document above sounds like it was written by a backwoods redneck Palin supporter.
1. forces in Iraq – we currently have more troops in Germany. Why aren’t we trying to get them out?
2. allies concerning Iraq -so you say we shouldn’t have been there and then turn around and punish those who agree with you? Doesn’t make sense. Those earthquake victims in Haiti should have sent troops to Iraq, dammit.
3. warning to terrorists – this is our position now. How’s that been working?
4. leaving NATO/France/Russia – treaty organizations are generally bad (and pretty much started WWI), so here’s one I agree with. We should leave the UN too.
5. UN delegates have unpaid parking tickets? Why is that a big deal? 10,000 warrants are issued in my county alone for unpaid parking tickets.
6. Border security – an antiquated concept. I’m for free immigration. If you want to live here, then come in and fill out some paperwork. No 10 year wait lists, no graduating up from visa to green card to citizen. We waste so much money trying to defend our borders when all the majority want is to live and work here. That means more money coming into the economy, which is good for everyone.
7. NAFTA – we need to get rid of NAFTA and do away with all trade restrictions and tariffs. Let the free market decide who’s best rather than government subsidies and restrictions. If China makes a better mousetrap, let me buy it without any added costs.
8. Drilling in Alaska – yep, let’s ruin one of the last natural beauties of the world by sticking oil derricks all over it. We need to move away from oil, not drill for more of it. It’s going to run out eventually; why not look at alternatives now? Canada is our biggest oil source by far, so any argument about funding terrorism in the Middle East is moot.
9. Isolationism – do you honestly think any country with unfettered internet access can be isolated? It worked in the early 1800s, but it could never work now.
10. Homelessness/hunger – both worthy items to give money and time to. But the government should not and cannot force me to be charitable. If you care so strongly about these, volunteer at a local shelter or soup kitchen. I guarantee that the guy on the corner will appreciate you much more for that than paying higher taxes to support more government bureaucracy.
11. The only soldiers who truly fought for their country were in the Revolutionary War, War of 1812, the Civil War, and the Pacific theater in WWII. All other wars have been about power grabs or fighting the Soviets/Communism. Sorry vets, but it’s true.

Categories: News and politics

Comcast and Philadelphia Sports

October 11, 2010 1 comment

The NHL season having started, I’ve been searching for ways to watch the Flyers without paying Comcast an extra $45 per month. Paying that much just to watch hockey games occasionally is not going to happen.

I’ve looked into my other options. NHL.com offers a service to watch every game in the league on their website. It’s not cheap ($20 per month), but it’s better than nothing and the quality isn’t too bad. Unfortunately, blackout rules apply, and since I’m too close to Philadelphia, I can’t watch Flyers (or Crapitals) on there.

Same deal with Yahoo Sports and NHL Center Ice.

My solution? I’ve found that I can watch illegal streams on sites like atdhe.net. The quality usually stinks, but at least I can watch the games (assuming someone is streaming that night).

It’s ridiculous, and it’s all because of blackout rules. I am more than willing to pay a reasonable price to watch games online but the NHL refuses to take my money, instead stating that these services are for fans that don’t live near their team’s hometown, and not just another option to watch the local team. I don’t get it. Money is money, but apparently because I could give Comcast $45 more each month (that would be $450 for the season and playoffs), I’m not good enough.

I don’t like it, but illegal streaming it is. Please NHL: get rid of the antiquated blackout rule and let me give you my money.

Categories: Sports

Microsoft read my mind!

October 1, 2010 Leave a comment

MS just moved the old Live Spaces blogging site over to WordPress. I’ve gone ahead and merged my Spaces blog with this WordPress blog, so you may see some duplicate posts. You’ll also see posts going back a long time. It’s always interesting to read those old posts. It triggers memories of the time they were written.

Categories: Random Thoughts