Max Payne and “know thy audience”

I saw Max Payne last night. Overall, it’s an okay movie. It wasn’t boring, it wasn’t slow, and we stayed entertained the whole time. Cool CGI and camera stuff also. But, there was too much that broke the suspension of disbelief for us. I mostly think it was the dialog and the fact that it was a video game movie.

A “video game movie” is one that’s clearly made for fans of the game. I think directors are still learning how to turn a video game into a good movie, in the same way that they have learned how to turn books into movies. If you ever want to talk about a video game movie, or movie production, I’m always interested in that stuff. But that’s not my point here.

Like I said, a video game movie is made for the fans. That is to say, other people who play video games. I’d say, based on my personal knowledge and experience, that video game fans (and are likely to go to a Max Payne movie), also tend to like the Mythbusters. I do.
In case you don’t accept that assumption, you should know that last week’s Mythbusters had a “special sneak preview” Max Payne trailer during the episode. I did not see this trailer advertised during other shows. Somehow Rachel Ray’s audience doesn’t seem like the Max Payne type. So, clearly the marketing staff for the movie and Discovery Channel agree that people who are watching Max Payne have probably seen a few Mythbusters episodes.

The reason I bring this up is because in one scene, Max is underwater in a river, and there are handguns being fired at him. He’s probably 10 feet under, and the bullets are whizzing by him. In fact, it’s the exact same situation that the Mythbusters tested several years ago, and busted. But it’s in this movie.

Now, despite having written several paragraphs about this, I swear I’m not a foaming-at-the-mouth movie nerd. I’m not going to scream about it not being realistic. It was a cool looking shot, and the movie was a good way to spend 90 minutes. But it was another moment where something in my brain was awkward moment that helped break the suspension of disbelief that movie makers try so hard to achieve.

I feel like there’s some Seth Godin-esque point to be made here. When you do something for an audience, be sure to think about their perspective.

Arduino Follow-up

As a follow-up to yesterday’s post about Matt Williams’s presentation on Ruby and Arduino, here are some videos, slides, and notes from the ORUG site.

You absolutely must check this out. The field of robotics is going to play such a massive role in all of our lives over the next few years, and this is the ground floor.

*Going up?*

Physical Computing with Ruby and Arduino

Just got back from this month’s ORUG, where Matthew Williams gave a presentation on using Ruby to control an Arduino. Matt is a very natural speaker, and the presentation was great. He even demoed a bartending robot he built, which should be featured on Make very soon.

I took notes during the presentation, and they are as follows, with links where possible.


Matthew Williams
Physical Computing with Ruby and Arduino

Arduino is an open-source board

There’s Bluetooth Arduino boards

There’s an Arduino board that was developed in a circular shape. People have combined this with conductive thread and sewn it into clothing. Someone even integrated this with some LEDs into their clothing and made a shirt with turn signals for biking.

Matt showed a video of a Wii nunchuck integrated with an Arduino, hooked up to some servos, and made a robotic puppet that works just by moving the nunchuck (not the control stick, just the accelerometer motion).

There’s also a YouTube video with someone who built a 1-wheel Segway-esque skateboard. Matt claims there are only about 50 lines of code controlling this device.

So, onto the Ruby Arduino Framework.
http://rad.rubyforge.org/ << outdated
http://github.com/atduskgreg/rad/ << more up to date

Matt says that the Arduino Google Group is fantastic.

[Tim: The Arduino IDE looks a *lot* like the Processing IDE (the Java-based graphics language).]

RubyToC – Ruby To C project; converts your Ruby code into C++, then compile it into Arduino bytecode. Then, there are Rake tasks which will load it onto the board for you. Most — but not all — of the Arduino API has been ported to Ruby.

RAD Methods
input_pin(s)
output_pin(s)
digitalWrite | digitalRead
analogWrite | analogRead
serial_print | serial_read

He mentions a slick trick for controlling the 7-segment LED displays. Since there’s 7 segments, you need to set 7 values separately, OR just create an array of those, and set them all with a single assignment.

Coming soon to RAD framework:

  • Testing
  • Arduino Simulator (for testing)
  • Better RubyToC support (there’s a few hacks required because ToC isn’t perfect)
  • More “out of the box” support
    • LCDs
    • OLED displays

Arduino “shields”
Shields are boards that can be plugged directly on top of the Arduino that add major new functionality.

Where to buy? Only $34.95 at
http://www.sparkfun.com
http://www.makezine.com (Matt strongly recommends subscribing to Make, says the dead trees copy is excellent)

Cheaper versions are available, but they either have components removed, or you must assemble it yourself

Make published a “get started with Arduino” kit, about $80, includes project info, the Arduino, extra parts. Most of the parts required for the project are included in the kit.

Barduino – DRINK MIXING ROBOT (created by Matt, who is clearly demonstrating his aptitude as a proper geek)
He used windshield washer pumps, $9/each

