25

Dec

Merry Christmas!!

December 25th 2009 10:38 am by Matt

:D

22

Dec

jQuery Validation with multiple (mostly) identical forms

December 22nd 2009 4:16 pm by Matt

I came across an issue today with jQuery with multiple forms. I’ve got a page that’s dynamically generating possibly several dozen mostly identical forms on a single page. “Why would you do that?” you might ask. Well, imagine a data set where I want to be able to edit each row independently and you’ve got an idea of what I’m doing. I know it’s not pretty, but it’s definitely an easy and straight forward way to do this. Here’s an example of a typical form that I might have 15 of in this script:

1
2
3
4
5
6
7
8
9
<form action="/form/process" method="post" class="question_form">
	<label for="questiont">Question:</label>
	<input class="required" type="text" name="question" />
	<br />
	<label for="answer">Answer:</label>
	<input class="required" type="text" name="answer" />
	<br />
	<input type="submit" value="Submit!" />
</form>

So, you’d think the logical thing to do for quickly running validation on all these forms would be:

1
2
3
$(document).ready(function() {
	$(".question_form").validate();
});

Unfortunately, because the form fields shared the same name, the validation plugin hiccuped with this solution. Now I’m using custom error classes and rules in my actual implementation, so maybe this problem is more specific and isn’t reproduced quite this easily – but basically what happens is that if you have 10 “Question” forms, the validation plugin will see the “Question” field on the first form and call it good. Obviously, we can’t have that, we want each form validating separately.

The solution? Use the each selector to iterate through the forms, of course:

1
2
3
4
5
$(document).ready(function() {
	$(".question_form").each(function() {
		$(this).validate();
	});
});

voila! Easy, but I want to remember it for later :)

19

Dec

MMM: Miss March (2009)

December 19th 2009 1:20 am by Matt

Starring

Nobody

In Brief

A high school abstinence speaker agrees to finally have sex with his girlfriend, but falls into a coma before he gets the chance. When wakes up 4 years later he discovers that his former girlfriend is a playboy playmate and sets off across the country to find her.

The Beef

The most painful biking I’ve done in a long time. I wouldn’t have finished the movie if I weren’t stuck on a bike waiting for my 45 minutes to be up (twice). I expected it to be bad, but I was hoping I’d at least get some good boobs out of it. But no. I would rather spend 90 minutes stabbing myself with cutlery than watching this movie again.
1stars 1/5 (Awful)

Weigh In

212 lbs.

16

Dec

MMM: Bandslam (2009)

December 16th 2009 3:44 pm by Matt

BandslamStarring

Alyson Michalka, Vanessa Hudgens, Gaelan Connell

In Brief

A high school outsider and music junkie moves to a new school overcome with Bandslam, a high school battle of the bands competition. He forms an unlikely bond with the former head cheerleader. Impressed with his musical knowledge, she makes him the manager of her band, which he quickly reshapes to compete for the glory of Bandslam.

The Beef

Lately a lot of disney and teen romp movies are leading with some awkward looking guys. I guess the idea is that it makes them easier to relate to. Michael Cera is an excellent example of what I’m talking about. Unfortunately, the guys casting Bandslam decided it wasn’t enough to find a skinny, awkward kid for their lead. No, they wanted the lead to be legitimately ugly – extra easy to relate to. To be fair, Gaelan Connell is really a pretty normal looking little geek. They put in effort to make him as ugly as possible. Just look at him in the poster up there. What the hell?

But I just wanted the little fucker to cut his hair and stop intentionally acting like a spazz for the entire movie. His ugliness actually had the reverse effect of making him difficult to relate to. He also dances like a queer bomb and is generally a goofy little fucker, and it bothered me.

The writers also fall into the same pattern of portraying teenage bullying as if it’s widely considered the ‘cool’ thing to do. They even show the entire school making fun of a kid because his dad drove drunk and was in a fatal accident. Seriously Todd Graff? You think teenagers would make fun of someone for that? What the fuck is wrong with you?

Other than that: the music is ok, but nothing special; Vanessa Hudgens is hot, but acts badly; The plot is predictable, but you knew it would be. An ok effort makes an OK movie. What a shocker.
3stars 3/5 (Ok)

Weigh In

213 lbs.

11

Dec

MMM: Taking Woodstock (2009)

December 11th 2009 11:16 am by Matt

Taking WoodstockStarring

Demetri Martin, Henry Goodman, Edward Hibbert, Imelda Staunton

In Brief

I’m not sure entirely how true this story is – but it centers around a young Elliot Tiber, a struggling young interior designer doing his best to save his parent’s dilapidated motel in White Lake, NY and to figure out how to come out to his parents. When Elliot hears that the permits for the Woodstock festival have been pulled by the town of Woodstock, he extends an offer to the organizers. The infamous Michael Lang and company assemble and woodstock lives… in White Lake, NY.

The Beef

This movie hasn’t been reviewed well. I think the problem is not the movie or story itself, but in people’s expectations for the story they’re going to see. This is NOT the story of Woodstock. If you want to see that, you should shoot for the 1970s Original. This is the story of Elliot Tiber, the young man who brought Woodstock to White Lake. Indeed, you don’t even see much (re: any) music in this movie.

For a lot, I’m sure their expectations about which story they were coming to see have tainted the movie. But I think Ang Lee resisted the temptation to move the focus away from Elliot and towards Woodstock as a whole. This movie is an enjoyable coming-of-age story with a much lighter tone than most of Lee’s films. I have a tough time characterizing it as a Comedy, as it’s been billed, but it was a good film none-the-less. I think this movie effectively uses the backdrop of Woodstock to strike an odd balance – managing to survive in the no-man’s land of films that aren’t funny enough to be comedies, but are too light for the story to carry them as dramas.
4stars 4/5 (Good)

Weigh In

213 lbs.

Men who drive slowly

December 11th 2009 10:51 am by Matt

Is it sexist that any time someone is piddling along at 5 mph under the speed limit I immediately assume it’s a woman? I think it’s mostly because more often than not that’s exactly the case. Yet every once in a while I’m shocked to discover it’s a man behind the wheel. I justify it to myself when they’re old, asian, or especially if they’re old and asian. But what I really don’t get is when I see a young man between 20 and 40 driving at less than the speed limit for no apparent reason. It’s absolutely mind boggling to me.

As those who’ve ridden with me can attest – I’m a very road ragey driver. I’ll swear and curse any idiot who’s going less than the speed limit anywhere. It’s a fault, I acknowledge it. I should be more patient, and speeding rarely gets you anywhere any faster. Still – if I eventually discover that the person whose existence I’ve been lamenting for several miles is in the aforementioned age bracket, everything I’ve thought about this person is immediately shattered. Replaced not with anger, but utter bafflement and confusion. It’s as if I’ve just discovered a small jungle cat is driving the car.

I don’t see these people often. Most of the time the culprit is exactly the fat old woman who I had channeled all my hatred towards. But once in a while… like this morning… It sets me back.

How am I going to work today?

09

Dec

MMM: Update

December 9th 2009 11:38 pm by Matt

I swear, it’s not that I haven’t been biking. I’ve been watching older movies and I have no interest in posting them. As soon as I catch a few newer movies I’ll be posting them again.

I’ve got Band Slam (wooohoo!!) and Taking Woodstock coming up soon.

Weight: 212lbs – for the record.

06

Dec

MMM: Extract (2009)

December 6th 2009 10:39 pm by Matt

ExtractStarring

Jason Bateman, Mila Kunis, Ben Affleck

In Brief

An entrepreneur struggles with his increasingly frustrating business, his increasingly stressed marriage and an increasingly gorgeous Mila Kunis. Not enough? Bateman plays a reasonably successful businessman who’s forced to deal with the consequences of an unfortunate industrial accident looming over his impending business sale. To complicate matters, a young con-artist has come into town and is making him uncomfortably horny all the time.

The Beef

