<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><atom:link rel="hub" href="http://tumblr.superfeedr.com/" xmlns:atom="http://www.w3.org/2005/Atom"/><description>This is my personal blog. It mainly treats UI Design, Javascript, AJAX and node.js. It’s an attempt to share some of my ideas and findings I encounter, during my way of developing and working out a new startup company, that hopefully will help make the internet an even nicer place to be.

It’s a small contribute to making computers more intuitive.

So have a nice read of my articles and if you like them, help distributing some of the concepts behind them!

DISCLAIMER: All I do here is free of charge, but you can support me writing articles and developing cool new software, by flattering my entries.

Have fun;)</description><title>Grenzgenial</title><generator>Tumblr (3.0; @grenzgenial)</generator><link>http://grenzgenial.com/</link><item><title>Quicklook Mac OSX UTI Hell (or what Apple did omit in its documentation)</title><description>&lt;p&gt;After some blogging abstinence I am back. And we are coming up with a really nice topic, which hasn&amp;#8217;t been blogged about out there on the web yet ;)&lt;/p&gt;
&lt;p&gt;It&amp;#8217;s all about Apple&amp;#8217;s UTI&amp;#8217;s and what Apple omitted to say about them.&lt;/p&gt;
&lt;p&gt;UTI&amp;#8217;s are one of the most powerful features of MacOSX and most CoreServices like LaunchServices, Spotlight and Quicklook depend upon it.&lt;/p&gt;
&lt;p&gt;However documentation about it is unclear about which strategy applies when UTI&amp;#8217;s are missing.&lt;/p&gt;
&lt;p&gt;So what are UTI&amp;#8217;s anyway:&lt;/p&gt;
&lt;p&gt;UTI stays for Uniform Type Identifier, which means they identify a file type, very similar to a file extension or a MIME type, but more generic and with builtin inheritance.&lt;/p&gt;
&lt;p&gt;So for example an image file has the UTI public.image, which inherits from public.data.&lt;/p&gt;
&lt;p&gt;(you can learn more about UTI&amp;#8217;s &lt;a href="http://developer.apple.com/library/mac/#documentation/FileManagement/Conceptual/understanding_utis/understand_utis_conc/understand_utis_conc.html#//apple_ref/doc/uid/TP40001319-CH202-CHDHIJDE"&gt;here&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;Ok. That&amp;#8217;s great, but where does a file hold the information about its UTI? Extension information comes from the filename and MIME types come from HTTP header information, but UTI??&lt;/p&gt;
&lt;p&gt;Well it turns out that UTI information is stored in the extended attributes of a file on HFS+. You can show this metadata by typing &lt;em&gt;mdls &amp;#8220;filename&amp;#8221;&lt;/em&gt; in a Terminal window.&lt;/p&gt;
&lt;p&gt;The fields &lt;strong&gt;kMDItemContentType&lt;/strong&gt; and &lt;strong&gt;kMDItemContentTypeTree&lt;/strong&gt; will save information about the filetype and its inheritance.&lt;/p&gt;
&lt;p&gt;But what happens if a file has not been created by a Mac OSX application and therefore has no UTI information at all??? That&amp;#8217;s actually an interesting question, cause it happens quite oft.&lt;/p&gt;
&lt;p&gt;MacOS X will generate a dynamic UTI, but most importantly it will fall back to file extensions, which is what Apple calls &amp;#8220;Idintifier Tags&amp;#8221;, but lets look at the information lookup flow a bit.&lt;/p&gt;
&lt;p&gt;Lets say you have this awesome new file extension called .markdown and want to preview it with Quicklook. &lt;/p&gt;
&lt;p&gt;The relevant UTI information looks like this:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;In case of Readme.md the relevant information is:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;kMDItemContentType             = &amp;#8220;dyn.ah62d4rv4ge8043a&amp;#8221;&lt;/p&gt;
&lt;p&gt;kMDItemContentTypeTree         = (&lt;/p&gt;
&lt;p&gt;    &amp;#8220;dyn.ah62d4rv4ge8043a&amp;#8221;,&lt;/p&gt;
&lt;p&gt;    &amp;#8220;public.data&amp;#8221;,&lt;/p&gt;
&lt;p&gt;    &amp;#8220;public.item&amp;#8221;&lt;/p&gt;
&lt;p&gt;)&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;p&gt;OSX has no clue about it. So what&amp;#8217;s gonna happen? First off, OS X will generate a dynamic UTI, but that&amp;#8217;s not of a big help here. (see above)&lt;/p&gt;
&lt;p&gt;So Quicklook will lookup the file extension and choose the appropriate program, that can &amp;#8216;handle&amp;#8217; such file.&lt;/p&gt;
&lt;p&gt;How can Quicklook know about which program is mapped to a certain file extension?&lt;/p&gt;
&lt;p&gt;Each application has an &lt;em&gt;Info.plist&lt;/em&gt; file in it&amp;#8217;s Contents folder. This Info.plist can contain a key called &lt;strong&gt;UTImportedTypeDeclarations&lt;/strong&gt; or &lt;strong&gt;UTExportedTypeDeclarations&lt;/strong&gt;, both of which do more or less the same. The first is more generic as it says, which UTI&amp;#8217;s (but also file extensions) an application will handle and registers it in the system. (The second one, says, that the application is not only able to handle such type, but is the actual &amp;#8216;owner&amp;#8217; of the type).&lt;/p&gt;
&lt;p class="p1"&gt;Within UTImportedTypeDeclarations the application can then give a list of UTI Types the file type also conforms to. So an UTI inheritance list gets generated. E.g. Markdown being also public.plain-text.&lt;/p&gt;
&lt;p class="p1"&gt;So what we have till here is: file extension -&amp;gt; application that says it can handle extension -&amp;gt; inherited UTI&amp;#8217;s for file extension.&lt;/p&gt;
&lt;p class="p1"&gt;Now back to Quicklook. Based upon the file extension Quicklook will try to find a Quicklook generator (.qlgenerator), a small Plugin, that says how to render a file type. First in the Application, then in ~/Library and /Library. The Quicklook generator itself has an Info.plist, where it can communicate to the system, which UTI&amp;#8217;s (or file extensions) it is able to handle.&lt;/p&gt;
&lt;p class="p1"&gt;As a side information: Quicklook generators always renderer ouput to PDF, Text or Image Buffers.&lt;/p&gt;
&lt;p class="p1"&gt;If for a certain UTI or file type no qlgenerator is found Quicklook will display a standard dialog, but no Preview :(&lt;/p&gt;
&lt;p class="p1"&gt;As with Markdown, there is no .qlgenerator installed per default (actually one exists at &lt;a href="https://github.com/toland/qlmarkdown"&gt;&lt;a href="https://github.com/toland/qlmarkdown"&gt;https://github.com/toland/qlmarkdown&lt;/a&gt;&lt;/a&gt;, but we won&amp;#8217;t use this one now).&lt;/p&gt;
&lt;p class="p1"&gt;As Markdown actually is a text file, it would be sufficient to start of the classic public-plain-text UTI qlgenerator, but markdown has no inheritance list that includes plain-text.&lt;/p&gt;
&lt;p class="p1"&gt;However if nothing is found the next lower UTI communicated by the &lt;strong&gt;application&lt;/strong&gt; in &lt;em&gt;&lt;strong&gt;UTTypeConformsTo&lt;/strong&gt;&lt;/em&gt; is taken. This is where we can hook in the magic.&lt;/p&gt;
&lt;p class="p1"&gt;So take an application of your choice (which one is not important) and paste in the following in the Info.plist.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p class="p1"&gt;&amp;lt;key&amp;gt;UTImportedTypeDeclarations&amp;lt;/key&amp;gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;&amp;lt;array&amp;gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;  &amp;lt;dict&amp;gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;&amp;lt;key&amp;gt;UTTypeConformsTo&amp;lt;/key&amp;gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;&amp;lt;array&amp;gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;&amp;lt;string&amp;gt;&lt;strong&gt;public.plain-text&lt;/strong&gt;&amp;lt;/string&amp;gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;&amp;lt;/array&amp;gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;&amp;lt;key&amp;gt;UTTypeDescription&amp;lt;/key&amp;gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;&amp;lt;string&amp;gt;Markdown document&amp;lt;/string&amp;gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;&amp;lt;key&amp;gt;UTTypeIconFile&amp;lt;/key&amp;gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;&amp;lt;string&amp;gt;public.text.icns&amp;lt;/string&amp;gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;&amp;lt;key&amp;gt;UTTypeIdentifier&amp;lt;/key&amp;gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;&amp;lt;string&amp;gt;net.daringfireball.markdown&amp;lt;/string&amp;gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;&amp;lt;key&amp;gt;UTTypeReferenceURL&amp;lt;/key&amp;gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;&amp;lt;string&amp;gt;http://daringfireball.net/projects/markdown/&amp;lt;/string&amp;gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;&amp;lt;key&amp;gt;UTTypeTagSpecification&amp;lt;/key&amp;gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;&amp;lt;dict&amp;gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;&amp;lt;key&amp;gt;public.filename-extension&amp;lt;/key&amp;gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;&amp;lt;array&amp;gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;&amp;lt;string&amp;gt;markdown&amp;lt;/string&amp;gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;&amp;lt;string&amp;gt;mdown&amp;lt;/string&amp;gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;&amp;lt;string&amp;gt;&lt;strong&gt;md&lt;/strong&gt;&amp;lt;/string&amp;gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;&amp;lt;string&amp;gt;mdml&amp;lt;/string&amp;gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;&amp;lt;string&amp;gt;text&amp;lt;/string&amp;gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;&amp;lt;string&amp;gt;mdwn&amp;lt;/string&amp;gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;&amp;lt;string&amp;gt;mkd&amp;lt;/string&amp;gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;&amp;lt;string&amp;gt;mmd&amp;lt;/string&amp;gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;&amp;lt;string&amp;gt;rst&amp;lt;/string&amp;gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;&amp;lt;/array&amp;gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;&amp;lt;/dict&amp;gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;  &amp;lt;/dict&amp;gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;&amp;lt;/array&amp;gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p class="p1"&gt;So what we have now is: file extension -&amp;gt; application that says it can handle extension -&amp;gt; inherited UTI&amp;#8217;s for file extension under ConformsTo is plain-text-&amp;gt; inherited UTI qlgenerator for plain-text will be used if no qppropriate qlgenerator was found before.&lt;/p&gt;
&lt;p class="p1"&gt;In order to reload the UTI table for the application, delete the app from the Application folder, then go to Trash and put it back into Applications. (Comments on an easier way to reregister the UTI&amp;#8217;s of an app are appreciated!)&lt;/p&gt;
&lt;p class="p1"&gt;and here we go! :) Quicklook for Markdown!&lt;/p&gt;
&lt;p class="p1"&gt;Please note, that it was not important at all, which UTI the file has or which application we choose, as we are (ab)using the UTTypeTagSpecification of the application, mapping an extension to a list of conforming UTI&amp;#8217;s.&lt;/p&gt;
&lt;p class="p1"&gt;Final hint: We were talking about Quicklook to find the right qlgenerator for preview here, still this has nothing to do with the application, which will be opening the file. This depends also on UTI&amp;#8217;s and File Extensions, &lt;a href="http://lists.apple.com/archives/carbon-dev/2005/Oct/msg00096.html"&gt; CFBundleDocumentTypes&lt;/a&gt;, Creator Codes etc. but each app registers for them seperately. There is a very nice Preference Pane, that shows all registered extensions for an application and it&amp;#8217;s called: RCDefaultApp &lt;a href="http://www.rubicode.com/Software/RCDefaultApp/"&gt;&lt;a href="http://www.rubicode.com/Software/RCDefaultApp/"&gt;http://www.rubicode.com/Software/RCDefaultApp/&lt;/a&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p class="p1"&gt;Go get it and play around with the mappings!&lt;/p&gt;</description><link>http://grenzgenial.com/post/30754690551</link><guid>http://grenzgenial.com/post/30754690551</guid><pubDate>Mon, 03 Sep 2012 00:16:00 +0200</pubDate><category>. qlgenerator</category><category>Markdown</category><category>RCDefaultApp</category><category>UTExportedTypeDeclarations</category><category>UTImportedTypeDeclarations</category><category>UTTypeConformsTo</category><category>UTTypeTagSpecification</category><category>Uniform Type Identifier</category><category>kMDItemContentType</category><category>kMDItemContentTypeTree</category><category>mac</category><category>mac osx</category><category>quicklook</category><category>text.</category><category>CFBundleDocumentTypes</category></item><item><title>Javascript and the brain: Why Javascript is the future of programming languages</title><description>&lt;p&gt;I discover myself all the time comparing programming languages to brain functions. &lt;/p&gt;
&lt;p&gt;While I have never designed a programming language myself, I have used many of them, and think, that I know their strengths and weaknesses quite well by now. &lt;/p&gt;
&lt;p&gt;But more importantly, I have studied brain functions and neural sciences to some extend over the years (especially starting with reading &lt;a title="Von Neumann" href="http://en.wikipedia.org/wiki/John_von_Neumann"&gt;von Neumann&amp;#8217;s&lt;/a&gt; and Turings books)&lt;/p&gt;
&lt;p&gt;It is not a case that von Neumann, was also one of the founders of the computer paradigm. After all he just invented computers after the human prototype he was studying.&lt;/p&gt;
&lt;p&gt;Over the decades however programming languages diverged from his principles and I always found myself reaching a dead end after some while with modern programming languages like Ruby, Java, .Net. etc. Strangely at first contact with Javascript over 15 years ago, I suddenly had this &amp;#8220;feels right&amp;#8221; feeling, but couldn&amp;#8217;t describe why. Today, after some more years and some more experience with computer languages, I finally understand why Javascript not only feels right to me, but objectively is the right language for building future applications.&lt;/p&gt;
&lt;p&gt;Let me explain why:&lt;/p&gt;
&lt;p&gt;Preamble: I must explain some basics of how basic brain functionality in order to explain my conclusions:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;The brain is a neural network&lt;/li&gt;
&lt;li&gt;Neural networks are connections of neurons&lt;/li&gt;
&lt;li&gt;Neurons are cells&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;So what&amp;#8217;s the brain for?&lt;/p&gt;
&lt;p&gt;The brain is a world simulator. It&amp;#8217;s a big approximator. It takes input from it&amp;#8217;s senors (the eyes, etc.) and produces output (which in someway should reproduce what&amp;#8217;s happening or will happen in the real world)&lt;/p&gt;
&lt;p&gt;How does the brain do that? It does it by a process called &amp;#8220;learning&amp;#8221;, which was studied quite extensively by von Neumann, reaching also very surprising conclusions about the learning process itsself. All that neural networks do, is they modify their connection weightings all time, until the output produced by the network is coherent to what the sensor input says. It&amp;#8217;s some sort of &amp;#8220;Calibration&amp;#8221; that takes place during learning. When you learn things right, chances are you will make the right conclusions, before things happen, and you probably will survive. Yes, you see that car rushing at you with 100&amp;#160;km/h. Well your brain should be able to precalculate, that if it continous on its trail like that it will just hit you in the next minute. Therefore it&amp;#8217;s better to jump in the bush before. Your brain might even be able to precalculate, that the driver might be drunk or that he will see you in the next 20 seconds and therefore tell you to wait a moment to not make too fast or early conclusions. Your brain is fantastic!&lt;/p&gt;
&lt;p&gt;Ok. Probably you knew this already.&lt;/p&gt;
&lt;p&gt;What does this have to do with programming languages?&lt;/p&gt;
&lt;p&gt;Well. If you think about the above, there is a powerful conclusion you can make, which is:&lt;/p&gt;
&lt;p&gt;The brain is a (sophisticated) computer! It&amp;#8217;s a big processor. But most importantly and this is what computer languages forgot over the years. It&amp;#8217;s a parallel processor! That&amp;#8217;s what most programming languages are not. They just took some of von Neumann&amp;#8217;s paradigms, but forgot about the most important ones. Parallelism and self modification. Aehm, self modification? Yes, the brain modifies it&amp;#8217;s functions by learning. Neural networks function, in that electronic impulses coming from the human sensors, run through it parallely. It&amp;#8217;s evented non-blocking IO. Yes! I hope now you understand the hype about node.js. Node is an evented non-blocking IO framework written in Javascript.&lt;/p&gt;
&lt;p&gt; Ok so let&amp;#8217;s see why Javascript fits in perfectly in imitating the brain.&lt;/p&gt;
&lt;p&gt;a) &lt;strong&gt;No types&lt;/strong&gt;: types are stupid. The brain has no notion of a type. A neuron is a neuron. A type is an artifical creation of computer scientists, in order to distinguish, what an object can do. It turns out, that object are actually all the same. They are objects in OO programming languages. The type comes over their metadata and the objects they are connected with in memory. In fact one of the big &amp;#8220;revolution&amp;#8221; in OOP languages was to move away from basic types like int, float, etc. to a generic object oriented model. However still some languages use types to distinguish such basic objects. It&amp;#8217;s not necessary. The compiler can find out by itself over heuristics. That&amp;#8217;s what Javascripts tracing JIT does! And as we see in the last years with Tracemonkey, Spidermonkey and Google V8 or Crankshaft it starts doing it really well and fast!&lt;/p&gt;
&lt;p&gt;b) &lt;strong&gt;Dynamic&lt;/strong&gt;: Javascript is a dynamic language. This means that code can modify code during runtime. This was something like the devil for programming language designers over the last decades. They thought it was evil to do that and would lead to code, that wasn&amp;#8217;t clear anymore and so they tried to prevent such use in their languages. Well it turns out that they were wrong. Self modifying code will be the future, and while we are not there yet, I think it will be the 4th and last revolution in software design in this century.&lt;/p&gt;
&lt;p&gt;c) &lt;strong&gt;Functions in Javascript are first class citizens&lt;/strong&gt;: Well to explain this I have again to make reference to brain functions and &amp;#8220;brain functions&amp;#8221;.&lt;/p&gt;
&lt;p&gt;What are equivalent to functions in the brain? Well the brain has no distinction between functions and memory. Everything is taking up memory in the neural network. Functions and data. But Functions are like a set of neurons, with a specific scope. That&amp;#8217;s data (signals) runs through them to produce some output data (other signals). In fact the way this works in Javascript is completely the same. Functions are just again objects in memory and thus can group functionality. Not only! They will also map to process memory perfectly.&lt;/p&gt;
&lt;p&gt;The objects that run through such functions are electric impulse codificated objects coming directly from our sensors.&lt;/p&gt;
&lt;p&gt;In computers sensors quantize these information to 0-1 bit streams.&lt;/p&gt;
&lt;p&gt;So a binary diff function somewhat operates however on the same memory and therefore is a first class citizen. That&amp;#8217;s why javascript is the future of languages, cause it treats functions as first class citizens, whereas other languages don&amp;#8217;t.&lt;/p&gt;
&lt;p&gt;d) &lt;strong&gt;Javascript scope and closures&lt;/strong&gt;: Javascripts scope keeps your working environment and variable in place, also after you come back from some asynchronous function. This is important and is like the brain is connected to neurons it uses more often in a more &amp;#8220;near&amp;#8221; or &amp;#8220;local scope&amp;#8221; fashion.&lt;/p&gt;
&lt;p&gt;e) &lt;strong&gt;IPC communication&lt;/strong&gt;: well todo communication we need to marshal data in a protocol. The way this is done nowadays is mainly http. And parsing text on both sides. Javascript is a perfect fit for this with it&amp;#8217;s human readable JSON object notation.&lt;/p&gt;
&lt;p&gt;f) &lt;strong&gt;Push and not pull, and Javascripts event model&lt;/strong&gt;: The brain works by emitting electrical signals to connected neurons. The brain doesn&amp;#8217;t &amp;#8220;call&amp;#8221; functions it always &amp;#8220;emits&amp;#8221; events. In computer science it is well known by now that passing objects to functions leads to tight coupling, which makes code less maintainable over time. Javascript although it is not perfect has a quite simple notation for emitting events. Whilst other languages can do that too over patterns like inheritance, delegates and interfaces or notification centers. Javascript&amp;#8217;s implementation is more powerful cause it uses simple function pointers, which are more leightweight, than passing around objects.&lt;/p&gt;
&lt;p&gt;g) &lt;strong&gt;Inheritance, Annotations and Mixins&lt;/strong&gt;: The brain has no notion of inhertitance. It&amp;#8217;s an interconnected graph so there is no hierarchy. While other languages try to create object hierarchies through inheritance, Javascript doesn&amp;#8217;t. Instead you can modify or extend every existing object or just &amp;#8220;connect&amp;#8221; to it over a pointer. That&amp;#8217;s why Javascript immitates better the connection between neurons, than any other language I know.&lt;/p&gt;
&lt;p&gt;This article was really fun writing. I think creating the brain analogy was a good idea. Comparing programming language features to brain functions, somewhat works quite well, so this means that there is a strong correlation between the two.&lt;/p&gt;
&lt;p&gt;Have another brain analogy. Post me a line.&lt;/p&gt;</description><link>http://grenzgenial.com/post/2414488498</link><guid>http://grenzgenial.com/post/2414488498</guid><pubDate>Sat, 19 Feb 2011 15:49:45 +0100</pubDate><category>javascript</category><category>brain</category><category>neural networks</category><category>neuron</category><category>closures</category><category>ipc</category><category>dynamic programming languages</category><category>typed languages</category><category>dynamic types</category><category>self mdification</category><category>van neumann</category><category>neumann</category><category>prototype</category></item><item><title>Wikileaks and the definition of "secrets"</title><description>&lt;p&gt;It&amp;#8217;s in these days and weeks, where everyone talked about wikileaks and it&amp;#8217;s founder Julian Assange, that I read much about national security and secrets, but I realize, that what people mean with these terms and what they really stand for are somewhat completely different things and that&amp;#8217;s what makes the discussion full of misunderstandings.&lt;/p&gt;
&lt;p&gt;E.g. today I read the following note:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;#8220;he [Mr. Assange] doesn&amp;#8217;t accept any secrets of governments, whereas he himself makes heavy use of them with his project Wikileaks&amp;#8221;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I want to analyze, the sentence above and show, why this is a wrong conclusion.&lt;/p&gt;
&lt;p&gt;First off I want to explain the simple and powerful concept of Wikileaks. Wikileaks is all about transparency, to fight corruption and abuse. Nothing more nothing less.&lt;/p&gt;
&lt;p&gt;It&amp;#8217;s about bringing transparency to where concentration of power runs together and where wrong decisions can really be threats for society and humanity, meaning in governments and big societies.&lt;/p&gt;
&lt;p&gt;As soon as you understand that, you understand that Wikileaks is not a threat for democracy, but the fundamental of it. No government or company has the right to preclude information from the public.&lt;/p&gt;
&lt;p&gt;Does this mean, that there don&amp;#8217;t have to be secrets anymore? Absolutely not! &lt;/p&gt;
&lt;p&gt;But lets analyze the term secret a bit more:&lt;/p&gt;
&lt;p&gt;A secret is something, that only some people are authorized to see. Not everyone. It&amp;#8217;s about authorization in a value system. Who can see the secret? That&amp;#8217;s already more difficult to define: In most cases there is a fine grained hierarchy of &amp;#8220;trust&amp;#8221;, that determines who is authorized to access secret information and this shows already, that secrets are somewhat &amp;#8220;unnatural&amp;#8221; to nature and difficult to handle. After all it&amp;#8217;s human being accessing secrets.&lt;/p&gt;
&lt;p&gt;What kind of information might be secret?&lt;/p&gt;
&lt;p&gt;- well obviously the information must have some value. It is not your shopping list. What&amp;#8217;s the highest value an information can have? When information becomes so filtered, that it becomes knowledge. Does knowledge have to be secret? No, knowledge is a public porperty of humanity. So what has to be secret? Well it turns out, that there are not many informations, that have to be kept secret. In nature secrets don&amp;#8217;t exist! And there is a good reason for it. The natural value system regulates itsself by weightings. So authorization is replaced by heuristics. That&amp;#8217;s how humans act between each other. You won&amp;#8217;t tell all your private things to a perfect stranger, but perhaps to your mother. That&amp;#8217;s because, your mother has a higher rating of trust in your brains neural circuit. &lt;/p&gt;
&lt;p&gt;I have always wondered, how potentially insecure networks, like e.g. credit card networks are after all quite safe. Well it turns out, that they make heavy use of these heuristics. E.g. they can detect over mathematical algorithms, if an access pattern is somewhat &amp;#8220;unnatural&amp;#8221; to your normal behaviour and block your card. As a simple case immagine your credit card is stolen and someone is continuously accessing your bank account from abroad. This is an unnatural context for your normal behaviour and might therefore be detected by the system as a fraud.&lt;/p&gt;
&lt;p&gt;After this excurse, I want to go back to the initial question:&lt;/p&gt;
&lt;p&gt;Do states have to have secrets?&lt;/p&gt;
&lt;p&gt;The answer is yes, until we don&amp;#8217;t live in a perfect world, states sometimes must have secrets (especially, when it comes to national security), but most of the time the answer is NO! Why? Cause states are only legitimated by the civilization itsself. (It&amp;#8217;s the people who finance governments, it&amp;#8217;s their money!). So everything they do must be transparent to the people. Governments don&amp;#8217;t have to ask every individual its consent, but it must be transparent, what they intend to do and how they gonna spend the money. I am really astonished these days, to see how many politicians and journalists seem to not have understood this.&lt;/p&gt;
&lt;p&gt;Does Wikileaks have secrets? No! Cause Wikileaks is not about authorizing anybody to have the information, the information is completely public. It&amp;#8217;s about &lt;strong&gt;anonymizing&lt;/strong&gt; the source of the information so that no one not even Wikileaks itsself can find out where this information came from and trying to make sure the authenticity of it,  This is fundamental in democracy (see the constitutional anonymity principle in elections).&lt;/p&gt;
&lt;p&gt;So to keep the conclusion of this article short:&lt;/p&gt;
&lt;p&gt;When people talk about secrets, they should differenciate between &lt;strong&gt;authorization&lt;/strong&gt; and &lt;strong&gt;anonymizing&lt;/strong&gt;!&lt;/p&gt;</description><link>http://grenzgenial.com/post/3381785824</link><guid>http://grenzgenial.com/post/3381785824</guid><pubDate>Sat, 19 Feb 2011 15:43:49 +0100</pubDate></item><item><title>Sammy.js and Express.js the dynamic Duo for progressive website enhancement</title><description>&lt;p&gt;I could have called this blog article &lt;a href="http://www.youtube.com/watch?v=CyEf1Lp7Byk&amp;amp;feature=related"&gt;Sammy Davis Jr. and Frank Sinatra - Me and my shadow&lt;/a&gt;, but no one would have understood, that this is all about fancy web development and Node.js. However after you have read this article, you might actually think and smile, about what a good fit this title would actually be&amp;#8230;so let&amp;#8217;s go:&lt;/p&gt;
&lt;p&gt;Yeah, we all love the fancy world of AJAX, but unfortunately, we don&amp;#8217;t live in a perfect world. When it comes to publishing real world apps to the Web, normally the first thing you encounter is the world crashing in your face, cause you start to test your page in non fancy browsers (yeah talking about you here, IE ;)&lt;/p&gt;
&lt;p&gt;I follow up to the great writeup from &lt;a href="http://bennolan.com/2010/08/13/pushstate-and-nodejs.html"&gt;Ben Nolan&lt;/a&gt; and &lt;a href="http://express.davglass.com/"&gt;Dav Glass&lt;/a&gt; upon how to do progressive enhancement with node.js and the concept of serverside DOM rendering of javascript, if for some reason it is not available in the clients browser. &lt;/p&gt;
&lt;p&gt;While Ben&amp;#8217;s writeup is somewhat theoretic and involves Firefox pushState functionality, Dav gives a real cool demo with YUI 3. &lt;/p&gt;
&lt;p&gt;All this fancyness however comes with higher complexity&amp;#8230;so I actually left it apart until I discovered &lt;a title="Sammy.js" href="http://code.quirkey.com/sammy/"&gt;Sammy.js&lt;/a&gt; a week ago and hey, saw it clear in front of me: That was the solution to progressive enhancement we are all searching for!&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What&amp;#8217;s Sammy.js and what does it have to do with progressive enhancement?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Sammy.js (yeah Sammy David Jr. inspired) is to the clients browser, what is Express.js (Sinatra inspired) to the server. Or to put it simple, Sammy.js is all about encoding AJAX state on the client into the hash URL, whereas Express is about serverside routes = encoding serverside state into the URL.&lt;/p&gt;
&lt;p&gt;What is so beautiful here is, that while both do substantially the same, but one on the client to enable your seemless AJAX navigation, and the other on the Server to prevent you from writing strange regexp patterns and do unfancy URL parsing, the way they encode state is quite the same: they both use URL encoding.&lt;/p&gt;
&lt;p&gt;So let&amp;#8217;s look @ how Sammy encodes an URL:&lt;/p&gt;
&lt;p&gt;&lt;span&gt; &lt;/span&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class="javascript"&gt;&lt;span class="c1"&gt;// string&lt;/span&gt;
&lt;span class="nx"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'/user/:id'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; 
  &lt;span class="p"&gt;...&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code class="javascript"&gt;&lt;span class="p"&gt;&lt;span&gt;And now lets look @ how Express encodes an URL:&lt;/span&gt;&lt;br/&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code class="javascript"&gt;&lt;span class="p"&gt;&lt;span&gt;&lt;pre&gt;&lt;code&gt;app.get('/user/:id', function(req, res){
   ...
});&lt;/code&gt;&lt;/pre&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Looks familiar? This is because both use &amp;#8220;routes&amp;#8221; as there way of mapping query strings to variables, so in the above example, user:id could be the name of a user to search for.&lt;/p&gt;
&lt;p&gt;With sammy, this search would happen on the client involvimng perhaps some AJAX request to the client. With express this search is done on the server.&lt;/p&gt;
&lt;p&gt;All things are beautiful here, cause Sammy will keep away nasty problems developers had to face with AJAX development. E.g. the browsers back button not working. Sammy does it all for you and it does it the same way as Express does it on the Server!&lt;/p&gt;
&lt;p&gt;Well, so how do you connect both up together:&lt;/p&gt;
&lt;p&gt;The point is you don&amp;#8217;t have to do anything! If the browser has Javascript support, Sammy will disable the links (prevent the default action for clicks) and handle them with Sammy&amp;#8217;s  Javascript functions instead.&lt;/p&gt;
&lt;p&gt;If there is no Javascript support, the Browser will simply call out to the Server and Express will handle the request, like in a normal Client-Server scenario. &lt;/p&gt;
&lt;p&gt;Well there is one Gotcha however. AJAX apps normally do massive clientrside DOM manipulation, whereas this cannot be done on the Server normally.&lt;/p&gt;
&lt;p&gt;Well fortunately there comes some help from &lt;span&gt;Elijah Insua and his awesom &lt;a title="JSDOM Node.js" href="http://github.com/tmpvar/jsdom"&gt;JSDOM&lt;/a&gt; project on Github. JSDom basically is a serverside DOM parser and enables you even to use JQuery on the server.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;So big up yourself and get fancy with Sammy and Express!&lt;/span&gt;&lt;/p&gt;</description><link>http://grenzgenial.com/post/2142636019</link><guid>http://grenzgenial.com/post/2142636019</guid><pubDate>Sat, 08 Jan 2011 12:55:00 +0100</pubDate><category>sammy.js</category><category>express.js</category><category>sammy</category><category>express</category><category>node.js</category><category>node</category><category>javascript</category><category>progressive enhancement</category></item><item><title>javascript console.log revamped with stacktrace</title><description>&lt;p&gt;This post is a small tip about how I revamped console.log.&lt;/p&gt;
&lt;p&gt;Actually console.log is a handy function, but having a stacktrace at the time of the log would be sometimes nice. Therefore I wrote a log function, which keeps stacktraces of the log in a global history. So you keep logging as before and when you need more information you can get it from the global history object. The idea for this came to me, when I saw a similar implementation from Paul Irish (without stacktrace though).&lt;/p&gt;
&lt;script src="https://gist.github.com/726792.js?file=gistfile1.js"&gt;&lt;/script&gt;&lt;p&gt;so I revamped it to something like this: &lt;/p&gt;
&lt;script src="https://gist.github.com/726802.js?file=gistfile1.js"&gt;&lt;/script&gt;&lt;p&gt;Try it out in console:&lt;/p&gt;
&lt;script src="https://gist.github.com/726814.js?file=gistfile1.js"&gt;&lt;/script&gt;</description><link>http://grenzgenial.com/post/2080765415</link><guid>http://grenzgenial.com/post/2080765415</guid><pubDate>Fri, 03 Dec 2010 11:46:45 +0100</pubDate><category>console.log</category><category>javascript</category><category>stacktrace</category><category>google chrome</category><category>timestamp</category><category>history</category></item><item><title>Security - Google Chrome Background Pages</title><description>&lt;p&gt;UPDATE: Actually Chrome Extensions do ask you for a permission, when you install them to have privileged access to certain domains, which they couldn&amp;#8217;t access due to Cross Domain Origin Policy. However this just means, that e.g. they cannot do e.g. a POST to yourbank.com, if you hadn&amp;#8217;t allowed them. But nothing hinders them to spy on your passwords, etc.&lt;/p&gt;
&lt;p&gt;This is a fast writeup of what came to my mind today. As the Browser is always more becoming a Platform for &amp;#8220;Applications&amp;#8221; (Extensions) to run on, I started thinking about some security implications today.&lt;/p&gt;
&lt;p&gt;I am using the Google Chrome Extension API lately to develop for a Google Chrome Extension.&lt;/p&gt;
&lt;p&gt;I realized quickly, that many many extensions can load Javascript (so called contentscripts) on every page, doing all kind of weird stuff.&lt;/p&gt;
&lt;p&gt;This is nothing new, cause everyone knows that Javascript is not safe right? Well no!&lt;/p&gt;
&lt;p&gt;Javascript is as safe as any other language, but the point is the architecture of Web-Browsers today allows extensions to run scripts and potentially, spy on your web-browsing, banking activities and so on.&lt;/p&gt;
&lt;p&gt;Background pages and content scripts are actually a big security flaw. Just immagine only some things they can do:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;open and close tabs in the background&lt;/li&gt;
&lt;li&gt;click ok for you somewhere in a page (e.g. while you are authorizing someone via oAuth)&lt;/li&gt;
&lt;li&gt;listen to keystrokes&lt;/li&gt;
&lt;li&gt;make cross-domain XMLHTTPRequests in the background using or transmitting your session secret and/or banks mobile TAN.&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;The only &amp;#8220;normative&amp;#8221; force is that extensions are actually delivered in Javascript and therefore can be inspected by developers. So normally they won&amp;#8217;t do weird stuff. But anyways, who knows?&lt;/p&gt;
&lt;p&gt;I think Google should start allowing only signed extensions, which they have reviewed to not do any harmful stuff, similar to how Apple reviews their apps and let only signed extensions run on the Google Chrome platform. By the way the same is true other web-browsers like Firefox and IE9 too.&lt;/p&gt;
&lt;p&gt;I think Safari is the only browser allowing only signed extensions, which is a big plus.&lt;/p&gt;
&lt;p&gt;Comments are appreciated!&lt;/p&gt;</description><link>http://grenzgenial.com/post/1573081472</link><guid>http://grenzgenial.com/post/1573081472</guid><pubDate>Sun, 14 Nov 2010 17:54:00 +0100</pubDate><category>security</category><category>extensions</category><category>background pages</category><category>content script</category><category>google chrome</category><category>firefox</category><category>internet exlorer</category></item><item><title>How to manually set a breakpoint in Chrome / Firebug / Firefox</title><description>&lt;p&gt;I just found out a feature of Chromes debugger today, that I was searching for a while, but never found out:&lt;/p&gt;
&lt;p&gt;How to set breakpoints in code, so that when you run over a function the debugger will automatically stop at that line of code.&lt;/p&gt;