Matt created a DSL for describing drinks

drink ‘Screwdriver’ do
serve_in ‘Highball Glass’
ingredients do
2.ounces :vodka
5.ounces :orange_juice
end
end

Matt mentioned a hack, some functions that accept only one param will get converted (by RubyToC) to functions that accept none, so, the following line fixes it

def dispense(pump)
foo = pump + 0 /* This is the fix */

end

For more Ruby Arduino…

RubyConf 2008, Friday, 10:25 – 11:05, Room 3
Greg Borenstein — author of the Ruby Arduino framework — is presenting

Questions:

Can you “brick” an Arduino?
Not via code, but you could put too much power into it and fry it. Matt thinks there’s a little surge protection on it.

Can you sync Arduinos?
He’s seen something like it, and thinks that the serial comm lines would make it fairly easy to do.

Twitter Autocomplete (Tw-autocomplete Firefox Extension)

After lots of code, tests, and fun, I’ve produced a Firefox extension to add a useful, new feature to Twitter, as opposed to writing Twitter extensions as a joke 😀

Simply put, the extension provides autocomplete for Twitter usernames from your own list of friends while you’re using the web interface at twitter.com. It’s totally secure — no separate login required. Just install it, and use Twitter naturally.

When you start typing messages to people — using “@user” or “d user” — a list of matching contacts (along with icons) will drop in. You can click the person’s name to fill their username into the text box, or use the arrow keys along with tab/enter to select. As an added bonus, if you can’t remember their username at all, just type their first name, and the extension will figure it out.

There is another autocomplete script for Twitter, but it requires installing extra libraries, and I think this is simpler. Clearly it’s a feature in-demand.

The extension is hosted at addons.mozilla.org, a highly reputable site. They also provide lots of great management features that are handy to developers. I hope you enjoy using Tw-autocomplete.

I love Science.

I love Science. I don’t just love Science, I *fucking* love it. Maybe I’ll do a post on the Science sticks someday.

There’s a webcomic I particularly like, called XKCD.  It’s Science-y, Math-y, geek humor. Perfect for me.

One of the best is the following comic, good old #397. I love it because Feynman (one of the most significant scientific figures of the 20th century) shows up *as a zombie*, to defend the Mythbusters (who are awesome). On top of it, he makes a great point about Science, and Science in culture.

Zombie Feynman defends the Mythbusters

That, and I love the phrase “drag humanity out of the unscientific darkness”. Science!

What makes a great wine?

Saw a post on the Freakonomics blog about wines, and people’s abilities to tell the difference between good and bad wines. I love Levitt for his willingness to piss people off in the pursuit of truth (read the part about the scholar who stormed out of the room!) Anyways, there was a large study done, and the conclusion is that people generally can’t taste the difference between “great” wines, and ordinary wines (link goes to original paper).

Don’t get me wrong, I’ve had some reasonably pricey bottles of wine. And I’ve enjoyed some of them. I appreciate that there’s people who really take care of their vines; who pick the best grapes; who use classic equipment and methods. But, I’ve also had bottles that cost under $20 and tasted quite nice.

Generally (and with no expertise to back this up) I think the knowledge of how to produce a decent wine has spread very far, and snobbery is mostly a hangover from the past few hundred years when lots of wines were actually quite bad.

Of course, I know the true secret behind great wine. It’s that any average wine becomes great when you drink it with great people. Salud!

Little digits

There’s this idea I’ve had rolling around my head for a while now. I call it the Law of Small Numbers, but it’s not really a law, and it’s apparently not called that either, at least according to Wikipedia.

Basically, it’s that small numbers increase easier than big numbers. It’s an idea that’s become popular with investors — small businesses can double your money easier than big ones. A tiny store can easily double it’s business, WalMart can’t.

Simply put, if you’ve got 2 units, and you increase that by 1, you’ve increased by 50%. If you’ve got 20 units, and you increase by 1, it’s only 5%. That’s the Law of Small Numbers. Maybe I should call it the Law of Increases of Small Numbers.

It’s something that’s popped into my head lately, thinking about gas prices. I’ve been trying to collect some gas mileages in my car, so that I can have hard data to look at. The way I see it, your gas mileage is a function of your gear, and your RPMs. Assuming constant gear (let’s say 4th — you’re cruising). If you are going from 2000 RPM to 4000 RPM when accelerating, you are literally cutting your gas mileage in half. If you can travel 55 MPH at 2000, but 60 MPH at 2500, is it worth decreasing your mileage by 25%? What if the corresponding speed increase only gets you there 90 seconds faster?

On a side note, one of the pages linked from that Wikipedia page discusses the Strong Law of Small Numbers

“There aren’t enough small numbers to meet the many demands made of them.”

I see this as the reason that things always seem to happen in twos and threes, but that doesn’t mean that they’re related.