<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Twinapex Blog &#187; technology</title>
	<atom:link href="http://blog.mfabrik.com/category/technology/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.mfabrik.com</link>
	<description>Where creativity meets technology</description>
	<lastBuildDate>Sun, 24 Jan 2010 17:02:52 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>PyDev, Python and system default Unicode encoding problem</title>
		<link>http://blog.mfabrik.com/2010/01/24/aptana-studio-eclipse-pydev-default-unicode-encoding/</link>
		<comments>http://blog.mfabrik.com/2010/01/24/aptana-studio-eclipse-pydev-default-unicode-encoding/#comments</comments>
		<pubDate>Sun, 24 Jan 2010 17:02:33 +0000</pubDate>
		<dc:creator>Mikko Ohtamaa</dc:creator>
				<category><![CDATA[aptana studio]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[plone]]></category>
		<category><![CDATA[pydev]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://blog.twinapex.fi/?p=415</guid>
		<description><![CDATA[Python 2 has a thing called &#8220;default encoding&#8221; to automagically encode Unicode strings when they are presented as byte strings. This is evil and has been discussed various times before.
What could be even more evil? Something in your development environment messes this setting set for you, without telling you that. This way you never encounter [...]]]></description>
			<content:encoded><![CDATA[<p>Python 2 has a thing called &#8220;default encoding&#8221; to automagically encode Unicode strings when they are presented as byte strings. <a href="http://tarekziade.wordpress.com/2008/01/08/syssetdefaultencoding-is-evil/">This is evil and has been discussed various times before</a>.</p>
<p>What could be even more evil? Something in your development environment messes this setting set for you, without telling you that. This way you never encounter Unicode problems on your development computer and when you roll out your seemingly working code to production, the world goes haywire.</p>
<p>Evil. Evil. Evil. Thousands of curses and overworking hours to fix the problems.</p>
<p>I encountered this problem. And this is the code I used to track the problem down in site.py:</p>
<pre># Trap the bastard messing with the default encoding
# using a monkey patch
old_set_default_encoding = sys.setdefaultencoding

def aargh(x):
    import pdb ; pdb.set_trace()

sys.setdefaultencoding = aargh</pre>
<div>And the result was surprising:</div>
<pre>
<div id="_mcePaste">--Return--</div>
<div id="_mcePaste">&gt; /home/moo/py24/lib/python2.4/site.py(485)aargh()-&gt;None</div>
<div id="_mcePaste">-&gt; import pdb ; pdb.set_trace()</div>
<div id="_mcePaste">(Pdb) bt</div>
<div id="_mcePaste">/home/moo/py24/lib/python2.4/site.py(613)?()</div>
<div id="_mcePaste">-&gt; main()</div>
<div id="_mcePaste">/home/moo/py24/lib/python2.4/site.py(604)main()</div>
<div id="_mcePaste">-&gt; execsitecustomize()</div>
<div id="_mcePaste">/home/moo/py24/lib/python2.4/site.py(514)execsitecustomize()</div>
<div id="_mcePaste">-&gt; import sitecustomize</div>
<div id="_mcePaste">/home/moo/Desktop/Aptana Studio 2.0/plugins/org.python.pydev_1.5.3.1260479439/PySrc/pydev_sitecustomize/sitecustomize.py(99)?()</div>
<div id="_mcePaste">-&gt; sys.setdefaultencoding(encoding) #@UndefinedVariable (it's deleted after the site.py is executed -- so, it's undefined for code-analysis)</div>
<div id="_mcePaste">&gt; /home/moo/py24/lib/python2.4/site.py(485)aargh()-&gt;None</div>
<div id="_mcePaste">-&gt; import pdb ; pdb.set_trace()</div>

--Return--&gt; /home/moo/py24/lib/python2.4/site.py(485)aargh()-&gt;None-&gt; import pdb ; pdb.set_trace()(Pdb) bt  /home/moo/py24/lib/python2.4/site.py(613)?()-&gt; main()  /home/moo/py24/lib/python2.4/site.py(604)main()-&gt; execsitecustomize()  /home/moo/py24/lib/python2.4/site.py(514)execsitecustomize()-&gt; import sitecustomize  /home/moo/Desktop/Aptana Studio 2.0/plugins/org.python.pydev_1.5.3.1260479439/PySrc/pydev_sitecustomize/sitecustomize.py(99)?()-&gt; sys.setdefaultencoding(encoding) #@UndefinedVariable (it's deleted after the site.py is executed -- so, it's undefined for code-analysis)&gt; /home/moo/py24/lib/python2.4/site.py(485)aargh()-&gt;None-&gt; import pdb ; pdb.set_trace()</pre>
<p>Looks like the culprint was PyDev (Eclipse Python plug-in).  The interfering source code is <a href="http://github.com/aptana/Pydev/blob/master/plugins/org.python.pydev/PySrc/pydev_sitecustomize/sitecustomize.py">here</a>. Looks like the reason was to co-operate with Eclipse console. However it has been done incorrectly. Instead of setting the console encoding, the encoding is set to whole Python run-time environment, messing up the target run-time where the development is being done.</p>
<p>There is a possible fix for this problem. In Eclipse Run&#8230; dialog settings you can choose <em>Console Encoding</em> on <em>Common</em> tab. There is a possible value <em>US-ASCII</em>. I am not sure what Python 2 thinks &#8220;US-ASCII&#8221; encoding name, since the default is &#8220;ascii&#8221;.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mfabrik.com/2010/01/24/aptana-studio-eclipse-pydev-default-unicode-encoding/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Creating a drag&#8217;n&#039;drop basket with jQueryUI</title>
		<link>http://blog.mfabrik.com/2010/01/05/creating-a-dragndrop-basket-with-jqueryui/</link>
		<comments>http://blog.mfabrik.com/2010/01/05/creating-a-dragndrop-basket-with-jqueryui/#comments</comments>
		<pubDate>Tue, 05 Jan 2010 12:53:07 +0000</pubDate>
		<dc:creator>Mikko Ohtamaa</dc:creator>
				<category><![CDATA[jquery]]></category>
		<category><![CDATA[jqueryui]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[basket]]></category>
		<category><![CDATA[cdn]]></category>
		<category><![CDATA[google.code]]></category>
		<category><![CDATA[shopping cart]]></category>
		<category><![CDATA[travel planner]]></category>

		<guid isPermaLink="false">http://blog.twinapex.fi/?p=401</guid>
		<description><![CDATA[I have created an example how to create a &#8220;basked&#8221; with jQuery and jQueryUI with the following features

The user can be pick items from the predefined set
Items are dragged and dropped to the basket
The basket value reflects a hidden input

This kind of user interface pattern is suitable for

Shopping carts
Travel planners

The example in fact bears the [...]]]></description>
			<content:encoded><![CDATA[<p>I have created an example how to create a &#8220;basked&#8221; with jQuery and jQueryUI with the following features</p>
<ul>
<li>The user can be pick items from the predefined set</li>
<li>Items are dragged and dropped to the basket</li>
<li>The basket value reflects a hidden input</li>
</ul>
<p>This kind of user interface pattern is suitable for</p>
<ul>
<li>Shopping carts</li>
<li>Travel planners</li>
</ul>
<p>The example in fact bears the name &#8220;travel planner&#8221; but it is not tied to travel anyhow.</p>
<p><strong>Note: this is just a screenshot </strong>- please see l<a href="http://blog.twinapex.fi/wp-content/uploads/2010/01/index.html">ive example</a></p>
<p><a href="http://blog.twinapex.fi/wp-content/uploads/2010/01/basket.png"><img class="alignnone size-full wp-image-409" title="basket" src="http://blog.twinapex.fi/wp-content/uploads/2010/01/basket.png" alt="basket" width="500" height="298" /></a></p>
<p>The example code uses</p>
<ul>
<li><a href="http://code.google.com/apis/ajaxlibs/documentation/">google.code() content delivery network</a> to load jQuery and jQueryUI</li>
<li>jQueryUI draggable and droppable features</li>
<li>Well planned visual cues for the drag and drop operations: cursor changes, CSS hover classes</li>
<li>&lt;form&gt; which &lt;input&gt; value is updated according to the basket content &#8211; all selected item ids form a comma separated list</li>
</ul>
<p>The example code is well-documented with links to the further documentation.</p>
<ul>
<li><a href="http://blog.twinapex.fi/wp-content/uploads/2010/01/index.html">Live example</a></li>
<li><a href="http://code.google.com/p/jquerybaskedexample/source/browse/trunk/">View source code</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.mfabrik.com/2010/01/05/creating-a-dragndrop-basket-with-jqueryui/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Nokia N900, sports tracking and geotagging</title>
		<link>http://blog.mfabrik.com/2009/11/29/nokia-n900-sports-tracking-and-geotagging/</link>
		<comments>http://blog.mfabrik.com/2009/11/29/nokia-n900-sports-tracking-and-geotagging/#comments</comments>
		<pubDate>Sat, 28 Nov 2009 21:33:52 +0000</pubDate>
		<dc:creator>Mikko Ohtamaa</dc:creator>
				<category><![CDATA[geotagging]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[n900]]></category>
		<category><![CDATA[nokia]]></category>
		<category><![CDATA[sports tracker]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[ecoach]]></category>
		<category><![CDATA[exif]]></category>
		<category><![CDATA[google maps]]></category>
		<category><![CDATA[gpicsync]]></category>
		<category><![CDATA[gps]]></category>
		<category><![CDATA[gpx]]></category>
		<category><![CDATA[kml]]></category>
		<category><![CDATA[map my tracks]]></category>
		<category><![CDATA[nokia sports tracker]]></category>
		<category><![CDATA[sports tracking]]></category>

		<guid isPermaLink="false">http://blog.twinapex.fi/?p=371</guid>
		<description><![CDATA[This blog contains some tips how to use your Nokia N900 smart phone as a &#8220;augmented reality&#8221; sports device.
Sports tracking
Sport tracking is about collecting your sports activity data using GPS and other equipment. After running/cycling/skiing/whatever you see where you have been, how much time it took and how fast you are. In same cases you [...]]]></description>
			<content:encoded><![CDATA[<p>This blog contains some tips how to use your Nokia N900 smart phone as a &#8220;augmented reality&#8221; sports device.</p>
<h2>Sports tracking</h2>
<p>Sport tracking is about collecting your sports activity data using GPS and other equipment. After running/cycling/skiing/whatever you see where you have been, how much time it took and how fast you are. In same cases you are able to calculate burnt calories and estimated heart rate.</p>
<p>N900 has at least one sports tracking application out there, <a href="http://maemo.nokia.com/maemo-select/applications/ecoach/">eCoach</a>.  eCoach is also suitable for professionals as it has heart rate monitor integration.</p>
<p>eCoach allows you record and  store sport activities. During the activity it uses Open Street Map based map viewer to show your current location. At least Helsinki area has very detailed maps available there, showing even the smallest trails, so you can safely venture to unknown neighbourhoods.</p>
<p>eCoach exports its tracks as GPX gps data file format. eCoach does not have any service integration yet, but you can upload this file to <a href="http://sportstracker.nokia.com/">Nokia Sports Tracker</a> and <a href="http://www.mapmytracks.com/">Map My Tracks</a>. The recommend the latter as it has better social media integration and seems to be under active development. On the otherhand I have been using Nokia Sportstracker since 2007 and it has not really development during the whole this time and seems to lack will to go forward. Also Nokia has <a href="http://betalabs.nokia.com/forum/topic/4085">disabled track profile for imported GPX files</a> <a href="http://www.symbian-guru.com/welcome/2009/07/nokia-is-killing-sportstracker.html">which gives a message &#8220;we really don&#8217;t care about this service&#8221;</a>.</p>
<p>There is also a service called mapmyrun.com with various domain names like &#8220;maymysomething.com&#8221;. Steer away from this service as I tested it and it didn&#8217;t live up to my expections (too much advertising, horrible user interface).</p>
<p>Some sport tracks I have made</p>
<ul>
<li><a href="http://www.mapmytracks.com/explore/track/activity-2009-11-28-152647540200/">Run in Map My Tracks</a></li>
<li><a href="http://www.mapmytracks.com/explore/track/activity-2009-11-15-1541107360200/">Another run in Map My Tracks</a></li>
<li><a href="http://sportstracker.nokia.com/nts/workoutdetail/index.do?id=1801563">The same run in Nokia Sportstracker</a></li>
<li><a href="http://sportstracker.nokia.com/nts/user/profile.do?u=miohtama">All my runs in Nokia Sporstracker</a></li>
</ul>
<h2>Geotagging</h2>
<p>Geotagging is about having GPS  coordinates on your photos. This way photos can be put on the map autotically in photo sharing services like Yahoo <a href="http://www.flickr.com/groups/geotagging/pool/map?mode=group">Flick </a>or Google Picasa. When you known location, capture time and sharing license of the photo, all kind of fantastic services can be created, like <a href="http://photosynth.net/">Microsoft Photosynth</a>.</p>
<p>Technically geotagging works by embedded GPS coordiates into the EXIF metadata of JPEG files.</p>
<p>N900 has geotagging as out of the box feature &#8211; no additional software needed. Just turn on it on in Camera application settings.</p>
<p>Also, you can retrofit your photos with geotagging information afterwards. You can do this by hand using labels and drag and drop in the most of photo sharing applications, like Google Picasa. Also there exist automated tools if you have relates GPS records available as GPX or KML file: checkout <a href="http://code.google.com/p/gpicsync/">GPicSync</a>. This is handy if you record your sports in eCoach and forgot to turn on geotagging in N900 camera. GPicSync also has <a href="http://code.google.com/p/gpicsync/wiki/GoogleMapsExport">a Google Maps export feature</a> if you want to create custom maps for your friends or customers.</p>
<ul>
<li><a href="http://maps.google.com/maps/ms?ie=UTF8&amp;hl=en&amp;msa=0&amp;msid=107574116820777591375.000479751b32bc79abb01&amp;ll=60.204303,25.054064&amp;spn=0.034248,0.08214&amp;z=14">An example map created with N900, eCoach,  GPicSync and Google Maps</a> from one of the runs above</li>
</ul>
<h2>Sports tracking + geotagging = ?</h2>
<p>I am still trying to figure out how to combine sports tracking and geotagging to something cool. Maybe something along the lines of <a href="http://en.wikipedia.org/wiki/Urban_exploration">urban exploration</a>.</p>
<p>But in any case here are some of cities I have &#8220;collected&#8221; from my travels</p>
<ul>
<li><a href="http://sportstracker.nokia.com/nts/workoutdetail/index.do?id=1758533">Budapest</a></li>
<li><a href="http://sportstracker.nokia.com/nts/workoutdetail/index.do?id=1017087">London</a></li>
<li><a href="http://sportstracker.nokia.com/nts/workoutdetail/index.do?id=658576">Copenhagen</a></li>
<li><a href="http://sportstracker.nokia.com/nts/workoutdetail/index.do?id=658581">New York (GPS was not exactly working well&#8230;)</a></li>
<li><a href="http://sportstracker.nokia.com/nts/workoutdetail/index.do?id=156134">Oulu</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.mfabrik.com/2009/11/29/nokia-n900-sports-tracking-and-geotagging/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>PhoneGap ported on N900 (Maemo)</title>
		<link>http://blog.mfabrik.com/2009/11/24/phonegap-ported-on-n900-maemo/</link>
		<comments>http://blog.mfabrik.com/2009/11/24/phonegap-ported-on-n900-maemo/#comments</comments>
		<pubDate>Tue, 24 Nov 2009 00:17:52 +0000</pubDate>
		<dc:creator>Mikko Ohtamaa</dc:creator>
				<category><![CDATA[maemo]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[n900]]></category>
		<category><![CDATA[phonegap]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://blog.twinapex.fi/?p=355</guid>
		<description><![CDATA[We have ported PhoneGap mobile application framework to the new Nokia N900 smartphone and its Maemo operating system. PhoneGap is a framework to build mobile applications easily with HTML and Javascript. With the new Maemo port PhoneGap platform support covers iPhone, Android, Nokia Series 60, Blackberry, Windows Mobile and Maemo, making it one of the most [...]]]></description>
			<content:encoded><![CDATA[<p>We have ported <a href="http://phonegap.com">PhoneGap</a> mobile application framework to the new Nokia N900 smartphone and its Maemo operating system. PhoneGap is a framework to build mobile applications easily with HTML and Javascript. With the new Maemo port PhoneGap platform support covers iPhone, Android, Nokia Series 60, Blackberry, Windows Mobile and Maemo, making it one of the most portable mobile application development solution available.</p>
<p><img class="alignnone size-full wp-image-361" title="01012008052" src="http://blog.twinapex.fi/wp-content/uploads/2009/11/010120080521.jpg" alt="01012008052" width="400" height="300" /></p>
<p><img class="alignnone size-full wp-image-365" title="snapshot1" src="http://blog.twinapex.fi/wp-content/uploads/2009/11/snapshot11.png" alt="snapshot1" width="407" height="257" /></p>
<p>The demo application currently supports only Device Info and Accelerometer APIs. The porting work is still in its early stages and we suggest novice developers steer away from it. We&#8217;ll develop and maintain the work as long as we have client cases for mobile applications. If you are looking forward to port your commercial PhoneGap application to N900, please contact us.</p>
<p>PhoneGap port was done using QT and QWebView controller. The native shell source code is in C++. Build and packaging scripts are standard Makefiles. More technical information on the <a href="http://blog.twinapex.fi/phonegap-on-maemo/">release notes</a> page.</p>
<p>Code is available on <a href="http://github.com/jtoivola/phonegap/tree/master/maemo/">GitHub</a>.</p>
<h2>So what&#8217;s cool about Maemo (compared to other PhoneGap platforms)?</h2>
<p>Shortly: The openess of Maemo platforms enables developer innovation never seen before. There are zero artificial limitations chaining your imagination.</p>
<ul>
<li>No code signing whatsoever required</li>
<li>No approval process to get your application distributed</li>
<li>Very robust development tools and development environment. Hey, it&#8217;s Linux! The phone ships with X terminal built in.</li>
<li>You have root access to the device if needed</li>
<li>QWebView WebKit control which itself is open source &#8211; you can recompile from scratch and stick in the needed features</li>
<li>The phone itself is rock solid. It beats iPhone 100-0.</li>
<li>Maemo has very active open source community. You actually might get help when stuck, unlike with NDAs and other madness from some other vendors.</li>
</ul>
<h2 style="font-size: 1.5em;">So what&#8217;s cool about PhoneGap (compared to other mobile application technologies)?</h2>
<ul>
<li>Use low entry level HTML, CSS and Javascript technologies &#8211; even PHp coder can build his/her own mobile application! This is the most cost effective way to develop non-CPU-intensive applications.</li>
<li>PhoneGap has the widest mobile platform support &#8211; the best medicine against fragmented mobile application markets</li>
<li>You can always break out from the sandbox and use the native capabilities of the phone. This is something you cannot do with Flash Lite or Java ME.</li>
<li>Very active community</li>
<li>WebKit rendering engine enables CSS3 goodies and much more</li>
<li>Easily convert your existing mobile site to an application</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.mfabrik.com/2009/11/24/phonegap-ported-on-n900-maemo/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Installing Python Imaging Library (PIL) under virtualenv or buildout</title>
		<link>http://blog.mfabrik.com/2009/11/19/installing-python-imaging-library-pil-under-virtualenv-or-buildout/</link>
		<comments>http://blog.mfabrik.com/2009/11/19/installing-python-imaging-library-pil-under-virtualenv-or-buildout/#comments</comments>
		<pubDate>Thu, 19 Nov 2009 20:58:16 +0000</pubDate>
		<dc:creator>Mikko Ohtamaa</dc:creator>
				<category><![CDATA[plone]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[buildout]]></category>
		<category><![CDATA[pil]]></category>
		<category><![CDATA[satchmo]]></category>
		<category><![CDATA[site packages]]></category>
		<category><![CDATA[virtualenv]]></category>

		<guid isPermaLink="false">http://blog.twinapex.fi/?p=349</guid>
		<description><![CDATA[I have greatly struggled to have PIL library support in isolated Python environments like virtualenv &#8211;no-site-packages.
For example, when installing Satchmo shop under virtualenv:

../bin/clonesatchmo.pyhe Python Imaging Library is not installed. Install from your distribution binaries.

../bin/clonesatchmo.py
The Python Imaging Library is not installed. Install from your distribution binaries.
Though it clearly is there, installed by easy_install PIL command:
ls ../lib/python2.5/site-packages/PIL-1.1.7-py2.5-linux-x86_64.egg
ArgImagePlugin.py	 [...]]]></description>
			<content:encoded><![CDATA[<p>I have greatly struggled to have PIL library support in isolated Python environments like virtualenv &#8211;no-site-packages.</p>
<p>For example, when installing <a href="http://www.satchmoproject.com/">Satchmo</a> shop under virtualenv:</p>
<pre>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">../bin/clonesatchmo.pyhe Python Imaging Library is not installed. Install from your distribution binaries.</div>

../bin/clonesatchmo.py
The Python Imaging Library is not installed. Install from your distribution binaries.</pre>
<p>Though it clearly is there, installed by <em>easy_install PIL </em>command:</p>
<pre>ls ../lib/python2.5/site-packages/PIL-1.1.7-py2.5-linux-x86_64.egg
ArgImagePlugin.py	 ExifTags.py		  GimpGradientFile.pyc...</pre>
<p>Does anyone know if this problem is with PIL itself, eggified PIL or something else?</p>
<p>In any case, there is an easy workaround: use system-wide PIL (sudo apt-get install python-imaging) and symlink PIL from your site-wide installation under the isolated Python environment:</p>
<pre>(satchmo-py25)mulli% pwd
/srv/plone/mmaspecial/satchmo-py25/lib/python2.5/site-packages
(satchmo-py25)mulli% ln -s /usr/lib/python2.4/PIL .</pre>
<div>That works for now, but I&#8217;d like to learn how to make virtualenv and buildout install PIL egg bullet-proof way.</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.mfabrik.com/2009/11/19/installing-python-imaging-library-pil-under-virtualenv-or-buildout/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Setting up multi-touch scrolling for Ubuntu 9.10 Karmic Koala Linux on Asus Eee 1005HA netbook</title>
		<link>http://blog.mfabrik.com/2009/10/11/setting-up-multi-touch-scrolling-for-ubuntu-9-10-karmic-koala-linux-on-asus-eee-1005ha-netbook/</link>
		<comments>http://blog.mfabrik.com/2009/10/11/setting-up-multi-touch-scrolling-for-ubuntu-9-10-karmic-koala-linux-on-asus-eee-1005ha-netbook/#comments</comments>
		<pubDate>Sun, 11 Oct 2009 01:05:25 +0000</pubDate>
		<dc:creator>Mikko Ohtamaa</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[asus]]></category>
		<category><![CDATA[eee]]></category>
		<category><![CDATA[fdi]]></category>
		<category><![CDATA[hal]]></category>
		<category><![CDATA[karmic koala]]></category>
		<category><![CDATA[macbook]]></category>
		<category><![CDATA[multi-touch]]></category>
		<category><![CDATA[scroll]]></category>
		<category><![CDATA[synaptics]]></category>
		<category><![CDATA[synclient]]></category>
		<category><![CDATA[touchpad]]></category>
		<category><![CDATA[two-finger]]></category>
		<category><![CDATA[x11]]></category>
		<category><![CDATA[xinput]]></category>

		<guid isPermaLink="false">http://blog.twinapex.fi/?p=310</guid>
		<description><![CDATA[This post is specific to Asus Eee 1005HA netbook, but the technique explained here can be used on any computer having Synaptics touchpad.
Multi-touch gestures allow you to perform user interface actions by doing two finger gestures on touchpad. Apple introduced this feature on Macbooks and after you get used to it, it greatly enhances your [...]]]></description>
			<content:encoded><![CDATA[<p>This post is specific to Asus Eee 1005HA netbook, but the technique explained here can be used on any computer having Synaptics touchpad.</p>
<p>Multi-touch gestures allow you to perform user interface actions by doing two finger gestures on touchpad. Apple introduced this feature on Macbooks and after you get used to it, it greatly enhances your web browsing on mouseless netbook. The most important gesture is scroll text by swiping the touchpad with two fingers.</p>
<p>Apple has also many patents related to the gestures so they are not enabled by default.</p>
<p>The real multi-finger touch support needs multi-finger aware (capacitive) touchpad. Most PC laptops are not equipped with one. Luckily some of the simple gestures, like two finger scrolling, can be emulated on normal pressure point sensitive touchpad via clever calculations and other tricks.</p>
<p><strong>Note</strong>: <a href="https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-input-synaptics/+bug/355071">Ubuntu HAL support for Synaptics seem to be broken</a>. Only shell script at the end of the post will work. HAL options in FDI file are being ignored.</p>
<h2>Setting up Synaptics driver</h2>
<p>Type in terminal</p>
<pre>gksudo gedit /etc/hal/fdi/policy/11-x11-synaptics.fdi</pre>
<p>Create and save file with this content:</p>
<pre>&lt;?xml version="1.0" encoding="ISO-8859-1"?&gt;
&lt;deviceinfo version="0.2"&gt;
 &lt;device&gt;
   &lt;match key="info.capabilities" contains="input.touchpad"&gt;
       &lt;merge key="input.x11_driver" type="string"&gt;synaptics&lt;/merge&gt;
       &lt;merge key="input.x11_options.SHMConfig" type="string"&gt;On&lt;/merge&gt;

       &lt;merge key="input.x11_options.EmulateTwoFingerMinZ" type="string"&gt;40&lt;/merge&gt;
       &lt;merge key="input.x11_options.VertTwoFingerScroll" type="string"&gt;1&lt;/merge&gt;
       &lt;merge key="input.x11_options.HorizTwoFingerScroll" type="string"&gt;1&lt;/merge&gt;
       &lt;merge key="input.x11_options.TapButton1" type="string"&gt;1&lt;/merge&gt;
       &lt;merge key="input.x11_options.TapButton2" type="string"&gt;3&lt;/merge&gt;  &lt;!--two finger tap -&gt; middle clieck(3) --&gt;
       &lt;merge key="input.x11_options.TapButton3" type="string"&gt;2&lt;/merge&gt;  &lt;!--three finger tap -&gt; right click(2). almost impossible to click --&gt;
   &lt;/match&gt;
 &lt;/device&gt;
&lt;/deviceinfo&gt;</pre>
<p>This allows us to use synclient utility to watch touchpad real-time data in console window.</p>
<p>Now restart X</p>
<pre>sudo /etc/init.d/gdm restart</pre>
<p>And open terminal again.</p>
<p>Type in command</p>
<pre>synclient -m 100</pre>
<p>And you should see data like this scrolling in the terminal:</p>
<pre>129.355  2912 3469  59 1  4  0 0 0 0 0  00000000   0  0  0   0   0
 129.455  2952 3529  59 1  4  1 0 0 0 0  00000000   0  0  0   0   0
 time     x    y   z f  w  l r u d m     multi  gl gm gr gdx gdy
 129.555  3283 3516  60 1  4  1 0 0 0 0  00000000   0  0  0   0   0
 129.656  3928 3517  60 1  4  1 0 0 0 0  00000000   0  0  0   0   0
 129.756  4364 3637  60 1  4  1 0 0 0 0  00000000   0  0  0   0   0
 129.856  4020 3329  49 1  4  0 0 0 0 0  00000000   0  0  0   0   0
 129.956  3634 3122  58 1  4  0 0 0 0 0  00000000   0  0  0   0   0
 130.057  3320 2957  60 1  4  0 0 0 0 0  00000000   0  0  0   0   0
 130.157  2779 3312  61 1  4  0 0 0 0 0  00000000   0  0  0   0   0
 130.257  2557 3739  61 1  4  0 0 0 0 0  00000000   0  0  0   0   0
 130.358  2636 3485  39 1  4  0 0 0 0 0  00000000   0  0  0   0   0
 130.458  2659 3104  60 1  4  0 0 0 0 0  00000000   0  0  0   0   0
 130.558  2671 2988  60 1  4  0 0 0 0 0  00000000   0  0  0   0   0</pre>
<p>f column tells the number of fingers. w is the touched area width. z is the pressure.</p>
<p>If you put two fingers on touchpad and you see value f=2 then your hardware has multi-touch aware touchpad. Unfortunately Asus Eee 1005HA doesn&#8217;t seem to have one <img src='http://blog.mfabrik.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<h2>Emulation approach</h2>
<p>Synaptics driver can emulate two-finger touch with the following conditions</p>
<ul>
<li>Touched area width exceeds certain threshold (min width)</li>
<li>Touch pressure exceeds certain thresholds</li>
</ul>
<p>When the conditions are met the driver thinks &#8220;Wow looks this guy is pressing us really hard. maybe he is using two fingers?&#8221; Note that touchpad values are touchpad specific and values applying for one model don&#8217;t work on another computer.</p>
<p><a href="http://manpages.ubuntu.com/manpages/karmic/man4/synaptics.4.html">Synaptics driver settings are described here</a>. Synaptic driver settings can be modified run-time using xinput command. Run <em>synclient -m 100</em> in one terminal window and change threshold values in other until you find correct emulation parameters for your laptop. Below is my xinput tests. Test scrolling on Firefox and any long web page.</p>
<pre>moo@huiskuttaja:~$ xinput set-int-prop "SynPS/2 Synaptics TouchPad" "Synaptics Two-Finger Width" 32 7
moo@huiskuttaja:~$ xinput set-int-prop "SynPS/2 Synaptics TouchPad" "Synaptics Two-Finger Pressure" 32 280
moo@huiskuttaja:~$ xinput set-int-prop "SynPS/2 Synaptics TouchPad" "Synaptics Two-Finger Width" 32 11
moo@huiskuttaja:~$ xinput set-int-prop "SynPS/2 Synaptics TouchPad" "Synaptics Two-Finger Pressure" 32 50
moo@huiskuttaja:~$</pre>
<p>Looks like the following parameters are good for two finger emulation for Asus Eee 1005HA:</p>
<ul>
<li>Width: 8</li>
<li>Pressure (Z): 10</li>
</ul>
<p>You can also use command synclient -l to dump the current settings.</p>
<p>Below is the final script you need to run during log-in (see note about broken HAL at the beginning of the post):</p>
<pre>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 1504px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">#!/bin/sh</div>

#!/bin/sh
#
# Use xinput --list-props "SynPS/2 Synaptics TouchPad" to extract data
#

# Set multi-touch emulation parameters
xinput set-int-prop "SynPS/2 Synaptics TouchPad" "Synaptics Two-Finger Pressure" 32 10
xinput set-int-prop "SynPS/2 Synaptics TouchPad" "Synaptics Two-Finger Width" 32 8
xinput set-int-prop "SynPS/2 Synaptics TouchPad" "Two-Finger Scrolling" 8 1
xinput set-int-prop "SynPS/2 Synaptics TouchPad" "Synaptics Two-Finger Scrolling" 8 1 1

# Disable edge scrolling
xinput set-int-prop "SynPS/2 Synaptics TouchPad" "Synaptics Edge Scrolling" 8 0 0 0 

# This will make cursor not to jump if you have two fingers on the touchpad and you list one
# (which you usually do after two-finger scrolling)
xinput set-int-prop "SynPS/2 Synaptics TouchPad" "Synaptics Jumpy Cursor Threshold" 32 110
<strong>
</strong></pre>
<pre><strong>Jumpy cursor after two finger scroll</strong></pre>
<p>When you do a two-finger scroll and lift your one finger before the other the mouse cursor/scrolling may jump. Synaptics driver does not seem to have an option to filter out this bad event. If anyone knows solution for this please comment.</p>
<h2>Other resources</h2>
<ul>
<li> <a href="http://randomtruth.110mb.com/blog/index.php/2009/03/30/v10-of-linux-multi-touch-released/">Linux Multi-Touch</a> is a project to collect set of Perl scripts related to multi-touch events. If you want to customize your multi-touch experience and you have some development insight, this is the place to begin.</li>
<li><a href="https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-input-synaptics/+bug/422224">Notes about multi-touch emulation (see the last comment)</a>.<a href="http://ubuntu-snippets.blogspot.com/2009/03/multi-touch-for-anyall-synaptics.html"> </a></li>
<li><a href="http://ubuntu-snippets.blogspot.com/2009/03/multi-touch-for-anyall-synaptics.html">Diagnosing multitouch support and editing HAL files</a>.</li>
<li><a href="http://brainstorm.ubuntu.com/idea/3077/">Related idea on Ubuntu Brainstorm</a>.</li>
<li><a href="http://cgit.freedesktop.org/xorg/driver/xf86-input-synaptics/">Synaptics X11 driver source</a>. <a href="http://web.telia.com/~u89404340/touchpad/index.html">Synaptics driver project page</a>. Looks like there is no one central figure behind it, except for maintaining, and big bunch of patches from distributors.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.mfabrik.com/2009/10/11/setting-up-multi-touch-scrolling-for-ubuntu-9-10-karmic-koala-linux-on-asus-eee-1005ha-netbook/feed/</wfw:commentRss>
		<slash:comments>24</slash:comments>
		</item>
		<item>
		<title>Cannot sort custom content item in Plone folder listing</title>
		<link>http://blog.mfabrik.com/2009/10/05/cannot-sort-custom-content-item-in-plone-folder-listing/</link>
		<comments>http://blog.mfabrik.com/2009/10/05/cannot-sort-custom-content-item-in-plone-folder-listing/#comments</comments>
		<pubDate>Mon, 05 Oct 2009 12:00:12 +0000</pubDate>
		<dc:creator>Mikko Ohtamaa</dc:creator>
				<category><![CDATA[plone]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[folder]]></category>
		<category><![CDATA[listing]]></category>
		<category><![CDATA[sort]]></category>

		<guid isPermaLink="false">http://blog.twinapex.fi/?p=290</guid>
		<description><![CDATA[Bug: Plone folder manual sorting does not move items even though you try all tricks. The first suspect would be a Javascript bug, but it isn&#8217;t.
It is bug 8161.
Your custom content meta_type must not contain spaces.
You can fix this on-line by editing meta type in portal_types in ZMI and remove all spaces from meta type [...]]]></description>
			<content:encoded><![CDATA[<p>Bug: Plone folder manual sorting does not move items even though you try all tricks. The first suspect would be a Javascript bug, but it isn&#8217;t.</p>
<p>It is <a href="https://dev.plone.org/plone/ticket/8161">bug 8161.</a></p>
<p>Your custom content meta_type must not contain spaces.</p>
<p>You can fix this on-line by editing meta type in portal_types in ZMI and remove all spaces from meta type name.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mfabrik.com/2009/10/05/cannot-sort-custom-content-item-in-plone-folder-listing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Subversion global-ignores and .egg-info in Python/Plone development</title>
		<link>http://blog.mfabrik.com/2009/10/03/subversion-global-ignores-and-egg-info-in-pythonplone-development/</link>
		<comments>http://blog.mfabrik.com/2009/10/03/subversion-global-ignores-and-egg-info-in-pythonplone-development/#comments</comments>
		<pubDate>Sat, 03 Oct 2009 12:47:04 +0000</pubDate>
		<dc:creator>Mikko Ohtamaa</dc:creator>
				<category><![CDATA[plone]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[egg-info]]></category>
		<category><![CDATA[global-ignores]]></category>
		<category><![CDATA[ignores]]></category>
		<category><![CDATA[setuptools]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[svn]]></category>
		<category><![CDATA[version control]]></category>

		<guid isPermaLink="false">http://blog.twinapex.fi/?p=286</guid>
		<description><![CDATA[Subversion does a good job by ignoring most of build/temporary/unwanted files by default.
However, there is one exception still existing at least in Subversion 1.6: Python egg folders. All folders whose name ends up with .egg-info should not committed or considered in version controlling actions. your.package.name.egg-info folder is generated inside your Python egg source folder when [...]]]></description>
			<content:encoded><![CDATA[<p>Subversion does a good job by ignoring most of build/temporary/unwanted files by default.</p>
<p>However, there is one exception still existing at least in Subversion 1.6: Python egg folders. All folders whose name ends up with <strong>.egg-info</strong> should not committed or considered in version controlling actions. your.package.name.egg-info folder is generated inside your Python egg source folder when you run setup.py / setuptools.</p>
<p>If you are working with Python source code eggs, add the following line to your ~/.subversion/config</p>
<pre>global-ignores = *.o *.lo *.la #*# .*.rej *.rej .*~ *~ .#* .DS_Store *.egg-info *.pyc *.pyo .project .pydevproject</pre>
<p>Otherwise development tools like <a href="http://pypi.python.org/pypi/mr.developer/">Mr. Developer</a> might get confused.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mfabrik.com/2009/10/03/subversion-global-ignores-and-egg-info-in-pythonplone-development/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Cross-platform mobile application development and payments</title>
		<link>http://blog.mfabrik.com/2009/09/30/cross-platform-mobile-application-development-and-payment/</link>
		<comments>http://blog.mfabrik.com/2009/09/30/cross-platform-mobile-application-development-and-payment/#comments</comments>
		<pubDate>Wed, 30 Sep 2009 09:55:30 +0000</pubDate>
		<dc:creator>Mikko Ohtamaa</dc:creator>
				<category><![CDATA[android]]></category>
		<category><![CDATA[blackberry]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[locationing]]></category>
		<category><![CDATA[payment]]></category>
		<category><![CDATA[series 60]]></category>
		<category><![CDATA[symbian]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[appaccelerator]]></category>
		<category><![CDATA[appstore]]></category>
		<category><![CDATA[bango]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[deviceatlas]]></category>
		<category><![CDATA[fennec]]></category>
		<category><![CDATA[gallery]]></category>
		<category><![CDATA[mozilla]]></category>
		<category><![CDATA[nokia]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[phonegap]]></category>
		<category><![CDATA[pre]]></category>
		<category><![CDATA[rhomobile]]></category>
		<category><![CDATA[sms]]></category>
		<category><![CDATA[titanium]]></category>
		<category><![CDATA[upload]]></category>
		<category><![CDATA[web run-time]]></category>
		<category><![CDATA[webkit]]></category>

		<guid isPermaLink="false">http://blog.twinapex.fi/?p=277</guid>
		<description><![CDATA[We have been piloting multi-platform mobile application development and payments in few client projects. Target platforms usually include iPhone, Android, Blackberry and Nokia Series 60. Also there are two notable usual cases which need to be specially handled

Image uploads
Payments for subscribed content

Sounds easy, right? Well it isn&#8217;t&#8230; Below are some notes for our due diligence [...]]]></description>
			<content:encoded><![CDATA[<p>We have been piloting multi-platform mobile application development and payments in few client projects. Target platforms usually include iPhone, Android, Blackberry and Nokia Series 60. Also there are two notable usual cases which need to be specially handled</p>
<ul>
<li>Image uploads</li>
<li>Payments for subscribed content</li>
</ul>
<p>Sounds easy, right? Well it isn&#8217;t&#8230; Below are some notes for our due diligence work which you fellow developers might find interesting.</p>
<h2>SDKs</h2>
<p>Mobile phone vendors are jealously and don&#8217;t want to co-operate with each other. Building application which works in all handsets is major headache.</p>
<p>We found some reasonable candidates for cross-platform mobile development doing HTML and Javascript. HTML and Javascript pages are converted to native application using a wrapper technology (a.k.a. appaccelerator). Doing Flash Lite or Java ME can be pretty much forgotten nowadays as they won&#8217;t run on the most hyped platform, iPhone. Flash Lite has poor support for anything except content authoring due to primitive and limited APIs. Java ME provides horrible user experience.</p>
<p>(X)HTML is the only common language spoken by mobile phones. Thus, there has been a rise of &#8220;appaccelerators&#8221;, technologies which allow to create mobile applications with HTML(5) and Javascript.</p>
<ul>
<li><a href="http://www.phonegap.com/">Phonegap:</a> iPhone, Android, Blackberry and possibly S60 in the future. <strong>Pluses:</strong> BSD license, very active community. <strong>Minuses:</strong> <a href="http://groups.google.com/group/phonegap/browse_thread/thread/5760d86c91970441/f0305e400b362933#f0305e400b362933">bad documentation, difficult deployment process</a>.</li>
<li><a href="http://www.appcelerator.com/">Titanium</a>: iPhone, Android.<strong> Pluses: </strong>Professional, Apache license. <strong>Minuses:</strong> Too tightly coupled with Appacclerator Inc. company.</li>
<li><a href="http://www.rhomobile.com/">Rhomobile</a>: iPhone, Android, Blackberry, S60, Windows Mobile. <strong>Pluses:</strong> Professional, tries to build open source community, the widest platform support. <strong>Minuses:</strong> Dual licensing and tightly coupled with Rhomobile Inc.</li>
<li><a href="http://www.forum.nokia.com/Technology_Topics/Web_Technologies/Web_Runtime/">Nokia Web-runtime</a>: Nokia S60 and some other Symbian based phones. <strong>Pluses: </strong>Professional, good documentation. <strong>Minuses: </strong>Not open source, impossible to extend, Nokia has little interest to make this cross-platform, Nokia doesn&#8217;t like updating old models and web-runtime is useable only in the latest S60 5th edition models.</li>
<li>Palm Pre supports web applications natively. However Palm Pre application business is still taking a shape.</li>
</ul>
<p>All these wrap the browser component (WebKit) and provide some extra Javascript APIs when your web pages as executed under the application mode.</p>
<ul>
<li>Locationing</li>
<li>Contacts</li>
<li>SMS</li>
<li>Client-side database</li>
<li>and so on&#8230;</li>
</ul>
<p>Rhomobile has little different use cases  from the rest of the bunch as it provides client-side programming using Ruby and less focuses on Javascript/web applications.</p>
<h2>Payments and in-application purchases</h2>
<p>There are four major way to do mobile payments &#8220;inside&#8221; the application for bought content and subscriptions. The price tag on the application itself is left out on this discussion as the application stores themselves take care of it.</p>
<ul>
<li>Credit card</li>
<li>SMS</li>
<li>App Store payment (thus far Apple only)</li>
<li>Direct operator payments &#8211; you have a service provider (Bango) which can directly charge items to the operator phone bill based on handset identification.</li>
</ul>
<p>App Store payment is the most attractive as it provides the best end user experience.  It allows you to use App Store payment mechanism inside the application. It is safe and no need to hassle with external payment providers. However, App Store payment can be used only for content consumed directly inside the application. You cannot use it e.g. for ordering a pizza. I think this might be related to recent EU legislation forbidding SMS payments for services not consumed in the phone itself.</p>
<p>SMS payment is ok for little payments. Operators take big cut of the revenue, generally 30% &#8211; 70% depending on the country. Short code fees usually start from 500€ set-up fee + 500€ / month. SMS cannot be often send as a background, but the user is presented the normal SMS editor which reduces the user experience somehow.</p>
<p>For credit card payments there exists several providers. Credit card has the cheapest entry fees, but the downside is that the user needs to have the credit card. This excludes teenager audience.</p>
<p>Direct operator payments are not very well supported yet globally. Most western operators support them. The operator also takes a big share and the fixed fee is pretty high.</p>
<p>My favorite payment provider thus far is<a href="http://www.bango.com"> Bango</a> which provides credit card payment starting 9€ / mo. and scales up to worldwide SMS payments which cost few grannies per month.</p>
<p>In most cases, the payment experience will not be smooth. You need to open the phone main browser on the payment provider page to do the payment. This usually will close your own application. Rarely you can do the payment inside the application <em>and</em> support multiple platforms. After doing the payment most platforms allow you to close the browse and reopen your application using a special URL handler.</p>
<p><a href="http://en.wikipedia.org/wiki/Mobile_payment">Wikipedia mobile payments</a> page is also useful.</p>
<h2>Image upload</h2>
<p>&lt;input type=&#8221;file&#8221;&gt; won&#8217;t work on iPhone and some other platforms  as those don&#8217;t have user browsable file system. Also the file dialog usually doens&#8217;t have image preview making it useless.</p>
<p>Phonegap has a branch which supports images picking using iPhone&#8217;s own gallery browser.</p>
<p>In any case, there is not yet cross-platform solution for this.</p>
<h2>Future prospects</h2>
<p>In some time-frame we will get rid of the need to wrap HTML applications natively as the web browser applications will support all HTML5 features without extensions and probably have some proprietary extensions for mobile specific features like SMS. We already have had some taste for this:</p>
<ul>
<li>The first taste of this is <a href="http://hacks.mozilla.org/2009/06/geolocation/">Mozilla&#8217;s Fennec mobile browser which has locationing support</a>.</li>
<li>iPhone&#8217;s Safari already supports <a href="http://developer.apple.com/safari/library/documentation/iPhone/Conceptual/SafariJSDatabaseGuide/Introduction/Introduction.html">client-side storage</a> and <a href="http://girliemac.com/blog/2009/01/23/webkit-comparison-on-css3/">CSS3</a>.</li>
<li>All phones have support for dial-in links. The format of the link may vary. <a href="http://deviceatlas.com/">DeviceAtlas</a> is good place to hunt for this information.</li>
<li>Nokia browser supports send SMS links</li>
<li>Nokia browser supports downloadable map markers (to the map application of the phone itself)</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.mfabrik.com/2009/09/30/cross-platform-mobile-application-development-and-payment/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Building a mobile site and applications with Django and Python</title>
		<link>http://blog.mfabrik.com/2009/09/30/building-a-mobile-site-and-applications-with-django-and-python/</link>
		<comments>http://blog.mfabrik.com/2009/09/30/building-a-mobile-site-and-applications-with-django-and-python/#comments</comments>
		<pubDate>Wed, 30 Sep 2009 08:46:52 +0000</pubDate>
		<dc:creator>Mikko Ohtamaa</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[pys60]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[analytics]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[apex vertex]]></category>
		<category><![CDATA[augmented reality]]></category>
		<category><![CDATA[bicycling]]></category>
		<category><![CDATA[bilingual]]></category>
		<category><![CDATA[browser]]></category>
		<category><![CDATA[browsercontrol]]></category>
		<category><![CDATA[capabilities]]></category>
		<category><![CDATA[darwin]]></category>
		<category><![CDATA[django-cms]]></category>
		<category><![CDATA[extjs]]></category>
		<category><![CDATA[google maps]]></category>
		<category><![CDATA[gps]]></category>
		<category><![CDATA[handset]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[lbs]]></category>
		<category><![CDATA[localhost]]></category>
		<category><![CDATA[location based]]></category>
		<category><![CDATA[map]]></category>
		<category><![CDATA[media]]></category>
		<category><![CDATA[mobile profile]]></category>
		<category><![CDATA[mod_python]]></category>
		<category><![CDATA[multichannel]]></category>
		<category><![CDATA[multilingual]]></category>
		<category><![CDATA[nokia]]></category>
		<category><![CDATA[oulu]]></category>
		<category><![CDATA[phonegap]]></category>
		<category><![CDATA[premium]]></category>
		<category><![CDATA[print]]></category>
		<category><![CDATA[publishing]]></category>
		<category><![CDATA[rtsp]]></category>
		<category><![CDATA[series 40]]></category>
		<category><![CDATA[series 60]]></category>
		<category><![CDATA[sniffing]]></category>
		<category><![CDATA[streaming]]></category>
		<category><![CDATA[symbiansigned]]></category>
		<category><![CDATA[tourism]]></category>
		<category><![CDATA[traffic statistics]]></category>
		<category><![CDATA[twinapex]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[upnorth]]></category>
		<category><![CDATA[user agent]]></category>
		<category><![CDATA[webkit]]></category>
		<category><![CDATA[xhtml]]></category>

		<guid isPermaLink="false">http://blog.twinapex.fi/?p=248</guid>
		<description><![CDATA[Recently we created a mobile site for an interactive bicycle tour. oulugo.mobi (you need to use mobile browser to access the site or you&#8217;ll get a redirect) is a multimedia enriched bicycle tour through the historic parts of the city of Oulu. All content is provided by OnGo.
The route, which you can bicycle through is drawn [...]]]></description>
			<content:encoded><![CDATA[<p>Recently <a href="http://www.twinapex.com">we</a> created a mobile site for an interactive bicycle tour. <a href="http://oulugo.mobi">oulugo.mobi</a> (you need to use mobile browser to access the site or you&#8217;ll get a redirect) is a multimedia enriched bicycle tour through the historic parts of <a href="http://ouka.fi/english/index.asp">the city of Oulu</a>. All content is provided by <a href="http://www.ongo.fi/en/index.htm">OnGo</a>.</p>
<p>The route, which you can bicycle through is drawn on Google Maps. There are nine  action points where the user can listen to streaming audio clips, with still images, in his/her mobile phone. This is sort of  augmented reality experience: The user sees the real world (where he/she is now bicycling) combined with the historic events (audio playback narrative). For example, at Linnansaari (a location on the route) you&#8217;ll see the actual 17th century castle ruins and the narrator tells how the castle exploded when fire, caused by a lighting, reached gunpowder warehouse&#8230; boom. The explosion caused stones fly over 400 meters.</p>
<p>Alternatively, the clips are available as podcasts from <a href="http://www.oulutourism.fi/oulugo/en_default.aspx">Oulu Tourism pages</a>. You can download them into your iPod for offline listening and use in conjuction with a paper map. This demostrates interesting mix of multichannel publishing: paper, web, mobile and podcasts.</p>
<p>The tour is bilingual in Finnish and English.</p>
<p>There exists unreleased iPhone application, based on <a href="http://phonegap.com">PhoneGap</a>, which allows the user to track his/her location real-time on the web page. We didn&#8217;t see it worth of trouble to go through Apple iPhone application review process. When location based service support comes for the browser this feature is indended to be included as the standard HTML5 feature of the service.</p>
<p>There also exists Nokia Series 60 mobile application, based on<a href="http://wiki.opensource.nokia.com/projects/PyS60"> PyS60</a> and Series 60<a href="http://www.forum.nokia.com/info/sw.nokia.com/id/47d8a7fe-768c-44e5-bc26-fcba0a05e35e/S60_Platform_Browser_Control_API_Guide_v2_0_en.pdf.html"> BrowserControl API</a>, which allows the user to track his/her location in real-time. The application provides wrapper around Series 60 WebKit control and allows Javascript to access phone native functions (GPS) over localhost socket communication. Like with Apple, we didn&#8217;t see real-time tracking feature interesting enough to go through Symbian Signed process to get our application released. Also, BrowserControl had seriousquality problems and we didn&#8217;t consider it stable enough for the end users. <a href="https://code.launchpad.net/~august-joki/pys60community/browsercontrol">Some work is available in PyS60 Community Edition repository</a>.</p>
<p>The service is hosted <a href="http://www.twinapex.com/solutions/outsourcing-hosting-and-maintenance-of-internet-and-mobile-systems">on Python specific virtual server on Twinapex services server farm</a>.</p>
<h2>Features</h2>
<ul>
<li>Premium content tailored for audio listening</li>
<li>Dubbed in English and Finnish by a professional voice actor</li>
<li>Bilingual: English/Finnish</li>
<li>Adapts for smartphones (WebKit based browsers) and low end phones (XHTML mobile profile browsers)</li>
<li>Streaming video and audio (RTSP / progressive HTTP download forv iPhone). Different audio quality is provided on depending on the handset features.</li>
<li>Screen resolution detection based on <a href="http://en.wikipedia.org/wiki/User_Agent">user agent sniffing</a>. Three different version of images are used.</li>
<li>Custom Google Maps component for mobile is used. The component adapts for different mobile phones based on sniffing. Features include zoom, show action point, show the current location, search street address name. This component can be published on a request.</li>
<li>Management interface features include video upload, video transcoding different mobile versions and editing bilingual content</li>
<li><a href="http://www.twinapex.com/products/mobile-publishing/apex-vertex/handset-database">Apex Vertex handset database is used to detect the user&#8217;s mobile phone capabilities</a></li>
<li><a href="http://www.twinapex.com/products/mobile-publishing/apex-vertex/reporting">Apex Vertex logging and traffic analytics capabilities are used for the site statistics</a></li>
</ul>
<h2>Software stack</h2>
<ul>
<li><a href="http://www.ubuntu.com">Ubuntu 8.04 Hardy Heron virtual server</a></li>
<li><a href="http://www.apache.org">Apache 2.2 / mod_python</a></li>
<li><a href="http://python.org">Python 2.5</a></li>
<li><a href="http://djangoproject.com">Django 1.0</a></li>
<li><a href="http://django-cms.org/">Django-CMS 1.0</a></li>
<li><a href="http://code.google.com/p/mobilesniffer/">mobile.sniffer Python package to provide abstraction over different handset databases</a></li>
<li><a href="http://www.twinapex.com/products/mobile-publishing/apex-vertex">Apex Vertex streaming</a> solution (RTSP based on Darwin streaming server by Apple)</li>
<li><a href="http://tinymce.moxiecode.com/">TinyMCE WYSIWYG editor</a></li>
<li><a href="http://developer.apple.com/opensource/server/streaming/index.html">Darwin streaming server</a></li>
<li><a href="http://extjs.com/">ExtJS</a> is extensively used in Apex Vertext management interface</li>
</ul>
<h2>Development effort</h2>
<p>Development time: Around 100 hours. Three different developers where involved. Used development tools: <a href="http://www.eclipse.org">Eclipse</a>, <a href="http://pydev.sourceforge.net/">PyDev</a>, <a href="http://subclipse.tigris.org/">Subclipse</a>, <a href="http://subversion.tigris.org/">Subversion</a>. There were around five meetings between the content provider and the technology provider. Few beta testing rounds using iPhone application were performed by bicycling in -10 celcius degrees weather (north and so on&#8230;). No polar bears were harmed during the creation of this mobile service.</p>
<p>The service is linked in from Oulu Tourism pages and thousands of paper brochures printed for Oulu summer season 2009.</p>
<p><strong style="font-weight: bold;">About the author Mikko Ohtamaa</strong></p>
<ul>
<li><a href="http://www.linkedin.com/in/ohtis  ">LinkedIn</a></li>
<li><a href="http://twitter.com/moo9000">Twitter</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.mfabrik.com/2009/09/30/building-a-mobile-site-and-applications-with-django-and-python/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