&lt;p&gt;Whenever you use the special keyword &lt;strong&gt;&lt;code&gt;debugger&lt;/code&gt;&lt;/strong&gt; in your script, FireBug / Chrome will treat that line as if it was a breakpoint, and stop your script right there.&lt;/p&gt;

&lt;p&gt;This is so handy! Of course you can still set breakpoints by clicking on the line number in debugger.&lt;/p&gt;

&lt;p&gt;So have fun debugging your code!&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;br/&gt;&lt;/span&gt;&lt;/p&gt;</description><link>http://grenzgenial.com/post/1445167900</link><guid>http://grenzgenial.com/post/1445167900</guid><pubDate>Sun, 31 Oct 2010 10:20:56 +0100</pubDate><category>chrome</category><category>google</category><category>firefox</category><category>debugger</category><category>stop</category><category>debugging</category><category>breakpoint</category><category>firebug</category><category>firefox</category></item><item><title>Google TV vs. Apple TV / Apps and the UI</title><description>&lt;p&gt;There are some unsung revolutions coming up this year.&lt;/p&gt;
&lt;p&gt;While Microsoft and the others are chasing behind to catch up on the mobile market, but will always remain one step behind with Google and Apple, both companies are already up into other things, especially TV.&lt;/p&gt;
&lt;p&gt;So fresh so good. Google is here with the long awaited &lt;a title="Google TV" href="http://www.google.com/tv/"&gt;Google TV&lt;/a&gt; and I must say &amp;#8220;Yeah I like it!&amp;#8221;. &lt;/p&gt;
&lt;p&gt;While there has been some buzz around Apple&amp;#8217;s TV, presented last month, but always declared a &amp;#8220;hobby&amp;#8221; of the company, I think Google TV has taken the right direction and introduced some really nice new features, especially one: Apps for TV.&lt;/p&gt;
&lt;p&gt;While the idea of Apps, could actually come from Apple itsself (see the iPhone), Apple TV lacks to become the platform for Apps, the iPhone became. Hey you Apple guys, I think this was a big mistake and I think it is the real revolution behind Google TV.&lt;/p&gt;
&lt;p&gt;I think, that its clear by now, that TV&amp;#8217;s need some update and especially need their &lt;span&gt;own UI and controls&lt;/span&gt; to interact with. It&amp;#8217;s similar to how the iPhone revolutionized the mobile market, with it&amp;#8217;s innovative touch interface.&lt;/p&gt;
&lt;p&gt;You cannot just bring a classical webpage like Facebook to the TV screen, you have to modify it, to make use of TV&amp;#8217;s features. (see my follow up &lt;a title="UI Design Guide for Google TV" href="http://grenzgenial.com/post/1249071075/guide-to-ui-design-for-google-tv-how-google-tv-apps"&gt;guide on UI design for TV apps&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;The combination Google chose is great, and is the same that Apple chose too, a mobile device, like the iPhone, with a rich UI as remote control and a TV as the screen for it. Apps for TV will have to be developed to render pages, that look nice on a big screen, while still being used from a cell phone device. (Googles Android and iPhone being a good platform for that)&lt;/p&gt;
&lt;p&gt;Google TV (contrary to Apple TV) also greatly interacts with the &amp;#8220;old&amp;#8221; way of watching TV, making it a good start of migration to some sort of web based TV, that Apple TV is.&lt;/p&gt;
&lt;p&gt;So while Apple TV is becoming more the &amp;#8220;video recorder&amp;#8221; substitute in our homes making it possible to rent and buy films, Google TV is becoming the &amp;#8220;set top box&amp;#8221; substitute, making it possible to connect to your Satellite, the Web and see webpages on your TV screen. &lt;/p&gt;
&lt;p&gt;So ok Google, I think you got it good this time! I think we will see many cool apps come out for Google TV in the next time.&lt;/p&gt;
&lt;p&gt;Here is my comparison to what are the main differences and &amp;#8220;killer&amp;#8221; features:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;span&gt;Apple Tv vs Google TV:&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Sources:&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;GoogleTV:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;classical: Satellite, TV &lt;/li&gt;
&lt;li&gt;new: Web&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;AppleTV:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;classical: no &lt;/li&gt;
&lt;li&gt;new: iTunes Store for TV shows and films&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;&lt;em&gt;Stream vids to the TV:&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;(through vids on it from iPhone, Mac)&lt;/p&gt;
&lt;p&gt;Google TV: no, yet?&lt;/p&gt;
&lt;p&gt;AppleTV: yes&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Stream from it:&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Google TV: no, yet&lt;/p&gt;
&lt;p&gt;AppleTV: no&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Remote control it with your phone:&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Google TV: yes&lt;/p&gt;
&lt;p&gt;Apple TV: yes&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;Apps:&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Google TV: yes&lt;/p&gt;
&lt;p&gt;Apple TV: no&lt;/p&gt;</description><link>http://grenzgenial.com/post/1248930015</link><guid>http://grenzgenial.com/post/1248930015</guid><pubDate>Tue, 05 Oct 2010 14:53:00 +0200</pubDate><category>ui design</category><category>tv</category><category>google tv</category><category>apple tv</category><category>comparison</category><category>remote control</category><category>apps</category></item><item><title>Debugging Node.js with Node-Inspector</title><description>&lt;p&gt;Today I had another mind-blowing experience.&lt;/p&gt;
&lt;p&gt;As I was writing a software project in Node, which has reached it&amp;#8217;s critical level for me, where I just don&amp;#8217;t want to go on, with sys.puts and sys.inspect to find out, what my code is doing, I was in search of a Debugger for node.&lt;/p&gt;
&lt;p&gt;Yesterday I tried out Cloud9&amp;#8217;s Javscript IDE, but while being really a great project, is still in the very beginnings and I wasn&amp;#8217;t able to set breakpoints in Chrome nor in Firefox. Perhaps I was doing something wrong, but it just didn&amp;#8217;t work out of the box for me and I couldn&amp;#8217;t find any documentaion yet. Anyways, Cloud9 is going to be really a great IDE some day!&lt;/p&gt;
&lt;p&gt;So I was tinkering around and remembered, that I came accross a link to a project that involves Webkit&amp;#8217;s Web Inspector as a debugger for Node.js. The Project is called &lt;a title="node-inspector github" href="http://github.com/dannycoates/node-inspector#readme"&gt;Node- Inspector&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;A &lt;strong&gt;npm install node-inspector&lt;/strong&gt; gave me a good start and I got all that was necessary on my system.&lt;/p&gt;
&lt;p&gt;Node-Inspector itsself is written in Javascript as it should be and runs with node. ;) The way node-inspector works is that it spawns a Webserver on port 8080 by default, where you can see Web Inspectors debugger Interface. Then it connects to Node&amp;#8217;s Debug port, which in my case is 5858.&lt;/p&gt;
&lt;p&gt;There is some confusion in the Readme and the screencast of how to startup node-inspector.&lt;/p&gt;
&lt;p&gt;However a fast node &amp;#8212;help, made things clear.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;So here is my Installation Instruction:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Start node-inspector, by typing: node-inspector&amp;amp; (this will start the Webserver)&lt;/p&gt;
&lt;p&gt;Startup your favourite Webkit browser (e.g. Safari, Chrome, etc) and go to 127.0.0.1:8080&lt;/p&gt;
&lt;p&gt;start node with the &lt;strong&gt;&amp;#8212;debug-brk&lt;/strong&gt; option. This will start a TCP debug port at 5858 and set a startup breakpoint on the first line of your Javascript file.&lt;/p&gt;
&lt;p&gt;So if youR Javascript file is called &amp;#8220;hello.js&amp;#8221;.&lt;/p&gt;
&lt;p&gt;node &lt;strong&gt;&amp;#8212;debug-brk&lt;/strong&gt; hello.js will startup things.&lt;/p&gt;
&lt;p&gt;Now go back to your browser and hit the &amp;#8220;Connect to Node&amp;#8221; button.&lt;/p&gt;
&lt;p&gt;all your node are belong to us now!&lt;/p&gt;
&lt;p&gt;Web Inspector is about the greatest debugger around and seeing it full screen debugging node is just mind-blowing cool!&lt;/p&gt;
&lt;p&gt;So check it out!&lt;/p&gt;
&lt;p&gt;&lt;img height="274" width="500" alt="Node-Inspector" src="http://farm5.static.flickr.com/4092/5036152302_ea9418903c_d.jpg"/&gt;&lt;/p&gt;</description><link>http://grenzgenial.com/post/1210106964</link><guid>http://grenzgenial.com/post/1210106964</guid><pubDate>Wed, 29 Sep 2010 14:07:00 +0200</pubDate><category>node.js</category><category>node-inspector</category><category>debug</category><category>debugger</category><category>web inspector</category></item><item><title>Why Windows Mobile 7 should be a fail (AGAIN)</title><description>&lt;p&gt;There are companies, that will never learn. One of them is Microsoft.&lt;/p&gt;
&lt;p&gt;I thought, I will never blog about companies and stuff, cause this blog is mainly intended to my writeups about AJAX geekiness, but the news and writeups spreading on the next &amp;#8220;big thing&amp;#8221; from Microsoft urges me to share some thoughts, about this &amp;#8220;new&amp;#8221; phone operating system.&lt;/p&gt;
&lt;p&gt;What I see from the videos on Youtube is a far from complete phone operating system.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Rule No #1: Free Markets and the Killer Feature&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Dear Microsoft, there are markets, which you don&amp;#8217;t conquer being &amp;#8220;fast&amp;#8221;, but only having a &lt;strong&gt;killer feature&lt;/strong&gt;. While Microsoft was not fast at all, since the iPhone is dominating the Market with it&amp;#8217;s innovative design and features since 4 years, Windows Mobile 7 was anounced only last autumn. So while Microsoft&amp;#8217;s decision was to launch Windows Mobile 7 in these months, it is still is to see if there is enough innovation in it.&lt;/p&gt;
&lt;p&gt;Of course in pay markets also price plays a role, and Microsoft can surely be competitive, if they want to (by greatly reducing their profit). In fact Microsoft will not make any profit at all with Windows Mobile 7, cause there is already a cheap (cause free) OS in the market: namely ANDROID from Google!&lt;/p&gt;
&lt;p&gt;I think, that from, what I see Windows Mobile 7, doesn&amp;#8217;t offer any feature, that you won&amp;#8217;t find on iPhone.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Rule No #2: Save costs by using a common codebase&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Windows Mobile 7 seems to be built on Silverlight (Microsofts proprietary Flash software). This means, that developing Windows Mobile 7 and Windows are two completely different things. No common codebase (Silverlight) is bad for costs. &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Rule No #3: Innovation in the UI&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I do not see any innovation in the UI: Despite some &amp;#8220;Widgets&amp;#8221; which you can put on the start screen, and which will clutter up the Home screen even more, than Apple&amp;#8217;s app centric approach, I don&amp;#8217;t see anything new! &lt;/p&gt;
&lt;p&gt;You must think, that this is the &lt;strong&gt;best&lt;/strong&gt; Microsoft&amp;#8217;s engineers seem to be able to come up with at the moment!&lt;/p&gt;
&lt;p&gt;While with Windows the excuse has always been, that Microsoft can&amp;#8217;t confront people with too radical changes in the UI (although windows made such changes, not for the better, by introducing even more substructures and even more complicated workflows), with Windows Mobile 7 they had the opportunity of a fresh relaunch.&lt;/p&gt;
&lt;p&gt;Well, for me the conclusion is clear from what I can see this company completely lost its way to innovate.&lt;/p&gt;
&lt;p&gt;Well, all this of course, doesn&amp;#8217;t mean that Microsoft cannot improve, and that consumers won&amp;#8217;t buy the phone anyways. People most often don&amp;#8217;t even know, what is the operating system on their phone and Microsoft has good distribution and marketing channels, but I don&amp;#8217;t believe they can do it with such a product.&lt;br/&gt;Let&amp;#8217;s see, what will be the consumers choice! &lt;br/&gt;Anyways I am waiting for the big Web OS re-launch next year. I think, that HP is doing really good in waiting the whole buzz this year, and then coming up with something mind-blowing for the beginning of next year. I still believe that WebOS is going to be the real competitor of the iPhone!&lt;/p&gt;</description><link>http://grenzgenial.com/post/1209748563</link><guid>http://grenzgenial.com/post/1209748563</guid><pubDate>Wed, 29 Sep 2010 12:12:00 +0200</pubDate><category>windows</category><category>mobile</category><category>7</category><category>iphone</category><category>android</category><category>ui design</category><category>review</category></item><item><title>Why OAuth Specification 1.0 is a quite big security flaw / IETF get moving!!!</title><description>&lt;p&gt;I actually have been a big fan of OAuth and its usage, until I didn&amp;#8217;t read how it works, yesterday!&lt;/p&gt;
&lt;p&gt;Let me say that, while offering some security, OAuth is not safe for work at all!&lt;/p&gt;
&lt;p&gt;Read the article about at &lt;a href="http://hueniverse.com/2009/04/explaining-the-oauth-session-fixation-attack/"&gt;http://hueniverse.com/2009/04/explaining-the-oauth-session-fixation-attack/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This is not a small security hole, it&amp;#8217;s a flaw by design!&lt;/p&gt;
&lt;p&gt;So I read, that OAuth 2.0 is the next upcoming version of OAuth and already implemented e.g. by Facebooks Graph API and Github. However the draft is still under development.&lt;/p&gt;
&lt;p&gt;UPDATE: After having read the OAuth v2.0 specification as far as I can see the problem has been resolved, cause the spec. requires now TLS for authorization requests and generates the token on the server and not on the client anymore, which however could be sniffed, if it wasn&amp;#8217;t for the TLS mechanism.&lt;/p&gt;
&lt;p&gt;So what&amp;#8217;s the issue with OAuth 1.0 all about?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;How OAuth authorization is working:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;A consumer makes an authorization request to get access to the users data. (Actually he gets authorized to see some of the users data, not all). To enable this, the consumer therefore receives a so called request token, which then gets transformed in an access token + an access secret (all depending on the request token), which is not exchanged securely or over an encrypted channel, but just appended to the URL.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;How it should be working:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The request token secret should be transmitted over a &lt;strong&gt;secure&lt;/strong&gt; (encrypted with public key of provider) and authenticated (both sides know who is who) connection (similar to how the SSH Handshake works).&lt;/p&gt;
&lt;p&gt;In fact the session fixation attack uses this flaw, in that:&lt;/p&gt;
&lt;p&gt;In the authorization workflow, the user authenticates (&amp;#8220;signs&amp;#8221;) a request secret generated on the client and appended to a request URL, to be authenticated to access users data, which is ok under normal conditions, but the problem is, that an attacker can read in plain text, what the request token secret is (cause its not transmitted safely).&lt;/p&gt;
&lt;p&gt;Substantially OAuth 1.0 is giving the master secret ~ request token to everyone.&lt;/p&gt;
&lt;p&gt;Now even if a server developer limits the requests to only originate from the client(=consumer) an attacker can still hijack this mechanism by making a request &amp;#8220;&lt;em&gt;over&lt;/em&gt;&amp;#8221; the consumer by using the request token and thus giving him access to the result of the request! &lt;/p&gt;
&lt;p&gt;Note: although the request token is not the shared secret it directly &amp;#8220;leads&amp;#8221; to it, thus making it &amp;#8220;equivalent&amp;#8221; in many ways to the master key. Of course an attacker still has to go through the consumer site, which will do the calculations necessary to access the users data for him (request-&amp;gt;access token secret) + signing (=hashing over consumer key and access token secrets), cause the attacker has none of them, and you could built infrastructure, thats lets this be done only by authenticated consumers. But even if consumers are authenticated, as you see, you can still go &amp;#8220;&lt;strong&gt;through&lt;/strong&gt;&amp;#8221; the consumer and get out the users data!&lt;/p&gt;
&lt;p&gt;Even worse with IP and domain poisoning, an attacker can trick the whole machinery (e.g. the service provider) into believing, he is the consumer and do the whole access key + hash calculations himself, thus even getting out access keys, etc.&lt;/p&gt;
&lt;p&gt;This attack just wouldn&amp;#8217;t work, if consumer and provider were authenticated to each other over a secure HTTPS channel.&lt;/p&gt;</description><link>http://grenzgenial.com/post/1191012097</link><guid>http://grenzgenial.com/post/1191012097</guid><pubDate>Sun, 26 Sep 2010 13:50:00 +0200</pubDate><category>oauth</category><category>security</category><category>flaw</category><category>how oauth works</category><category>oauth explained</category><category>oath explained</category></item><item><title>Google Percolator, Core data, CouchDB and the real time indexing chain</title><description>&lt;p&gt;It was really a great read today, to see how Google re-vamps its search infrastructure to get even more real time search results.&lt;/p&gt;&#13;
&lt;p&gt;&lt;a title="Google Percolator"&gt;&lt;a href="http://www.theregister.co.uk/2010/09/24/google_percolator/"&gt;http://www.theregister.co.uk/2010/09/24/google_percolator/&lt;/a&gt;&lt;/a&gt;&lt;/p&gt;&#13;
&lt;p&gt;I think Googles instant search together with Percolator is intended to offer realtime updates to Googles index.&lt;/p&gt;&#13;
&lt;p&gt;A Google bot makes such trigger happen (being effectively a pull request) and then pushes that through their Percolator pipeline so that results show up in the index nearly immediately.&lt;/p&gt;&#13;
&lt;p&gt;This is needed for data, where real time is important like news, twitter feeds etc. &lt;/p&gt;&#13;
&lt;p&gt;I think the more elaborated information becomes the less important real time gets!&lt;/p&gt;&#13;
&lt;p&gt;However it great to see Google innovate and always be one step ahead to its competitors.&lt;/p&gt;&#13;
&lt;p&gt;The problem is, that if small portions in a document change, especially with regard to links to other web-pages, Map Reduce has to process the whole data set again, to update link counts in other documents for Google&amp;#8217;s Pagerank algorithm. In fact such link counts represent some sort of &amp;#8220;dynamic&amp;#8221; data in the database, thus making them not get updated automatically by the MapReduce algorithm.&lt;/p&gt;&#13;
&lt;p&gt;In fact what&amp;#8217;s happening here, is that, some objects in the data pool, contain &amp;#8220;aggregate&amp;#8221; data about other objects.&lt;/p&gt;&#13;
&lt;p&gt;The way Percolator does these updates, by using, what they call &amp;#8220;observers&amp;#8221; reminds me much of how you can subscribe to update events in Cocoa&amp;#8217;s Core Data using Key Value Observing mechanisms.&lt;/p&gt;&#13;
&lt;p&gt;In fact immagine you have an application with a departments and employees table. Lets say, you want the number of employees in a department be stored as a property of the department. In Core data you can subscribe the departments attribute, to get notified, when the employees change, thus automatically updating also the departments table.&lt;/p&gt;&#13;
&lt;p&gt;What Google did here, however is make this step completely integrated on a database level, which is really where it belongs to be!&lt;/p&gt;&#13;
&lt;p&gt;Above is particularily interesting, as I was thinking of using &lt;em&gt;CouchDB&lt;/em&gt; for my upcoming project, which will use real time data and was interested the limitations of Map Reduce Tables described in above article are generic to every Database and therefore also exist also in CouchDB.&lt;/p&gt;&#13;
&lt;p&gt;The short answer is unfortunately: YES!&lt;/p&gt;&#13;
&lt;p&gt;There is no database (RDBM or document based) I know of, which doesn&amp;#8217;t have this limitation. (Correct me if I am wrong in the comments section)&lt;/p&gt;&#13;
&lt;p&gt;So first lets take a look at CouchDB&amp;#8217;s implementation of a Map reduce algorithm:&lt;/p&gt;&#13;
&lt;p&gt;I read the &lt;a title="CouchDB View Index Updates" href="http://horicky.blogspot.com/2008/10/couchdb-implementation.html"&gt;CouchDB View Index Updates Implementaion&lt;/a&gt;, and found out, that it is important to note, that views are updated lazily and incrementally.&lt;/p&gt;&#13;
&lt;p&gt;&lt;em&gt;How CouchDb works:&lt;/em&gt;&lt;/p&gt;&#13;
&lt;p&gt;CouchDB substantially is in first just a big set of unrelated data (documents) on which it imposes so called &amp;#8220;&lt;strong&gt;views&lt;/strong&gt;&amp;#8221; which are B+Trees upon such data. The B+Trees are actually the efficient way to access and search the data. They are &amp;#8220;paths&amp;#8221; into the data. You can lookup data from different point of views (hence the term &amp;#8220;view&amp;#8221;) E.g. by location, time,etc.&lt;/p&gt;&#13;
&lt;p&gt;Now if new documents get added to CouchDB the index gets updated incrementally, looking first for changes to the DB , that arrived since the last View calculation and updating the B+Tree.&lt;/p&gt;&#13;
&lt;p&gt;Now does this mean, that our data will get updated automatically.&lt;/p&gt;&#13;
&lt;p&gt;No, this just means, that the B+Tree gets updated, the documents themselves remain unmodified! &lt;/p&gt;&#13;
&lt;p&gt;This means, that also CouchDB has this limitations.&lt;/p&gt;&#13;
&lt;p&gt;I am really looking forward seeing someone implement Percolator in CouchDB!&lt;/p&gt;</description><link>http://grenzgenial.com/post/1190930321</link><guid>http://grenzgenial.com/post/1190930321</guid><pubDate>Sun, 26 Sep 2010 13:24:00 +0200</pubDate><category>core data</category><category>couchdb</category><category>google percolator</category><category>mapreduce</category><category>observers</category></item><item><title>YQL website scraping with pagination</title><description>&lt;p&gt;Recently I wrote about &lt;a href="http://grenzgenial.com/post/1155985825/common-ui-design-mistakes-pagination"&gt;pagination&lt;/a&gt; and why the way it is implemented in major websites, represents a major UI design mistake.&lt;/p&gt;
&lt;p&gt;While the idea of limiting the results per page is a good one, thus greatly reducing load times and server load, it makes websites inefficient and complicated to use.&lt;/p&gt;
&lt;p&gt;Today I want to talk about a further drawback of pagination, especially when it comes to retreiving information from websites, that don&amp;#8217;t offer RSS feeds or any other form of machine readable data. The process of retreiving such information is called: website scraping.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;The use case:&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;I recently needed to get the email addresses of all doctors in my area. While public yellow pages exist that offer such information, they all present their results in form of about 10 results per page. &lt;/p&gt;
&lt;p&gt;This is obviously a problem if you have more than hundred results and each one has the email address on a separate details page.&lt;/p&gt;
&lt;p&gt;Well, if you are like me and don&amp;#8217;t want to waste your time going through each of them one by one, but instead prefer spending your precious time on finding out how to get this stupid job done by a computer, then hold on. Here is the solution:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;The solution:&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;This is where &lt;a href="http://yhoo.it/aBM3A2"&gt;YQL&lt;/a&gt; comes into play.&lt;/p&gt;
&lt;p&gt;If you don&amp;#8217;t know about YQL yet, YQL is a free webservice offered by Yahoo, which substantially lets you scrape any website, with a common SQL-like query syntax and using Yahoo&amp;#8217;s botnet to get your data;)&lt;/p&gt;
&lt;p&gt;Lets look at a simple query statement.&lt;/p&gt;
&lt;p&gt;&lt;span&gt; &lt;/span&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class="xml"&gt;SELECT * FROM html WHERE url = ‘http://www.amazon.de’ AND xpath=’descendant-or-self::title | descendant-or-self::meta’&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This returns all title and meta elements in the amazon.de website. You can try this query out &lt;a href="http://yhoo.it/9VaWXr"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;What make YQL even cooler, is that you can create your own tables, which is what YAHOO calls &lt;a href="http://yhoo.it/9Z2262"&gt;open data  tables&lt;/a&gt;. These tables, can run custom functions on Yahoo&amp;#8217;s servers to make the queries even more sophisticated. Immagine it like being some sort of stored procedure for YQL. The cool thing about this is, that you can write such functions in Javascript, then upload them to your server and Yahoo will do the rest for you. This makes this tool a &lt;strong&gt;super-potent-nuclear-weapon&lt;/strong&gt; scraper.&lt;/p&gt;
&lt;p&gt;This is what I needed to get the pagination under control:&lt;/p&gt;
&lt;p&gt;First lets see how a query looks like:&lt;/p&gt;
&lt;pre&gt;&lt;code class="xml"&gt;select * from {table} where url="http://a-paginated-website.com/page1" AND xpath="//table[@class='results']" and paginationXPath="//li[@class='next']"&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You first select the custom table (in my case the table is called otb. This is defined in the xml file that describes the table.). Then you pass in the following parameters to select:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;url&lt;/strong&gt; = the url of the first page you want to scrape&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;xpath&lt;/strong&gt; = an xpath describing the content you are interested in (if you xpath is uncommon to you check out the great pages about &lt;a href="http://www.w3schools.com/xpath/default.asp"&gt;xpath at w3schools.com&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;paginationXPath&lt;/strong&gt; = is the xpath leading to the pagination link on the website&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;Now lets have a look at the javascript for the YQL table:&lt;/p&gt;
&lt;pre&gt;&lt;code class="javascript"&gt;var paginationUrl = url;
var i=0;
var responseData= [];
var data;
while (true){

	data = y.rest(paginationUrl).accept('text/html').get().response;
	responseData=responseData+y.xpath(data,xpath);
	
	var x= y.xpath(data,paginationXPath);
	if(x.length()!=0){
		paginationUrl =y.xmlToJson(y.tidy(x)).html.body.a[0].href;
		y.log(paginationUrl);
		if (paginationUrl.indexOf('http://')!=-1){
			continue;	
		}else{y.log('not a link');}//but continue

	}else{
		var XMLresponse= y.tidy(responseData).body.a;
		response.object = {XMLresponse};
		break;
	}
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;What this does is the following: &lt;/p&gt;
&lt;ol&gt;&lt;li&gt;starts an endless loop&lt;/li&gt;
&lt;li&gt;makes a request to the url provided in the select statement&lt;/li&gt;
&lt;li&gt;gets the content selected by the xpath and concatenates it with any result from previous runs&lt;/li&gt;
&lt;li&gt;&lt;span&gt;gets the pagination link specified by paginationXPath&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;does some logic to ensure, that we actually found a valid link to the next page&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;loops through all pages that have a valid &amp;#8216;next&amp;#8217; link&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;when there is no further link, writes all data in the response object needed by YQL to return results&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;p&gt;That&amp;#8217;s it! We can now scrape through hundreds and hundreds of pages &amp;#8230; and get back beautiful JSON!&lt;/p&gt;
&lt;p&gt;You can download the full definition of the data table &lt;a href="http://bit.ly/otbxml"&gt;here&lt;/a&gt; and a run a full query &lt;a href="http://bit.ly/dykxwK"&gt;here&lt;/a&gt;! Have fun;)&lt;/p&gt;
&lt;p&gt;P.S. there are some considerations you should keep in mind, while using this&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;YQL spiders run under the name &amp;#8220;Yahoo Pipes 2.0&amp;#8221;&lt;/li&gt;
&lt;li&gt;when a request is made, YQL looks in the robots.txt file on the server to see if scraping of the website hasn&amp;#8217;t been disabled. If it is disabled, YQL will not scrape the page!&lt;/li&gt;
&lt;li&gt;YQL&amp;#8217;s timeout is set to 30000&amp;#160;ms. If your query exceeds this timelimit it will get aborted. I have no idea, if it is possible to circumvent this!&lt;/li&gt;
&lt;/ul&gt;</description><link>http://grenzgenial.com/post/1156309633</link><guid>http://grenzgenial.com/post/1156309633</guid><pubDate>Mon, 20 Sep 2010 17:52:00 +0200</pubDate><category>pagination</category><category>scraper</category><category>scraping</category><category>yahoo pipes</category><category>yql</category><category>screenscraping</category><category>pagescraping</category><category>html parser</category></item><item><title>UI Design: Modal dialogs and Lightboxes: A common UI-Design mistake in websites and some workarounds</title><description>&lt;p&gt;I wrote about pagination as a common UI design mistake in &lt;a href="http://grenzgenial.com/post/1155985825/common-ui-design-mistakes-pagination"&gt;my last post&lt;/a&gt;. This time I want to talk about another common design mistake: Modal Dialogs a.k.a. Popups.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;Modal dialogs (e.g. lightboxes)&lt;/em&gt;&lt;/strong&gt;&lt;br/&gt;&lt;br/&gt;One common design mistake in webdesign and UI design are modal popups done with DHTML techniques. The most common being some form of &lt;a href="http://www.huddletogether.com/projects/lightbox2/"&gt;lightbox&lt;/a&gt;, &lt;a href="http://www.digitalia.be/software/slimbox2"&gt;slimbox&lt;/a&gt;, etc.&lt;br/&gt;&lt;br/&gt;&lt;em&gt;Whats wrong about popup techniques?&lt;/em&gt;&lt;br/&gt;&lt;br/&gt;Popups are always &lt;em&gt;obtrousive&lt;/em&gt;, as they overlay the user&amp;#8217;s screen and the user&amp;#8217;s interaction with the page. They are a clear statement to the user.&lt;br/&gt;The statement is: &amp;#8220;I am not part of this website!&amp;#8221;&lt;/p&gt;
&lt;p&gt;&lt;br/&gt;I personally know just one good reason, when to use this technique and it&amp;#8217;s, when you actually want to tell the user, that something is not part of your website. &lt;br/&gt;For example if you have to bring the corporate identity of a 3rd party website to your website.  An example: Let&amp;#8217;s immagine you have to authenticate your user with a common authentication service (E.G. Facebook Connect OR Twitter) or for a 3rd party payment service (e.g. Paypal). In this situation you want to give a clear statement to the user: &amp;#8220;&lt;em&gt;Hey this is the official Facebook site!&lt;/em&gt;&amp;#8221; or &amp;#8220;Y&lt;em&gt;ou are now redirected to Paypal!&lt;/em&gt;&amp;#8221;.&lt;br/&gt;&lt;br/&gt;In all other cases there are other, much more effective techniques to use. Some of them being fixed or slideout panels, menus, tabs, accordion panels, etc. I personally like everything that fades in and out with come cool animation, but that&amp;#8217;s individual. What is more important is picking the right size of your panel, it can even be fullscreen!&lt;br/&gt;&lt;br/&gt;The most common mistake I see is, when websites want to display images or videos in a gallery. &lt;br/&gt;&lt;br/&gt;Normally websites display small versions of images somewhere within the website and when the user clicks on such an image, present a larger version of the image to the user. And where do they show it? In a lightbox! Don&amp;#8217;t do that! This is a complete fail for 2 reasons:&lt;br/&gt;&lt;br/&gt;Not only does a lightbox waste precious screen estate, which could be used to display details of an image, it also makes the rest of the page become unusable. Moreover many Lightbox implementation just close, when you click on a small close button, whereas they should close as soon as the user clicks somewhere outside the dialog!&lt;br/&gt;&lt;br/&gt;However, what I want to say, is that lightboxes have nearly &lt;em&gt;no benefit&lt;/em&gt; at all. &lt;br/&gt;Your user wanted to see the &lt;em&gt;details&lt;/em&gt; of an image and you just showed him half, while disabling the whole page!&lt;br/&gt;&lt;br/&gt;Remember: If a user clicks on a detail, he wants the page and controls out of the way and just see as much of a picture/video as possible. So you want to give the picture or video as much space as possible or as much as the user has available and display it to him in fullscreen mode. &lt;br/&gt;UPDATE: &lt;a href="http://manos.malihu.gr/sideways-jquery-fullscreen-image-gallery"&gt;Sideways jQuery Plugin&lt;/a&gt; is a good example of how to do image galleries right.&lt;/p&gt;
&lt;p&gt;&lt;br/&gt;There is one exception to this, which is &lt;em&gt;Previews&lt;/em&gt;. Previews work differently, in that the user, wants a big representation, but wants to be able to switch back to the website immediately. But again you won&amp;#8217;t display previews in a Lightbox, because, when the user displays a preview, he wants to keep control over the rest of the page , so one good way to display previews is in a non-modal, tooltip-like fashion and not in a lightbox!&lt;br/&gt;&lt;br/&gt;&lt;em&gt;The worst things you can do with modal popups:&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;br/&gt;The worst things you can do with lightboxes,  is putting them&lt;em&gt; into scrollviews or scrolling div&lt;/em&gt;s. Most interestingly even Google makes this mistake in its well designed Google AdWords page.&lt;br/&gt;&lt;img src="http://farm5.static.flickr.com/4105/5008472146_22767cc5b4_m.jpg" alt="Google Adwords Bad UI Design"/&gt;&lt;br/&gt;Huh? Where are the controls here? How do you close this window?&lt;br/&gt;&lt;img src="http://farm5.static.flickr.com/4151/5007865985_b2f14a580c_m.jpg" alt="Google Adwords"/&gt; &lt;/p&gt;
&lt;p&gt;Ahh, the close button scrolled of the page ;)&lt;br/&gt;&lt;br/&gt;Please: Don&amp;#8217;t use modal dialogs in scrollviews! Instead use full screen centered dialogs and if not all controls fit in the window, don&amp;#8217;t make the dialog scroll but instead give scrollbars to the dialog and make the close button fixed on screen, so it cannot scroll off the screen like in the above example! &lt;/p&gt;
&lt;p&gt;Make the web a better place, by adopting these techniques!&lt;/p&gt;</description><link>http://grenzgenial.com/post/1156008445</link><guid>http://grenzgenial.com/post/1156008445</guid><pubDate>Mon, 20 Sep 2010 16:18:00 +0200</pubDate><category>design</category><category>dialog</category><category>lightbox</category><category>modal</category><category>modal dialog</category><category>popup</category><category>ui</category><category>user interface</category><category>usability</category><category>interface designer</category><category>user interface design</category><category>award winning web design</category><category>the essential guide to user interface design</category><category>common user interface</category><category>user interface requirements</category><category>user interface</category><category>user interface engineering</category><category>user experience</category><category>application design</category><category>usability</category><category>interface designing</category></item><item><title>UI Design: Pagination: A common UI-Design mistake in websites and some workarounds</title><description>&lt;p&gt;Today I would like to introduce to you a very common UI design mistake, still encountered in many major websites today.&lt;/p&gt;
&lt;p&gt;&lt;br/&gt;&lt;strong&gt;Pagination:&lt;/strong&gt;&lt;br/&gt;&lt;br/&gt;While pagination itsself is a good idea and actually a very common technique to save load time and reduce server load, the way it&amp;#8217;s implemented in many sites nowadays is just not user friendly at all.&lt;br/&gt;&lt;br/&gt;For anyone who doesn&amp;#8217;t know, what pagination on websites is, here is an example:&lt;br/&gt;&lt;br/&gt;&lt;img alt="Google Pagination Links" src="http://farm5.static.flickr.com/4105/5004519091_74641505b2_d.jpg"/&gt;&lt;br/&gt;&lt;br/&gt;Pagination is a way of providing a &lt;em&gt;limit&lt;/em&gt; and an &lt;em&gt;offset&lt;/em&gt;  to the number of items fetched e.g. from a database and presented  to the user.&lt;/p&gt;
&lt;p&gt;The problem with pagination is, that the user has to reload the whole page, thus having to deal with long response times waiting for new data and doing nothing. This completely breaks the user experience, which should be much more fluid and dynamic.&lt;br/&gt;&lt;br/&gt;&lt;em&gt;So how can we do pagination right?&lt;/em&gt;&lt;br/&gt;&lt;br/&gt;A common technique used today to do pagination is the &lt;strong&gt;&lt;em&gt;AJAX lazy loading&lt;/em&gt;&lt;/strong&gt; technique. (I will explain this technique in detail in another blog entry so stay tuned;)). Such technique is applied e.g. by &lt;a href="http://tumblr.com"&gt;Tumblr.com&lt;/a&gt; to load Blog entries.&lt;br/&gt;&lt;br/&gt;While I don&amp;#8217;t see any good reason for webdesigners today not to use such techniques, they are still not very widely adopted. The AJAX and DOM manipulation needed is actually available nearly everywhere, even in very old browsers and even if users have Javascript turned off, sites can provide fallbacks to classical pagination links.&lt;/p&gt;
&lt;p&gt;&lt;br/&gt;Most notably even big sites like Google and Amazon use old pagionation techniques. But this doesn&amp;#8217;t make them more acceptable! Instead it&amp;#8217;s just a sign of how old these pages actually are and how slow innovation is moving towards&amp;#8230;&lt;br/&gt;&lt;br/&gt;Fortunately there are workarounds available in form of browser extensions:&lt;br/&gt;One of them is called &lt;a href="http://bit.ly/autopagerize"&gt;AutoPagerize&lt;/a&gt;, and is written by a Japanese guy. (Fortunately Google Chrome has the ability to translate Japanese pages into something I can read and understand too; I really love to read the twitter feed of this guy in Japanese!!)&lt;/p&gt;
&lt;p&gt;The extension is available for Chrome/Safari and Firefox.&lt;br/&gt;&lt;br/&gt;With the extension installed you can now do AJAX pagination in all major sites, including Google, Amazon, etc.&lt;br/&gt;&lt;br/&gt;It&amp;#8217;s one of the rare extensions, that after having them installed you get this &amp;#8220;&lt;em&gt;Man, how could I live without it till now?&lt;/em&gt;&amp;#8221; feeling. You &amp;#8220;feel&amp;#8221; the difference! Well, that&amp;#8217;s what good UI design is about after all!&lt;br/&gt;&lt;br/&gt;The way the extension works, is, that it comes with a preset of so called &amp;#8220;SiteLinks&amp;#8221;. SiteLinks are XPATH descriptions, which for a certain page define, where to find pagination links.&lt;br/&gt;&lt;br/&gt;What&amp;#8217;s even cooler is, that you can provide further SiteLinks to AutoPagerizer over the &lt;a href="http://wedata.net"&gt;WeData.net&lt;/a&gt; Wiki. WeData.net also provides an API to post new SiteLinks to it in form of key/value pairs. So if a page has no pagination info available yet, why not write one of your own?  &lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;/p&gt;</description><link>http://grenzgenial.com/post/1155985825</link><guid>http://grenzgenial.com/post/1155985825</guid><pubDate>Mon, 20 Sep 2010 16:11:00 +0200</pubDate><category>ajax</category><category>ajax</category><category>autopagerize</category><category>common</category><category>design</category><category>extension</category><category>lazy</category><category>lazy load</category><category>load</category><category>mistake</category><category>next</category><category>pagination</category><category>ui</category><category>ui design</category><category>application design</category><category>award winning web design</category><category>common user interface</category><category>design</category><category>dialog</category><category>interface designer</category><category>interface designing</category><category>the essential guide to user interface design</category><category>user interface requirements</category><category>user interface engineering</category><category>user interface design</category><category>user interface</category><category>user experience</category><category>usability</category></item><item><title>Inspecting cookies using Web Inspector's / Firebug's console</title><description>&lt;p&gt;Ever wanted to know, which cookies are set for your domain?&lt;/p&gt;
&lt;p&gt;Modern Browsers often have the possibility to see the cookies saved on your system.&lt;/p&gt;
&lt;p&gt;Google Chrome even has a very detailed list under &amp;#8220;Preferences / Show Cookies and other data for websites&amp;#8221;, which also gives you the possibility to see if a site uses HTML5 LocalStorage.&lt;/p&gt;
&lt;p&gt;However there is a simpler trick: Just open up Web Inspector in Google Chrome /Safari or  Firebug in Firefox and type &amp;#8220;&lt;strong&gt;document.cookie&lt;/strong&gt;&amp;#8221; in the console window.&lt;br/&gt;This will show you all  cookies for a given website.&lt;/p&gt;
&lt;p&gt;Cool isn&amp;#8217;t it?&lt;/p&gt;</description><link>http://grenzgenial.com/post/1155315447</link><guid>http://grenzgenial.com/post/1155315447</guid><pubDate>Mon, 20 Sep 2010 12:48:00 +0200</pubDate><category>web inspector console cookie firebug safari firefox chrome</category><category>web inspector</category><category>console</category><category>cookie</category><category>safari</category><category>firefox</category><category>chrome</category></item><item><title>Let's start this blog</title><description>&lt;p&gt;&lt;pre&gt;&lt;code class="javascript"&gt;function foo() {
  var me= {
    id: dotmaster,
    age: 35,
    nationality: "Austria",
    twitter: "www.twitter.com/dotmaster"
    properties: [
      "Enterpreneur",
      "Manager",
      "AJAX Geek",
      "Technologist",
      "Awesome Coder;)"  
    ]
  };
  return "Hello World!";
}
&lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;</description><link>http://grenzgenial.com/post/1150351184</link><guid>http://grenzgenial.com/post/1150351184</guid><pubDate>Sun, 19 Sep 2010 17:57:00 +0200</pubDate></item><item><title>Guide to UI Design for Google TV: How Google TV Apps will introduce a whole new world of HTML5 and AJAX apps for TV</title><description>&lt;p&gt;I just kept thinking today, of how Google TV will actually revolutionize the TV market and came to the conclusion, that this will end up in something similar to what we are seeing happening on the iPhone.&lt;/p&gt;
&lt;p&gt;I think we will see a whole new bunch of AJAX geekiness come together with Google TV and their concept of enhancing UI with Apps for TV.&lt;/p&gt;
&lt;p&gt;Have a look at: &lt;a title="Google TV Spotlight" href="http://www.google.com/tv/spotlight.html"&gt;&lt;a href="http://www.google.com/tv/spotlight.html"&gt;http://www.google.com/tv/spotlight.html&lt;/a&gt;&lt;/a&gt; just to see a few concepts, of what we can expect to come up next.&lt;/p&gt;
&lt;p&gt;I thought of how UI design for a TV might have to look like and came up with these few principals:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1. TV UI Design Principal No.1: Apps will have to split UI and control:&lt;/strong&gt; Control may reside on a mobile device with touchscreen or computer, UI will be the television screen&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;2.&lt;/strong&gt; &lt;strong&gt;TV UI Design &lt;span&gt;&lt;strong&gt;Principal&lt;/strong&gt;&lt;/span&gt; No.2:&lt;/strong&gt; The main screen being the Television, Apps will have much &lt;em&gt;&lt;strong&gt;&amp;#8220;screen real estate&amp;#8221;,&lt;/strong&gt;&lt;/em&gt; while having to provide much &lt;strong&gt;&lt;em&gt;bigger buttons&lt;/em&gt;&lt;/strong&gt;, than websites on a computer, cause TV screens are normally far away. (yeah I see Web 2.0 Buttons coming to the TV next you ;)&lt;/p&gt;
&lt;p&gt;This means, that we will see many Apps, that are more similar to how they look on an iPad today, than on the iPhone.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;3.&lt;/strong&gt; &lt;strong&gt;TV UI Design &lt;span&gt;&lt;strong&gt;Principal&lt;/strong&gt;&lt;/span&gt; No.3: Rich remote controls: &lt;/strong&gt;I think interacting with the TV, will be much similar to how you use the iTunes remote App, the remote control being a fully fledged web app too, with possibilities to search, select and switch TV programs as well as bring parts of the UI to the remote control itsself.&lt;/p&gt;
&lt;p&gt;In fact the TV will be like the extended arm of your mobile device.&lt;/p&gt;
&lt;p&gt;Use your Facebook app, as long as you are not in front of the TV. As soon as you get near your TV, connect to it and see the whole navigation happen on your TV, while still controlling the Facebook app on your phone. I really do like that thought!&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;4.&lt;/strong&gt; &lt;strong&gt;The API&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I think, there will be some SDK necessary, for bringing up some important features into what the browser is lacking right now. Especially &lt;em&gt;access to the TV and Audio device&lt;/em&gt;!&lt;/p&gt;
&lt;p&gt;Wouldn&amp;#8217;t be surprised  to see this integrated in Google Tv&amp;#8217;s version of &amp;#8220;Webkit&amp;#8221;&amp;#160;?! already.&lt;/p&gt;
&lt;p&gt;Hopefully Google will choose to make Google TV an open platform, like they did with Android!&lt;/p&gt;
&lt;p&gt;UPDATE: so Google TV is actually based on Android according to this article &lt;a title="Rooting Google TV" href="http://phandroid.com/2010/10/21/google-tv-root-first-signs-possibilities/"&gt;&lt;a href="http://phandroid.com/2010/10/21/google-tv-root-first-signs-possibilities"&gt;http://phandroid.com/2010/10/21/google-tv-root-first-signs-possibilities&lt;/a&gt;&lt;/a&gt;/ and the video insoide.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;span&gt;&lt;strong&gt;&lt;span&gt;&lt;br/&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;So while I am still waiting and am curious of how this device will really be, I recommend to you developers out there, to warm up your fingers and get ready to start doing some great stuff with Google TV!&lt;/p&gt;</description><link>http://grenzgenial.com/post/1249071075</link><guid>http://grenzgenial.com/post/1249071075</guid><pubDate>Fri, 05 Feb 2010 15:33:00 +0100</pubDate><category>ui design guide</category><category>html5</category><category>google tv</category><category>apps</category><category>web 2.0</category><category>ajax</category></item></channel></rss>
