So for the past few months, I’ve been working with food writer Michael Ruhlman on the iPhone adaptation of his cookbook “Ratio”. Well pop some bubbly, cause the app is now live in iTunes!
A lot of people find this blog because of my articles on mobile bar codes, so I thought I would mention Google’s spotlight today celebrating the 57th birthday of the bar code. In case you miss Google.com today, here’s a screenshot.
I’ve been using MobilePress for a while now on my blog. It’s a quick, easy way to make your Wordpress blog friendly for all those crazy smartphones out there like iPhone, Android, Nokia, Palm Pre, etc. etc. You just add the plugin to your Wordpress install, activate it, and you’re set.
My only issue with the plugin is that it doesn’t support alternate content for mobile devices. Sure you can post the same text in both places, but it doesn’t always work that way for things like very large images or YouTube embeds. Often you’ll want the desktop version to have the very large image, but the mobile version to have a small thumbnail. Likewise with videos you’ll want your desktop site to have the full video embed, but the mobile site to have a link to the 3GP version of your video. To solve this, I quickly wrote an extension to MobilePress that allows you to accomplish this using Wordpress shortcodes. Here’s the result.
If you’re on the mobile site, you should only have seen a small thumbnail linking to a mobile version of the video. But if you’re on the normal version of the site, you’ll get the full video embed.
So how did that work exactly? In the post itself, place [mobile] at the beginning and [/mobile] at the end of any text you want to appear only on the mobile site. Likewise, for content that you don’t want to appear on the mobile site, you place [nonmobile] at the beginning and [/nonmobile] at the end of any text. For this post, here’s what the text looked like.
[mobile]
<h1>You're on the mobile site!</h1>
<a href="rtsp://rtsp-youtube.l.google.com/CkYLENy73wIaPQk4TalGJzJtDRMYDSANFEIJbXYtZ29vZ2xlSARSBXdhdGNoWg5DbGlja1RodW1ibmFpbGCLjNC-9__5m0oM/0/0/0/30/video.3gp">
<img src="http://i.ytimg.com/vi/DW0yJ0apTTg/default.jpg?w=160&h=120&sigh=uxtjuGf9Vjatje_YL3m1JSn0mMY" alt="video" width="160" height="120" style="border:2;margin:0px;" />
</a>
[/mobile]
[nonmobile]
<h1>You're on the non-mobile site!</h1>
<object width="425" height="344">
<param name="movie" value="http://www.youtube.com/v/DW0yJ0apTTg&hl=en&fs=1&rel=0"&rt;</param&rt;
<param name="allowFullScreen" value="true"></param>
<param name="allowscriptaccess" value="always"></param>
<embed src="http://www.youtube.com/v/DW0yJ0apTTg&hl=en&fs=1&rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed>
</object>
[/nonmobile]
Pretty easy, eh? Here’s the source code for the plugin.
That’s all there is to it. Each of these functions just checks for the existence of a session variable telling whether or not you are using the mobile version of MobilePress (the cookie management is handled entirely by MobilePress). Based on the session cookie, it either returns the text itself, or it returns an empty string.
I’ve only spent a few minutes writing the plug in, so I am curious if others would find this useful or if there are any obvious bugs or enhancements people notice.
Recently, I’ve been playing around with Minify. For those who’ve never heard of it, Minify is a simple HTTP content server built as a PHP5 application. It’s placed in a folder on your server, and then either using a querystring or mod_rewrite, it will dynamically merge and minify CSS and JS files as they are served up to a user’s browser. This allows you to develop using multiple CSS or JS files with comments and clear visual formatting, but when they are delivered to your users via a browser, they get minified and optionally merged making your site load and render faster in the user’s browser.
While Minify is meant to run on a webserver, I thought it could also work as a handy offline tool for optimizing Nokia WRT widgets. Since WRT widgets are just zipped folders of Javascript, HTML and CSS, Minify seems like a simple step you could include in the widget packaging process of your workflow before testing and deploying.
I wasn’t sure how much savings Minify would give the average WRT widget, so as a quick test I batch processed the contents of the STEW sample widget from Forum Nokia using Minify running on a local webserver. The resulting files were bundled as a new widget, and here’s a comparison of the two.
Size of all Files
WGZ size
Forum Nokia version
122.4K
83.0K
Minified version
106.3K
78.2K
Difference
13.2% smaller
5.8% smaller
The savings aren’t gigantic, but they’re significant enough that you should seriously consider adding this step before deploying a widget. I’d also be curious to see if anyone has done comparisons about whether or not Minify affects how much memory is consumed at run-time in the browser.
I might do some more work on automating this process or creating a tool that minifies widgets automatically for you, but ideally, I think this should be something automatically built into widget IDEs like Aptana.
How are other developers out there currently optimizing their widgets for release on Ovi Store?
UPDATE: That was fast, just got an email that the widget has been accepted!
I’ve officially submitted the Morse Code widget to the Ovi Store where hopefully it will downloaded onto millions of devices worldwide. And guess what? It’s FREE.
In case you’ve forgotten about it, here’s a brief video showing how it works.
I spent the past two days at the Gilbane 2008 conference in Boston, and while I came away with some good information and had some good conversations with people, these conferences remind me how frustrated I get when people talk and talk and talk instead of demonstrating, showing, and using specific examples. I heard too many people say “well, that’s what young people are doing on Facebook,” when I would have found it much more useful if they’d opened up a browser and shown me real content, real people, real applications and real usage patterns.
But for all the talk in the sessions about the importance of Social Media, I’m curious why more sites aren’t doing mashups that integrate general web search results with search results from your own social network. Someone should build an OpenSocial container with a Google search bar in it, and in the results you could include recent status updates from your friends that include similar search terms.
So how does this incident show up in search results? Below are some dynamic AJAX results comparing Google News and Google Blog search results for “gilbane fatwire” with the exact same search results from Twitter. I’m sure these results will change over time, but for now it’s a concrete example of how integrated search results can help you connect with the right information AND the right people.
Yesterday I was riding the subway in NYC and saw something I had never seen before — a print advertisement for Google maps.
In true Google fashion it was a simple ad with a clear message saying you could use Google Maps on your phone. BUT THERE WAS NO QR CODE. C’mon Google, you clearly missed an opportunity here to show people the power of bar codes and you just dropped the ball entirely. There are so many other aspects of your business that are promoting bar codes — the launch of Android and the G1, your own open source bar code reader, and your in depth education about bar codes when trying to sell print advertisement.
Yet when you’ve finally given the opportunity to demonstrate the power of bar codes, test them in a public mass market environment and start collecting real data about how people are or are not using them, you just didn’t even take the chance.
I always liked the website Muxtape, and right around the time that the site went offline, a group launched an open source web application that allows you to run and share a mix tape on your own server. It’s called OpenTape, and while the idea is similar, they are NOT related to Muxtape.
OpenTape is amazingly easy to use. Just download the files, unzip, and upload them to your own webserver. From there you can use the web interface to set up and configure the mix tape you want to share.
But what I want to know is can I run OpenTape on my mobile phone? Specifically, my N95? If you want to try this yourself, here are the steps.
Register and install the Mobile Web Server to your S60 compatible device.
Download and install the PAMP package for S60 and install it on your compatible device.
Download OpenTape and copy it to the htdocs folder of your Mobile Web Server installation.
Once that’s done, just go to the directory on your webserver, and voila, it works!
Notice that the URL is actually from my Mobile web site…
Once I set up the password, then it was still working just fine.
And after I added songs, i thought it was looking so good.
But then it never displayed any of my songs. Hmmm…
Not to give in so quickly, I started digging through the source code, and it turns out that the problem might be with the PHP package on my mobile. First, the /code/xspf.php XML file wasn’t returning any tracks even though they were uploaded in the folder and the permissions were set correctly. Digging further, it looks like the code is using an ID3 library to read all of the metadata about the Mp3 files, so maybe that’s not included in the PAMP package?
Anyway, I’m so close, but I’ll keep looking into this and see what kind of fix I can come up with.
I read a lot of blogs many of which are heavily devoted to technology, mobile, and the developers who love them.
This week I came across a new video series for N-Gage targeting developers and it’s strangely brilliant in a Finnish way. It’s called Sauna Talk because all the interviews, well, take place in a sauna. Beware though, clicking this link will force you to watch a lot of video content starring this guy.
The only thing that’s really lame about it is that there’s no RSS feed and there’s no way to easily share/embed the video. If there were RSS, I’d probably go back to the site more. And this totally needs to be on YouTube.
I’ve been doing some pro bono web work recently for Children’s Pressline, a youth news service that trains kids to be reporters and editors who write articles for mainstream media partners. It’s a non-profit open to any child in NYC, and currently their news stories are being run in the NY Daily News, Metro, and the Amsterdam News.
There’s not a mobile website, but just by having an RSS feed, that’s all you really need to get started reading the content on your mobile. If you’re reading this on your S60 device, you can just click on the RSS feed, and automatically subscribe to the latest news articles.
If you’ve got one of the newer S60 devices, though, then you can get a richer experience using this widget I made which pulls in the RSS feed and displays the latest news stories directly on your phone.
Total development time for this widget was less than an hour, and most of that time was just deciding which colors to use in the CSS. If you haven’t seen the Nokia Web Run Time, then I’d recommend checking it out as it’s going to be a great way to build quick applications for S60 devices. Right now, it’s only drawback is that it has almost no access to the device itself (e.g. GPS, Contacts), but Nokia has already announced these features will be included in the next major release.
If you want to see the source code of the widget, then just download the file to your PC and change the file extension from .wgz to .zip. Then open the zip file and all of the source code is there. It’s a very simple setup with one HTML page, and one XMLHttpRequest call to retrieve the RSS feed.
Let me know if you have any questions about how the widget was built, and I’m also interested to see how other people are using widgets not just for their personal use, but also to help promote causes they believe in.