Category Archives: General

Just what the heck is Ratatouille, anyway?

With the release of our movie just a couple of weeks away, you might be asking yourself “what is Ratatouille, anyway?” It’s not a very common dish anymore, I’d never had it before. But never fear! Here’s a recipe from Cooking for Engineers. I’m not a huge eggplant fan myself, but this sounds pretty good to me.

You guys are gonna all go see it, right?

[tags]Cooking,Ratatouille,Pixar[/tags]

Cuckoo Hashing, Theory and Practice

In an effort to try to continue to claim that I know something about computer science, I’ve been trying to find some good blogs in computer science and mathematics, and see what people who don’t spend all their time making pixels turn the right color do. The My Biased Coin blog has an interesting introduction to cuckoo hashing, which until this morning, was a term I had never heard before. It seems like a very good idea, with good (and somewhat surprising) theoretical bounds on performance.

My Biased Coin: Cuckoo Hashing, Theory and Practice : Part 1

[tags]Hashing,Algorithm[/tags]

QOTD: Was teaching kids BASIC as a first programming language really fatal?

Dijkstra once famously claimed (well, perhaps not anymore, since fewer and fewer learn BASIC):

It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration.

The question that I asked myself last night: “Was Dijkstra right?”

I must admit, I’m one of those guys who learned BASIC as a kid, and then later went on to study computer science, get a couple of degrees, and proceed to make a pretty decent living writing what I hope are good programs. Am I just “practically impossible”? The exception that proves the rule? Or was something else at work here.

I’ll submit that Dijkstra was wrong (although I’m going to provide nothing more than simple gesticulation to back this idea up). It is certainly true that the vast majority of people who picked up BASIC as a first language never progressed beyond being anything but the most dreadful programmers. I suspect, however, that is true about almost any skill. I never became good at roller skating. I don’t possess anything but the most rudimentary skills at drawing. My ability to play the piano is limited to halting walks up and down the keyboard in tuneless exercises.

Peter Norvig has an essay about learning to program which I think hints at the fallacy in Dijkstra’s famous claim. It takes a long time to learn to program, and you have to start somewhere. You learn to program by doing, and for a short generation of programmers, the most accessible entry point was through the BASIC interpreter that came on their Apple II, their Atari or their Commodore 64. A kid with no understanding of programming could noodle around, flailing miserably, writing silly and bad programs, and most importantly figure out that he liked doing it. He could begin to read other people’s programs, and improve. He could even ultimately graduate beyond the world of BASIC, and move on to different ideas.

Dijkstra was in some sense right, but missed the forest for the trees. To get kids to learn programming, you have to get them programming. I pity the poor kid who tries to learn C or uses Visual C# as a first language. Today, languages like Python or even Perl and PHP would take the place of BASIC, and by virtue of their more powerful datatypes and structuring, generally are better choices for the beginning programmer. Yes, we see lots of really bad code written in all these languages. But from the din of mediocre achievement (itself not totally without value) a few scattered diamonds will form.

What’s your take? Was BASIC your first language? Did you turn out to be an okay programmer?

[tags]Programming,Dijkstra,BASIC[/tags]

Addendum: Interesting notes on the acquisition of expertise.

WiFi enabled digital cameras/cards: a good idea?

I was reading the article linked below about why WiFi enabled cameras or cards aren’t a good idea.

» Wi-Fi-enabled digital cameras: Five reasons why you couldn’t care less | IP Telephony, VoIP, Broadband | ZDNet.com

