surelyyourenotserious.com
Wait… Where’d it go?

Yes, I had to remove a post. There’s some cool stuff still to say though.

At lunch, I posted about an event my employer is hosting. It’s really cool and has a very high geek score, but the event is hush-hush, not to be publicized at the behest of some of the attendees. Sorry. Let’s just say I work at an amazing company that is changing how email is done.

Now, what’s really neat is that less than an hour after I clicked “Publish”, our companies marketing manager got an automated email from Google letting him know there was a new blog post that linked to our company site. How cool is that?

Of course, he quickly came to my office, and in a very friendly, non-KGB, non-Jack-Bauer way asked me not to publicize the event. My bad. I didn’t know it was hush-hush. Intriguing, eh?

Vader Goes Nuts

The afore mentioned cracked DVD from NetFlix was Star Wars III, which I ended up buying so we could watch it.

It got me in a Star Wars kind of mood, which led me to this hilarious mash-up of every James Earl Jones movie ever made. There is some PG-13 language in it. You have been warned. I only wish I had the hours and hours of free time it would take to do something so creative and fun.

Vader Goes Nuts Video

My favorite part is right at the end when Vader can’t find anything good on the radio.

How do you get your movies?

This weekend, we got our first damaged, unplayable DVD from NetFlix. That’s pretty good. Out of a couple dozen DVDs sent to us in unprotected paper envelopes, only one has showed up cracked. I’ve also watched several movies online and watched all of the available episodes of “The Office”, both Brit and Yank. I’d have to say, I really like NetFlix.

It got me thinking. How do you get your movie fix? C’mon all you lurkers out there. I want to see some votes from people other than Ghosty and David. I’ve seen the logs. I know you’re there. Speak up!

(Intercepting your comments ahead of time:) Yes, Ghosty and David. You can still vote too.

What is your primary source for viewing movies?
At the theater. I must have that oily popcorn smell.
At the discount theater. I must have that sticky floor feel.
Big name video rental. 10 million lemmings can’t be wrong.
Mom and pop video store. Just stay away from that room behind the curtain!
Netflix/Blockbuster snail mail club. My movies, my way, eventually.
Purchased DVDs. Walmart’s return policy rawks.
Hollywood is the throne of Satan. I don’t watch movies.
Free polls from Pollhost.com

I should be happy, shouldn’t I?

Okay, so, like, you know all this talk about WeightWatchers lately? You know how I’ve said that I get 28 points a day and stuff? Well, I’ve been living for the last three weeks on that 28 points a day (more or less… okay, mostly more) and I’ve done pretty well. I’ve figured out at which places I just can’t afford to eat and what foods just won’t fit in the points budget. I think I’ve been a great student.

So why would I be upset? Well, you know me. I didn’t really read every word of instructions when I signed up. I’m a guy. Worse yet, I’m a geek – a web geek at that – and when I sign up for some web service, I pretty much feel comfortable figuring it out on my own.

But somehow, somewhere, I missed the part where you’re supposed to “click here” to take your “target point quiz”. See, even the name doesn’t really tell me what’s really going on there. The “target point quiz” is where you “confirm” your height, weight, age, and gender, and pick whether you want to maintain your weight or lose weight. I figured that since you asked me all those questions when I signed up that the 28 points that showed up on my profile was correct. But noooo.

See I stumbled across the “target point quiz” purely by accident late last week. I “confirmed” all that information and clicked “save” (Why it’s “save” and not “calculate” or something more descriptive, I don’t know.) and then noticed that my point total changed from 28 points a day to 37. 37?! Good grief! That’s HUGE compared to 28. I could eat like a relative pig and not use up 37 points a day (plus the 35 “extra points” I get per week).

I took the “quiz” several times and the result was always the same: 37. I crawled all over the web site trying to find out how to set it back to 28, how to fix my calculated result from the “quiz”. I even googled the points and found a chart that showed, for my weight, I should be at 28:

225 to 250 pounds = 28 Points

Finally, I relented, and sent an email to support. Two days later, I get this response:

Based on your information 37 POINTS® is your correct POINTS Target. It is possible that you were viewing your POINTS® Target before you took the POINTS quiz. After the sign-up process you would have been assigned a POINTS® Target value that is based solely on your current weight.

So what you’re telling me is that 28 points is correct for a person that weighs 250 pounds, but is… what? …a four-foot-tall, ten-year-old girl? How could they make such a retarded assumption. They already had all the information they needed, but somehow they assigned my points target based on only one criteria. I’vE BEEN EATING LIKE A BIRD FOR THREE WEEKS WHEN I DIDN’t HAVE TO??!!

Never mess with a large, hungry man. He may not have the energy to curtail his ham-sized fists of rage.

So anyway, that was last week. I’m pretty much over being mad. I know I should be happy that I’m allowed to eat more now. But somehow I feel cheated. I feel like three weeks of happy eating has been stolen from me. Granted I’ve lost almost ten pounds, but the victory is as hollow as my stomach has felt for the last three weeks.

