Archive for the ‘Software’ Category

Mail Hackery

Sunday, October 28th, 2007

One of the notification systems at AdMob went insane yesterday and as a result this morning I was looking at just over 19 thousand messages in my inbox. Not that I like dealing with my inbox to begin with. And Thunderbird was choking trying to deal with the volume. Not sure exactly why, but instead of figuring it out I just pulled up the Ruby interpreter and used the IMAP support in the standard library to delete the messages and expunge them. There are probably about a dozen additional ways deal with the issue, but I thought it was a cool bit of hackery and a quick practical usage example.

OpenMoko on Existing Hardware

Thursday, October 18th, 2007

Something I hadn’t realized until I went to a presentation last week was that OpenMoko is up and running to varying degrees on hardware other than the Neo1973, including the Treo 650. Cool, I think I have one of those kicking around somewhere. I also didn’t realize that all the info I was really looking for was over at OpenMoko.org (the OpenMoko.com site being the commercial part mostly for selling hardware). The wiki has a ton of info, almost none of which I’ve gotten a chance to read yet.

FBReader on the N800

Tuesday, September 11th, 2007

Russ has raved about FBReader, an ebook reader for Maemo, in the past. I had installed it before and tried it out, but had problems with the format of the books. He walked me through the stuff he was doing and gave me his FBReader config files, I’ve been trying it out since. I still have format problems, unordered lists in HTML seem to become just mashed up text without and formatting. Which was what really turned me off about it before cause it’s normally the first thing I see. But I’ve grabbed a few HTML based books and read a ways into them (seeing as how I’ve spent the last week lying on the couch rolling around in some half conscious state of delirium, it seemed like a good use of time). There are still some formatting quirks later on, but normally most of the nastyness is up at the start.

Here’s a shot of FBReader running on my N800, with the screen rotated and all so that pretty much the equivalent of a “small paperback” worth of text fits on the screen. It works out pretty well. I’ve grabbed a few online novels from random places, but most of my downloads have been from Project Gutenberg. The site is pretty usable from the built in browser. I select the compressed HTML version of the book whenever it’s available, and compressed plain text when not. Lots of them have three or four pages of unformatted cruft before the book starts, but once you make it past the table of contents the books are pretty readable.

Trying Maemo WordPy on the N800

Monday, September 3rd, 2007

Just trying out a post from the Python based Maemo WordPy client. I was also fooling around with Minimo, but was having a bunch of issues with the UI. Fortunately it looks like the Maemo version of the Minimo source code seems to be uploaded to the garage. Not that I really think I’ll have time to hack on it, but it’s nice to see that the option exists.

Your Own (Free/Open!) Adserver for Mobile

Sunday, September 2nd, 2007

One of the requests I’ve heard a few times from publishers at AdMob is something of the form of “how can I run my own advertising along with/together with/on top of AdMob?” Usually what the publishers want to do is accept a request to advertise directly from someone looking to do some marketing, but they just don’t have the tools they need to manage the advertising on their site. While we would love to build that stuff right into the mobile publisher tools we offer there are just so many hours in the day. And that set of stuff isn’t high enough on the totem pole to get proper attention yet.

Fortunately, like just about every other problem in the modern world, it can be solved with some open source tools and a bit of elbow grease. I’ve used an open source package called Openads in a few previous projects. Actually I used phpAdsNew and Max Media Manager, two of the projects that went into what is now Openads. It’s a fantastic project, very much under active development. However the things that are “standard” behavior on the web at large are somewhat at conflict with big swaths of the mobile web. For instance, the de-facto ad delivery method relies on browser Javascript support for rewriting the part of a page that the ad will occupy. Something that definitely isn’t yet a common feature on mobile browsers. Not to worry though, Openads supports what you need to get ads into mobile pages if you know where to look. Currently the mechanism I’m going to use only generates code for PHP, so this is only going to be simple if your publishing platform is PHP or can execute PHP for parts of a page.

