Post-commit hook failed with error output: .. and nothing more.

While getting the trac-svn integration up and running in one of our repositories tonight, I stumbled across this issue. Most links I found on Google said to try to run the post-commit script by itself under the same user, which worked just fine. Checked that all my paths were absolute paths to avoid assuming any CWD, but still nothing. After trying to minimize the problem I discovered that even with a post-commit-script of just environmental assignments, things were still failing. This nabble archived thread did however give a very important hint by Ryan Schmidt (who obviously has solved the post-commit problems for every single developer out there, if I were to judge by the number of times his name comes up. Awesome work, Ryan.):

Your post-commit must also begin with a line like “#!/bin/sh” and have its executable bit set.

Wow. Homer Simpson “Doh!”-moment right there. No #!/bin/bash (or #!/bin/sh) ment that SVN weren’t able to run the script with the proper interpreter. When running it from the command line, bash were already running of course, so it just assumed that it was a bash script .. and it were right.

Thanks Ryan, saved me a couple of hours tonight.

Informa and Custom XML Namespaces in RSS

While integrating a custom search application into a Java-based web application, I came across the need to access properties in custom namespaces through the Informa RSS library. Or to put it in another way; i needed to access to properties, Informa had been used for RSS parsing in the previous versions of the web application. The people who developed the original version of the application had decided to extend the Informa library into their own version, and had added several methods for .get<NameOfCustomProperty> etc. After thinking about this for approximately 2 seconds, I decided that having to support and modify a custom version of Informa was not the right track for us.

My initial thought was that their decision to customize Informa to support these methods had to come from the idea that Informa did not support custom namespaces out of the box. I did a few searchas over at Google, and found nothing useful. Reading through the documentation for Informa didn’t do me any good either, so I tried to find an alternative library instead. Did a bit of searching here too, and stumbled across a hit for one of the util classes for Informa (.. again). This did support custom namespaces, so the backend support was there at least. Then it struck me while reading the documentation for Informa and ChannelIF again; Informa did support it, as it inherited the methods from further up in the hierarchy. The getElementValue and getElementValues methods of the ChannelIF and ItemIF classes allows you to fetch the contents of elements with custom namespaces in a very easy to like manner.


This simply returns the string contained between <exampleNS:field> and </exampleNS:field>

Hoooray! We now have support for these additional fields, and we do not have to keep Informa manually in sync with the version in our application. Why the original developers decided to fork the Informa library to add their own properties I may never know, but I’ll update this post if they decide to step forward!

Extending HTML for Devices with Built-in Cameras

(I wrote this back in september. No idea why WordPress decided to not publish it. Oh well. It’s still interesting.)

Ajaxian has a post up about a hack Brad Lassey created for the Mozilla mobile browser (Fennec). The strategy shows the video feed from the built-in camera of the phone, and allows the user to take a shot and upload the image. Simple enough, but the idea to evolve HTML to allow this kind of interaction by extending the type-attribute of the input element seems like a good idea. We’ve been experimenting quite a bit with ways of uploading and getting this kind of information from the users previously, in particular in the BTDT – Been There Done That – project at Østfold College University in the Mobile Applications Group.

Christer and I are currently looking into some of these ideas for at least one of the sites we’re playing with. This will allow people to very easily get this kind of functionality by using standarized HTML attributes, instead of having to write the same boilerplate code over and over again. J2ME has loads of security exceptions and Python for Series 60, however ingenious for development work, has a few deployment problems (the size, in particular), so just relying on simple HTML and javascript would be great. Well, the browsers embedded on the phones will probably be just as different as always, so we’ll still be left with “things that just work on a few lucky devices”. The closest today seems to be email and MMS, so I guess we’ll have to go down that roadfor now.

Vincent Laforet Shows The First Shots from the Canon EOS 5D Mark II

Vincent Laforet has a very, very interesting post up about the Canon EOS 5D Mark II. It features the first shots from the camera, and while they are stunning in their own right (Vincent shoots some of the best photos on the planet, so no surprise there), the most amazing thing is that they’re shot while in video mode. That’s right. They’re straight from the RAW .mov file that the camera produces when recording 1080p video. Simply astounding. I’m getting one. Hands down.

For more information about the EOS 5D Mark II and the video mode, NRKBeta has a long article analyzing the video output from the beast itself. I can’t wait. Too bad the price here in Norway is above USD 4000, so it’s actually cheaper to fly to the US, buy it and fly back to Norway. NRKBeta gives you even more images of the EOS 5D Mark II, an incredible piece of engineering. Time to start drooling!

Seth MacFarlane’s Cavalcade of Cartoon Comedy

Seth MacFarlane (of Family Guy, American Dad fame) created his own YouTube channel a couple of weeks ago, where he published “Seth MacFarlane’s Cavalcade of Cartoon Comedy”. The channel features a collection of shorts in the distinct style of his other animated series, but limited to a single gag or joke instead (an extended version of the short puns and gags in Family Guy).

