Archive for the ‘Comedy’ Category

Bracket-notation syntax

Saturday, August 8th, 2009

I don’t agree with The Big Nerd Ranch’s philosophy. When I teach, I make sure to mention the bracket-notation added to C by Objective-C. Then, I make sure to tell the students never to use it ever, ever, ever again. Buy why? To keep our code consistent and maintain readability.

The Intent of Code

When we look at well written C code, we can tell exactly what is going on by glancing at it. That’s the power that C gives us. If I want to take a drink of water while doing a cartwheel, I call the function:

drink(water, TRUE);

We know exactly what that means. There is no room for interpretation. It is pure, simple, and good, just as Jesus intended.

Then comes Objective-C…

Objective-C comes along, sprinkling diabetes-inducing syntactic sugar all over our code. We wind up having to read code like this:

x = [foo value];

What is that? Can anybody interpret that? Of course not! That’s because the compiler could translate it into a call to any one of the functions objc_msgSend, objc_msgSend_fpret, or objc_msgSend_stret. But we have no way of telling which one! It’s impossible! For all we know, the compiler just picks one at random!

It’s incredibly confusing, which is why I recommend that students exclusively call those C functions directly, so there is no doubt about which one is being called. That way the code is readable.

But I’m used to Smalltalk. Bracket notation looks like I’m at home!

You are not at home. You’re in the forest, and wolves are trying to kill you.

Apple uses it in their sample code, though!

That’s right, they do. But should you really be trying to emulate Apple? Have you heard about the App Store review process? They are totally incompetent and can’t do anything!

In the end, there is a wrong way and a right way to write Objective-C code. I will not say that using brackets is wrong, even though I tell my students never ever to use it. Is that confusing? Not as confusing as brackets are.

Believing ideas are made

Wednesday, April 22nd, 2009

One of the toughest parts of performing improv is talking to friends who fundamentally misunderstand what it is that you do. They helpfully offer you their crazy anecdotes so that “you can use them in your improv” or say things like, “I know it’s made up, but how did you decide who was going to play what character?”

I like to make an analogy to sports: hockey players don’t know where the puck is going to go, but they all know the rules and what kind of actions help or hurt the team. That seems to lay to rest questions about how we decide which players enter which scenes, but it doesn’t seem to be a completely satisfactory explanation, either.

I think I figured out why.

I believe it is important for an improviser to begin the show by asking for a suggestion, whether it be a single word, a song lyric, a monologue, the contents of a wallet, etc. In a magic show, the magician could easily provide his own dollar bill, or have his assistant pick a card out of the deck, but he asks for a volunteer. Partially to “prove” it’s real magic but, more importantly, to give the audience some level of investment. After all, they know there’s no such thing as magic, so why should it matter if you use an ordinary dollar bill?

In improv, the trick is in taking an ordinary suggestion and seeing it inspire interesting scenes. If you don’t ask for a suggestion, I don’t really get to see the inspiration. (On the flip side: if you do ask for a suggestion, then perform it literally, there’s not much inspiration to see.)

The amazing thing about improv, to me, is that it depends on a fact of nature that most people do not believe to be true: that ideas are cheap and you can always make as many as you need, on demand.

I think that is why people who don’t do improv don’t get it. They have been led to believe (by whom, I’m not sure, I’m still tracing the conspiracy) that ideas are rare, precious things; that inspiration is like lightning, you must wait around for it to strike. They believe that ideas are something you have, but do not make.

They believe that people who have ideas are geniuses. But Thomas Alva Edison, widely regarded as genius, knew that perspiration is more important than inspiration. He told everybody, but they still give him more credit for his ideas than the fact that he simply worked hard.

Maybe one day everybody will figure out that the way to have ideas is to make them, and nobody will be impressed by improv any more. But until then, people who don’t make a habit of making ideas will have a hard time believing that you can.

Struck by Lightning

Tuesday, February 17th, 2009

I am totally hooked on the nonexistent ’80s glam rock band, Property of the Queen.

Hulu was nice enough to let me embed the video for “Struck by Lightning”, one of the songs on their fictitious Greatest Hits album from 1983. It really holds up.

Here are the lyrics, in case you can’t see it:

I got struck (ROCK) by lightning

and it really hurt.

I got struck (ROCK ROCK!) by lightning

and it really burned.

If you wanna know what happened to me

I’ll explain it all in depth:

I got struck (ROCK ROCK!) by lightning

but I’m not dead!

I’m hoping they break the fourth wall, like Spinal Tap before them, and release a real album. Until then, can you recommend any similar real bands to tide me over?