« November 2007 | Main | January 2008 »

December 31, 2007

Django: Don't let MEDIA_URL and ADMIN_MEDIA_PREFIX conflict

I'm working on a Django app and was getting an odd result when I tried to access the URL of an image referenced in an ImageField. The image uploaded successfully but I couldn't access it from the browser even after adding the proper URL confs to access static media. When I accessed the URL from get_FIELD_url the browser returned:

Page not found: /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/django/contrib/admin/...

It turns out I had decided to make my media accessible via a /media/ URL, which is also the default for ADMIN_MEDIA_PREFIX. The ADMIN_MEDIA_PREFIX setting is not a URL, so it's not obvious it was in conflict.

So don't put your media in your sites /media/ URL, or if you do change ADMIN_MEDIA_PREFIX.

Thanks to tonyskyday on #djangoIRC for help with this!

December 28, 2007

Activity Guide website sneak peek!

We're in the progress of getting our Activity Guide back up on the web. We've always had a great response from educators when they look at the book, and we think putting the whole thing up online will help get the word out about our software. We used to have all the lessons up on a wiki, but I hadn't locked it down and spammers added all sorts of crud to it. Our new site is not a wiki, but it will still have all the lessons, and I think look a little nicer as well. If you'd like to take a sneak peek hop over to http://blocks.gollygee.com/activityguide/. Follow the "Language Arts" and "Mathematics" links to see indices for each subject, or just go to the table of contents.

December 27, 2007

NPR: GPS Goes Mainstream

NPR has a story about GPS devices becoming common. Apparently they were a popular gift this year for Christmas; I can attest that my wife thought about getting me one, but I told her not to -- I mostly just drive back and forth to work, and I know how to get there. I think they're great in rental cars, though. We've been thinking about GPS use in educational settings, and have some ideas for a GPS Activity Kit that would include a curriculum guide and handheld GPS device. One lesson idea I like is GPS Drawing: kids would draw a simple design on a map of the school soccer field, then go out to the field with the handheld receiver and try to "draw" the pattern by running around the field. They'd then plug the receiver into a laptop, download the GPS trace, see it overlaid on a satellite map and get to compare it to their drawing. We'll see if we can get that kit together!

December 22, 2007

We Wish You a Merry Christmas

A Christmas Greeting from Oman! That's my brother on the melodica.

December 15, 2007

An uncredited appearance on Gizmodo!

Wayan stuck an old picture of me demoing the OLPC on an article at OLPC News. Gizmodo picked up the article and included the picture of us. I didn't even see it (I'm really more of an Engadget man), a friend of mine sent me link to tell me I was in it. Amusingly this isn't the first time something like this has happened. Thanks, Wayan!

December 10, 2007

Points and Images

I recently had to draw up a plan for a deck that was already built. It was a bit of a pain, I had to go measure everything and eventually used OmniGraffle to put the thing together. Some people call this "existing conditions documentation", and it can be very important for something like an oil refinery where what is in place is not on paper (or is just incorrect) and new plans are being made. Some companies sell expensive services for this sort of situation where they come in with laser scanners and will build a 3D model accurate to 1/4 inch of your site.

Software and algorithms that can generate 3D models from just images first appeared aroung 1994; they're still not ready for prime time but this is definitely where situations like this are headed. It would have been great if I could have just walked out to my deck, turned on the video camera, walked around, plugged the camera into my computer and let it build up a 3D model for me in an easy to use 3D modeler liek SketchUp (or even GollyGee Blocks).

There's definitely efforts to make this happen. Microsoft's been getting a lot of press for their PhotoSynth effort. In the film industry there are programs like boujou which will take a video stream and compute the camera properties and positions, which lets animators more easily insert 3D graphics into the scene. PhotoSynth is still in the lab and probably requires a data center, and boujou is about $10K, so we're still a ways off from solving my deck program.

In 1995, on a talk about the first of these algorithms coming out of UNC, Henry Fuchs told us that he thought in 10 years we wouldn't have any more polygons, it'd be all points and images. My guess is he's only off by a factor of two -- and not only will I be able to get a 3D model of my deck from my laptop in 2015, I'll probably be able to take it down to Kinko's and have them print out a scale model with a 3D printer.