I’m going to have some ice cream now. About a half gallon. With a bottle of Hershey’s on top.

To the Guy in the Dressing Room at Kohl’s…

An open letter to the guy in the dressing room at Kohl’s this Saturday:

I’m sorry. I guess I just assumed too much. You see, in my mind, it’s always been a simple fact: If the dressing room door is closed, it might be in use, so either knock or use the next dressing room (you know, the one on which the door was standing open at the time).

But, clearly, you did not accept that fact, or at least it had not occurred to you. So, yes, I’m sure it was my fault that you opened the door to my dressing room while I was using it. I should have hung a sock on the door knob, or maybe brought along a Sharpie and scrawled, “ES OCUPADO” on the door on my way in. How could I have been so thoughtless.

Then again, if you did it on purpose, because you’re some kind of freakish pervert, then I only hope it was good for you, cuz I didn’t particularly enjoy it.

At long last fall has arrived in North Texas. As the cold rain falls outside, wearing my first warm sweatshirt of the year, I ponder…

Why don’t sheep shrink in the rain?

Mamacita May Hate You For It

You know what I like best about real mexican restaurants? I love those warm, fluffy, hand rolled, love soaked tortillas. Mmm. I could eat a whole batch with a little melted butter and honey.

But I have bad news for you. If you love those little white disks of happiness, stop reading right now. I’m serious. Look away. You have been warned.

Tortillas are made from two basic ingredients: Bleached white flour and lard. That’s right, those yummy little flat breads are 100% fat and carbs. As far as your digestive system is concerned, you might as well, eat a big spoon full of Crisco with sugar on top.

I *LUVS* me some taco bell. I could have a 7-layer burrito and a bean burrito for dinner every day for the rest of my life and I’d die happy. I’d die at 38 years old and 800 pounds, but happy.

Using my handy-dandy WW Points calculator, I discovered that the meal above weighs in at 17.5 points (out of my daily allowance of 37*). Here’s the total, using my previous nutritional notation.

27 grams of fat:
Butter PatButter PatButter Pat

9 grams of sugar (But more importantly, 119 grams of carbohydrates. Remember, you body treats bleached white flour much the same way it treats sugar.):
Sugar PacketSugar Packet

2540 milligrams of sodium:
Salt PacketSalt PacketSalt PacketSalt Packet

And my new measurement, 17.5 WW Points:
1 Point1 Point1 Point1 Point1 Point1 Point1 Point1 Point1 Point1 Point1 Point1 Point1 Point1 Point1 Point1 Point1 Point1 Point

Taco Bell has an awesome nutritional calculator (as do all the Yum brand stores). On their calculator, you can add extra or completely remove any of the ingredients in an item. That means that, yes Virginia, you can have a burrito without the tortilla.

Taco Bell's Awesome Calculator

I had to give it a shot. Today at lunch I ordered a 7-layer and a bean burrito sans tortilla. The staff was confused, but the manager assured them it was possible. Visualize a short, hispanic woman looking at you with furrowed brow like your just asked her to make a taco with extra crazy on top. “¿Menos tortiyya? ¿¡Por que!?”

Here’s what I got.

Burrito in a bowl

And it was delicious!! Even better check out these numbers with the lard pie removed.

17 grams of fat:
Butter PatButter Pat

4 grams of sugar (And only 49 grams of carbohydrates, down from 119.):
Sugar Packet

1410 milligrams of sodium:
Salt PacketSalt Packet

And only 8 WW Points:
1 Point1 Point1 Point1 Point1 Point1 Point1 Point1 Point

Every value virtually cut in half! That’s SO AWESOME! The tortilla doesn’t add anything to the flavor and really offers nothing more than a handy carrying case, but doubles the gut busting anti-nutrition. From now on I’m a burrito bowl boy, baby!

Practice makes perfect… eventually.

When I practice juggling, I frequently drop the ball. When I practice playing the guitar, I frequently strike the wrong chord. I pretty much think of practices as screwing up something in the hope that you’ll gain experience from the screw-up and learn how to avoid screwing up again later.

With that in mind, here’s this week’s white board quip:

Doesn’t it bother you that doctors call what they do “practice”?

Hmm.

Event Function Stacking in JavaScript

<disclaimer>I don’t usually post the intricacies of my work here, but this one was just too cool to keep to myself. Those of you who are not steeped in JavaScript, DOM, and XHTML can stop reading here and come back later for your normal dose of humor and/or world news.</disclaimer>

I’ve been struggling for a while now with a problem in IE. On my company’s website, we use the DOM and JavaScript perform a lot of CSS trickery. IE doesn’t support some of the CSS pseudo classes we use to decorate our forms and to create our drop-down navigation. The best way I’ve found to get these pseudo classes to work in IE is the suckerfish library. You can read more about how suckerfish accomplishes this at the son of suckerfish site. They explain it much better than I could here.