I used the 2.3 release of Openads while I was playing around. There are a bunch of interesting features in there that make it worth checking out. It’s currently marked as beta though, so just keep that in mind if you decide to run it. The users guide for 2.3 does an excellent job of describing how to install and configure Openads. Their installation configurator is really slick actually. 2.0 had a great installer, this one is even better. All the potential setup issues were stopped in advance and the warning messages came along with the commands to fix them, which worked perfectly. Pretty much all you need is a working PHP install and MySQL.

The first thing you’ll want to check is that you have the option to allow XML-RPC invocation code allowed. You can find the option under “Invocation Settings” on the Main Settings subsection of the Settings tab. That enables the option when creating a publisher zone to have the server generating the page request an ad directly from the adserver instead of generating an HTML/Javascript snippet and relying on the browser to fetch the ad. Once you have that on you can create a zone for your mobile site (see the Openads docs for how to create advertisers and how to create publishers if you aren’t familiar with Openads). Instead of using the default advertising code on the “Invocation Code” tab for the zone, choose the XML-RPC Tag option from the drop down list. Paste that snippet of code into one of the PHP pages where you would like ads to start appearing, and either modify the include_path setting or copy the lib/xmlrpc/php/openads-xmlrpc.inc.php file from the Openads distribution to the same directory as your script. When you load the page, and assuming you have some ads assigned to the zone you created, you’ll see an advertisement on the page now. And more importantly, the ad will still appear when you hit it with a mobile browser!

If you see an error instead of an ad you might need to install the XML-RPC pear package for PHP. For most modern PHP distros that’s just a simple “pear install XML_RPC” from the command line on your server and you should be all set. Other things to keep in mind are that some of the features from Openads won’t work very well for most mobile userbases. Their base banner/text ad limiting, giving an overall limit to the number of times a banner can be displayed or the number of times it can be clicked will be no problem at all. However the session tracking stuff, limiting the maximum number of times any given user can see a banner over a period of time, will only work in a subset of cases. The session tracking is based on the use of cookies, and although the situation with cookies on mobile seems to be getting better, their support is definitely not universal. How “not universal” depends on the carrier networks that your users are on, the gateways they happen to be going through, how new their devices are, and in some cases the security settings they might have enabled.

Of course, at AdMob we like to think that we’re getting pretty good at turning mobile pageviews into money for publishers and clicks for advertisers. There are certainly cases where a particular advertiser is all hot and bothered to get up on your property, but there are also dry times when you have pageviews but nothing to populate them with (at least if your media properties are anything like the ones I’ve been involved with). So the best of both worlds is really to sell your own inventory when you can get a great value for them, but fall back on a more general network when there’s no ad to serve. Fortunately the good folks at Openads have started to build a plugin architecture for Openads, so I was able to write an invocation plugin that returns an ad from the Openads server when available and falls back on AdMob if there’s nothing. In order to install it:

  1. Download the plugin.
  2. Unpack the tarred and gzipped file into the root of your Openads install.
  3. Edit the plugins/invocationTags/admob/admob.plugin.php file and swap in your AdMob site id where it says “INSERT SITE ID”. You can find your site id from the my sites page on AdMob. Click on the site install code link for the site you want to use, and the site_id is up in the URL you’re taken to.
  4. Now you’ll have an additional “AdMob Tag” option when you generate the invocation code in Openads for any zone. Default behavior is to use Openads first, and request an ad from AdMob if there’s nothing available.

All in all, very nice. There are some things that could be done with Openads to make it a bit more mobile friendly. For instance, I can’t find a way to link a banner zone and a text zone. Openads has the ability to “fallback” between zones, but seems to insist that the two zones being linked are the same size. Makes sense in web layout terms, but on mobile pages tend to frequently be one column, and publishers will insert a banner if they have a banner and fall back to text if they don’t. There isn’t a very easy way to capture that pattern from what I’ve seen. Also, the MMA banner sizes aren’t in the banner drop down by default. You can of course enter them as custom sizes on both the zone and each banner, but that can be a pain. If you want to add them to the dropdown you can add the following to lib/max/resources/res-iab.inc.php under your Openads install:


