Feed Items
Dr Horrible
Last week I kept seeing people twittering about a new episode of Dr Horrible. I had no idea what they were talking about and assumed it was some show on TV.
Then last Saturday I was on iTunes and saw mention of Dr Horrible's Sing-Along Blog featuring a picture of Neil Patrick Harris. I'm a huge NPH fanboy, so had to check it out.
It was then that I discovered it was a made-for-Web show from Joss Whedon consisting of three 13 minute episodes. Joss Whedon + NPH — it had to be good. So I bought the trio of episodes and watched them right away.
It's a huge amount of fun — the songs are catchy, the writing awesome, NPH and Nathan Fillion are both brilliant as, respectively, the wannabe evil mastermind and self-centered super hero.
This isn't your ordinary made-for-Web series. The production values are very high -- judging from the crew credits, this was shot like hour-long TV show.
After watching it a couple of times, I spent a few hours last Sunday doing a cover of the first song from Act III, the hilarious "So They Say". I've put up an instrumental (with vocal lines on synth) mp3: http://jtauber.com/2008/07/so_they_say_0_1.mp3
I'll probably do a bunch of the other songs too.
iPhone Stopwatch Comparison
Below is a photo of my original iPhone next to my new iPhone 3G.
The original iPhone (on the left) is still running 1.1.4 (4A102) whereas the iPhone 3G (on the right) is running 2.0 (5A345) which it shipped with.
The first thing you might notice is that 2.0 has fixed the problem with the stopwatch taking up too much space when it goes over 1,000 hours (although not the lap time)
You might also notice the colour temperate difference (the original is more blue, the 3G more yellow) that has been much talked about.
But other than that, they look pretty similar. Except that's where it surprised me. The stopwatch is almost the same on both: about 2,200 hours. But that's three months and the 3G only came out a week ago.
That's right: when iTunes synced the data between my phones, it kept the stop watch going and only lost 1.4 seconds in the process :-)
iPhone 3G First Impressions
I stood in line on Friday to upgrade to an iPhone 3G. It took about 2.5 hrs to get to the front of the line but the process after that was very easy because I was already an AT&T customer.
By the time I'd left the store, my old iPhone no longer worked as a phone.
The iPhone 3G felt funny at first but I've gotten used to it now. I think actually prefer the feel of it in my hand but it did take a day or two to get to that point. The screen also felt rougher initially but that might have just been some temporary coating and it now feels just as smooth as my old iPhone.
I immediately downloaded Monkey Ball. The accelerometer-based controls are harder to get used to than they looked in the demos. I've also bought the Things app and look forward to when it supports synchronization with the desktop version.
The App Store experience itself was pretty impressive. It is pretty amazing sitting at the airport, deciding you want a new app and buying, downloading, installing and using it right there and then.
The GPS worked nicely in conjunction with Google Maps when my girlfriend and I were going to pick up a pizza last night.
I haven't really done much data stuff over 3G yet as I'm on wireless when at home so can't really comment on how much faster it is. Certainly the signal I get in my apartment isn't any better which is unfortunate.
I haven't played around with the Mobile Me integration yet.
I'll be configuring Exchange support tomorrow at work, so I'll report how that goes.
Overall: the original iPhone was so impressive, getting the new phone was somewhat anti-climactic in comparison.
iPhone Upgrade
So, I'm planning on upgrading my iPhone, if not Friday then pretty soon afterwards. I may upgrade my existing phone to the 2.0 software right away, though, just for a sneak preview (assuming the software update is available on Friday too).
I'm not clear what happens to my existing contract. I hope I can just roll it over to the new plan (and obviously stop using my existing iPhone, except as an iPod Touch with a camera). Surely they won't make me have two contracts in parallel if I only plan to use one phone (and transfer my number across).
I'm definitely looking forward to the faster data speeds. I'm also hoping it works better in my apartment. Location doesn't seem to be the problem (it works fine outside) but rather the building construction prevents me getting a signal inside. No idea if 3G will make a difference there or not.
Turing Chess
At the HTM Workshop there was a lightning talk by David Doshay on Computer Go which is another application I thought of as soon as I read On Intelligence.
During the break after his talk a bunch of us were talking and he basically said that a lot of researchers were moving to Go because Chess was a solved problem (perhaps I should have pursued it more back when I was interested in 2001).
I asked if he knew of anyone who, instead of switching from Chess, was going back to make Computer Chess more human-like rather than simply better. He wasn't aware of any such work.
It seems to me that an interesting pursuit would be a sort of Turing Test of Chess where the goal is not to beat the human but to trick other humans reading a transcript of the game as to which was the human player.
(Yes, I read Blondie24: Playing at the Edge of A a few years back)
The Rocker
My friend and filmmaking partner, Tom Bennett used to manage a band and still owns a Silver Eagle Coach from back in the day. About a year ago, he was contacted by 20th Century Fox interested in using the coach in a film.
The film was The Rocker (official site, IMDb) which comes out this month. It's the story of a failed drummer (played by The Office's Rainn Wilson) who, after 20 years of seeing the band he got kicked out of rise to stellar heights, finally gets a second chance.
Tom invited me to an advanced screening last week (it was fun going into the cinema and saying "we're on the list" :-)
The movie was a lot of fun. A predictable plot but well handled. Wilson's character seemed to me to have just the right balance of flaws and virtues. Solid acting all round, although the highlight comedically was Jason Sudeikis as the band manager. He got the best lines and delivered them with impeccable timing.
The original songs were excellent as well.
Pete Best (appropriately) has a cameo but I missed it.
Tom his son Travis (who travelled up to Cleveland for a few days of shooting) also had roles as background and I spotted them (not that Tom would have let me miss it :-)
On Intelligence and the HTM Workshop
Like a lot of geeks, I've been interested in how the brain works for most of my life. Artificial Intelligence was always one of my interests within computing (and part of what got me interested in linguistics at a very early age).
Within my linguistics research, I've always been interested in models that are biologically plausible so it was a huge delight to read Jeff Hawkins' On Intelligence back in early 2005 and find a theory that was biologically-based and believable from a linguistics point of view. One prominent psycholinguist told me in 2006 that it was one of the most promising theories he'd ever read.
After reading the book, I promptly went out and built a library (as I am wont to do) of about 20 books on general neuroscience, computational neuroscience and the relationship between the brain and language. I started thinking about how to implement the ideas and, after reading some of Jeff's and Dileep George's early papers, augmented the library further with books on Bayesian networks, belief propagation, etc.
When Jeff and Dileep started Numenta and eventually released an early version of their Hierarchical Temporal Memory (HTM) platform in Python, I was particularly excited to try it out, in particular applying it to linguistics. I started the htm-ling mailing list to gather other people interested in applying HTM to models of language. It turned out to be hard to word out to other people interested in HTM and linguistics, however.
I never got very far with Numenta's code, mostly because there were just too many other things I was working on.
But then a couple of months ago, I found out Numenta was running a workshop / conference. I thought it would be an excellent opportunity for me to (a) get back up to speed with what Numenta was doing and how to use their NuPIC platform; (b) meet other people interested in applying HTM to linguistics.
So a couple of weeks ago, I attended the first Numenta HTM Workshop. I had a great time. It was great to meet Jeff and the rest of the team. Dileep's talk on the algorithms in NuPIC was particularly helpful to me in understanding how things work.
There were a number of people who expressed an interest in the application to linguistics so in the evening I ran a BOF. None of the attendees (as far as I could tell) were linguists by training so I didn't really get to talk too technically from a linguistics perspective. The boost to the mailing list membership hasn't created any more discussion yet either.
But I am still hopeful that an HTM-like approach (whether in the form of NuPIC or some other implementation) might be useful in building biologically-plausible models of language processing.
Changes to Google Maps Satellite Images
It used to be obvious in Google Maps where the boundaries of different satellite images were. Each image had different brightness, contrast, colour, etc which gave away the stitching.
I always wondered whether there were techniques to normalize that.
I guess there are: Today I noticed the satellite images are stitched together seamlessly.
I also noticed some level-of-detail differences between land and ocean and that is also done pretty seamlessly.
It actually makes navigating around the satellite view a little eerie.
Anyone know when the change was made?
The Annotated Turing
Some books entertain, some inform; some confirm what you already knew, some make you change your mind about something. But then there are some books that just make you think "wow! I wish I'd written that".
For me, Charles Petzold's The Annotated Turing falls into that last category. It's a book worth reading not only for the topic itself but the way it's presented.
He provides the necessary background before working through Turing's famous 1936 paper "On computable numbers, with an application to the Entscheidungsproblem" with rich annotations at every stage, including biographical details.
If you are interested in computability, Turing's work, or even just ways of explaining mathematics in a historical context, I highly recommend this book.
Pinax Progress III
In the six weeks that it's been around (that's not six weeks since launch, that's six weeks since coding started), the Pinax platform and community has grown in ways I never expected.
Since I last blogged about it, we've added:
- localization into Brazilian Portuguese and Hebrew
- timezone localization
- external blog aggregation
- wikis
- threaded discussions
- bookmarks with voting
- contact import
- blogs with tagging and threaded comments
It is becoming clear that what was originally intended to be a demo site is a useful site in its own right, irrespective of whether you care or even know about the Pinax platform underlying it. So it will be moving over to a new site with a new identity soon.
Back to Blogging
Last month was my worst blogging drought ever.
It happened for a number of reasons: I was travelling almost 3 weeks out of the month; free time was spent on other projects; Twitter replaced a lot of my drive to blog (and subsequently, the django-hotclub IRC channel replaced a lot of my drive to Twitter).
I'm going to try to blog a lot more regularly this month. I have a long list of things to blog about.
Two Podcast Interviews
In the last week two podcasts have come out which I appear on.
The first is the Google Summer of Code podcast where Titus Brown and I were interviewed about the Python Software Foundation's participation in both GSoC and GHOP.
http://google-opensource.blogspot.com/2008/05/podcast-with-pythonistas.html
The second is This Week in Django where I talk a little about myself and (more importantly) Pinax and the Hot Club of France.
http://blog.michaeltrier.com/2008/6/2/this-week-in-django-24-2008-06-01
I sound much better in the second one because I recorded my track locally with a large diaphragm condenser mic and sent the audio file for mixing. In the first one, it's just my laptop mic going over Skype.
They were both fun although I babble too much, especially on the TWiD podcast.
Question-Driven Commenting
I've always loved Titus Brown's notion of stupidity driven testing. It's okay to make a mistake but you write a test to make sure you don't do it again.
With Pinax, I've been adopting the sister practice of "question-driven commenting". When someone asks me what a function does or how to implement a particular extension, that's when I go and add comments to the code.
Of course, the person asking the question could be me :-)
Pinax Progress II
Yesterday I reported that we'd added the following to Pinax in the last 24 hours:
- user profile pages
- gravatars
- user-to-user messages (via django-messages)
- announcements (a new app, django-announcements)
- OpenID support
- invitations to join
Well, in the last 24 hours we've added to that:
- translations into German, Spanish and Swedish
- a new design / logo
- auto-completion on message recipient field
- a basic Twitter clone
- OEmbed support in tweets
- the beginnings of tribes (i.e. groups)
I could not have hoped for a more productive weekend!
Earlier in the day I did a rough count purely based on file-size and estimated that Pinax is:
- 63% re-usable apps;
- 10% local app;
- 13% templates;
- 8% localization;
- 5% media;
- 1% util
which bodes well for the original goal of Pinax: to jump-start some reusable Django apps.
Pinax Progress
Here is what the team of brosner, leidel, floguy and myself have added to Pinax in the last 24 hours:
- user profile pages
- gravatars
- user-to-user messages (via django-messages)
- announcements (a new app, django-announcements)
- OpenID support
- invitations to join
Check it out at http://pinax.hotcluboffrance.com/
Programming as Jazz
I'm starting to appreciate that programming has more similarities to Jazz than just the project naming conventions encouraged by Django.
When I started the Hot Club of France mailing list (named for Django Reinhardt's Quintet du Hot Club de France) I explicitly mentioned it was about writing reusable apps that "jam" well together. But I'm realising that it's as much about the developers jamming as the code itself.
Ever since the inception of the Hot Club project, I've thought about cloning Web 2.0 websites using reusable Django projects. I noticed at the time that this is sort of like the "contrafact" approach of early Jazz where you would improvise new songs using the chord progressions of existing songs. The analogy isn't perfect but I do think the term "contrafact" is a great one to use for the programming practice.
Things are really starting to come together with Pinax and the conversations I've been having recently with other Django developers keen to jam with me on it reminds me a lot of stories I've read of the bebop years. You check out someone's work, think it will work well with your own style and start doing some improv together. Awesome stuff!
Things are really starting to come together at http://pinax.hotcluboffrance.com/
Just call me yardbird :-)
Funcom's Epic Fail
So the other night I decided to purchase the adventure game Dreamfall by FUNCOM as a digital download. They provide their own downloader, that's fine. But
- the downloader first requires you to install .NET 2.0 yourself
- the downloader prompts you to enter "the provided key" but the email receipt from FUNCOM didn't mention the word "key". It had something it called a "license number".
- I typed in the license number but the downloader came back "invalid coupon" (I'm thinking at this stage "is it a key, a number or a coupon" ?!?!)
- the receipt says to email marketing@funcom.com if there are any problems with digital downloads so I email that address
- I get back an autoresponse saying "If you have not submitted this via our web form at [link provided] then your mail may be removed by our spam filter. Please resubmit your request using this form."
- I click on said link and get a 404.
EPIC FAIL FUNCOM!
Creating Gradients Programmatically in Python
For various sites I often want to create a narrow gradient image. This site has two, for example, the grey background gradient and the purple header gradient.
Rather than having to open up a drawing tool every time I want to create one of these, I thought I'd write a Python script to generate a PNG of a gradient according to declarative specifications.
The result is
http://jtauber.com/2008/05/gradient.py
Only linear gradients are currently supported although you can have any number of them at different vertical offsets and it's easy to modify the code to support other gradient functions.
The code itself is 50 lines long and has no dependencies other than the standard library. I've included some samples based on the gradients on jtauber.com and Pinax.
For example, this gradient:
is produced with the following code:
write_png("test2.png", 50, 90, gradient([
(0.43, (0xBF, 0x94, 0xC0), (0x4C, 0x26, 0x4C)), # top
(0.85, (0x4C, 0x26, 0x4C), (0x27, 0x13, 0x27)), # bottom
(1.0, (0x66, 0x66, 0x66), (0xFF, 0xFF, 0xFF)), # shadow
]))
The 30-line write_png function could also be used more generally for generating any RGB PNGs.
Metrics Provide An Inner Product
Another post for the Poincaré Project.
We've already seen that a one-form is a linear function from a vector to a (for our purposes) real number. On a manifold, one-forms correspond to stack-type vectors being applied to arrow-type vectors by counting how many "stacks" the arrow passes through.
In the previous post Metrics As Mappings Between Arrows and Stacks, we saw that a metric is an extra bit of structure that describes how to map between arrow-type vectors and stack-type vectors.
So, in summary:
- a metric tells you how to go from an arrow-type vector to a stack-type vector
- a stack-type vector can be applied to another arrow-type vector to get a real number
These two facts can be combined to let you take two arrow-type vectors and get a real number out of them.
This has parallels with currying in functional programming.
Recall that if a function "add" takes two integers and returns an integer, it can be viewed as a function that takes one integer and returns a function that takes one integer and returns an integer.
add :: Int -> Int -> Int
Now, a one-form is a function that takes a vector and returns a real. In other words:
Vector -> Real
So it is easy to see that if you curry a real-valued function that takes two vectors you get:
Vector -> Vector -> Real
In other words, a function taking two vectors to a real is equivalent to a function from a vector to a one-form.
So if you have a metric that can convert between vectors and one-forms (or, in the context of a manifold, between arrows and stacks) then you also have a function from two vectors to a real.
Such a function is called an inner product or dot product. Often the notion of an inner product is defined first, before one-forms are introduced (if at all). In fact, some texts will define a metric to be an inner product. It is best for our purposes, though, to think of the metric's fundamental purpose as being converting between arrows and stacks (and back again) and the inner product as being an extra concept we get for free.
Introducing Pinax
In the post Reusable Django Apps and Introducing Tabula Rasa I mentioned my project to create an out-of-the-box Django-based website with everything but the domain-specific functionality.
At the time I was calling it Tabula Rasa but now I've settled on the Greek word Pinax, proposed by Orestis Markou.
So far it's just my new django-email-confirmation app tied together with password change and reset, login/logout, with the beginnings of a tab-style UI. There's a ton more I want to refactor out of my existing websites to put into it as well as adding support for OpenID and the stuff I'm starting to do for django-friends.
Even if one doesn't use Pinax as the starting point of a website, I'm hoping it will prove very useful for another goal, namely a "host" project to develop and tryout reusable apps.
The initial code is available at http://code.google.com/p/django-hotclub/ under /trunk/projects/pinax and there is a running instance for you to try out at:
http://pinax.hotcluboffrance.com