Here’s some of the clips that he has posted so far:

Trackday at Rudskogen with Autostrada Sport

I spent four hours at Rudskogen Motor Raceway tonight, at an event hosted by Autostrada Sport. A nice collection of Ferraris, Maseratis, BMWs and Porsches turned up (even a Lamborghini and an Aston Martin). As usual I spent some time photographing, before Marius took me for loads of laps in the black GT2.

The photo set is (yet again, as usual) availabable at Flickr.

Here are some of my favorites:

Autostrada Sport - Rudskogen - 2008-09-16 - Maserati GT

Autostrada Sport - Rudskogen - 2008-09-16

Autostrada Sport - Rudskogen - 2008-09-16

Autostrada Sport - Rudskogen - 2008-09-16

Autostrada Sport - Rudskogen - 2008-09-16

(as you can see, I’ve become very fond of this style after the last auto slalom. Some of those pictures turned out really great, so I spent some time playing around with it today)

We also had an inboard camera:

Last Auto Slalom Round of 2008 With Porsche Club Norway

I spent yet another sunday camped out at the part of Gardermoen Raceway where Marius usually compete in the Auto Slalom competition while I spend the day photographing the drivers and their cars. Marius finished in 5th place this time, and this concludes this year’s season of auto slalom. We’ll be back for more next year!

The complete set can be seen on flickr!

Here’s a few of my favourites:

Bilslalom - PCN

Bilslalom - PCN

Bilslalom - PCN

Bilslalom - PCN

Bilslalom - PCN

Weekend Link Roundup

As we’re starting a new week I’m just going to round up a few of the links I’ve been having around in my browsers for quite some time now:

  • Gravatar Implementation Details – I’m currently looking into using gravatars as default avatars for a smallish site I’m writing a few lines of code for every now and then. This page details which parameters you can submit to gravatar to control the image returned from their servers.
  • The BOSS Mashable Challenge is a contest hosted by mashable and Yahoo! Search about building a site or resource on top of the BOSS API from Yahoo! BOSS stands for “Build your Own Search Service“, and is an open API to access Yahoo’s search service from your own applications. It’s very interesting and I have several ideas about how to incorporate this into our own sites.
  • NRKbeta just had a notice about a very nice site containing biaural recordings. I listened to a few of these a couple of years back without being very impressed at the time, but these recordings are at a whole new level. Great stuff. Still have a bit of trouble about determining if something is in front of me or behind me, other than the usual context clues (people cutting your hair is usually behind you, not in front of you, etc).
  • The Open Social Specification – Just had to look this up again today. Wondering if I should attempt to implement Open Social for social networking and for your friends graph in the sites I’m currently hacking around with. Could be a good experience anyways.
  • I want this.

More on Domain Specific Languages

My previous post on the power of micro languages peaked quite a bit of interest. Today Gamasutra published a feature article documenting the creation of Whimsy, a domain specific language developed to create images resembling the art of Rodney Alan Greenblat. The language is actually quite similar to what I used myself:

superegg 0.15,0.10,3.5 at .3,.7 size 1.2 black distort .01
petals 14 0.05 size 1.8 petalblue
inner .88,.01 tvpurple

The statements are one on each single line, with the command / drawing primitive as the first literal, then parameters to the command.

A View Behind the Scenes of the Creativity at Pixar

As I’ve been having a cold the last two days with everything that involves of fevers and chills, I’ve at least had the time to a bit of reading. To be honest I’ve not been able to much else, so I finally got around to reading an article at Harvard Business Online about Pixar, titled «How Pixar Fosters Collective Creativity».

One of the most interesting quotes which I’ve been hearing a lot lately and that I agree with 100% is the following:

If you give a good idea to a mediocre team, they will screw it up; if you give a mediocre idea to a great team, they will either fix it or throw it away and come up with something that works.

To see how this shaped the development of Toy Story 2, one of the best animated movies of all time, read the article.

I’ve also seen several movies from the Pixar offices on the behind the scenes features of several of their DVDs (in particular in the Toy Story 1 & 2 Box Set which features a complete DVD with just extra material), but I never understood the true meaning of why they had built it like that. I might just have missed it in the material, and it still looks like an awesome place to work. Anyways, the article has a nice quote about the effect of the buildings structure:

Our building, which is Steve Jobs’s brainchild, is another way we try to get people from different departments to interact. Most buildings are designed for some functional purpose, but ours is structured to maximize inadvertent encounters. At its center is a large atrium, which contains the cafeteria, meeting rooms, bathrooms, and mailboxes. As a result, everyone has strong reasons to go there repeatedly during the course of the workday. It’s hard to describe just how valuable the resulting chance encounters are.

While the visions of my company in the future may not have to integrate people from so many different arts, this still provides a very interesting view of the dynamic between groups and people.

Well worth a read.