<feed xmlns='http://www.w3.org/2005/Atom'><id>tag:www.mdk.org.pl,2009:atom-tools</id><title type='text'>Michael Dominic K.</title><subtitle type='text'>It doesn&apos;t mean you should just because you can</subtitle><updated>2009-07-30T16:51:32+02:00</updated><link href='http://www.mdk.org.pl' rel='alternate' type='text/html'/><link href='http://www.mdk.org.pl/feed/atom.xml' rel='self' type='application/atom+xml'/><rights type='text'>Copyright © 2009, Michael Dominic K.</rights><entry><id>tag:www.mdk.org.pl,2009:the-great-demise-of-the-file</id><title type='text'>The great demise of the file</title><content type='html'>&lt;p&gt;&lt;img src=&quot;http://www.mdk.org.pl/assets/not-a-file.png&quot; alt=&quot;This is not a file&quot; style=&quot;float:left; margin: 0; margin-left: 0px&quot;/&gt;&lt;/p&gt;

&lt;p&gt;I recently had an HDD failure and had to dig deep into the filesystem to recover some data. Pain in the ass. While navigating the crummy, hidden folders to recover weirdly-sounding filenames&amp;hellip; an epiphany hit me &amp;mdash; &lt;em&gt;The File&lt;/em&gt; is dying. The metaphorical role of a file is dying. The file used to be the beginning and the end &amp;mdash; it contained an essay, a book, a photo, a song, a todo list, a business card&amp;hellip; to give you a document I would put the file containing it on a disk. Or on a usb stick. Or I would send it via email.&lt;/p&gt;

&lt;p&gt;The piece of information &lt;strong&gt;was&lt;/strong&gt; the file and vice versa: the file &lt;strong&gt;was&lt;/strong&gt; the piece of information.&lt;/p&gt;

&lt;p&gt;But not so much anymore. The email program does not operate on files. Neither does the twitter client nor the todo-tracking application. They store data in well-hidden databases in the internal directories that we&amp;rsquo;re not supposed to look at. And quite rightly &amp;mdash; because there is nothing to see there. Looking at the huge &lt;em&gt;photos.db&lt;/em&gt; one might only wonder where his dog photos are.&lt;/p&gt;

&lt;p&gt;Sure, the applications still give you a way to share things and take them out of the storage. You can export a contact out of your address book as a vcard file. But the role of &lt;em&gt;The File&lt;/em&gt; here is slowly being reduced to a role of an intermediate storage medium. The business card is temporarily put in the &lt;em&gt;.vcf&lt;/em&gt; file before it gets injected into somebody else&amp;rsquo;s database (another address book?).&lt;/p&gt;

&lt;p&gt;As more and more applications operate on databases, the computer is becoming a monolithic &lt;em&gt;black-box&lt;/em&gt; that &amp;ldquo;has things&amp;rdquo;. How exactly (and where) the data is stored is becoming less clear. The application and the interface becomes united with the user data. It becomes one.&lt;/p&gt;

&lt;p&gt;And if I own your user interface, I own your data.&lt;/p&gt;

&lt;h2&gt;Not so good&lt;/h2&gt;

&lt;p&gt;Databases as storage mediums solve problems by creating new ones.&lt;/p&gt;

&lt;p&gt;I&apos;ve got a directory on my disk that contains stuff related to my &lt;a href=&quot;http://www.new-wild.com&quot;&gt;company&lt;/a&gt; &amp;ndash; documents, invoices and some other content which is still mostly file-based. But I also have a todo list related to my work things and some notes about current projects. These are stored in two separate applications that operate on their own storage. So now: if I copy the whole company directory to another medium I&apos;m not effectively copying everything. This trivial issue is extremely confusing for most users who are not familiar with the application internals.&lt;/p&gt;

&lt;p&gt;There are other technical issues as well. Apple&amp;rsquo;s &lt;a href=&quot;http://www.apple.com/macosx/what-is-macosx/time-machine.html&quot;&gt;Time Machine&lt;/a&gt; is a good example here. It&amp;rsquo;s a great backup service but it was designed to operate on files. When a file is modified locally Time Machine copies it to a backup storage. This way it&amp;rsquo;s fast and incremental &amp;ndash; the changes are small and isolated. You can even browse various versions of the file from the past. But if your &amp;ldquo;file&amp;rdquo; is a monolithic 1GB notes &amp;amp; pictures database (it&amp;rsquo;s &amp;ldquo;everything&amp;rdquo;) the whole concept is blown away (ie. &lt;a href=&quot;http://www.mail-archive.com/yojimbo-talk@barebones.com/msg01151.html&quot;&gt;Yojimbo&lt;/a&gt; example).&lt;/p&gt;

&lt;h2&gt;Meet the service&lt;/h2&gt;

&lt;p&gt;Not surprisingly, we stopped talking &amp;ldquo;files&amp;rdquo; long time ago. We&amp;rsquo;re talking &amp;ldquo;services&amp;rdquo; now. In some cases it works great: in example, I don&amp;rsquo;t exactly care how my Linux, Mac or iPhone email client store the mail data. I don&amp;rsquo;t care because the central storage (my IMAP server) is out there and it has a clear, well-defined service API. It&amp;rsquo;s transparent.&lt;/p&gt;

&lt;p&gt;Too bad that email is a lonely exception here. Quite a significant portion of the data generated by us today is put in totally black-boxed, closed services that are very open to &lt;em&gt;take&lt;/em&gt; our data but not very keen on &lt;em&gt;giving it back&lt;/em&gt; in a sane way. This is often a deliberate business practice but sometimes &amp;ndash; a lack of thought. Social services like &lt;a href=&quot;http://www.facebook.com&quot;&gt;Facebook&lt;/a&gt; come to mind. &lt;a href=&quot;http://www.google.com&quot;&gt;Google&lt;/a&gt; does not score better either.&lt;/p&gt;

&lt;h2&gt;The great escape&lt;/h2&gt;

&lt;p&gt;Should we stop defending the lost trenches of &lt;em&gt;The File&lt;/em&gt;? Should we fight for more open services? Should we get concerned about freedom of data storage? Should we acknowledge that open code is not enough?  Should I buy a new guitar?&lt;/p&gt;

&lt;p&gt;Could be. Remembering the hard lesson from the web: convenience &lt;strong&gt;always&lt;/strong&gt; wins over integrity.&lt;/p&gt;
</content><published>2009-07-30T16:51:32+02:00</published><updated>2009-07-30T16:51:32+02:00</updated><author><name>Michael Dominic K.</name><uri>http://www.mdk.org.pl</uri></author><link href='http://www.mdk.org.pl/2009/7/30/the-great-demise-of-the-file' rel='alternate' type='text/html'/></entry><entry><id>tag:www.mdk.org.pl,2009:midgard-objc-bindings</id><title type='text'>Midgard ObjectiveC bindings</title><content type='html'>&lt;p&gt;&lt;img src=&quot;http://www.mdk.org.pl/assets/midgard-logo.png&quot; alt=&quot;Midgard logo&quot; style=&quot;float:right; margin: 0; margin-left: 10px&quot;/&gt;&lt;/p&gt;

&lt;p&gt;I&apos;m glad to announce the first (experimental) release of a project I&apos;ve been working on recently &amp;mdash; &lt;a href=&quot;http://www.midgard-project.org/&quot;&gt;Midgard&lt;/a&gt; bindings for the &lt;a href=&quot;http://en.wikipedia.org/wiki/Objective-C&quot;&gt;ObjectiveC&lt;/a&gt; language. Those bindings are for the upcoming &lt;a href=&quot;http://www.midgard-project.org/midgard2/&quot;&gt;Midgard2&lt;/a&gt; &amp;mdash; the brand new fresh version of the library.&lt;/p&gt;

&lt;p&gt;Midgard2 is an Open Source Content Repository and it provides an objectified view to the data and services surrounding it. At the basic level it abstracts the database access (&lt;em&gt;SQLite&lt;/em&gt;, &lt;em&gt;MySql&lt;/em&gt;, &lt;em&gt;PostgreSQL&lt;/em&gt;) but this is only where it all starts. Serialization &amp;amp; replication, managing own storage objects, multi-process access to data are all covered. The fully object-oriented (GObject-oriented) API allows you to focus on the data, not the database syntax.&lt;/p&gt;

&lt;p&gt;For many desktop software developers, database technologies belong to where they belong &amp;mdash; the web alone. This is not necessarily true. As the software &amp;amp; services &lt;em&gt;en masse&lt;/em&gt; move to the web, &lt;a href=&quot;http://bergie.iki.fi/blog/midgard2_at_fscons-your_data-everywhere/&quot;&gt;the need to integrate the cloud&lt;/a&gt; with the desktop becomes indispensable.&lt;/p&gt;

