Thursday, February 28, 2013

for loops

I read this over at TheDailyWTF and promptly had to clean coffee off of my monitor. This has to be the greatest for loop ever written!

$i = 0;
for (;;) {
$i++;
...
if ($i >= 15) break;
}


Now go clean whatever beverage you were drinking off of your monitor, and don't blame me! I warned you!

(and for those non-coders reading, the entire thing can be replaced with for($i=0 ; $i < 15 ; $i++) { ... })

Wednesday, February 27, 2013

Tuesday, February 26, 2013

Why I hate the TSA

Great article titled Why I hate the TSA. The people who read me might be interested to read as well.

Saturday, February 23, 2013

How to thwart TSA "security"

A couple of weeks ago, the TSA found a plastic dagger via it's virtual strip-search machines. In the picture, the dagger appears to have a four-inch blade. In the comments, several people (rightfully) take TSA to task for this find, as it is not a threat to aviation. Our point is that it is not worth the liberties and the money to find something so insignificant, but some anonymous person seemed to want an answer as to why we were not focusing on the intent of the person trying to smuggle it on. My reply exposes several "weaknesses" in TSA security, so I doubt it will get approved. But here is my basic reply (I did not save a local copy, so I don't have it word-for-word:

The intent of the person carrying this dagger is irrelevant, as it is not a threat to aviation. If he had ill intent, here are some other ways to get past security:

First, make the checkpoint itself the target. I'm not sure how much damage you could do with a 4" plastic blade, but you'd be just as big a threat to aviation there as if you managed to get it on the plane, what with hardened cockpit doors and passenger awareness and all.

Second, place the blade in the scanner's blind spot. See point one as to why, even if successful, you're still not a threat to aviation.

Third, take a pair of scissors, which are allowed, instead. Once past security, separate the blades. Now you have TWO weapons instead of one. See point one as to why this does not matter, though, and why I suspect the scissors are allowed to begin with.

Fourth, go through security and find a place inside the "secure" area to have a nice steak dinner before your flight. Pocket the steak knife before you leave the restaurant. You're still not a threat to aviation, but at least you had a nice meal before the other passengers on the flight took you down when you started trying to take over the plane with a steak knife.

Finally, fly first-class and opt for the in-flight meal. Then you can wait, in the comfort of first class, for a flight attendant to hand you a knife. Again, at least you had a nice meal (with the bonus of a comfortable seat on the plane) before the other passengers took you down.

Friday, February 22, 2013

Why are comments moderated?

I just realized that, as an advocate of free speech, I thought it might be wise to post an explanation of why comments are moderated here.

The explanation really is quite simple: spam. I moderate comments so that I can keep out the spam. If you are a human posting a comment, it will get approved. If it does not get approved, it must have appeared to be spam ;) Sure, I use a ton of anti-spam measures both on the blog and on the forum, but by requiring moderation of your first couple of comments, I add myself as the final anti-spam measure. After you've been approved twice before, your comments should be auto-approved. The restrictions on the forum are the same (two approved posts, then auto-approval kicks in), and, unfortunately, approved comments do not count towards posts and approved posts do not count towards comments. The only other difference with the forum is that off-topic posts will be moved to a more appropriate location, but will not be deleted.

Wednesday, February 20, 2013

Tuesday, February 19, 2013

Homeland

The download page for Homeland is ready! :) Or, you can still buy a copy (affiliate link) ;)