I think the author misses the mark on this. His reasons are:

  1. You already have a camera phone. Well, yes. And chances are your $400 camera phone takes really, really bad pictures. I know mine does. Not quite as pathetic as the old MPX220 that I had, but still worse than a $75 digital camera. A lot worse. That is, of course, why I actually have both a camera phone and a digital camera.
  2. Why buy a WiFi enabled digital camera when you already have a digicam? Well, golly, why buy upgrades to any gadget that you have? The question itself is one of economics: do you gain enough features to merit the upgrade given the cost. WiFi is becoming a very, very cheap upgrade (the Nikon P3 and P4, whose sole difference is the presence of WiFi in the P3, sell for exactly the same price on Amazon). The 2GB card that Eye-Fi is proposing will sell for about double what a normal 2GB card would sell for now. Is it worth it? It very well might be for me, but more on that below…
  3. Why look around for a WiFi hotspot to payfor when you have a cell phone plan already? Because I don’t pay for WiFi hotspots of course. And because cell phone data plans are expensive. And slower than WiFi. And my data isn’t on my cell phone, it’s in my camera. And cell phones aren’t optimized to doing large, bulk data transfers.
  4. If you are really out photographing stuff, there is no urgency to upload your photos. During my trip to Paris a couple of years back, I took about 1200 photos. The problem was, I only had space for about 1000 on the memory cards I had with me. I found an Internet cafe that would burn them onto CD for me, but if I had access to a wireless access point, they could have been transferred while I was sipping a cafe au lait.
  5. Many Wifi hotspots are indoors, and who wants to take pictures of themselves indoors? Uh, duh. There is this thing, it is called memory. Photos are captured onto it, and transferred at a later date.

Okay, well, that was a long diatribe. What would cause me to buy such a camera?

  1. Relatively small price premium. While I think that Wifi enabled cameras are a good idea, they aren’t really the killer app, so don’t price them as if they are.
  2. Unattended image transfer. I want to click a button, putting my camera in some kind of bulk download mode, and have it upload pictures either to my home server (integration with gallery would be cool) or post to a photo sharing site (flickr would be a must).
  3. Ability to use open wifi networks, and efficiently scan for them.

With this kind of feature set, you could take your camera with you on vacation, without a laptop, and snap pictures more or less continuously, with the assurance that in the evening, at either a paid hotspot or a free open one, you could backup all your photos and provide live updates to your friends about where you are and what you are doing. I think that’s pretty cool.

[tags]Photography, WiFi[/tags]

A physics teacher begs for his subject back

It’s no secret that I believe that primary and secondary education in this country is basically abysmal, with minor pockets of competency and occasional bright flashes. We do a terrible job of educating children, particularly in mathematics and science. In my bleaker, more skeptical moments, I believe that primary and secondary schools may in fact do more to damage children than to educate them.

I’m now forty three years old, and I must admit: I have a fairly eclectic set of interests. But underlying most of my interests is a desire to actually know what’s really going on. Take for example hybrid cars. I bought my SUV back in 1998, when I was hauling more people around, and when gas was $1.20 a gallon or so. My car is beginning to show its age, and I’m thinking of replacing it. So, I ask myself, what would be the best environmental choice to replace it? The car I bought for my son is a Civic which gets 30 or so MPG. A Prius might net me 45MPG or so. My Expedition gets 15. So, what is my best, most reasonable choice?

It’s a difficult question to answer, but a quantifiable one, if one is willing to dig and think. Maybe I won’t even come up with the right answer, but the answer will at least be rational: I will have more than just my kneejerk reaction to justify it. Sadly, most people don’t ask these kinds of questions. In fact, most people don’t even understand how you might go about asking these questions.

Well, that’s a garbled, rambling introduction, but I’ll pass you off to an open letter by Wellington Grey. Apparently the UK Department of Education has revised science standards, and not for the better. Grey is a physicist, but the new standards cover biology and chemistry as well. His basic complaint is that in an effort to make students understand how science works, they have abstracted away everything that actually shows you how science works.

An open letter to the AQA board and the UK Department for Education

There is an educational philosophy which is popular in this country that says that it is important for students to have positive learning experiences. This doesn’t sound like a bad idea, but it has become one. Let’s face it, for most people, becoming educated is hard, and hard things are often not the positive experience that you might think they are, at least not every day, and not all at once. In an effort to “remain positive”, standards have been set ridiculously low. It is a mockery of education.

Education is neither hard, nor easy. It is simply necessary. If it comes easy for a child, they are fortunate, and should be challenged even more. If it is hard, we should not abandon them, but should redouble our efforts to teach them. But in both cases, the goal is to educate, not to pander. The positive outcome for all students is that they should feel confident that they have obtained a reasonable education: one that allows them to understand the world around them.

Oh well, there’s my rant of the day.

[tags]Science Education[/tags]

More Panorama Noodling…

Okay, since I went to the trouble of actually doing a bit of panorama stitching on Linux, I thought I’d go ahead and make a 360 degree panorama (not a spherical one, I didn’t have the patience). So, as I walked out the door at Pixar Animation Studios, I snapped fourteen handheld images using my little Panasonic, and then stitched ’em into this panorama:

Not too bad! The exposures aren’t held very closely (no way to exposure lock on the DMC-TZ1) but the overall quality of the stitch is quite good.

(If you don’t have java installed, you can at least click here to see the full panorama data)

[tags]Panorama stitching[/tags]

San Francisco From Angel Island

Yesterday, we had our group wrap-up-party excursion. We settled on a leisurely bikeride around Angel Island, accompanied by barbecued ribs and chicken. It was a stupendously nice day, warm, but not hot, and while I was feeling a bit under the weather during the first bit, I had a lot of fun. I snapped some pictures with my little Panasonic, including 7 shots that spanned the view of the San Francisco from Bay Bridge to Golden Gate. Today, under less than entirely optimal conditions, I used the programs autopano-sift, hugin and emblend to produce the following panorama:

I could probably do a bit better in keeping the horizon from curving, but overall, I’m quite pleased.

Addendum: converted to black and white, and converted to black and white.

[tags]Photography,Angel Island, San Francisco[/tags]

Meraki

One of the mailing lists I was on suggested that the best way to provide network access to a neighborhood was to use a mesh architecture based upon the Meraki nodes. I seemed to have vaguely recalled seeing them before, so I went to peek. They look really interesting, and quite competitive pricewise ($99 for an outdoor node, $49 for an indoor one). I haven’t used ’em, but they look really cool. If you have the need, check ’em out.

Meraki

Ratatouille Wrap Party Highlights

Well, we wrapped up Ratatouille production (well, almost) with a wrap party on Saturday at the Masonic auditorium in San Francisco. Carmen had a lovely dress (REALLY lovely), I had a tux, and we had a screening followed by eating, drinking and dancing. I’ll try to get some pictures up sometime, but off the top of my head, here are some highlights:

  1. The Pixar singers did a lovely job again performing a piece composed and conducted by Brian Rosen. These bits get better every year.
  2. There were some nice speeches by the big three: Catmull, Jobs and Lasseter. Producer Brad Lewis was his usual erudite self in thanking those associated with the production, and Brad Bird was his usual, self-effacing self, seeming almost shy as he introduced the picture.
  3. A terrific little featurette about how motion capture was used in Ratatouille. I hope and pray this makes it on the DVD.
  4. The screening began with the Gary Rydstrom directed short Lifted, and the trailer for the upcoming feature Wall E (not sure if I’m typing that right). You should be seeing both soon.
  5. The screening itself, from the front balcony with some of my peeps in Rendering. Yaz, Don, Kate, Kim, Paul, Domenic, Matt, Jay (we missed you, man), Pam, Eric, Sandy: you’re all the best. Susan and Julian: saw you as I walked in, but didn’t find you again. Looking forward to working with you on Wall E.
  6. Tom’s fancy sneakers: glimpsed only from afar, I didn’t run into you either, and I obviously missed out.
  7. Snacks, libations and dancing: yes, Carmen got me to dance for a bit.
  8. A short walk back to the Mark Hopkins. The bed? Oh, so very soft.
  9. Bumping into a tired looking Brad Bird in the lobby the next morning. Initially, he just walked by as I said hi, but then stopped, tapped me on the shoulder, and shook my hand and thanked me. Brad: you’re the best. I’m just a geek with degrees in computer science, but when i watch you work in reviews, it’s obvious that I am in the presence of greatness. It’s always a pleasure.
  10. Brunch at the Top of the Mark. Best, breakfast, buffet, ever.

It is kind of tough when you work in rendering: you see every single shot in the film at least a half a dozen times, and have worked on lots of them. You’ve seen the gags, you’ve watched it all play out dozens of times, and yet, when you see it for the first time all cut together with sound and music, you know that it’s good, but you can’t really see it with the same eyes that the public will see it with. Still, I bumped into a number of people who hadn’t seen it, and they all seemed to really like it. I hope that come June 29th, some of you will go out and see it too, and enjoy it as much as I did in playing my very small part in bringing it to you.

[tags]Pixar,Ratatouille[/tags]

Well, if that didn’t entice you into wanting to go see it, check out Brad in this clip from YouTube: