One of the lectures I attended at VCFA was presented by graduating student Lisa Doan, who addressed writing humor.
I find writing humor difficult. I think it takes a special personality to create believable humor. I also think it can't be forced. Lisa pointed out that it really comes from character - and this was a true "aha!" moment for me.
She talked about the character who has a "skewed world view" - that is, a character who spends time thwarting society's expectations. The further "out" the character becomes, the more we find that character's behavior funny (think "There's Something About Mary"). Lisa said:
"To invent a skewed world view, define society's view, define the exact opposite, then back it down into something workable."
Wow. I was really taken with her ideas (and there were many more like this one). Suddenly I totally got why I find The Wednesday Wars or Holes so funny. I expected one thing, and the opposite happened. Actually, and more importantly, the characters expected one thing, and the opposite happened.
So the next time you are working on humor, think "skew".