Suckerfish has been wonderful and we’ve used it all over our site. However, I ran into a snag. We’re adding a search form to the top of our page template, where real estate is premium. In order to save space, I created a small icon-like button to submit the form rather than using a bigger “Search” button.

Now, to be a good and accessible site, we need to explicitly label the form somehow so the user doesn’t have to infer what it’s for. My idea (admittedly stolen) was to have the default value of the field be "Search...". When the user clicks into the field, an onfocus event removes the default value, and if the user doesn’t give us a search term, the onblur event puts the default value back. Pretty straight forward, right? Wrong.

Suckerfish has this one drawback: It overwrites any preexisting event. When my suckerfish script added an onfocus event to my search box (to change the CSS style) it overwrote my clever text value swap. I needed a way for suckerfish to stack events instead of blindly assigning the event listener to a new function.

Another bit of code we use (to created rounded boxes) utilized Scott Andrew’s addEvent method. I tried switching suckerfish to use this, but the outcome was the same. The inline event functions were overwritten.

My good friend and colleague, Randy Peterman, sent me a link to a potential fix. Simon Wilson’s addLoadEvent method seemed to do exactly what I was looking for. And sure enough, I was able to stack my events by slightly modifying his window.onload logic to take the element object and the event type as arguments. Cloogy, yes. Uses eval method, yes. But worked, apparently, at least in testing. It wasn’t until I added my code to change the value of this that this method failed.

It took a me a while to really understand what Simon’s method was doing. It involves JavaScript Closures and, what I best understand as the scope of nested function objects. When using Simon’s closure method, the this object reference gets lost as the nesting of functions unwinds. So when I tried to nest…

if( this.value == 'search...')

…I found out that this was undefined. The complicated solution was just too complicated. I needed to dumb it down.

So I did just that: Make it elementary. Rather than storing function objects within function objects and nesting closures, I just needed to strip out the meat of the functions and tack them together. Sounds pretty sophomoric, but it solved my problem.

See a sample here.

/* Retains any existing event listener, rather than overwritting it. Trint Ladd */
function stackEvent( obj, eventType, func )
{
	var oldEvent = eval( "obj." + eventType );
	var oldInnerSource = "";
	var newInnerSource = func.toString()
	newInnerSource = newInnerSource.substring( newInnerSource.indexOf( "{" ) + 1, newInnerSource.lastIndexOf( "}" ) );

	if( typeof oldEvent == "function" )
	{
		oldInnerSource = oldEvent.toString()
		oldInnerSource = oldInnerSource.substring( oldInnerSource.indexOf( "{" ) + 1, oldInnerSource.lastIndexOf( "}" ) );
	}
	eval( "obj." + eventType + " = function(){ " + oldInnerSource + newInnerSource + " }" );
}

/* suckerfish focus on textboxes */
sfFocusInput = function( elements )
{
	for( var i=0; i < elements.length; i++ )
	{
		if( elements[i].tagName == "INPUT" && ( elements[i].type != "text" && elements[i].type != "password" ) )
		{
			// Don't apply this to other input types (buttons, radios, etc.)
			continue;
		}

		stackEvent( elements[i], "onfocus", function()
			{
				this.value += "1";
			}
		);
		stackEvent( elements[i], "onfocus", function()
			{
				this.value += "2";
			}
		);
		stackEvent( elements[i], "onfocus", function()
			{
				this.value += "3";
			}
		);
	}
}

/* suckerfish method can be found at http://www.htmldog.com/articles/suckerfish/ */
suckerfish(sfFocusInput, "INPUT");
My Girlish Figure

I’m sure you picked up on the hints last week. I’ve signed up for WeightWatchers.

I have a few friends who’ve had great success with WeightWatchers’ online point system. One young man in our youth group lost 70 pounds last year. It’s easy, inexpensive, and you don’t have to buy any special foods, just be more conscious of the things you already eat.

Ultimately it came down the the fact that most of my “XL” shirts have become uncomfortably snug and my clever tactic of doing nothing about it was not working out for me.

Today marks the first day of week two. I am allowed 37* points a day, with 35 points of overflow to use throughout the week. I did really well last week, averaging about 30 points a day, until the weekend. My in-laws were in town and we spent the whole weekend together shopping and eating and site seeing and eating and eating and eating. I honestly surprised myself when I tallied up the points for Saturday and topped 50 points. That’s much closer to what I was eating on a regular basis before I started. Not every day, but at least a couple of days a week.

I weighed in this morning at 1 pound less than last Monday. I could probably lose one pound by getting a hair cut, so I’m calling the first week a wash. But it was a learning experience and that’s better than nothing.

© Copyright 2004-2005, Light-Spark Design
Powered By WordPress