I had high hopes for this one. Like a lot of people I think I was hoping for more like Arrested Development. I know Mike Judge has nothing to do with Arrested Development, but it seemed like it was going to be more of that smart, sarcastic comedy. In hindsight, it may have been a lot to ask for. A lot of the comedy in Arrested Development (and sitcoms in general) comes from your familiarity with the characters, and there’s just not the time to do that in a 90 minute movie. As a result, Extract has quite a few funny moments and the story itself sounds funny, but everything is leveled throughout the entire movie and it just doesn’t produce any real laugh-out-loud moments. Overall it felt much more sedated and slow than I was expecting.

I was disappointed, but I had high expectations for Extract. I think this is a perfectly decent movie and well worth the 90 minutes of your life – if only to oggle Mila Kunis for a while.
3stars 3/5 (Ok)

Weigh In

213 lbs.

04

Dec

MMM: Inglorious Basterds (2009)

December 4th 2009 11:37 pm by Matt

Inglorious BasterdsStarring

Brad Pitt, Christoph Waltz, Mélanie Laurent, Diane Kruger

In Brief

World War II if Tarantino had a chance at writing it. Inglorious Basterds is the entirely fictional tale of a group of Jewish American soldiers conducting guerilla warfare in Nazi-Occupied France. Their methods are brutal, they take no prisoners, kill everyone and scalp the dead. When an opportunity to kill the entire German high command in one fell swoop presents itself, the ‘Basterds’, as they are known, can’t resist. They enlist the help of a German double agent, an actress with high standing amongst the Nazis. Meanwhile, a Jewish refugee who witnessed her parents being killed has her own plans for Nazis.

The Beef

Pulp Fiction is still Tarantino’s best movie. But if someone asked me to name a movie that epitomizes his style of narration and directing … I’d pick Kill Bill. Still, Inglorious Basterds is classic Tarantino. The gore, the imagery, the characters and most of all the long, tension-riddled scenes of dialogue in Inglorious Basterds are Tarantino working at his best.

This is the second time I’ve seen this movie (a first for the MMM segment) and generally it’s necessary for me to watch Tarantino (and Guy Ritchie movies, for that matter) a few times before I can decide whether I like them, but this one I like a lot.

The only down side, and it’s a big enough down side to be the only thing keeping this film from a 5th star, was Brad Pitt. Pitt’s character acting was absolutely awful. In a movie where everyone else on screen absolutely shined, especially Mélanie Laurent and Christoph Waltz, Pitt’s acting really stood out – in a terrible way. I’m sure it was mostly the absurd accent that he was tasked with portraying convincingly. He simply wasn’t up to the task. As a result, his character (who, on paper, could have gone down in history as one of film’s great badasses) is mostly just annoying.

I like Brad Pitt, but he should stick to roles where his natural mannerisms and voice aren’t stretched.

4stars 4/5 (Good)

Weigh In

214 lbs.

02

Dec

MMM: Carriers (2009)

December 2nd 2009 12:46 am by Matt

CarriersStarring

Piper Perabo, Chris Pine (Star Trek)

In Brief

Two brothers try to get back to the beach of their childhood memories to escape a viral outbreak that has ravaged the entire planet. These dead people aren’t coming back to life or yearning for human flesh though, they’re just dying. Over the course of the trip the brothers and their two female companions have to fight for gas, safe refuge and above all, to avoid infection.

The Beef

I thought this was going to be a zombie movie. In fact, based on the cover art it’s almost like they’re trying to fool you into thinking it’s a zombie movie. This is better though, without the zombies. Carriers puts a realistic spin on the genre, if it can even be placed in the same genre. It makes you think about what kind of world it would be if a virus killed everyone you know and love. What if the ability to instantly treat someone as if they were just a temporary incubator for a deadly plague was the only thing standing between you and infection? This is so much better than the supernatural zombie thrillers, it doesn’t lean on jumps and screams to provide the intrigue and suspense.

Carriers is well acted and well written. It’s short, but not to a fault. My only complaint is that I wanted more. More story, more exploring the world where these characters were stuck. I think if I had gotten more though the movie could have been ruined. It works this way.

See this one for sure.
4stars 4/5 (Good)

Weigh In

214 lbs.