&lt;p&gt;Midgard is quite ready for that &amp;mdash; it based &amp;amp; engineered fully on the top of the desktop (&lt;a href=&quot;http://www.gnome.org&quot;&gt;Gnome&lt;/a&gt;) software stack. Being highly modular and having &lt;em&gt;very little&lt;/em&gt; dependencies it scales from a &lt;a href=&quot;http://projects.gnome.org/tomboy/&quot;&gt;note taking application&lt;/a&gt; to a full-blown CMS system.&lt;/p&gt;

&lt;h2&gt;ObjectiveC bindings&lt;/h2&gt;

&lt;p&gt;The Midgard objc bindings come in a shape of a &lt;a href=&quot;http://www.mdk.org.pl/assets/midgard-v1.pkg&quot;&gt;standard Mac installer&lt;/a&gt;. The package (which requires a Leopard+ system) installs a Midgard &lt;em&gt;private framework&lt;/em&gt; which allows to &lt;a href=&quot;http://www.midgard-project.org/documentation/xcode_tutorial/&quot;&gt;develop Midgard applications using XCode&lt;/a&gt;. The applications built this way have Midgard &lt;em&gt;embedded&lt;/em&gt; dynamically into them &amp;mdash; they don&amp;rsquo;t require any extra libraries/components on the target machine.&lt;/p&gt;

&lt;h2&gt;Links&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://www.mdk.org.pl/assets/midgard-v1.pkg&quot;&gt;Midgard installer for the mac&lt;/a&gt; &amp;mdash; requires Leopard.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://trac.midgard-project.org/browser/trunk/midgard/apis/objc&quot;&gt;Source code of the bindings&lt;/a&gt; &amp;mdash; the bindings are auto-generated from API description.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.midgard-project.org/documentation/objectivec_midgard/&quot;&gt;Technical overview&lt;/a&gt; &amp;mdash; a couple of notes about the process.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.midgard-project.org/documentation/xcode_tutorial/&quot;&gt;XCode tutorial&lt;/a&gt; &amp;mdash; building your first application with Midgard on the Mac.&lt;/li&gt;
&lt;/ul&gt;

</content><published>2009-03-26T08:48:32+01:00</published><updated>2009-03-26T08:48:32+01:00</updated><author><name>Michael Dominic K.</name><uri>http://www.mdk.org.pl</uri></author><link href='http://www.mdk.org.pl/2009/3/26/midgard-objc-bindings' rel='alternate' type='text/html'/></entry><entry><id>tag:www.mdk.org.pl,2009:3g-in-orange</id><title type='text'>3G in Orange - now with less fat</title><content type='html'>&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; As many people have reported to me, the practices described below seem to be pretty common among mobile operators in Europe. To some extent the &lt;a href=&quot;http://moreati.org.uk/blog/2008/02/28/how-to-make-t-mobile-web-n-walk-a-real-web-connection/&quot;&gt;proxy can be bypassed&lt;/a&gt; &amp;mdash; at least on the desktop.&lt;/p&gt;

&lt;h2&gt;Alternate Internet&lt;/h2&gt;

&lt;p&gt;Over the past couple of years a lot of effort and resources were invested into selling various variants of the &lt;em&gt;&amp;lsquo;alternate Internet&amp;rsquo;&lt;/em&gt;. &lt;em&gt;&amp;lsquo;Alternate&amp;rsquo;&lt;/em&gt; meaning here &amp;mdash; &lt;em&gt;&amp;lsquo;Almost like the real thing, but&amp;hellip;&amp;rsquo;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;A prime example here is &lt;a href=&quot;http://en.wikipedia.org/wiki/Wireless_Application_Protocol&quot;&gt;WAP&lt;/a&gt;. WAP was supposed to be this &lt;em&gt;&amp;lsquo;Internet for mobile phones&amp;rsquo;&lt;/em&gt; thing where providers would create an &lt;em&gt;alternate&lt;/em&gt; WAP content of their websites. It ended up just being a synonym of Internet banking for geeks (at least in Poland).&lt;/p&gt;

&lt;p&gt;Another example of an alternate Internet is what most mobile phones &lt;a href=&quot;http://techdigest.tv/symbian-browser.jpg&quot;&gt;present&lt;/a&gt; when you type a url of a modern web page. You are supposed to believe that the crappy-formatted, layout-broken Frankenstein on the screen is the Internet.&lt;/p&gt;

&lt;p&gt;It&amp;rsquo;s not.&lt;/p&gt;

&lt;p&gt;In the context of the two examples above it&amp;rsquo;s not surprising the understand the &lt;a href=&quot;http://marketshare.hitslink.com/mobile-phones.aspx?qprid=55&quot;&gt;sudden interest&lt;/a&gt; in mobile browsing when devices (ie. the iPhone or the Nokia tablets) started providing &lt;em&gt;real&lt;/em&gt;, first-class Internet experience. People like the real thing, not the cheap imitation.&lt;/p&gt;

&lt;h2&gt;3G in Orange.pl&lt;/h2&gt;

&lt;p&gt;The worst kind of alternate Internet is the kind that&amp;rsquo;s advertised &amp;amp; sold as &lt;em&gt;&amp;ldquo;the real thing&amp;rdquo;&lt;/em&gt;  but it&amp;rsquo;s actually &lt;strong&gt;not&lt;/strong&gt;. I&apos;m talking here about what &lt;a href=&quot;http://www.orange.pl&quot;&gt;Orange&lt;/a&gt; does in Poland on it&amp;rsquo;s 3G network.&lt;/p&gt;

&lt;p&gt;And what it does is: all images (&lt;em&gt;jpg&lt;/em&gt;, &lt;em&gt;png&lt;/em&gt;, &lt;em&gt;gif&lt;/em&gt;) downloaded via the &lt;em&gt;http&lt;/em&gt; protocol are being dynamically recompressed to their lower-quality representations. In other words: all images are being accessed through a proxy which serves them in a significantly reduced quality.&lt;/p&gt;

&lt;p&gt;Here&amp;rsquo;s a more concrete example to illustrate how a &lt;a href=&quot;http://www.dilbert.com&quot;&gt;Dilbert strip&lt;/a&gt; looks like on the iPhone. The left image is what you see when accessing it through the Orange 3G network. The right image is the original picture &amp;mdash; as you can see it when accessed via wifi.&lt;/p&gt;

&lt;center&gt;&lt;img src=&quot;http://www.mdk.org.pl/assets/orange-wifi-comparison-1.png&quot; alt=&quot;Comparison 1&quot;&gt;&lt;/center&gt;


&lt;p&gt;It&amp;rsquo;s not hard to see the differences. The &lt;em&gt;gif&lt;/em&gt; image on the left has a reduced color palette and the gradients look pretty cheap.&lt;/p&gt;

&lt;p&gt;There is no way to avoid the recompression on Orange 3G in Poland. It seems to be happening on a binary basis (the proxy detects headers?). Sadly &amp;mdash; it also affects &lt;em&gt;all&lt;/em&gt; other applications accessing image data via &lt;em&gt;http&lt;/em&gt; &amp;mdash; not only the browser.&lt;/p&gt;

&lt;p&gt;Below is an example of the &lt;a href=&quot;http://iconfactory.com/software/twitterrific&quot;&gt;Twitteriffic&lt;/a&gt; application on the iPhone. Again &amp;mdash; left is 3G, right is wifi. Observing the avatars one can easily see that the pictures (&lt;em&gt;jpg&amp;rsquo;s&lt;/em&gt;) on 3G (left) are quite blurry (compressed) when compared to the originals (right).&lt;/p&gt;

&lt;center&gt;&lt;img src=&quot;http://www.mdk.org.pl/assets/orange-wifi-comparison-2.png&quot; alt=&quot;Comparison 2&quot;&gt;&lt;/center&gt;


&lt;p&gt;Unfortunately, this is not all. Additionally to recompressing the images, Orange is injecting a 12kb &lt;a href=&quot;http://www.mdk.org.pl/assets/orange-bmi.txt&quot;&gt;piece of javascript&lt;/a&gt; code into &lt;em&gt;all html documents&lt;/em&gt;. This code (which looks like originating from &lt;a href=&quot;http://www.sprint.com&quot;&gt;Sprint&lt;/a&gt;) is adding a right click option to images to &amp;ldquo;improve their quality&amp;rdquo; (meaning: load the original image). Obviously, this only works if you&amp;rsquo;re in a web browser and if the web browser is a supported one (sorry, no iPhone support).&lt;/p&gt;

&lt;h2&gt;Mind boggles&lt;/h2&gt;

&lt;p&gt;The whole idea is so broken that it&amp;rsquo;s even hard to start explaining all the problems with it. I could go on enumerating all the issues but I&amp;rsquo;ll just focus on two fundamental ones.&lt;/p&gt;

&lt;p&gt;Firstly &amp;mdash; the idea is not fair because customers are not being told the whole truth. They think they&amp;rsquo;re buying &lt;em&gt;Internet access&lt;/em&gt; while in fact they&amp;rsquo;re getting &lt;em&gt;lower-quality Internet access&lt;/em&gt;. It&amp;rsquo;s obvious why the recompression process has been put in place &amp;mdash; lowering the image quality/size gives a &lt;em&gt;fake&lt;/em&gt; impression of faster download speeds (this is by far one of the primary factors of the connection).&lt;/p&gt;

&lt;p&gt;Secondly, I see a significant security/privacy infringement in those actions. Owning the pipe &lt;strong&gt;does not&lt;/strong&gt; mean you can alter the content passing through it. In the corner cases there might be digital rights embedded in the pictures. But even in the standard case &amp;mdash; &lt;em&gt;silently&lt;/em&gt; injecting a piece of &lt;em&gt;runnable code that gets executed on the user&amp;rsquo;s machine&lt;/em&gt; is, as far as my logic goes, &lt;em&gt;highly illegal&lt;/em&gt;. Or at least &amp;mdash; &lt;strong&gt;very evil&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The ability to recompress the traffic implies the ability to &lt;em&gt;monitor&lt;/em&gt; it in the first place. What else is Orange in Poland doing with the traffic data?&lt;/p&gt;

&lt;p&gt;I&apos;m not sure if I want to know.&lt;/p&gt;
</content><published>2009-03-12T15:41:34+01:00</published><updated>2009-03-26T08:47:42+01:00</updated><author><name>Michael Dominic K.</name><uri>http://www.mdk.org.pl</uri></author><link href='http://www.mdk.org.pl/2009/3/12/3g-in-orange' rel='alternate' type='text/html'/></entry><entry><id>tag:www.mdk.org.pl,2009:new-wild</id><title type='text'>New Wild</title><content type='html'>&lt;p&gt;&lt;a href=&quot;http://www.new-wild.com&quot;&gt;&lt;img src=&quot;http://www.mdk.org.pl/assets/new-wild.png&quot; alt=&quot;New Wild logo&quot; style=&quot;float:right; margin: 0; margin-left: 10px; border: 0;&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I&apos;ve been spreading the news here and there for few days now but it&amp;rsquo;s time to make it official.&lt;/p&gt;

&lt;p&gt;After quitting &lt;a href=&quot;http://www.novell.com&quot;&gt;Novell&lt;/a&gt; I decided to take the plunge and try something I&apos;ve been long waiting for&amp;hellip; &amp;ndash; go self-employed and start own company. &lt;a href=&quot;http://www.new-wild.com&quot;&gt;New Wild&lt;/a&gt; is just that &amp;mdash; a young company offering services related to &lt;em&gt;mobile&lt;/em&gt; software, &lt;em&gt;web&lt;/em&gt; and &lt;em&gt;unix(ish)&lt;/em&gt; engineering. Additionally (and that&amp;rsquo;s new) it&amp;rsquo;s also about &lt;em&gt;cocoa&lt;/em&gt; &amp;mdash; both mobile (&lt;em&gt;iPhone&lt;/em&gt;) and desktop.&lt;/p&gt;

&lt;p&gt;One part of what I&apos;m planning to do at New Wild is pushing my own software projects &amp;mdash; first of which I hope to be announcing quite soon. Another part is &lt;em&gt;helping others to make their ideas happen&lt;/em&gt;. That&amp;rsquo;s more commonly known as contracting &amp;amp; consulting.&lt;/p&gt;

&lt;p&gt;The decision to start New Wild is not something that came out of a profound business analysis and huge preparations. Quite the contrary &amp;mdash; like every important decision it came out of an impulse. The very basic promise behind New Wild is that after spending the last several years working at big companies I &lt;em&gt;know&lt;/em&gt; how to provide some &lt;em&gt;real&lt;/em&gt; value to people who want to make their software ideas happen.&lt;/p&gt;

&lt;p&gt;I&apos;m open for business!&lt;/p&gt;
</content><published>2009-03-04T09:55:46+01:00</published><updated>2009-03-04T09:55:46+01:00</updated><author><name>Michael Dominic K.</name><uri>http://www.mdk.org.pl</uri></author><link href='http://www.mdk.org.pl/2009/3/4/new-wild' rel='alternate' type='text/html'/></entry><entry><id>tag:www.mdk.org.pl,2009:quicklook-for-markdown</id><title type='text'>Quicklook for markdown</title><content type='html'>&lt;p&gt;&lt;a href=&quot;http://www.flickr.com/photos/michaeldominic/3269127963&quot;&gt;
&lt;img src=&quot;http://www.mdk.org.pl/assets/quicklook-for-markdown.png&quot; alt=&quot;Quicklook plugin&quot; style=&quot;float:right; margin: 0; margin-left: 10px&quot;/&gt;
&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; My changes were merged into the &lt;a href=&quot;http://github.com/toland/qlmarkdown/&quot;&gt;original code&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;As services such as &lt;a href=&quot;http://www.getdropbox.com&quot;&gt;DropBox&lt;/a&gt; become more mature, it makes &lt;em&gt;again&lt;/em&gt; sense to store simple textual content (ie. notes) as files &amp;mdash; instead of going for &lt;a href=&quot;http://al3x.net/2009/01/31/against-everything-buckets.html&quot;&gt;Everything Buckets&lt;/a&gt;. For simple text files DropBox provides an &lt;em&gt;actually working&lt;/em&gt;  synchronization, offline access to the data and a pretty good integration with the native platform (be it GNOME or OSX).&lt;/p&gt;

&lt;p&gt;I usually store my notes and other simple text snippets as &lt;a href=&quot;http://daringfireball.net/projects/markdown/&quot;&gt;markdown-formatted&lt;/a&gt; plain-text files. The simple markdown format is exactly the amount of syntactic sugar I need to get along. Additionally, the markdown format is supported by all popular editors (gEdit, TextMate, vi&amp;hellip;) and many web-writing platforms.&lt;/p&gt;

&lt;p&gt;On OSX by default the markdown files (&lt;code&gt;.markdown&lt;/code&gt;) have two limitations when compared to standard (&lt;code&gt;.txt&lt;/code&gt;) files:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Can&amp;rsquo;t be Quicklook&apos;ed&lt;/li&gt;
&lt;li&gt;Contents are not indexed by Spotlight (can&amp;rsquo;t be searched)&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Installing an editor such as &lt;a href=&quot;http://macromates.com/&quot;&gt;TextMate&lt;/a&gt; gives support for the &lt;code&gt;.markdown&lt;/code&gt; extension but &lt;em&gt;does not&lt;/em&gt; solve either of the above problems.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://fiatdev.com&quot;&gt;Phil Toland&lt;/a&gt; did a great work and created a &lt;a href=&quot;http://fiatdev.com/2008/07/29/quicklook-preview-for-markdown&quot;&gt;markdown quicklook plugin&lt;/a&gt;. I took his code and improved a bit  on it. In particular, my version does 3 things more:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Uses &lt;a href=&quot;http://www.pell.portland.or.us/~orc/Code/markdown/&quot;&gt;discount&lt;/a&gt; C library to render markdown (instead of calling-in Perl)&lt;/li&gt;
&lt;li&gt;Styles the output a little bit (Helvetica vs. Times)&lt;/li&gt;
&lt;li&gt;Adds spotlight indexing&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;To get going you need to install the &lt;a href=&quot;http://www.mdk.org.pl/assets/QLMarkdown.tar.gz&quot;&gt;compiled binary plugin&lt;/a&gt; in &lt;code&gt;~/Library/Quicklook/&lt;/code&gt; (create if it doesn&amp;rsquo;t exist).&lt;/p&gt;

&lt;h2&gt;Links&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://github.com/toland/qlmarkdown/&quot;&gt;Phil&amp;rsquo;s original repo&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://github.com/mdk/qlmarkdown/&quot;&gt;My fork&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.mdk.org.pl/assets/QLMarkdown.tar.gz&quot;&gt;Compiled plugin&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</content><published>2009-02-10T18:20:00+01:00</published><updated>2009-02-12T07:44:01+01:00</updated><author><name>Michael Dominic K.</name><uri>http://www.mdk.org.pl</uri></author><link href='http://www.mdk.org.pl/2009/2/10/quicklook-for-markdown' rel='alternate' type='text/html'/></entry><entry><id>tag:www.mdk.org.pl,2009:tagging-strategies</id><title type='text'>Strategies for tagging content</title><content type='html'>&lt;p&gt;&lt;img src=&quot;http://www.mdk.org.pl/assets/mdk-blog-wordle.png&quot; alt=&quot;MDK wordle&quot; style=&quot;float:right; margin: 0; margin-left: 10px&quot;/&gt;&lt;/p&gt;

&lt;p&gt;Damn. I was trying to find this website I knew I bookmarked in &lt;a href=&quot;http://delicious.com/michaldominik/&quot;&gt;my delicious bookmarks&lt;/a&gt; months ago. I even remembered &lt;em&gt;why&lt;/em&gt; I got it bookmarked in the first place &amp;mdash; it had unique design &amp;amp; colors, something inspiring for future. So I tried searching for &lt;em&gt;design&lt;/em&gt;, &lt;em&gt;colors&lt;/em&gt;, &lt;em&gt;pretty&lt;/em&gt;, &lt;em&gt;cool&lt;/em&gt;&amp;hellip; lots of results, no luck with the site I was looking for. Made me think.&lt;/p&gt;

&lt;p&gt;Now, I&apos;m not actually browsing my delicious library that often. I&apos;m mostly dumping stuff there and forgetting about it. So I started thinking &amp;mdash; if I&apos;m using it that scarcely and I can&amp;rsquo;t find what I&apos;m looking for anyways, what&amp;rsquo;s the point of doing it in the first place?&lt;/p&gt;

&lt;p&gt;Or maybe I&apos;m just tagging the information wrongly? Let&amp;rsquo;s have a bird&amp;rsquo;s eye view at various strategies for tagging stuff.&lt;/p&gt;

&lt;h2&gt;Tagging for contents&lt;/h2&gt;

&lt;p&gt;Perhaps the most obvious way to tag is to describe the contents of the tagged object. In example, I&apos;m applying tags &lt;em&gt;julia&lt;/em&gt; to photos where my girlfriend is present. Similarly I&apos;m tagging photos that contain me with &lt;em&gt;mdk&lt;/em&gt; tag. The use case here is obvious: having this tags in place I can easily create a view (search) containing photos with both &lt;em&gt;julia&lt;/em&gt; and &lt;em&gt;mdk&lt;/em&gt; &amp;mdash; the set of photos where we&amp;rsquo;re together in one picture.&lt;/p&gt;

&lt;p&gt;It&amp;rsquo;s quite easy to overdo it. I&apos;ve got some photos with tags such as &lt;em&gt;winter&lt;/em&gt;, &lt;em&gt;summer&lt;/em&gt;&amp;hellip; what I was thinking? Photos in general have information about the time when they were taken &amp;mdash; adding those tags is just duplication. Another example of over-commitment is ultra-fine-grained tagging. Some people on &lt;a href=&quot;http://www.flickr.com&quot;&gt;Flickr&lt;/a&gt; do it all the time describing with tags everything present on the photo.&lt;/p&gt;

&lt;p&gt;If the picture is about a dog, the &lt;em&gt;dog&lt;/em&gt; tag most likely makes sense. And if the picture is about a city street and the dog is just happening to be in the frame&amp;hellip;&lt;/p&gt;

&lt;p&gt;Tagging for content is not a universal solution to every data description problem. Sometimes it doesn&amp;rsquo;t work too good. Consider an example of a &lt;em&gt;todo managing application&lt;/em&gt; where you can tag individual items that you need to get done. You might have an item there saying: &lt;em&gt;&amp;ldquo;pay the phone bill&amp;rdquo;&lt;/em&gt;. Tagging it with &lt;em&gt;bill&lt;/em&gt;, &lt;em&gt;phone&lt;/em&gt; or even &lt;em&gt;money&lt;/em&gt; is not that useful. It&amp;rsquo;s very unlikely you&amp;rsquo;ll use any of those keywords to look up this item in future.&lt;/p&gt;

&lt;h2&gt;Tagging for context&lt;/h2&gt;

&lt;p&gt;Instead, you should tag for context. If you&amp;rsquo;re using internet banking, your context in the above case is: &lt;em&gt;banking&lt;/em&gt;. Next time you will be doing the internet banking chores you can list all the items with the &lt;em&gt;banking&lt;/em&gt; tag and handle them in one go. That might include an item called &lt;em&gt;&amp;ldquo;change the mailing address for the credit card statement&amp;rdquo;&lt;/em&gt; which also belongs to &lt;em&gt;banking&lt;/em&gt; but is not directly about bills and money. Except for the context.&lt;/p&gt;

&lt;p&gt;There is a &lt;em&gt;creational&lt;/em&gt; difference between tagging for content and tagging for context. In the first case (tagging for content) we&amp;rsquo;re applying the tag to name (describe) something already existing in the tagged object. Ie. a person, following the photo example I&apos;ve given earlier. When tagging for context, we&amp;rsquo;re adding new information to the target.&lt;/p&gt;

&lt;p&gt;Another example: an &lt;em&gt;&amp;ldquo;order new window blinds&lt;/em&gt;&amp;rdquo; todo item. When tagged with &lt;em&gt;phone&lt;/em&gt; it gets a new meaning: the blinds need to be ordered via phone. Holding the phone in our hand is the context to get this thing done.&lt;/p&gt;

&lt;h2&gt;Tagging for feeling&lt;/h2&gt;

&lt;p&gt;Tagging data with information about the contents (tagging for content) creates fairly objective (universal) meanings. A &lt;em&gt;cat&lt;/em&gt; tag on a photo has a quite obvious (and familiar) meaning to everybody. Adding contextual information using tags (tagging for context) still remains fairly objective, however the tag describes the tagger in relation to the tagged object. Ie. a &lt;em&gt;phone&lt;/em&gt; tag on a todo item describes &lt;em&gt;my&lt;/em&gt; relation to the object. So, we could say: the tag becomes a carrier of a personalized information.&lt;/p&gt;

&lt;p&gt;Now, moving to the most subjective way of tagging &amp;mdash; tagging for feelings. In this case we &amp;ldquo;stamp&amp;rdquo; the content with our feeling towards that content. An obvious example: putting a &lt;em&gt;cool&lt;/em&gt; tag on a photo. Or on a file.&lt;/p&gt;

&lt;p&gt;In this variant it&amp;rsquo;s sometimes useful to invent new categories and custom words which have a personalized meaning. An example: I might use a tag &lt;em&gt;whichcraft&lt;/em&gt; to tag all the stuff related to my past girlfriends. This obviously has a meaning only to me (and maybe to others when explained).&lt;/p&gt;

&lt;p&gt;Data tagged with feelings becomes more concrete and full &amp;mdash; but only for the original tag author. Therefore, it makes most sense in cases where personal use and personal organization are involved.&lt;/p&gt;

&lt;h2&gt;The original problem&lt;/h2&gt;

&lt;p&gt;Coming back to the original problem of tagging a bookmark (an interesting site) for future reference &amp;mdash; this use case requires me to use a mix &amp;amp; match of all of the above three tagging methods.&lt;/p&gt;

&lt;p&gt;Firstly, I want to apply content tags: I want to use &lt;em&gt;ruby&lt;/em&gt; and &lt;em&gt;webdev&lt;/em&gt; if the website is about ruby and web development. Secondly, I want to apply some contextual information: ie. &lt;em&gt;toread&lt;/em&gt; tag if I want to read the website later. Thirdly and lastly: I want to tag it with &lt;em&gt;awesome&lt;/em&gt; if the website has great design and colors.&lt;/p&gt;

&lt;p&gt;Since the &lt;em&gt;context&lt;/em&gt; and &lt;em&gt;feeling&lt;/em&gt; tags are &amp;ldquo;private&amp;rdquo; tags (they have meaning in relation to &lt;em&gt;me&lt;/em&gt;) it makes sense to prefix them with a special character.&lt;/p&gt;

&lt;p&gt;In the end, I might end up with a list of tags like this:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;em&gt;ruby&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;webdev&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;@toread&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;@awesome&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;@rainbow&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;This way I can search for &lt;em&gt;@awesome&lt;/em&gt; meaning specifically things I marked as awesome, not random content which just happens to have the word. And that &amp;mdash; in most cases &amp;mdash; does the trick.&lt;/p&gt;
</content><published>2009-01-15T19:50:25+01:00</published><updated>2009-01-15T19:50:25+01:00</updated><author><name>Michael Dominic K.</name><uri>http://www.mdk.org.pl</uri></author><link href='http://www.mdk.org.pl/2009/1/15/tagging-strategies' rel='alternate' type='text/html'/></entry><entry><id>tag:www.mdk.org.pl,2008:hell-in-wroclaw</id><title type='text'>Hell in Wrocław</title><content type='html'>&lt;p&gt;I&amp;rsquo;ll be attending and giving a presentation at &lt;a href=&quot;http://www.libregraphicsmeeting.org&quot;&gt;Libre Graphics Meeting&lt;/a&gt; this year in Wrocław.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Title:&lt;/strong&gt; &lt;em&gt;&amp;ldquo;Programmer&amp;rsquo;s hell: working with a UI designer&amp;rdquo;&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Time:&lt;/strong&gt; Friday, 14:25.&lt;/p&gt;

&lt;p&gt;Lot&amp;rsquo;s of fun guaranteed, come to feel some hot flames.&lt;/p&gt;
</content><published>2008-05-07T23:35:15+02:00</published><updated>2008-05-07T23:36:21+02:00</updated><author><name>Michael Dominic K.</name><uri>http://www.mdk.org.pl</uri></author><link href='http://www.mdk.org.pl/2008/5/7/hell-in-wroclaw' rel='alternate' type='text/html'/></entry><entry><id>tag:www.mdk.org.pl,2008:nordea-sucks</id><title type='text'>Nordea sucks</title><content type='html'>&lt;p&gt;I rarely feel like blogging about personal stuff but today my patience finally went off. Since I switched from &lt;a href=&quot;http://www.nordea.fi&quot;&gt;Finnish Nordea&lt;/a&gt; (which provides excellent service BTW) to a &lt;a href=&quot;http://www.nordea.pl&quot;&gt;Polish one&lt;/a&gt; I&apos;m having only problems. Not the only one being that for &lt;em&gt;two months now&lt;/em&gt; they&amp;rsquo;re unable to send me a banking card for my account.&lt;/p&gt;

&lt;p&gt;Today, however, something much more scary happened. When trying to send them email (using their own banking account messaging system) I got this nice failure:&lt;/p&gt;

&lt;pre&gt;Warning: pg_exec() [function.pg-exec]: Query failed: ERROR: syntax error at or near 
&quot;u&quot; at character 2101 in /www/pglib/libs/c_db_postgres.php on line 106
error: query(): ERROR: syntax error at or near &quot;u&quot; at character 2101 
INSERT INTO cms.tabmail ( sto, ssubject, scontent, sheaders ) VALUES 
( &apos;solopl@nordea.com&apos;, &apos;produkty i usługi bankowe&apos;, 
&apos;Temat: produkty i usługi bankowe...
&lt;/pre&gt;


&lt;p&gt;As &lt;a href=&quot;http://linuxart.com/&quot;&gt;garrett&lt;/a&gt; pointed out &amp;mdash; of all the places you want to see this kind of error, your bank is not one. For those unfamiliar with the problem &amp;mdash; it&amp;rsquo;s esentially an &lt;a href=&quot;http://en.wikipedia.org/wiki/SQL_injection&quot;&gt;Sql injection&lt;/a&gt; bug which, in short, means that your system security is &lt;em&gt;a piece of shit&lt;/em&gt;.&lt;/p&gt;
</content><published>2008-04-18T17:13:43+02:00</published><updated>2008-04-18T17:16:33+02:00</updated><author><name>Michael Dominic K.</name><uri>http://www.mdk.org.pl</uri></author><link href='http://www.mdk.org.pl/2008/4/18/nordea-sucks' rel='alternate' type='text/html'/></entry><entry><id>tag:www.mdk.org.pl,2008:moonlight-flicks</id><title type='text'>Moonlight flicks</title><content type='html'>&lt;p&gt;&lt;a href=&quot;http://www.tirania.org&quot;&gt;Miguel&lt;/a&gt; has a good &lt;a href=&quot;http://tirania.org/blog/archive/2008/Mar-03.html&quot;&gt;status update on Moonlight&lt;/a&gt;. Complementing that I recorded a few simple demos presenting current state of our &lt;a href=&quot;http://anonsvn.mono-project.com/source/trunk/moon/&quot;&gt;Moonlight trunk&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;While talking to friends at &lt;a href=&quot;http://www.fosdem.org&quot;&gt;FOSDEM&lt;/a&gt; I noticed that while everybody pretty much heard about Moonlight/Silverlight, not so many people have actually seen it in action. This is understandable &amp;mdash; at the moment &lt;a href=&quot;http://www.mono-project.com/Moonlight#Getting_Started&quot;&gt;building Moon&lt;/a&gt; from source is not trivial. Hopefully those little videos will help a little.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://www.mdk.org.pl/assets/moonlight_showcase_thumb.png&quot; style=&quot;float:left; padding: 5px&quot;/&gt;&lt;a href=&quot;http://silverlight.net/showcase/default.aspx&quot;&gt;Microsoft showcase&lt;/a&gt; &amp;mdash; a website collecting links to various Silverlight-enabled pages and web apps. Users can browse sites and rate them. Built with &lt;a href=&quot;http://en.wikipedia.org/wiki/Xaml&quot;&gt;Xaml&lt;/a&gt; and Javascript. &lt;a href=&quot;http://www.viddler.com/explore/michaldominik/videos/40/&quot;&gt;Watch demo&lt;/a&gt; / &lt;a href=&quot;http://files.mdk.am/demos/moonlight-showcase-hq.avi&quot;&gt;Download high-res avi&lt;/a&gt;.&lt;/p&gt;

&lt;br style=&quot;clear: left&quot; /&gt;


&lt;p&gt;&lt;img src=&quot;http://www.mdk.org.pl/assets/moonlight_podium_thumb.png&quot; style=&quot;float:left; padding: 5px&quot;/&gt;&lt;a href=&quot;http://election.msn.com/podium08.aspx&quot;&gt;Podium&lt;/a&gt; &amp;mdash; A dynamic mashup of various news related to US election candidates. Shows some more advanced text-flowing and formatting capabilities. Again &amp;mdash; Xaml and Javascript. &lt;a href=&quot;http://www.viddler.com/explore/michaldominik/videos/41/&quot;&gt;Watch demo&lt;/a&gt; / &lt;a href=&quot;http://files.mdk.am/demos/moonlight-podium-hq.avi&quot;&gt;Download high-res avi&lt;/a&gt;.&lt;/p&gt;

&lt;br style=&quot;clear: left&quot; /&gt;


&lt;p&gt;&lt;img src=&quot;http://www.mdk.org.pl/assets/moonlight_surfaces_thumb.png&quot; style=&quot;float:left; padding: 5px&quot;/&gt;&lt;a href=&quot;http://delay.members.winisp.net/SilverlightSurface/&quot;&gt;Surfaces&lt;/a&gt; &amp;mdash; A very simple surface manipulation/D&amp;amp;D example. &lt;a href=&quot;http://clutter-project.org/&quot;&gt;Clutter&lt;/a&gt; has a similiar demo. &lt;a href=&quot;http://www.viddler.com/explore/michaldominik/videos/42/&quot;&gt;Watch demo&lt;/a&gt; / &lt;a href=&quot;http://files.mdk.am/demos/moonlight-surfaces-hq.avi&quot;&gt;Download high-res avi&lt;/a&gt;.&lt;/p&gt;

&lt;br style=&quot;clear: left&quot; /&gt;


&lt;p&gt;This is only a small selection of Silverlight-enabled sites which was easier to record (ie. not using media playback). A bigger list we use for testing is available at &lt;a href=&quot;http://www.mono-project.com/Moonlight_1.0_TestSites&quot;&gt;Moonlight 1.0 test sites&lt;/a&gt;.&lt;/p&gt;
</content><published>2008-03-04T20:46:00+01:00</published><updated>2008-04-09T16:43:49+02:00</updated><author><name>Michael Dominic K.</name><uri>http://www.mdk.org.pl</uri></author><link href='http://www.mdk.org.pl/2008/3/4/moonlight-flicks' rel='alternate' type='text/html'/></entry><entry><id>tag:www.mdk.org.pl,2008:changes-of-n</id><title type='text'>Changes of &quot;N&quot;</title><content type='html'>&lt;p&gt;Just a small status update: I recently quit &lt;a href=&quot;http://www.nokia.com&quot;&gt;Nokia&lt;/a&gt; and joined the &lt;a href=&quot;http://grendello.blogspot.com/&quot;&gt;new&lt;/a&gt; &lt;a href=&quot;http://www.gnome.org/~fherrera/&quot;&gt;old&lt;/a&gt; &lt;a href=&quot;http://tirania.org/blog/&quot;&gt;faces&lt;/a&gt; at &lt;a href=&quot;http://www.novell.com&quot;&gt;Novell&lt;/a&gt; for a brighter future. Cheers guys! Helsinki folks &amp;mdash; don&amp;rsquo;t despair, you still have &lt;a href=&quot;http://www.meritahti.net/&quot;&gt;Meritahti&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Also, like last year, I&amp;rsquo;ll be coming to Brussels for &lt;a href=&quot;http://www.fosdem.org/2008/&quot;&gt;FOSDEM&lt;/a&gt; this year. Let&amp;rsquo;s meet!&lt;/p&gt;
</content><published>2008-01-31T23:27:47+01:00</published><updated>2008-01-31T23:27:52+01:00</updated><author><name>Michael Dominic K.</name><uri>http://www.mdk.org.pl</uri></author><link href='http://www.mdk.org.pl/2008/1/31/changes-of-n' rel='alternate' type='text/html'/></entry><entry><id>tag:www.mdk.org.pl,2007:on-gnome-mobile</id><title type='text'>On GNOME mobile</title><content type='html'>&lt;p&gt;&lt;a href=&quot;http://www.murrayc.com/blog/permalink/2007/11/26/gnome-board-2007-candidates-the-bad/&quot;&gt;Murray writes&lt;/a&gt; about &lt;a href=&quot;http://www.gnome.org/mobile/&quot;&gt;GNOME mobile&lt;/a&gt;:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The is currently most obvious in the GMAE (or GNOME Mobile) group, which Jeff insists on controlling, which the board allowed despite knowing what would happen. After almost two years it has produced nothing more than a press release announcing its existence, and that happened six months later than the members wanted.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I don&amp;rsquo;t think &lt;a href=&quot;http://perkypants.org/&quot;&gt;Jeff&lt;/a&gt; is to be blamed here first. I don&amp;rsquo;t know about other players involved but I personally feel that we at &lt;a href=&quot;http://www.nokia.com&quot;&gt;nokia&lt;/a&gt; simply didn&amp;rsquo;t put enough effort into GNOME mobile.&lt;/p&gt;

&lt;p&gt;This is to be read carefully. We did put &lt;strong&gt;a lot&lt;/strong&gt; of serious work (directly and indirectly) into &lt;a href=&quot;http://www.gnome.org&quot;&gt;GNOME&lt;/a&gt; and various GNOME mobile components. A lot of those efforts are invisible. Where we so far failed is to make this work standardized, reusable and transparent &amp;mdash; what (if I understand correctly) was the original goal of the GNOME mobile.&lt;/p&gt;

&lt;p&gt;Hopefully this can be changed. But I don&amp;rsquo;t think it&amp;rsquo;s fair to blame Jeff for this particular issue.&lt;/p&gt;
</content><published>2007-11-27T00:37:10+01:00</published><updated>2007-11-27T00:37:18+01:00</updated><author><name>Michael Dominic K.</name><uri>http://www.mdk.org.pl</uri></author><link href='http://www.mdk.org.pl/2007/11/26/on-gnome-mobile' rel='alternate' type='text/html'/></entry><entry><id>tag:www.mdk.org.pl,2007:gl-colorspace-conversions</id><title type='text'>GL colorspace conversions</title><content type='html'>&lt;p&gt;A fellow sushi-lover &lt;a href=&quot;http://macslow.thepimp.net/&quot;&gt;MacSlow&lt;/a&gt; was blogging some time ago about &lt;a href=&quot;http://macslow.thepimp.net/?p=123&quot;&gt;various cool things that can be done with OpenGL and video&lt;/a&gt;. Mirco writes:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&amp;ldquo;The remaining things to implement are: using fragment-shaders for the colorspace-conversion too, hooking up some implicit-animation love for switching between different videos.&amp;rdquo;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I&apos;d like to pick a little bit on the first part of his todo (using hardware-accelerated colorspace conversions).&lt;/p&gt;

&lt;p style=&quot;text-align: center&quot;&gt;&lt;img src=&quot;http://www.mdk.org.pl/assets/yuv-screenshot.png&quot; /&gt;&lt;/p&gt;


&lt;h2&gt;RGB vs. YUV&lt;/h2&gt;

&lt;p&gt;Computer graphics is an RGB-world. Every point/pixel on the screen is represented by an intensity of red, green and blue. Any visible color can be coded with a combination of those three values. RGB is the way to specify colors in various drawing API&amp;rsquo;s, HTML color coding, etc. However &amp;mdash; RGB gamut is not modeling well the way human eye works. Our perception has certain characteristics that are not well expressed in the RGB universe. For example &amp;mdash; a human eye is very sensitive to changes in lightness (intensity) but is not very keen on noticing differences between dark shades of blue. This is where &lt;a href=&quot;http://en.wikipedia.org/wiki/YUV&quot;&gt;YUV&lt;/a&gt; colorspace kicks in. YUV (just like RGB) can be used to represent any color but the representation is more interesting from the video compression point of view &amp;mdash; which is mostly about benefiting from the imperfections in our sight.&lt;/p&gt;

&lt;p&gt;In YUV colors are represented by luminance (Y) and two chrominance components (U and V). For example, in RGB the white color is represented with [1.0; 1.0; 1.0] triple while in YUV it would be a [1.0; 0.0; 0.0] set. In a way YUV predates RGB and computers as it&amp;rsquo;s the format used in the analog TV (the cable essentially contains YUV signals at different bands).&lt;/p&gt;

&lt;h2&gt;Conversion&lt;/h2&gt;

&lt;p&gt;The reason why YUV is important is that it&amp;rsquo;s used as the native format in video compression. The raw (fast) output we get from a modern video decoder is a (some kind of) YUV buffer. YUV can be fairly easily converted to RGB (and vice versa) but it comes at a price. Since it&amp;rsquo;s a per-pixel operation the processing time gets steep fast. With high-resolution DVD-quality video we&amp;rsquo;re talking about ~10 million points per second. With numbers like that &lt;strong&gt;any&lt;/strong&gt; operation becomes a bottleneck. Since in the end we somehow need to get the RGB representation, the only thing we can do is delegate the conversion from the CPU to the graphical hardware.&lt;/p&gt;

&lt;h2&gt;Overlays to the rescue&lt;/h2&gt;

&lt;p&gt;The traditional way of dealing with this problem was to use overlay capabilities of the graphics board. Overlays are around since long time (way longer than 3d acceleration) and are fairly well established. Overlays, being a hardware capability, allow us to &amp;ldquo;take over&amp;rdquo; a certain (more or less rectangular) area of the screen and dump there some pixel data &amp;mdash; bypassing the traditional drawing pipeline. The data pushed can be in YUV format. Modern graphics hardware supports all popular YUV formats and the conversion is handled by the hardware.&lt;/p&gt;

&lt;p&gt;The limitation of this approach is that the video (overlay) is not really a first-class citizen in the UI pipeline. It&amp;rsquo;s something that is (simplification here) &amp;ldquo;burnt over&amp;rdquo; other elements of the UI. We can&amp;rsquo;t transform it, we can&amp;rsquo;t use it in the 3d/2d effects pipeline and it&amp;rsquo;s problematic (slow) to draw over it (think transparent playback controls drawn over playing video). Overlays are more than enough for implementing standard desktop players but are useless when we want to do more fancy stuff.&lt;/p&gt;

&lt;p&gt;For the fancy effects we want to use video as a native texture/source image while &lt;strong&gt;still&lt;/strong&gt; delegating the colorspace conversion to the hardware. OpenGL API/pipeline does not support YUV formats but we can easily fix that with custom GPU code.&lt;/p&gt;

&lt;h2&gt;YUV formats&lt;/h2&gt;

&lt;p&gt;One problem with YUV is that it comes in different flavors (formats) and there are quite many of them. &lt;a href=&quot;http://www.fourcc.org&quot;&gt;FourCC&lt;/a&gt; website &lt;a href=&quot;http://www.fourcc.org/yuv.php&quot;&gt;has a good overview&lt;/a&gt;. The good thing is that there are just a couple of popular formats used in practice and the huge rest is mostly exotic or legacy.&lt;/p&gt;

&lt;p&gt;Let&amp;rsquo;s take a quick look at the popular IYUV/I420 format we get from a &lt;a href=&quot;http://www.divx.com/&quot;&gt;DivX&lt;/a&gt; decoder. It&amp;rsquo;s a planar format which means that (unlike most RGB formats) the components are &lt;strong&gt;not&lt;/strong&gt; interleaved. We can graphically represent an I420 buffer:&lt;/p&gt;

&lt;p style=&quot;text-align: center&quot;&gt;&lt;img src=&quot;http://www.mdk.org.pl/assets/yuv-buffer.png&quot; /&gt;&lt;/p&gt;


&lt;p&gt;The buffer contains the full Y plane followed by two U and V planes. And here comes the rub &amp;mdash; the U and V planes are sub-sampled at half the resolution. So, assuming we&amp;rsquo;re dealing with a 400x240 video we first get the luminance (Y) plane at full resolution (400x240) followed by U/V planes at half the resolution (200x120). Again, this is because the information about the lightness of the picture (Y) is more important than the information about the chrominance (&amp;ldquo;colors&amp;rdquo;) of the video. In other YUV formats it&amp;rsquo;s common to assign less bits for the U and V.&lt;/p&gt;

&lt;h2&gt;GL implementation&lt;/h2&gt;

&lt;p&gt;In the GL implementation we particularly want to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Avoid any data processing on the software side&lt;/li&gt;
&lt;li&gt;Avoid extra mem copies/unpacking of the data&lt;/li&gt;
&lt;li&gt;Benefit from the hw-accelerated scaling/filtering (linear, cubic, etc.)&lt;/li&gt;
&lt;li&gt;Get a high-quality image&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;To achieve this we need to use three GL elements which are not part of the GL 1.x standard but are commonly available as extensions &amp;mdash; &lt;strong&gt;multitexturing&lt;/strong&gt;, &lt;strong&gt;fragment programs&lt;/strong&gt; and &lt;strong&gt;rectangular texture&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Multitexturing&quot;&gt;Multi-texturing&lt;/a&gt; allows us to use three different textures (Y, U and V plane respectively) as the source for the output image. A custom &lt;a href=&quot;http://en.wikipedia.org/wiki/Fragment_shader&quot;&gt;fragment shader&lt;/a&gt; executes the proper blending function to create the RGB data out of the YUV source. &lt;a href=&quot;http://www.opengl.org/registry/specs/ARB/texture_rectangle.txt&quot;&gt;Rectangular texture&lt;/a&gt; is necessary to be able to use non-power-of-two resolution source as the texture.&lt;/p&gt;

&lt;p style=&quot;text-align: center&quot;&gt;&lt;img src=&quot;http://www.mdk.org.pl/assets/yuv-pipeline.png&quot; /&gt;&lt;/p&gt;


&lt;p&gt;For the textures/planes we use a &lt;code&gt;GL_LUMINANCE&lt;/code&gt; 1-byte texture format. We also need to use a separate set of texture coordinates for each plane due to the resolution differences. The texture-filtering step (ie. during scaling) happens before the shading step so in the shader we automatically get properly filtered data (each texture separately).&lt;/p&gt;

&lt;p&gt;For other YUV formats (ie. the interleaved ones) we need to do a bit more work. As the UV components are usually scattered across many triples automatic GL scaling/filtering will destroy our data before it reaches the shader. To counter that we need to first draw (with hw-accelerated conversion) to an off-screen &lt;a href=&quot;http://oss.sgi.com/projects/ogl-sample/registry/EXT/framebuffer_object.txt&quot;&gt;FBO&lt;/a&gt;/texture and reuse that data as a native RGB texture for further rendering in the UI/scene. Alternatively one can use &lt;a href=&quot;http://oss.sgi.com/projects/ogl-sample/registry/SGIX/pbuffer.txt&quot;&gt;pbuffers&lt;/a&gt; (less optimal performance-wise).&lt;/p&gt;

&lt;h2&gt;Source code&lt;/h2&gt;

&lt;p&gt;&lt;a href=&quot;http://www.mdk.org.pl/assets/yuv-gl-video.tar.gz&quot;&gt;Here is an example program&lt;/a&gt; + source which renders a sample video (&lt;a href=&quot;http://www.nseries.com/n810&quot;&gt;Nokia n810&lt;/a&gt; ad) using GStreamer + hardware-accelerated colorspace conversion and some effects. The example uses a rather primitive way of syncing video using timers. The proper way would be to write a decent &lt;a href=&quot;http://www.gstreamer.org&quot;&gt;GStreamer&lt;/a&gt; video sink or extend the existing GL-sink to use fragment programs. This approach would prolly be the right way to handle video in ie. &lt;a href=&quot;http://clutter-project.org/&quot;&gt;clutter&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;A rendering of the program output just for reference (might not show up in RSS, full resolution video can be &lt;a href=&quot;http://files.mdk.am/demos/opengl-video.avi&quot;&gt;downloaded here&lt;/a&gt;):&lt;/p&gt;

&lt;p style=&quot;text-align: center&quot;&gt;&lt;object classid=&quot;clsid:D27CDB6E-AE6D-11cf-96B8-444553540000&quot; width=&quot;437&quot; height=&quot;370&quot; id=&quot;viddler_michaldominik_36&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://www.viddler.com/player/755b2fff/&quot; /&gt;&lt;param name=&quot;allowScriptAccess&quot; value=&quot;always&quot; /&gt;&lt;param name=&quot;allowFullScreen&quot; value=&quot;true&quot; /&gt;&lt;embed src=&quot;http://www.viddler.com/player/755b2fff/&quot; width=&quot;437&quot; height=&quot;370&quot; type=&quot;application/x-shockwave-flash&quot; allowScriptAccess=&quot;always&quot; allowFullScreen=&quot;true&quot; name=&quot;viddler_michaldominik_36&quot; &gt;&lt;/embed&gt;&lt;/object&gt;&lt;/p&gt;

</content><published>2007-11-17T14:38:05+01:00</published><updated>2007-11-17T14:38:11+01:00</updated><author><name>Michael Dominic K.</name><uri>http://www.mdk.org.pl</uri></author><link href='http://www.mdk.org.pl/2007/11/17/gl-colorspace-conversions' rel='alternate' type='text/html'/></entry><entry><id>tag:www.mdk.org.pl,2007:curvy-blues</id><title type='text'>Curvy blues</title><content type='html'>&lt;p&gt;I was looking in the &lt;a href=&quot;http://www.mdk.org.pl/2007/8/16/vector-drawing-opengl-polygon-tessellation&quot;&gt;past&lt;/a&gt; (and &lt;a href=&quot;http://www.mdk.org.pl/2007/8/6/vector-drawing-opengl-shaders-and-cairo&quot;&gt;some more&lt;/a&gt;) at various solutions for efficient hardware-aided curve rasterization methods. Those ideas mostly focused on using the graphical hardware for accelerating the geometry generation process. But what happens, when we completely skip the geometry generation step? Even more blazing performance and totally resolution-independent rendering. Thanks to some tips by &lt;a href=&quot;http://jonsmirl.googlepages.com/graphics.html&quot;&gt;Jon&lt;/a&gt; and interesting math discussions I had in the past weeks, I&apos;m glad to present my current thinking.&lt;/p&gt;

&lt;h2&gt;Quadratic curves&lt;/h2&gt;

&lt;p&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Quadratic_function&quot;&gt;Quadratic curves&lt;/a&gt; (second-degree polynomials) consist of a starting point, an end point and one control point. Such curves cannot self-intersect nor inflect. The representation of a quadratic curve is a parabola, a straight line or (a degenerate case) &amp;mdash; a point. Quadratic curves are not the most popular ones in modern graphical packages. Cubic types (more about them later) are the basic unit of notation. In example, &lt;a href=&quot;http://www.cairographics.org&quot;&gt;cairo&lt;/a&gt; doesn&amp;rsquo;t provide direct quadratic API. It&amp;rsquo;s understandable as any quadratic can be trivially represented in a cubic form. However, since (due to their limited properties) quadratics are usually much faster to process it makes sense to look at them separately. Quadratics are part of the &lt;a href=&quot;http://www.w3.org/TR/SVG/paths.html#PathDataQuadraticBezierCommands&quot;&gt;SVG standard&lt;/a&gt; and have some interesting uses &amp;mdash; including &lt;a href=&quot;http://en.wikipedia.org/wiki/True_type&quot;&gt;TrueType&lt;/a&gt; fonts (which are represented only with 2nd degree curves) and Flash (which uses quadratics as the native curve representation and represents cubics by subdividing them into quadratics). Few examples of quadratic curves:&lt;/p&gt;

&lt;p style=&quot;text-align: center&quot;&gt;&lt;img src=&quot;http://www.mdk.org.pl/assets/quadratic-examples.png&quot; alt=&quot;Quadratic curve examples&quot;/&gt;&lt;/p&gt;


&lt;p&gt;Now, let&amp;rsquo;s look at how we can hook up the programmable GPU hardware to rasterize quadratics. The first observation is that the three points describing the curve form a triangle and this triangle covers the whole area of the curve. Triangle is the most basicrasterization primitive in modern graphics hardware. Let&amp;rsquo;s assign two texture coordinates (&lt;em&gt;v&lt;/em&gt; and &lt;em&gt;w&lt;/em&gt;) for each of the three points. We&amp;rsquo;re going to use &lt;strong&gt;[0.0; 0.5]&lt;/strong&gt; , &lt;strong&gt;[0.0; 1.0]&lt;/strong&gt; and &lt;strong&gt;[1.0; 1.0]&lt;/strong&gt; for, respectively &amp;mdash; the start point, the control point and the end point.&lt;/p&gt;

&lt;p style=&quot;text-align: center&quot;&gt;&lt;img src=&quot;http://www.mdk.org.pl/assets/quadratic-triangle.png&quot; alt=&quot;Quadratic triangle&quot;/&gt;&lt;/p&gt;


&lt;p&gt;As the triangle is being rendered the hardware will interpolate &lt;em&gt;v&lt;/em&gt; and &lt;em&gt;w&lt;/em&gt; across the three vertices. For each pixel belonging to the triangle we get a unique, interpolated &lt;em&gt;v&lt;/em&gt; and &lt;em&gt;w&lt;/em&gt; texture coords pair. And here comes the crucial part &amp;mdash; as the actual &amp;ldquo;texture&amp;rdquo; for this triangle we use a dynamic fragment program that evaluates the following expression:&lt;/p&gt;

&lt;p style=&quot;text-align: center&quot;&gt;&lt;img src=&quot;http://www.mdk.org.pl/assets/quadratic-expression_1.png&quot; alt=&quot;Quadratic shader expression&quot;/&gt;&lt;/p&gt;


&lt;p&gt;If the expression evaluates to &lt;em&gt;true&lt;/em&gt;, we pass the pixel. If not, we discard it. What we get is:&lt;/p&gt;

&lt;p style=&quot;text-align: center&quot;&gt;&lt;img src=&quot;http://www.mdk.org.pl/assets/quadratic-shader.png&quot; alt=&quot;Quadratic shader rendering&quot;/&gt;&lt;/p&gt;


&lt;p&gt;&lt;a href=&quot;http://www.mdk.org.pl/assets/quadratic-shader.pso&quot;&gt;Here is a shader implementation&lt;/a&gt; that does this operation. As we see, the rastered picture represents the curve we&amp;rsquo;re trying to visualize. To be precise, we get the fill for the curve. If we replaced the &lt;em&gt;&amp;lt;&lt;/em&gt; sign with &lt;em&gt;=&lt;/em&gt; sign we would get the actual stroke (the green line). As we zoom towards the curve, the shader generates more pixels giving a more accurate representation. A true resolution-independent rendering.&lt;/p&gt;

&lt;p&gt;I&apos;m going to come back to why this is so fundamentally amazing later on, but now let&amp;rsquo;s move on to the cubics.&lt;/p&gt;

&lt;h2&gt;Cubic curves&lt;/h2&gt;

&lt;p&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Cubic_curve&quot;&gt;Cubics&lt;/a&gt; (third-degree polynomials, the bezier-curves) are a bit more complex. They consist of two arbitrary control points plus start/end points. As a result a cubic can self-intersect, loop, inflect or cusp. Beziers are &lt;strong&gt;the thing&lt;/strong&gt; in vector drawing and most of the data we get to render these days (icons, buttons, UI elements&amp;hellip;) are sets of shapes defined by cubic curves.&lt;/p&gt;

&lt;p style=&quot;text-align: center&quot;&gt;&lt;img src=&quot;http://www.mdk.org.pl/assets/cubic-examples.png&quot; alt=&quot;Cubic curve examples&quot;/&gt;&lt;/p&gt;


&lt;p&gt;For blazing-fast rendering of cubics we&amp;rsquo;re going to use a similar approach that we used for quadratics. Since cubics consist of four points we need more than a single triangle. Actually, depending on the control points set we&amp;rsquo;re dealing with, we need 2 or 3 triangles. In other words &amp;mdash; we need to triangulate the points. In this case (very fixed) triangulation is trivial and essentially we can discover the case we have by doing a few &lt;a href=&quot;http://en.wikipedia.org/wiki/Dot_product&quot;&gt;dot products&lt;/a&gt; between the vectors of the control points.&lt;/p&gt;

&lt;p style=&quot;text-align: center&quot;&gt;&lt;img src=&quot;http://www.mdk.org.pl/assets/cubic-triangle.png&quot; alt=&quot;Cubic curve triangulation&quot;/&gt;&lt;/p&gt;


&lt;p&gt;Since we&amp;rsquo;re dealing with a cubic equation, we need &lt;strong&gt;three&lt;/strong&gt; texture coordinates per point (that&amp;rsquo;s perfectly fine with the &lt;a href=&quot;http://www.opengl.org/sdk/docs/man/xhtml/glTexCoord.xml&quot;&gt;OpenGL API&lt;/a&gt;). Let&amp;rsquo;s call those three coords: &lt;em&gt;v&lt;/em&gt;, &lt;em&gt;w&lt;/em&gt; and &lt;em&gt;t&lt;/em&gt;. In our fragment shader (&lt;a href=&quot;http://www.mdk.org.pl/assets/cubic-shader.pso&quot;&gt;implementation here&lt;/a&gt;) we&amp;rsquo;re going to evaluate the following expression:&lt;/p&gt;

&lt;p style=&quot;text-align: center&quot;&gt;&lt;img src=&quot;http://www.mdk.org.pl/assets/cubic-expression_1.png&quot; alt=&quot;Cubic shader expression&quot;/&gt;&lt;/p&gt;


&lt;p&gt;And the last hard part &amp;mdash; unlike quadratics, for cubics there are no static texture coords to use. We need to calculate them separately for each curve. The method to do that is a subject for a separate article, but it&amp;rsquo;s enough to say that it&amp;rsquo;s a fast fixed-time operation that involves few matrix multiplications. Essentially we need to put the control point coordinates in a matrix, move it to power basis and analyze the determinants. Depending on the number of square roots, we have one of the few distinct cubic-cases which further dictate which &lt;em&gt;v&lt;/em&gt;, &lt;em&gt;w&lt;/em&gt;, &lt;em&gt;t&lt;/em&gt; coords to use. Those computations could be put in hardware-accelerated matrix pipeline but I haven&amp;rsquo;t found that to be critical enough to do so.&lt;/p&gt;

&lt;p&gt;In the end we end up with:&lt;/p&gt;

&lt;p style=&quot;text-align: center&quot;&gt;&lt;img src=&quot;http://www.mdk.org.pl/assets/cubic-shader.png&quot; alt=&quot;Cubic shader rendering&quot;/&gt;&lt;/p&gt;


&lt;p&gt;Using this technique we can render any cubic at any resolution in a fixed time.&lt;/p&gt;

&lt;h2&gt;Practical results&lt;/h2&gt;

&lt;p&gt;Two following screenshots (click for bigger versions) show sample renderings (a font glyph and a mono-project logo) obtained using this method. Shapes consist of roughly 30 cubics/lines. The first figure represents the inner-mesh hardware-accelerated triangulation. The second one &amp;mdash; a rendering of the curve data. By combining the two we end up with a final mask for the shape. This method works for any polygon including complex self-intersecting concave/convex shapes.&lt;/p&gt;

&lt;p style=&quot;text-align: center&quot;&gt;&lt;a href=&quot;http://www.mdk.org.pl/assets/gpu-rendering-font.png&quot;&gt;&lt;img src=&quot;http://www.mdk.org.pl/assets/gpu-rendering-font-thumb.png&quot; alt=&quot;GPU font rendering&quot;/&gt;&lt;/a&gt;&lt;/p&gt;


&lt;p style=&quot;text-align: center&quot;&gt;&lt;a href=&quot;http://www.mdk.org.pl/assets/gpu-rendering-mono-logo.png&quot;&gt;&lt;img src=&quot;http://www.mdk.org.pl/assets/gpu-rendering-mono-logo-thumb.png&quot; alt=&quot;GPU mono logo shape rendering&quot;/&gt;&lt;/a&gt;&lt;/p&gt;


&lt;h2&gt;Why it&amp;rsquo;s cool&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Traditional approaches to curve rasterization usually require recursive subdividing of the curve towards a certain level of line-approximation or reaching a pixel-precision. The complexity/processing time grows exponentially and the result might be not correct. With the approach presented above we achieve high quality by keeping the mathematically-correct (not compromised) information about the curve till the very last step &amp;mdash; the rasterization . The precision of the final image (output) is only limited by the resolution of the display system, not the implementation. The complexity of the algorithm is linear and the processing time is only constrained by the pixel fill rate of the GPU board (that value approaching hundreds of millions for modern equipment).&lt;/li&gt;
&lt;li&gt;From my experiments, attaching the (presented) fragment shaders to the triangle rasterization process has no any impact on the performance. In other words, it seems that on modern hardware rendering a solid-filled triangle is equally fast as rendering a triangle with a simple shader.&lt;/li&gt;
&lt;li&gt;As we&amp;rsquo;re not generating/storing any extra geometry data and just using two (max three) triangles per curve, the memory requirements are minimal &amp;mdash; even for extremally complex shapes.&lt;/li&gt;
&lt;li&gt;By using some additional extensions (such as a &lt;a href=&quot;http://oss.sgi.com/projects/ogl-sample/registry/EXT/compiled_vertex_array.txt&quot;&gt;compiled vertex array&lt;/a&gt;) after the initial pre-calculation step we can completely move the geometry data to the GPU unit and render by just invoking display lists. In this case the expose events theoretically come cost-free for the CPU.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Smart curve rasterization is the first step towards efficient drawing API implementation. By combining the solution with additional dynamical GPU-programmable pipeline elements (gradients, triangulation, anti-aliasing, multi-sample rendering) we can achieve blazing-fast vector-based drawing tool. This is my current approach towards building a new OpenGL-based cairo backend. World domination follows. Obviously.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; for better math overview check &lt;a href=&quot;http://research.microsoft.com/~cloop/loopblinn05.pdf&quot;&gt;this&lt;/a&gt; article by Loop &amp;amp; Blinn. It&amp;rsquo;s a good starting point even though it&amp;rsquo;s not complete and has certain mistakes (check comments).&lt;/p&gt;
</content><published>2007-10-27T18:40:45+02:00</published><updated>2007-10-31T18:35:26+01:00</updated><author><name>Michael Dominic K.</name><uri>http://www.mdk.org.pl</uri></author><link href='http://www.mdk.org.pl/2007/10/27/curvy-blues' rel='alternate' type='text/html'/></entry><entry><id>tag:www.mdk.org.pl,2007:nokia-n810-announced</id><title type='text'>Nokia N810 announced!</title><content type='html'>&lt;p&gt;It&amp;rsquo;s announced, we did it!&lt;/p&gt;

&lt;p style=&quot;text-align: center&quot;&gt;&lt;a href=&quot;http://www.nokia.com/A4136017?category=n810#&quot;&gt;&lt;img src=&quot;http://www.mdk.org.pl/assets/n810.png&quot; alt=&quot;Nokia n810 Internet Tablet&quot;/&gt;&lt;/a&gt;&lt;/p&gt;


&lt;p&gt;&lt;a href=&quot;http://jaaksi.blogspot.com/&quot;&gt;Ari&lt;/a&gt; has some &lt;a href=&quot;http://jaaksi.blogspot.com/2007/10/nokia-n810-announced.html&quot;&gt;more gory details&lt;/a&gt; about what&amp;rsquo;s new and cool. From the toolkit point of view one thing worth mentioning is that we&amp;rsquo;re now running the full &lt;strong&gt;gtk-2.10&lt;/strong&gt; stack in &lt;a href=&quot;http://maemo.org/news/announcements/view/1190039774.html&quot;&gt;Chinook&lt;/a&gt; (the OS release powering the n810). Now, there are two things to that:&lt;/p&gt;

&lt;p&gt;The &lt;em&gt;bad&lt;/em&gt; thing is that due to the consolidation efforts the API compatibility is broken. Let me stress that again: if your application uses UI, it won&amp;rsquo;t run &lt;em&gt;at all&lt;/em&gt; on Chinook without (often trivial) modifications. We have &lt;a href=&quot;http://live.gnome.org/Hildon/TwoPointZero&quot;&gt;documents&lt;/a&gt; and &lt;a href=&quot;https://stage.maemo.org/svn/maemo/projects/haf/trunk/hildon-audit/&quot;&gt;tools&lt;/a&gt; to assist you in porting the applications. So go ahead, &lt;a href=&quot;http://maemo.org/development/sdks/maemo_4_0_chinook_beta_sdk.html&quot;&gt;download Chinook beta&lt;/a&gt; and update your app &amp;mdash; there is a lot of cool stuff in maemo garage that we need to make run on Chinook also. You can nag us on the IRC channel or mailing lists for help on specific issues. We&amp;rsquo;ll help.&lt;/p&gt;

&lt;p&gt;The &lt;em&gt;good&lt;/em&gt; thing is that we&amp;rsquo;re now very much closer to the gtk upstream and you can expect the toolkit stack to behave in a much more sane and predictable way. We&amp;rsquo;ll also now be able to actually track the API stability more closely.&lt;/p&gt;

&lt;p&gt;As Ari also mentioned, Chinook is going to be available for n800 also. While it&amp;rsquo;s common for companies to provide firmware/bugfix updates for legacy hardware, it&amp;rsquo;s pretty rare to get a full new OS release + new features for free. I&apos;m glad we did it since&amp;hellip; well&amp;hellip; it&amp;rsquo;s exactly the &lt;em&gt;right&lt;/em&gt; thing to do!&lt;/p&gt;
</content><published>2007-10-17T19:41:48+02:00</published><updated>2007-10-17T19:41:53+02:00</updated><author><name>Michael Dominic K.</name><uri>http://www.mdk.org.pl</uri></author><link href='http://www.mdk.org.pl/2007/10/17/nokia-n810-announced' rel='alternate' type='text/html'/></entry><entry><id>tag:www.mdk.org.pl,2007:service-interrupted</id><title type='text'>Service interrupted</title><content type='html'>&lt;p&gt;I finally manged to go through the maintenance pain and migrated my blog to a completely new system and design. I put effort into making sure that all links &amp;amp; serivces work like they did but in some corner cases the RSS feed might stop working for you. If that happens and you&amp;rsquo;re still interested in reading, please re-subscribe.&lt;/p&gt;

&lt;p&gt;I&apos;d also like to appologize to all people who commented and put their opinions on my blog in the past despite the commenting system being completely bolox. It&amp;rsquo;s finally fixed now and works as expected.&lt;/p&gt;

&lt;p&gt;Sorry for the inconviences. More interesting service to follow.&lt;/p&gt;
</content><published>2007-10-14T19:10:28+02:00</published><updated>2007-10-14T19:39:08+02:00</updated><author><name>Michael Dominic K.</name><uri>http://www.mdk.org.pl</uri></author><link href='http://www.mdk.org.pl/2007/10/14/service-interrupted' rel='alternate' type='text/html'/></entry><entry><id>tag:www.mdk.org.pl,2007:vector-drawing-opengl-polygon-tessellation</id><title type='text'>Vector drawing: OpenGL polygon tessellation</title><content type='html'>&lt;p&gt;After having looked into the &lt;a href=&quot;http://www.mdk.org.pl/articles/2007/08/06/vector-drawing-opengl-shaders-and-cairo&quot;&gt;hardware-accelerated bezier curve computations&lt;/a&gt; I checked something more difficult and closer to the reality: hardware-accelerated arbitrary polygon tessellation with &lt;a href=&quot;http://www.opengl.org&quot;&gt;OpenGL&lt;/a&gt;. This topic has been covered by &lt;a href=&quot;http://zrusin.blogspot.com/2006/07/hardware-accelerated-polygon-rendering.html&quot;&gt;Zack&lt;/a&gt; some time ago, spawning a lot of flame (as most of the &lt;a href=&quot;http://www.gnome.org&quot;&gt;GNOME&lt;/a&gt; vs. &lt;a href=&quot;http://www.kde.org&quot;&gt;KDE&lt;/a&gt; performance comparisons do). All benchmarks are flawed, of course.&lt;/p&gt;

&lt;h2&gt;Test case&lt;/h2&gt;

&lt;p&gt;I used same setup as with my previous experiment. This time I measured the real framerate to make sure that no anomaly occurs due to GL async API. Each frame of the test consists of random flowers being drawn to screen with random parameters. Each flower is a polygon outlined by eight bezier curves. The flower shape is not special/optimized in any way. Any closed polygon made out of any number of curves could be used for this purpose. Summarizing:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://www.notebookreview.com/default.asp?newsID=2285&quot;&gt;Thinkpad t43&lt;/a&gt; with ATI mobility x300 card (fglrx proprietary driver with GL support)&lt;/li&gt;
&lt;li&gt;200 flowers being drawn in each frame&lt;/li&gt;
&lt;li&gt;Each flower has a random position, rotation, scale and fill&lt;/li&gt;
&lt;li&gt;Fill is a linear gradient from a random RGBA color to another random RGBA color&lt;/li&gt;
&lt;li&gt;640x480 space is used&lt;/li&gt;
&lt;li&gt;Same set of random data was used in both examples&lt;/li&gt;
&lt;li&gt;Anti-aliasing was turned on&lt;/li&gt;
&lt;li&gt;cairo 1.4.10-1 was used in the cairo version&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://files.mdk.am/other/flower.tar.gz&quot;&gt;Source code for the programs&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p style=&quot;text-align: center&quot;&gt;&lt;a href=&quot;http://www.mdk.org.pl/assets/polygon-cairo.png&quot;&gt;&lt;img src=&quot;http://www.mdk.org.pl/assets/polygon-cairo-thumb.png&quot; alt=&quot;Cairo flower&quot;/&gt;&lt;/a&gt; &amp;nbsp; &lt;a href=&quot;http://www.mdk.org.pl/assets/polygon-gl.png&quot;&gt;&lt;img src=&quot;http://www.mdk.org.pl/assets/polygon-gl-thumb.png&quot; alt=&quot;OpenGL flower&quot;/&gt;&lt;/a&gt;&lt;/p&gt;&lt;p style=&quot;text-align:center&quot;&gt;&lt;img src=&quot;http://www.mdk.org.pl/assets/polygon-chart.png&quot; alt=&quot;Performance graph&quot;/&gt;&lt;/p&gt;


&lt;p&gt;The OpenGL rendering seems to be a pixel &amp;ldquo;fatter&amp;rdquo; than the cairo version (prolly a bug in my code). The GL output seems to be slightly brighter blended. I guess the significant difference between cairo x surface performance and cairo image surface performance also comes from the intensive blending.&lt;/p&gt;

&lt;h2&gt;Optimizations&lt;/h2&gt;

&lt;p&gt;Some optimizations in the GL code could be made to speed up the code even further:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Computed bezier vertices could be stored (even as compiled vertices, if available) to skip the need to generate them twice for the anti-aliasing run.&lt;/li&gt;
&lt;li&gt;As in my prev example, vertex shader could be used to generate bezier points. That would require a different way to get the polygon extents though.&lt;/li&gt;
&lt;li&gt;The quality of the curve approximation (detail level) doesn&amp;rsquo;t seem to affect performance much and could be increased.&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;Algorithm&lt;/h2&gt;

&lt;p&gt;To render the polygons I&apos;m using a variation of the &lt;a href=&quot;http://en.wikipedia.org/wiki/Stencil_buffer&quot;&gt;stencil-based&lt;/a&gt; algorithm described in the &lt;a href=&quot;http://www.glprogramming.com/red/chapter14.html#name13&quot;&gt;OpenGL Red Book&lt;/a&gt;. It relies on a 1bit stencil buffer, which is commonly available. The basic method is:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Disable framebuffer, enable stencil buffer &amp;amp; stencil testing.&lt;/li&gt;
&lt;li&gt;Draw triangle fans for every vertex in the polygon with an odd-even stencil flip rule.&lt;/li&gt;
&lt;li&gt;Enable framebuffer, disable stencil writes, keep stencil testing.&lt;/li&gt;
&lt;li&gt;Draw anti-aliased outline of the polygon but only where the stencil bit is &lt;em&gt;not&lt;/em&gt; set (those are the anti-aliasing artifact pixels that theoretically doesn&amp;rsquo;t belong to the shape).&lt;/li&gt;
&lt;li&gt;Switch stencil test rule to pass only when stencil bit &lt;em&gt;is&lt;/em&gt; set.&lt;/li&gt;
&lt;li&gt;Switch stencil write to zero the bit when passed (spares us a separate stencil clear call later on).&lt;/li&gt;
&lt;li&gt;Render the actual polygon shape with ie. quad.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Worthy benefit of this approach is that it fits (works with) all the standard OpenGL matrix transformations, depth buffer testing, texturing model etc. It can be easily extended with 2d boolean operations. The CPU is not performing any calculations (except the original path calculation which can be offset to the GPU with a vertex shader).&lt;/p&gt;

&lt;p&gt;Once in a while I&apos;m getting questions how did I implement hardware-accelerated video color space conversions in &lt;a href=&quot;http://www.diva-project.org&quot;&gt;Diva&lt;/a&gt;. I&apos;m going to write a bit about that soon along with some boolean operations coverage.&lt;/p&gt;
</content><published>2007-08-16T09:50:39+02:00</published><updated>2007-09-24T20:12:28+02:00</updated><author><name>Michael Dominic K.</name><uri>http://www.mdk.org.pl</uri></author><link href='http://www.mdk.org.pl/2007/8/16/vector-drawing-opengl-polygon-tessellation' rel='alternate' type='text/html'/></entry><entry><id>tag:www.mdk.org.pl,2007:vector-drawing-opengl-shaders-and-cairo</id><title type='text'>Vector drawing: OpenGL shaders and cairo</title><content type='html'>&lt;h2&gt;The mystery&lt;/h2&gt;

&lt;p&gt;Some time ago I had a chance to talk to &lt;a href=&quot;http://zrusin.blogspot.com/&quot;&gt;Zack Rusin&lt;/a&gt; about the differences between QT and the Gnome/Gtk drawing stack. Zack was showing some impressive visual toolkit demos using tiny fractions of the CPU horse power. One of the subjects we started arguing about was using GPU hardware to perform tessellation &amp;mdash; as opposed to &lt;a href=&quot;http://cairographics.org/&quot;&gt;cairo&lt;/a&gt;, where tessellation happens always on the software side. The idea seemed tempting though the practical benefits were unclear to me.&lt;/p&gt;

&lt;p&gt;During &lt;a href=&quot;http://www.guadec.org&quot;&gt;GUADEC&lt;/a&gt; I poked a few people about the possibility of using &lt;a href=&quot;http://www.opengl.org&quot;&gt;OpenGL&lt;/a&gt; and shader programs with cairo to perform hw-accelerated tessellation. I got some constructive and interesting (yet discouraging) feedback about the problems and complications related to this approach. A lot of those (highly valid) points are &lt;a href=&quot;http://blogs.gnome.org/timj/2007/07/17/17072007-opengl-for-gdkgtk/&quot;&gt;summarized by Tim Janik in his blog&lt;/a&gt;. Still, the possible gains/performance improvements were highly unclear.&lt;/p&gt;

&lt;h2&gt;Investigation&lt;/h2&gt;

&lt;p&gt;I therefore decided to write a small benchmark to see what kind of speed differences we could possibly be talking about. To see if the game is worth playing at all. As the testbed I&apos;ve chosen one of the most fundamental bits of the vector graphics &amp;mdash; a bezier curve drawing algorithm. I implemented a 100% hw-accelerated version as a &lt;a href=&quot;http://en.wikipedia.org/wiki/Vertex_shader&quot;&gt;vertex shader program&lt;/a&gt; running on the GPU. I compared it against cairo software version in two scenarios &amp;mdash; using xsurface and image surface. The following setup was used for the test:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://www.notebookreview.com/default.asp?newsID=2285&quot;&gt;Thinkpad t43&lt;/a&gt; with ATI mobility x300 card (fglrx proprietary driver with GL support)&lt;/li&gt;
&lt;li&gt;A time to draw 100 random (pre-generated) bezier curves was measured&lt;/li&gt;
&lt;li&gt;Curves were randomized in a 640x480 space with a random width (1-10pixels) and a random color (red, green, blue, alpha)&lt;/li&gt;
&lt;li&gt;Same set of random curves was used in both examples&lt;/li&gt;
&lt;li&gt;Anti-aliasing was turned off&lt;/li&gt;
&lt;li&gt;An best of 3 test runs was taken&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://files.mdk.am/other/bezier.tar.gz&quot;&gt;Source code&lt;/a&gt; (&lt;a href=&quot;http://developer.nvidia.com/object/cg_toolkit.html&quot;&gt;CG toolkit&lt;/a&gt; from NVidia is needed to compile the shader program)&lt;/li&gt;
&lt;/ul&gt;


&lt;p style=&quot;text-align: center&quot;&gt;&lt;a href=&quot;http://www.mdk.org.pl/assets/bezier-cairo.png&quot;&gt;&lt;img src=&quot;http://www.mdk.org.pl/assets/bezier-cairo-thumb.png&quot; alt=&quot;Cairo bezier&quot; /&gt;&lt;/a&gt; &amp;nbsp; &lt;a href=&quot;http://www.mdk.org.pl/assets/bezier-shader.png&quot;&gt;&lt;img src=&quot;http://www.mdk.org.pl/assets/bezier-shader-thumb.png&quot; alt=&quot;Shader bezier&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center&quot;&gt;&lt;a href=&quot;http://www.mdk.org.pl/assets/flower-cairo.png&quot;&gt;&lt;img src=&quot;http://www.mdk.org.pl/assets/flower-cairo-thumb_1.png&quot; alt=&quot;Cairo flower&quot; /&gt;&lt;/a&gt; &amp;nbsp; &lt;a href=&quot;http://www.mdk.org.pl/assets/flower-shader.png&quot;&gt;&lt;img src=&quot;http://www.mdk.org.pl/assets/flower-shader-thumb_1.png&quot; alt=&quot;Shader flower&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center&quot;&gt;&lt;img src=&quot;http://www.mdk.org.pl/assets/bezier-chart.png&quot; alt=&quot;Performance graph&quot; /&gt;&lt;/p&gt;


&lt;p&gt;The rough-rough result of the test is that drawing using hardware opengl tessellation is 30 times faster than current software cairo implementation. By overlying the resulting images in ie. GIMP one can see tiny pixel differences between the two implementations (cairo implementation begin prolly more accurate) but essentially it&amp;rsquo;s the same thing. The OpenGL shader implementation is not optimized at all and could be made faster by using a geometry shader instead of a vertex shader.&lt;/p&gt;

&lt;h2&gt;Not only about speed&lt;/h2&gt;

&lt;p&gt;Using GPU to perform things normally happening on the CPU has one additional advantage &amp;mdash; it frees the processor to do other things. In my setup, with the cairo implementation drawing random curves as fast as possible, I can get a ~10fps animation (100 curves per frame). This keeps the CPU busy at 100% and the framerate will drop as soon as CPU starts doing anything else.&lt;/p&gt;

&lt;p&gt;With my 100% GPU implementation I get around 400fps and the CPU usage never goes beyond the 30% threshold (lots of it being the random-number generation I presume).&lt;/p&gt;

&lt;h2&gt;Caveats&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;OpenGL shader program support is not yet a commodity, even though it&amp;rsquo;s coming fast even to the mobile space (ie. &lt;a href=&quot;http://www.imgtec.com/PowerVR/Products/Graphics/MBX/index.asp&quot;&gt;MBX&lt;/a&gt; chip having vertex shader support and the &lt;a href=&quot;http://www.imgtec.com/PowerVR/Products/Graphics/SGX/index.asp&quot;&gt;SGX&lt;/a&gt; chip having a full set of pixel/vertex/geometry shaders support).&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://blogs.gnome.org/timj/2007/07/17/17072007-opengl-for-gdkgtk/&quot;&gt;As Tim pointed out&lt;/a&gt;, OpenGL implementations vary and per-implementation fine tuning might be in order&lt;/li&gt;
&lt;li&gt;To efficiently use shader programs one needs a full OpenGL-based drawing stack&lt;/li&gt;
&lt;li&gt;Shader programs + math + drawing algorithms are hard&lt;/li&gt;
&lt;li&gt;OpenGL drivers suck on Linux&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;I still think that the results are interesting though. I quickly hacked another shader implementation to draw solid-filled bezier shapes (more about that soon). The performance differences seem to be even bigger. My gut feeling here is that the programmable hardware drawing might be the only way to go for the resolution-independent fully vector-drawn UI&amp;rsquo;s. Especially on the mobile where the CPU power is scarce, it scales badly, and everything that doesn&amp;rsquo;t throttle the processor means longer battery life.&lt;/p&gt;
</content><published>2007-08-06T14:52:34+02:00</published><updated>2007-09-24T21:02:35+02:00</updated><author><name>Michael Dominic K.</name><uri>http://www.mdk.org.pl</uri></author><link href='http://www.mdk.org.pl/2007/8/6/vector-drawing-opengl-shaders-and-cairo' rel='alternate' type='text/html'/></entry><entry><id>tag:www.mdk.org.pl,2007:guadec-2007</id><title type='text'>GUADEC 2007</title><content type='html'>&lt;p&gt;I&amp;rsquo;ll be attending &lt;a href=&quot;http://www.guadec.org&quot;&gt;GUADEC&lt;/a&gt; this year in Birmingham. During the tutorial day (Friday) I&amp;rsquo;ll be giving a practical introduction to the &lt;a href=&quot;http://www.maemo.org&quot;&gt;maemo&lt;/a&gt; UI and showing some key differences from the full-blown desktop &lt;a href=&quot;http://www.gnome.org&quot;&gt;GNOME&lt;/a&gt; interface. If you&amp;rsquo;re an application developer and you&apos;d like to learn few new quirks about making your software feel responsive and look good on the mobile &amp;mdash; please do come.&lt;/p&gt;

&lt;p&gt;There is quite a bunch of us from &lt;a href=&quot;http://www.nokia.com&quot;&gt;nokia&lt;/a&gt; coming to the event including a strong representation of our magnificent three-letter tookit team starring &lt;a href=&quot;http://oluc.blogspot.com&quot;&gt;luc&lt;/a&gt;, &lt;a href=&quot;http://blogs.gnome.org/tko&quot;&gt;tko&lt;/a&gt;, &lt;a href=&quot;http://www.gnome.org/~fherrera/blog&quot;&gt;fer&lt;/a&gt;, &lt;a href=&quot;http://blogs.gnome.org/xan&quot;&gt;xan&lt;/a&gt; and &lt;a href=&quot;http://www.mdk.org.pl&quot;&gt;mdk&lt;/a&gt;. Great chance to poke us about our future plans regarding hildon, bitch about &lt;a href=&quot;http://sardine.garage.maemo.org&quot;&gt;sardine&lt;/a&gt; and discuss some revolutionary UI ideas you might have for the internet tablets. &amp;ldquo;Hildon &amp;mdash; now open more than ever!&amp;rdquo;. Ehm.&lt;/p&gt;

&lt;p&gt;See you in the UK.&lt;/p&gt;
</content><published>2007-07-12T17:42:14+02:00</published><updated>2007-09-24T20:51:32+02:00</updated><author><name>Michael Dominic K.</name><uri>http://www.mdk.org.pl</uri></author><link href='http://www.mdk.org.pl/2007/7/12/guadec-2007' rel='alternate' type='text/html'/></entry><entry><id>tag:www.mdk.org.pl,2007:chapter-1-in-which-we-meet-graff</id><title type='text'>Chapter #1 in which we meet Graff</title><content type='html'>&lt;p&gt;Long time, no news.&lt;/p&gt;

&lt;p&gt;I&apos;m working now on a (new) set of libraries called Graff. Graff is a lighweight high-performance graphics rendering library. I guess it falls into the category of &lt;em&gt;canvas&lt;/em&gt; &amp;mdash; as currently discussed on the &lt;a href=&quot;http://mail.gnome.org/archives/gtk-devel-list/2007-April/msg00076.html&quot;&gt;gtk mailing list&lt;/a&gt;. It&amp;rsquo;s a bit more generic though and focused on providing ways of &lt;em&gt;animating graphical elements over time&lt;/em&gt;.  It knows about motion paths, timelines, animating parameters, etc. The use case here is building new rich custom UI&amp;rsquo;s, providing a building-block for higher-level toolkits and abstracting hardware-specific quirks. It provides a basic model-view-controller environment with the UI elements (&amp;ldquo;faces&amp;rdquo;) being cleanly separated from the &amp;ldquo;motors&amp;rdquo; driving them. &amp;ldquo;Touches&amp;rdquo; provide event sources.&lt;/p&gt;

&lt;p&gt;Graff can currently render using two runtime-selectable backends &amp;mdash; a hardware-accelerated OpenGL backend or a software-only driver. The software backend is extremelly highly optimized using all the ugly demo-scene tips&amp;amp;tricks straight form the &amp;lsquo;90ties. It performs suprisingly well and the demo applications mentioned below can actually run good on our existing hardware (nokia 770, nokia n800).&lt;/p&gt;

&lt;p&gt;Speaking of demos, I made a few simplistic test applications to sketch the idea of what Graff can already do. Video recordings available below. It&amp;rsquo;s a work in progress, early on.&lt;/p&gt;

&lt;p style=&quot;text-align: center&quot;&gt;&lt;a href=&quot;http://files.mdk.am/demos/graff-demo-1.avi&quot;&gt;&lt;img src=&quot;http://www.mdk.org.pl/assets/graff_demo_1.png&quot; alt=&quot;Graff Demo 1&quot; /&gt;&lt;/a&gt; &amp;nbsp; &lt;a href=&quot;http://files.mdk.am/demos/graff-demo-2.avi&quot;&gt;&lt;img src=&quot;http://www.mdk.org.pl/assets/graff_demo_2.png&quot; alt=&quot;Graff Demo 2&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center&quot;&gt;&lt;a href=&quot;http://files.mdk.am/demos/graff-demo-3.avi&quot;&gt;&lt;img src=&quot;http://www.mdk.org.pl/assets/graff_demo_3.png&quot; alt=&quot;Graff Demo 3&quot; /&gt;&lt;/a&gt; &amp;nbsp; &lt;a href=&quot;http://files.mdk.am/demos/graff-demo-4.avi&quot;&gt;&lt;img src=&quot;http://www.mdk.org.pl/assets/graff_demo_4.png&quot; alt=&quot;Graff Demo 4&quot; /&gt;&lt;/a&gt;&lt;/p&gt;


&lt;p&gt;&lt;strong&gt;Image viewer:&lt;/strong&gt; a basic image viewer controlled with thumbs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Dancing emotes:&lt;/strong&gt; an example showing objects running along morphable paths.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Scrolling list:&lt;/strong&gt; contact list with inertia scrolling.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Drag:&lt;/strong&gt; trivial drag and drop with some smooth blending.&lt;/p&gt;

&lt;p&gt;The image viewer example uses &lt;a href=&quot;http://www.flickr.com/photos/jakubsteiner/&quot;&gt;Jakub&amp;rsquo;s&lt;/a&gt; nice photos. Icons come from our awsome &lt;a href=&quot;http://tango.freedesktop.org/Tango_Desktop_Project&quot;&gt;Tango artists&lt;/a&gt;.&lt;/p&gt;
</content><published>2007-04-23T17:14:22+02:00</published><updated>2007-09-24T20:54:05+02:00</updated><author><name>Michael Dominic K.</name><uri>http://www.mdk.org.pl</uri></author><link href='http://www.mdk.org.pl/2007/4/23/chapter-1-in-which-we-meet-graff' rel='alternate' type='text/html'/></entry><entry><id>tag:www.mdk.org.pl,2007:fosdem-2007</id><title type='text'>Fosdem 2007</title><content type='html'>&lt;p&gt;There is a few of us from &lt;a href=&quot;http://www.nokia.com&quot;&gt;nokia&lt;/a&gt; coming to &lt;a href=&quot;http://www.fosdem.org&quot;&gt;fosdem&lt;/a&gt;, Brussels. Catch us to chat about gtk, hildon and &lt;a href=&quot;http://www.maemo.org&quot;&gt;maemo&lt;/a&gt;. Or we&amp;rsquo;ll catch you.&lt;/p&gt;

&lt;p&gt;I also released nflick 0.4.0 &amp;mdash; a &lt;a href=&quot;http://www.flickr.com&quot;&gt;flickr&lt;/a&gt; browser for the maemo platform. Binaries for &lt;strong&gt;scirocco&lt;/strong&gt; and &lt;strong&gt;bora&lt;/strong&gt; can be found &lt;a href=&quot;https://garage.maemo.org/projects/nflick/&quot;&gt;at the usual place&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Main changes are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Adding hw-keys navigation to fullscreen view&lt;/li&gt;
&lt;li&gt;Pressing &amp;ldquo;escape&amp;rdquo; key while viewing a photo will return to the photo list&lt;/li&gt;
&lt;li&gt;Worker dialogs have now proper transiency so they don&amp;rsquo;t block whole device&lt;/li&gt;
&lt;li&gt;Other dialogs have now proper transiency too&lt;/li&gt;
&lt;li&gt;Fixing the bad-paging bug for good&lt;/li&gt;
&lt;/ul&gt;

</content><published>2007-02-22T15:01:10+01:00</published><updated>2007-09-24T20:55:16+02:00</updated><author><name>Michael Dominic K.</name><uri>http://www.mdk.org.pl</uri></author><link href='http://www.mdk.org.pl/2007/2/22/fosdem-2007' rel='alternate' type='text/html'/></entry><entry><id>tag:www.mdk.org.pl,2007:maemo-theming</id><title type='text'>Maemo theming</title><content type='html'>&lt;p&gt;A bit old news, but &lt;a href=&quot;http://www.tigert.com/&quot;&gt;Tuomas&lt;/a&gt; recently released a new version of his awesome &lt;a href=&quot;http://www.tigert.com/archives/2007/01/30/new-maemo-development-theme/&quot;&gt;plankton theme&lt;/a&gt;. Judging by the comments on his blog and the screenshots posted on planet maemo, It looks like the theme is liked and appreciated.&lt;br/&gt;
&lt;/p&gt;

&lt;p&gt;I also find tigert&amp;rsquo;s theme aesthetically pleasing and nicely-balanced. It reminds me of a well-formed piece of metal that just feels good in the hands. This is, quite unfortunately, in contrast to default n800 stock themes that remind me of &lt;a href=&quot;http://www.epartyunlimited.com/mirrorballs.html&quot;&gt;disco mirror balls&lt;/a&gt; and &lt;a href=&quot;http://en.wikipedia.org/wiki/German_Democratic_Republic&quot;&gt;DDR&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I sometimes have a feeling that the psychological effect of good theming artwork (understood as well-drawn artwork) is underestimated. After all, this is what the user of the product is going to be living with on a daily basis. It&amp;rsquo;s the face of the device. It can cover-up for many shortcomings of the software or badly expose them &amp;mdash; very much like a pretty-faced girl can often cover up for a plump figure (it doesn&amp;rsquo;t seem to work the other way round, does it?).&lt;/p&gt;

&lt;p&gt;For developing the themes we created a system that decouples the layouts from the actual graphics. The &lt;a href=&quot;https://stage.maemo.org/svn/maemo/projects/haf/trunk/hildon-theme-layout-4/&quot;&gt;layout&lt;/a&gt; contains the common gtkrc styles and other internal bits shared among all themes. The graphics consists of a single &lt;a href=&quot;https://stage.maemo.org/svn/maemo/projects/haf/trunk/hildon-theme-plankton/template/template.png&quot;&gt;template file&lt;/a&gt; that can be easily handled by the artist. A set of &lt;a href=&quot;https://stage.maemo.org/svn/maemo/projects/haf/trunk/hildon-theme-tools/&quot;&gt;tools&lt;/a&gt; can be used for various helper tasks.&lt;/p&gt;

&lt;p style=&quot;text-align: center&quot;&gt;&lt;img src=&quot;http://www.mdk.org.pl/assets/theme_diagram.png&quot; alt=&quot;Theming diagram&quot; /&gt;&lt;/p&gt;


&lt;p&gt;This dual system is very much similar to the libraries vs. applications in software development. Library (layout) contains some common bits shared among all applications (themes).&lt;/p&gt;

&lt;p&gt;The only things missing in this system is some documentation &amp;mdash; so that someone can actually use it. Coming soon.&lt;/p&gt;
</content><published>2007-02-13T15:23:55+01:00</published><updated>2007-09-24T23:28:54+02:00</updated><author><name>Michael Dominic K.</name><uri>http://www.mdk.org.pl</uri></author><link href='http://www.mdk.org.pl/2007/2/13/maemo-theming' rel='alternate' type='text/html'/></entry></feed>