$phpAds_IAB['MMA X-Large (305 x 64)'] = array (’width’ => 305, ‘height’ => 64);
$phpAds_IAB['MMA Large (215 x 34)'] = array (’width’ => 215, ‘height’ => 34);
$phpAds_IAB['MMA Medium (167 x 30)'] = array (’width’ => 167, ‘height’ => 30);
$phpAds_IAB['MMA Small (112 x 20)'] = array (’width’ => 112, ‘height’ => 20);

And the MMA sizes will appear in the dropdowns for both.

iPhone Tools and Services at AdMob

Monday, August 13th, 2007

AdMob is going to be showing off some iPhone specific stuff at the Silicon Valley MoMo tonight. I’ve made plenty of comments about the whole idea of the mobile browser as a thin client for rich applications. Generally, I think the whole discussion has headed off the deep end already, but there are brief flashes of sanity every now and again. The work that’s gone into some of the iPhone applications and open source javascript libs is pretty encouraging, it feels like a pretty cohesive community is forming about the device. We’re hoping we’ve created a way for those developers to make some money with their labor of love and keep the effort going.

Mobile Browser Testing

Thursday, August 9th, 2007

Andrea has a post about mobile device testing up on the dotMobi blog. If I understand correctly he’s talking in this case about an Acid2 style set of tests for mobile browsers in particular. Would certainly be nice to have a baseline set of compatibility metrics for different features across the various browser types and handsets. I’ve fooled around with testing Javascript capabilities myself.

Like he mentions however, the problem isn’t just support of the browser for certain capabilities but also the environment it goes into. Network differences, different gateway behavior, different default configuration settings or build options on different carriers, etc. Look to support for cookies as one example, as described in the wireless faq. Most modern mobile browsers support cookies, definitely. But some carriers ship with the option to accept cookies turned off, most likely to be true if their own internal portal doesn’t require the feature. And others have gateways that strip out cookies completely, or if the content site isn’t on a whitelist of trusted partners.

It seems like it would be very difficult to try to collect, organize, and present the info based on all the different dimensions it can have. Of course, I hope they can figure it out, it would be a killer resource to have! Very interested to see how this develops.

Old Bloggers, New Blogs

Wednesday, July 11th, 2007

Russell Beattie is back at it again with a new blog. Which he used almost immediately to call me crazy. Fair enough.

And Diego Doval has started up the much more aptly named blog.diegodoval.com.

I suggest subscribing to both immediately. I’ll wait.

Seriously, go do it.

Nintendo DS Opera Browser

Tuesday, June 12th, 2007

I just recently picked up a copy of the US release of the Opera browser for the Nintendo DS for “testing purposes”. The testing has been going well!

Nintendo DS w/ Opera

I know what you’re all thinking.. “But Miker, what does it send?” Here’s your header pr0n you sickos:

GET /blog/ HTTP/1.1
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Nitro) Opera 8.50 [en]
Host: www.madgat.com:9090
Accept: text/html, image/png, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1
Accept-Language: en
Accept-Charset: iso-8859-1, utf-8, utf-16, *;q=0.1
Accept-Encoding: deflate, gzip, x-gzip, identity, *;q=0
Connection: Keep-Alive

And the other major question I could see folks having, how is the Javascript and DOM support? Well the few little prototype.js scripts that I had hanging around from adventures with the Nokia OS browser would seem to indicate that there’s a lot missing. I don’t see the bound AJAX requests making it up to my server at all. There’s something going wrong enough in there that it looks like the request just doesn’t even get generated. I haven’t yet tried hand rolling the request without trying to use prototype though, so the stuff might be there and just not enough like normal Opera to work out of the box with the most basic of the AJAX libs. On the other hand, it does seem that innerHTML() is supported, I was able to rewrite divs and have that reflected in the page no problem.

Why the Fuck Won’t My SIS File Install

Saturday, October 28th, 2006

Just ran across the online SIS file debugger whythefuckwontmysisfileinstall.com. Pure genius! I think that’s exactly the phrase I’ve used about a dozen times in the past trying to figure out what exactly might have gone wrong with an application install that throws just a generic error. The E61 has actually been pretty good in this respect, I have it set to allow any installs. Not all devices are that nice however.