Happy Halloween
Here's a shot of our pumpkins this year. Have a safe holiday.


Here's a shot of our pumpkins this year. Have a safe holiday.


Who's governing the standards of the code behind the things you use on a daily basis? Tennessee's lottery has had an issue with their switch to computer generated numbers. Big deal, the lottery screwed up, we all do it from time to time, right? The problem is there should have been some checks and balances to prevent a bug like this from reaching production. Are they not using test driven development? Did anyone actually review the results of the generated test sets?
How can we know that we can trust the software running the things that we interact with? A friend of mine brought up electronic voting in a conversation we had today. There is a large issue here. How do I know that when I press the button that it really is counting towards the candidate that I select? More importantly still, how do I know that the code and hardware are hardened enough to prevent malicious activity?
Obviously, all of this just raises questions in my head. I'm not sure I have the answers to this, but I know for sure I'd love to inspect the code of some of this stuff. I'd at least like to know that real life code had some kind of audit. Think of it as a Good Housekeeping seal of approval or FDA stamp for publicly consumed software. For lack of a better name, we'll call it the Josh Bush Software Guarantee. I like that, don't you? It kind of has a nice ring to it.
Jokes aside, it's important to realize that computers control many aspects of our lives. Even though the lottery is a tax on the mathematically challenged, I want to make sure it's fair for everyone.
I'm just messing around with Flickr, so I thought I'd post a picture of our dog. Auto really likes to cruise.

This trips me up from time to time, so I wanted to document this for my own benefit and share my findings. Oracle treats NULL different from any other value. Any time you make a direct comparison to a NULL value, the end result is NULL.
This topic is best shown by example.
SELECT *
FROM records
WHERE NULL=NULL;Returns nothing.
SELECT *
FROM records
WHERE ''='';Returns nothing. Oracle treats an empty string (‘’) as NULL.
SELECT *
FROM records
WHERE NULL IS NULL;Returns everything. In order to do a comparison with NULL, you must use “is”.
SELECT *
FROM records
WHERE '' IS NULL;Also returns everything. This demonstrates Oracle’s behavior of the empty string (‘’) being treated as NULL.
Now it's time for the odd stuff. Whenever you are making list comparisons, you should also be careful of NULL. List comparisons are IN/NOT IN and EXISTS/NOT EXISTS.
SELECT *
FROM records
WHERE unique_id NOT IN (
SELECT unique_id
FROM some_other_table
WHERE 1=0
);Returns nothing even though you would expect it to. I’m using 1=0 because it is never true. The set will be empty(NULL). The inner query must return something in order for the query to proceed.
SELECT *
FROM records r
WHERE NOT EXISTS (
SELECT 1
FROM some_other_table
WHERE unique_id=r.unique_id
AND 1=0
);Returns everything. Exists will evaluate to true if something is returned and will evaluate false if nothing(NULL) is returned. Also, please note that in the inner query I’m referencing a value from the outer query(r.unique_id).
SELECT *
FROM records
WHERE unique_id NOT IN (
SELECT NULL AS c
FROM dual
);Returns nothing. The inner query doesn’t return an empty set, instead it returns a single value which is null. This query will take a while to run. It will scan every record and try to perform the following comparison “unique_id <> NULL”, which will fail for all records for reasons stated in the top set of examples.
SELECT *
FROM records
WHERE unique_id IN (
SELECT NULL FROM dual
UNION ALL
SELECT 11697981 FROM dual --Let us assume this value actually exists in the records table.
);Returns 1 record. The inner query returns 2 values (NULL, 11697981). Just because the list has a value in it that is null doesn’t mean the entire comparison will fail for that record.
That's all I've got on the NULL situation. Generally I get tripped up on a NOT IN clause or a <> comparison. Hopefully not anymore.
I finally got around to this. This has been building up in my mind, and it's time to vent a little. We used to debate back and forth about which network had better coverage, Fox or NBC. Now that ESPN has taken this over, either of the other two options would suit me just fine.
The announcers that ESPN have managed to line up are just terrible. Some of them are boring, some of them are uneducated about the sport, and some are both. Combined they just stink up the airwaves. The network itself goes to commercial way too often, and won't come back from commercials for important stuff like the other (better) networks.
Their technical segments are just lame. "Draft Track"? Give me a break. Also, the next time a motor lets go and they pan to that same animation of the valve breaking off, I'm seriously going to throw my remote through the TV. Usually, they've managed to go to this graphic before the car is even back in the pits. It's okay to speculate what's happened and say something like "Maybe he dropped a valve" or "The bottom end could have let go" before you really know. The animations are totally unnecessary until you've received some sort of confirmation about what actually happened.
Here's my public outcry to ESPN: Please go watch some of the recent coverage from the other (better) networks. Everything they did wasn't always the best, but it was absolutely better than what you are doing now.
Boogity, Boogity, Boogity.