<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Abstract form</title>
	<atom:link href="http://abstractform.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://abstractform.wordpress.com</link>
	<description>Just another WordPress.com weblog</description>
	<lastBuildDate>Mon, 02 Jan 2012 07:10:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='abstractform.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Abstract form</title>
		<link>http://abstractform.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://abstractform.wordpress.com/osd.xml" title="Abstract form" />
	<atom:link rel='hub' href='http://abstractform.wordpress.com/?pushpress=hub'/>
		<item>
		<title>CSSMatrix 3D Transformations</title>
		<link>http://abstractform.wordpress.com/2011/09/27/cssmatrix-3d-transformations/</link>
		<comments>http://abstractform.wordpress.com/2011/09/27/cssmatrix-3d-transformations/#comments</comments>
		<pubDate>Tue, 27 Sep 2011 18:10:13 +0000</pubDate>
		<dc:creator>Homam Hosseini</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[3D]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[WebKit]]></category>

		<guid isPermaLink="false">http://abstractform.wordpress.com/?p=251</guid>
		<description><![CDATA[Well I’ve spent a good weekend figuring out CSS3 3D transformations. In short, now I think it is intelligently designed to fit web design needs, however coming from Direct3D background I was looking for a camera in W3C API. In this post I show how to make a touch sensitive, interactive 3D model of the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=abstractform.wordpress.com&amp;blog=5674805&amp;post=251&amp;subd=abstractform&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Well I’ve spent a good weekend figuring out CSS3 3D transformations. In short, now I think it is intelligently designed to fit web design needs, however coming from Direct3D background I was looking for a camera in W3C API.</p>
<p>In this post I show how to make a touch sensitive, interactive 3D model of the iPad using matrix transformations.</p>
<p>Although iPad is not a perfect cuboid, for simplicity we assume it is. Google and download pictures of the 6 sides of the iPad. Read this excellent <a href="http://24ways.org/2010/intro-to-css-3d-transforms">Introduction to CSS 3-D Transforms</a> on how to make 3D cuboids using CSS3. It is fairly easy and straight forward.</p>
<div id="attachment_255" class="wp-caption aligncenter" style="width: 132px"><img class="size-thumbnail wp-image-255" title="Untransformed layers" src="http://abstractform.files.wordpress.com/2011/09/untransformed.jpg?w=122&#038;h=150" alt="Untransformed layers" width="122" height="150" /><p class="wp-caption-text">iPad layers before transformation; six sides stacked on top of each others</p></div>
<p>I want to rotate the model by touching the screen / moving the mouse. We’re not digging into the details of touch event handling here, check out <a href="http://www.sitepen.com/blog/2008/07/10/touching-and-gesturing-on-the-iphone/">Touching and Gesturing  on the iPhone</a> for a nice discussion on this subject.</p>
<p>Obviously we move our fingers on the phones screen, or the mouse in 2D flat surfaces, but we want to rotate our iPad in 3D space. Luckily any rotation in 3D space can be decomposed to 3 elemental rotations around the axes of a coordinate system (frame of reference), using <a href="http://en.wikipedia.org/wiki/Euler_angles">Euler angles</a>; meaning that a user can rotate the model to a desired state by no more than 3 gestures.</p>
<p style="text-align:left;"><img class="aligncenter size-thumbnail wp-image-256" title="Transformed iPad Model" src="http://abstractform.files.wordpress.com/2011/09/transformed.jpg?w=142&#038;h=150" alt="Transformed iPad Model" width="142" height="150" /><a href="http://www.wingooli.com/homam/posts/cssmatrix/no-matrix.htm">Check out the first draft.</a></p>
<p>It works; you can freely rotate the model in any direction. But something’s not quite right: the UI response to gestures is not intuitive. Sometimes when you move your fingers to the left, the model rotates upward, another time it rotates down-right…. The problem is that every time that you rotate the model you change the orientation of its axes. You can leave your program as it is, it is sellable and in fact I&#8217;ve bought programs with this bug before. The rest of this post explains a solution to this problem.</p>
<h2 style="margin-top:1.5em;">Linear Transformations</h2>
<p>All CSS3 transformations (rotate, scale, skew) are reversible, you can rotate an object 40 degrees clockwise, scale it to 2x bigger, then shrink it to half and rotate it 40 degrees counter clockwise and you end up with the object in its initial state. Another interesting feature of CSS3 transformations is that although an image can be distorted by a transformation, straight lines don’t curve or bend and remain straight under any transformation. Each point of the original image is always mapped to one and only one point of the transformed image. These are the characteristics of <a href="http://en.wikipedia.org/wiki/Linear_transformation">linear maps</a>.</p>
<p>Any linear map can be represented by a transformation matrix. In our case, in a 3-dimensional space, it is a 3&#215;3 matrix. I won’t dig into the technical details of matrices, simply because we don’t need to know those details. Check out your old analytic geometry textbook.</p>
<p>Given a transformation matrix M, any point P of our object will be transformed by this matrix product:</p>
<pre style="margin-top:1em;margin-bottom:1em;">P’ = M * P</pre>
<p>(Here we use the fact that points can be represented by their <a href="http://en.wikipedia.org/wiki/Position_(vector)">position vectors</a>, hence column matrices)</p>
<p>There’s a little thing about translation transformation. In good old geometry, a translation can be represented by a vector (when you translate an object, you move it along a path that has a direction and length), and you find the translated coordinates of a point P by summing up its original coordinates with the translation vector: P’ = P + T.  There’s a <a href="http://en.wikipedia.org/wiki/Translation_(geometry)">trick</a> to combine translation with other forms of linear transformations using 4&#215;4 matrices.</p>
<p>If M is a 4&#215;4 transformation matrix and P is a 4&#215;1 column vector representing the coordinate of a point in space (the last row of the vector is set to 0), then:</p>
<pre style="margin-top:1em;margin-bottom:1em;">P’ = M * P</pre>
<p>P’ (the matrix product of M and P) is the coordinate of our point after the object has been transformed by M.</p>
<p>M can represent any state of escalation, rotation, translation, or skewness.</p>
<h2 style="margin-top:1.5em;">CSSMatrix</h2>
<p>CSS gives us the option to define our desired transformation by a 4&#215;4 transformation matrix. This method is virtually useless in CSS declarative way, for a 3D transformation you have to calculate the matrix elements and pass 16 parameters to <code>matrix3d()</code> property function (for an example to see how obscure the code might become, check out <code>rotate3d()</code> definition in <a href="http://www.w3.org/TR/css3-3d-transforms/">W3C’s CSS 3d transforms draft</a>). But it is easy and very convenient to use this matrix in JavaScript code, thanks to DOM’s CSSMatrix interface. Currently (Sep. 2011) WebKit implements this interface by <code>WebKitCSSMatrix</code> type.</p>
<p>We initialize an instance of a <code>WebKitCSSMatrix</code> by passing a correct string value of <code>-webkit-transform</code> CSS property. So one can construct it by something like this:</p>
<pre style="margin-top:1em;margin-bottom:1em;"><span style="color:blue;">new</span> WebKitCSSMatrix(<span style="color:#993300;">"scale3d(1,2,1)"</span>)
or
<span style="color:blue;">new</span> WebKitCSSMatrix(<span style="color:#993300;">"scale3d(1,2,1) rotate3d(0,0,1, 45deg) translate3d(100px, 0, -20px)"</span>)</pre>
<p>Here’s where this window object’s little useful function comes handy: &#8216;<code>window.getComputedStyle()</code>&#8216;. <code>getComputedStyle()</code> takes a DOM Element and returns an instance of <code>CSSStyleDecleration</code> that is a representation of all the style properties currently set for the element. It is also a dictionary. You can get the current transform value by: <code>window.getComputedStyle(element)[<span style="color:#993300;">"-webkit-transform"</span>]</code> or by <code>window.getComputedStyle(element).webkitTransform</code> property. Its value is in form of <code>matrix()</code> or <code>matrix3d()</code>. To get the current <code>CSSMatrix</code> that is applied to an element use:</p>
<pre style="margin-top:1em;margin-bottom:1em;">m = <span style="color:#0000ff;">new</span> WebKitCSSMatrix(window.getComputedStyle(element).webkitTransform)</pre>
<p><code>CSSMatrix</code> is indeed a 4&#215;4 matrix (its properties are named m11 to m44), its <code>toString()</code> method returns its CSS representation (in <code>matrix()</code> or <code>matrix3d()</code> form).</p>
<p>It also provides a handful of useful functions for matrix manipulation. These functions don’t mutate the object; they return a new instance of <code>CSSMatrix</code>:</p>
<ul>
<li>multiply</li>
<li>inverse</li>
<li>translate</li>
<li>scale</li>
<li>rotate</li>
<li>rotateAxisAngle</li>
<li>skewX</li>
<li>skewY</li>
</ul>
<p>Check out <a href="http://developer.apple.com/library/safari/#documentation/AudioVideo/Reference/WebKitCSSMatrixClassReference/WebKitCSSMatrix/WebKitCSSMatrix.html">Apple’s documentation</a>.</p>
<p>I learnt it in a hard way that <code>multiply()</code> function doesn’t exactly work as I understand from the documentations. The text says, and I naturally expected that, given matrices A and B, <code>A.multipy(B)</code> must be equal to <code>A * B</code> in math notation. But it <a href="http://stackoverflow.com/questions/7468584/cssmatrix-multiplication">turned out</a> that it is actually equal to <code>B * A</code>.</p>
<p>Back to our original problem, let’s differentiate between the model&#8217;s frame of reference and the world (device viewport) <a href="http://en.wikipedia.org/wiki/Frame_of_reference">frame of reference</a>. Your view port (computer’s screen) has a static frame of reference (for our purpose). Viewport axes: Up (Y), Right (X) and Facing you (Z) are attached to the device; they don’t change with respect to the device. But the directions of your 3D model’s axes (X’,Y’,Z’) change as you rotate it inside the viewport. Our UI inconsistent response problem happened because when we move our fingers upward on the device, we expect the model to rotate around device X axis, but <code>rotate3d(1,0,0,#deg)</code> actually rotates the model around its own X’ axis.</p>
<p style="text-align:center;"><a href="http://abstractform.files.wordpress.com/2011/09/viewport-vs-model-frame-of-references2.jpg"><img class="aligncenter size-medium wp-image-268" title="Viewport vs Model frame of reference" src="http://abstractform.files.wordpress.com/2011/09/viewport-vs-model-frame-of-references2.jpg?w=132&#038;h=198" alt="Viewport vs Model frame of reference" width="132" height="198" /></a></p>
<p>Luckily <code>rotate3d(z,y,z,#deg)</code> function can rotate the model around any arbitrary axis (defined by vector [x,y,z] here). So the problem boils down to finding, which axis of the rotated object is parallel to the device X and Y axes, after an arbitrary rotation.</p>
<p>We know that rotation can be represented by a linear transformation matrix. If V’ is an arbitrary axis on the model, that was parallel to V (an axis in device frame of reference) prior to the rotation, then we can find what axis on object is now parallel to V after the rotation, by:</p>
<pre style="margin-top:1em;margin-bottom:1em;">V’’ = M * V’</pre>
<p>(where M is the transformation matrix that defines the rotation)</p>
<p>If the model is not transformed (when <code>window.getComputedStyle(element).webkitTransform</code> is the identity matrix) V’’ is parallel to V’ parallel to V.</p>
<p>Note that we represent an axis by a vector parallel to it, so the column vector: <img class="alignnone size-full wp-image-261" style="vertical-align:middle;" title="[1,0,0]" src="http://abstractform.files.wordpress.com/2011/09/image002.png?w=720" alt=""   /> represents X axis, <img class="alignnone size-full wp-image-263" style="vertical-align:middle;" title="[0,1,0]" src="http://abstractform.files.wordpress.com/2011/09/image004.png?w=720" alt="[0,1,0]"   /> represents Y and <img class="alignnone size-full wp-image-264" style="vertical-align:middle;" title="[0,0,1]" src="http://abstractform.files.wordpress.com/2011/09/image005.png?w=720" alt="[0,0,1]"   /> represent Z. A rotation linear transformation can be represented by a 3&#215;3 matrix<br />
M =<img class="alignnone size-full wp-image-265" style="vertical-align:middle;" title="Transformation matrix (M)" src="http://abstractform.files.wordpress.com/2011/09/image007.png?w=720" alt="Transformation matrix (M)"   /></p>
<p>There you go. You can extract <code>CSSMatrix</code> m11..m33 elements and write a little bit of JavaScript to produce V’’. Or use <code>CSSMatrix.multiply()</code> function that takes a <code>CSSMatrix</code> as its argument; then you have to construct a 4&#215;4 representation of axes by just padding the column vector and setting all the other elements to 0.</p>
<p>In JavaScript:</p>
<pre style="margin-top:1em;margin-bottom:1em;"><span style="color:blue;">var</span> deviceXAxis = <span style="color:blue;">new</span> WebKitCSSMatrix(<span style="color:#993300;">"matrix3d(1,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0)"</span>);
<span style="color:blue;">var</span> deviceYAxis = <span style="color:blue;">new</span> WebKitCSSMatrix(<span style="color:#993300;">"matrix3d(0,0,0,0, 1,0,0,0, 0,0,0,0, 0,0,0,0)"</span>);</pre>
<p>The result of <code>deviceXAxis.multiply(transformation)</code> is the object’s X’’ axis that is currently parallel to device X axis.</p>
<p>The following function rotates the model around device X and Y axes (resulting in a natural user experience):</p>
<pre style="margin-top:1em;margin-bottom:1em;"><span style="color:blue;">function</span> rotateModel (xRot, yRot) {
    <span style="color:green;">// get the current transformation matrix:</span>
    <span style="color:blue;">var</span> m = <span style="color:blue;">new</span> WebKitCSSMatrix(window.getComputedStyle(cube).webkitTransform);
    <span style="color:green;">// Model Y’ axis that is now parallel to device Y axis:</span>
    <span style="color:blue;">var</span> yAxis = ipad.deviceYAxis.multiply(m);
    <span style="color:green;">// Rotate around Y’:</span>
    <span style="color:blue;">var</span> m1 = m.rotateAxisAngle(yAxis.m11, yAxis.m21, yAxis.m31, yRot);
    <span style="color:green;">// Model X’ axis that is now parallel to device X axis:</span>
    <span style="color:blue;">var</span> xAxis = ipad.deviceXAxis.multiply(m1);
    <span style="color:green;">// Rotate around X’:</span>
    <span style="color:blue;">var</span> m2 = m1.rotateAxisAngle(xAxis.m11, xAxis.m21, xAxis.m31, xRot);
    <span style="color:green;">// Apply the final rotation matrix to the model:</span>
    cube.style.webkitTransform = m2.toString();
}</pre>
<p><a href="http://www.wingooli.com/homam/posts/cssmatrix/ipad.htm">Check out the final product here.</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/abstractform.wordpress.com/251/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/abstractform.wordpress.com/251/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/abstractform.wordpress.com/251/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/abstractform.wordpress.com/251/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/abstractform.wordpress.com/251/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/abstractform.wordpress.com/251/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/abstractform.wordpress.com/251/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/abstractform.wordpress.com/251/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/abstractform.wordpress.com/251/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/abstractform.wordpress.com/251/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/abstractform.wordpress.com/251/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/abstractform.wordpress.com/251/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/abstractform.wordpress.com/251/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/abstractform.wordpress.com/251/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=abstractform.wordpress.com&amp;blog=5674805&amp;post=251&amp;subd=abstractform&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://abstractform.wordpress.com/2011/09/27/cssmatrix-3d-transformations/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Homam Hosseini</media:title>
		</media:content>

		<media:content url="http://abstractform.files.wordpress.com/2011/09/untransformed.jpg?w=122" medium="image">
			<media:title type="html">Untransformed layers</media:title>
		</media:content>

		<media:content url="http://abstractform.files.wordpress.com/2011/09/transformed.jpg?w=142" medium="image">
			<media:title type="html">Transformed iPad Model</media:title>
		</media:content>

		<media:content url="http://abstractform.files.wordpress.com/2011/09/viewport-vs-model-frame-of-references2.jpg?w=200" medium="image">
			<media:title type="html">Viewport vs Model frame of reference</media:title>
		</media:content>

		<media:content url="http://abstractform.files.wordpress.com/2011/09/image002.png" medium="image">
			<media:title type="html">[1,0,0]</media:title>
		</media:content>

		<media:content url="http://abstractform.files.wordpress.com/2011/09/image004.png" medium="image">
			<media:title type="html">[0,1,0]</media:title>
		</media:content>

		<media:content url="http://abstractform.files.wordpress.com/2011/09/image005.png" medium="image">
			<media:title type="html">[0,0,1]</media:title>
		</media:content>

		<media:content url="http://abstractform.files.wordpress.com/2011/09/image007.png" medium="image">
			<media:title type="html">Transformation matrix (M)</media:title>
		</media:content>
	</item>
		<item>
		<title>HTML5 mobile games</title>
		<link>http://abstractform.wordpress.com/2011/07/10/html5-mobile-games/</link>
		<comments>http://abstractform.wordpress.com/2011/07/10/html5-mobile-games/#comments</comments>
		<pubDate>Sun, 10 Jul 2011 11:54:56 +0000</pubDate>
		<dc:creator>Homam Hosseini</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://abstractform.wordpress.com/?p=247</guid>
		<description><![CDATA[For everybody who got here looking for selling their games to my company, you can catch me in twitter @homam, Google, Windows Live (whichever you like ).<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=abstractform.wordpress.com&amp;blog=5674805&amp;post=247&amp;subd=abstractform&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>For everybody who got here looking for selling their games to my company, you can catch me in twitter <a href="http://twitter.com/homam">@homam</a>, <a href="https://profiles.google.com/bluesnowball/">Google</a>, <a href="http://profile.live.com/id-0e4efbcd50e4b1c6/">Windows Live</a> (whichever you like <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> ).</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/abstractform.wordpress.com/247/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/abstractform.wordpress.com/247/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/abstractform.wordpress.com/247/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/abstractform.wordpress.com/247/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/abstractform.wordpress.com/247/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/abstractform.wordpress.com/247/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/abstractform.wordpress.com/247/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/abstractform.wordpress.com/247/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/abstractform.wordpress.com/247/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/abstractform.wordpress.com/247/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/abstractform.wordpress.com/247/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/abstractform.wordpress.com/247/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/abstractform.wordpress.com/247/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/abstractform.wordpress.com/247/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=abstractform.wordpress.com&amp;blog=5674805&amp;post=247&amp;subd=abstractform&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://abstractform.wordpress.com/2011/07/10/html5-mobile-games/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Homam Hosseini</media:title>
		</media:content>
	</item>
		<item>
		<title>Mutually Dependent Systems</title>
		<link>http://abstractform.wordpress.com/2010/03/11/mutual-dependent-systems/</link>
		<comments>http://abstractform.wordpress.com/2010/03/11/mutual-dependent-systems/#comments</comments>
		<pubDate>Thu, 11 Mar 2010 10:17:07 +0000</pubDate>
		<dc:creator>Homam Hosseini</dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Modeling]]></category>
		<category><![CDATA[complexity]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[distributed system]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://abstractform.wordpress.com/?p=237</guid>
		<description><![CDATA[In this post I am discussing a problem that I have faced several times in the past year. Simplicity is always a goal in design as it saves resources during development and maintenance. But it&#8217;s not always clear which design is simpler. Sometimes a seemingly complex design turns out to be simpler to develop, maintain [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=abstractform.wordpress.com&amp;blog=5674805&amp;post=237&amp;subd=abstractform&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In this post I am discussing a problem that I have faced several times in the past year. Simplicity is always a goal in design as it saves resources during development and maintenance. But it&#8217;s not always clear which design is simpler. Sometimes a seemingly complex design turns out to be simpler to develop, maintain and extend.</p>
<p>In a master-slave architecture, assume S1 is the master. It produces one or more tasks form a given job and transfers them to S2 (the slave); S2 does the tasks and return the results back to S1. S2, the slave, depends on S1, the master.</p>
<p style="text-align:center;"><img class="aligncenter size-full wp-image-238" title="Mutual dependent couple" src="http://abstractform.files.wordpress.com/2010/03/mutual_dependent_couple.png?w=720" alt=""   /></p>
<p>If the next time that S1 assigns a task to S2 it uses the information that exists in the result of a previous task that had been assigned to S2 then S1 also depends on S2 and we have a mutually dependent couple.</p>
<p>In our terminology the systems are mutually dependent if and only if S1 uses the information it gained as a result of a previous task that it had already assigned to S2. It doesn’t matter if S2 has completed the previous task or not, but it should have reported something to S1 that is useful for S1 for a next assignment of a task to S2.</p>
<p>If S1 is only using the fact that S2 is busy or free then we don&#8217;t call it a mutual dependency. S1 must use the information that is generated by processing a task at S2. For example a MapReduce system is not a mutually dependent system.</p>
<p>Why is it important? You should have already guessed that S2 is the name of a class of slave systems that work with S1. There could be many instances of S2. Let&#8217;s define a homogenous mutually dependent system as a system that in which all slaves of S1 are in the same class.</p>
<p>Two slaves are of the same class if they share a common interface for communicating with S1.</p>
<p>Now assume that S3 is also a slave for S1. S3 is in a different class other than S2 if either its input or its output interface is different from S2&#8242;s.</p>
<p>When designing mutual dependent systems we have to always decide whether to keep the mutual dependencies or to break them by introducing new nodes. It&#8217;s mainly a decision over complexity. The other factor that may affect your decision is the swiftness of the system. Introducing a new node will usually reduce the responsiveness.</p>
<div id="attachment_239" class="wp-caption aligncenter" style="width: 302px"><img class="size-full wp-image-239 " title="breaking mutual dependency" src="http://abstractform.files.wordpress.com/2010/03/breaking_mutual_dependency.png?w=720" alt=""   /><p class="wp-caption-text">Breaking the mutual dependency by using S4 node. Note that S3 is another class and uses a different interface to communicate with S4.</p></div>
<p>For instance a new node must not be added if S1 waits for S2 to return. Generally you should try to keep the number of nodes as small as possible if the operations are not asynchronous.</p>
<p>Homogenous mutual dependency is OK (when the systems are simple and synchronous) but things get much dirtier as we introduce new classes to the system. On the other hand if extensibility is a goal you should try to avoid mutual dependencies.</p>
<p>For a conclusion, use mutual dependent systems in live systems, when a rapid response is required, and try to avoid them by introducing middle nodes if you have many classes of slaves or if extensibility is a goal.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/abstractform.wordpress.com/237/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/abstractform.wordpress.com/237/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/abstractform.wordpress.com/237/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/abstractform.wordpress.com/237/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/abstractform.wordpress.com/237/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/abstractform.wordpress.com/237/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/abstractform.wordpress.com/237/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/abstractform.wordpress.com/237/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/abstractform.wordpress.com/237/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/abstractform.wordpress.com/237/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/abstractform.wordpress.com/237/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/abstractform.wordpress.com/237/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/abstractform.wordpress.com/237/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/abstractform.wordpress.com/237/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=abstractform.wordpress.com&amp;blog=5674805&amp;post=237&amp;subd=abstractform&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://abstractform.wordpress.com/2010/03/11/mutual-dependent-systems/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Homam Hosseini</media:title>
		</media:content>

		<media:content url="http://abstractform.files.wordpress.com/2010/03/mutual_dependent_couple.png" medium="image">
			<media:title type="html">Mutual dependent couple</media:title>
		</media:content>

		<media:content url="http://abstractform.files.wordpress.com/2010/03/breaking_mutual_dependency.png" medium="image">
			<media:title type="html">breaking mutual dependency</media:title>
		</media:content>
	</item>
		<item>
		<title>Canvas Intellisense in Visual Studio</title>
		<link>http://abstractform.wordpress.com/2010/02/18/canvas-intellisense-auto-completion-in-visual-studio/</link>
		<comments>http://abstractform.wordpress.com/2010/02/18/canvas-intellisense-auto-completion-in-visual-studio/#comments</comments>
		<pubDate>Thu, 18 Feb 2010 12:09:41 +0000</pubDate>
		<dc:creator>Homam Hosseini</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[VS]]></category>

		<guid isPermaLink="false">http://abstractform.wordpress.com/?p=229</guid>
		<description><![CDATA[I was playing with HTML5 Canvas element to see how it could be useful in future web based game developments. I like that it is easier than GDI. I haven&#8217;t yet done much performance testing but it is definitely faster than making games by animating DOM elements. Recently I had some free time so I [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=abstractform.wordpress.com&amp;blog=5674805&amp;post=229&amp;subd=abstractform&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I was playing with HTML5 Canvas element to see how it could be useful in future web based game developments. I like that it is easier than GDI. I haven&#8217;t yet done much performance testing but it is definitely faster than making games by animating DOM elements.</p>
<p>Recently I had some free time so I decided to create vsdoc documention for Canvas element interface for Visual Studio. I added intellisense (auto competition) and some helps and tips.</p>
<p><a href="http://canvasvsdoc.codeplex.com/">Download canvas-vsdoc.js and canvas-utils.js from CodePlex</a>.</p>
<p><img class="alignnone" title="JavaScript intellisense for Canvas element" src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=canvasvsdoc&amp;DownloadId=106640" alt="" width="531" height="241" /></p>
<p>It is tuned to work with VS2010, but we can make it work with VS2008 too.</p>
<p>canvas-vsdoc.js contains the intellisense documentation.</p>
<p>canvas-utils.js has a few utility functions (like detecting if the browser supports Canvas) and some enumeration types for things like Line Joins, Repeations, Text Aligns, etc.</p>
<p>To use the intellisense you need to reference canvas-vsdoc.js in the beginning of your JavaScript file, like this:</p>
<p><span style="font-family:Consolas, Monaco, 'Courier New', Courier, monospace;line-height:18px;font-size:12px;white-space:pre;">/// &lt;reference path=&#8221;canvas-vsdoc.js&#8221; /&gt;</span></p>
<p>Note you can just drop the .js file and Visual Studio will write the reference.</p>
<p>Then use a utility method to get a reference to canvas element:</p>
<pre>var canvas = Canvas.vsGet(document.getElementById("canvas1"));</pre>
<p>Canvas.vsGet(element) receives a HTML element and returns the given element itself if it is in runtime. But in design time it returns Canvas.vsDoc.VSDocCanvasElement object that contains the documentations.</p>
<p>Then you can use the canvas element as usual:</p>
<pre>var ctx = canvas.getContext("2d");
ctx.arc(50, 50, 25, 0, Math.PI, true);
…</pre>
<p>Please note canvas-vsdoc.js must not be included  in runtime but canvas-utils.js should be included (if you want to use Canvas.vsGet() and other utilities).</p>
<p>In VS2008 you should trick the environment by assigning the variable that refers the 2D context to Canvas.vsDoc.Canvas2dContext, by something like this:</p>
<pre>var ctx = canvas.getContext("2d");
if (typeof DESIGN_TIME != "undefined" &amp;&amp; DESIGN_TIME)
ctx = Canvas.vsDoc.Canvas2dContext;</pre>
<p>DESIGN_TIME global variable is defined inside canvas-vsdoc.js. In runtime it should be undefined or false.</p>
<p>Just a note: if you still want to work in IE, you will find this Google extension very interesting: <a href="http://code.google.com/chrome/chromeframe/">http://code.google.com/chrome/chromeframe/</a></p>
<p>Update: <a href="http://msdn.microsoft.com/en-us/vstudio/hh127353">Visual Studio 11</a> natively supports canvas intellisense.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/abstractform.wordpress.com/229/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/abstractform.wordpress.com/229/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/abstractform.wordpress.com/229/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/abstractform.wordpress.com/229/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/abstractform.wordpress.com/229/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/abstractform.wordpress.com/229/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/abstractform.wordpress.com/229/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/abstractform.wordpress.com/229/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/abstractform.wordpress.com/229/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/abstractform.wordpress.com/229/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/abstractform.wordpress.com/229/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/abstractform.wordpress.com/229/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/abstractform.wordpress.com/229/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/abstractform.wordpress.com/229/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=abstractform.wordpress.com&amp;blog=5674805&amp;post=229&amp;subd=abstractform&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://abstractform.wordpress.com/2010/02/18/canvas-intellisense-auto-completion-in-visual-studio/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Homam Hosseini</media:title>
		</media:content>

		<media:content url="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=canvasvsdoc&#38;DownloadId=106640" medium="image">
			<media:title type="html">JavaScript intellisense for Canvas element</media:title>
		</media:content>
	</item>
		<item>
		<title>iframe Cookies in Safari</title>
		<link>http://abstractform.wordpress.com/2010/02/10/iframe-cookies-in-safari/</link>
		<comments>http://abstractform.wordpress.com/2010/02/10/iframe-cookies-in-safari/#comments</comments>
		<pubDate>Wed, 10 Feb 2010 07:05:52 +0000</pubDate>
		<dc:creator>Homam Hosseini</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[hyzonia]]></category>
		<category><![CDATA[privacy]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[xss]]></category>

		<guid isPermaLink="false">http://abstractform.wordpress.com/?p=225</guid>
		<description><![CDATA[Older Hyzonia games depend on session and authentication cookies. This dependency has been fixed in the newer games by storing session ID in JavaScript variables. The cookie independent services explicitly require a session ID to be sent by their clients. In this post I am not going to dig into the details of session management [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=abstractform.wordpress.com&amp;blog=5674805&amp;post=225&amp;subd=abstractform&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Older Hyzonia games depend on session and authentication cookies. This dependency has been fixed in the newer games by storing session ID in JavaScript variables. The cookie independent services explicitly require a session ID to be sent by their clients.</p>
<p>In this post I am not going to dig into the details of session management in Hyzonia platform, I just want to highlight a series of problems in the old schema that led us to redesign the session management behavior.</p>
<p>Hyzonia games can be embedded in publishers websites using a piece of code we call <a href="http://docs.hyzonia.com/HyzoBox/How-To-Use/Default.aspx">Hyzobox</a>. Hyzobox basically renders an iframe in the webpage. The internet domain where the actual game is hosted could be different from the publisher&#8217;s domain. If you have ever tried this before you know that we gonna have a lot of cross site security issues.</p>
<p>To address cross site scripting issues we developed Hyzobox In/Out API. A publisher can control certain things in the game and be notified about the events that are occurring inside the game using In/Out. It is a JavaScript based solution and strangely is widely supported in all major browsers. The In/Out API is not made public yet, but we are using it extensively in <a href="http://www.hyzogames.com">www.hyzogames.com</a>. For instance whenever you win in a game Hyzogames.com will be notified about this event (winning) and may show you a message box.</p>
<p>But cookies are another issue. Different browsers have way different behaviors when it comes to handling cookies in iframes.  For starters for it  to works in IE you need a <a href="http://www.alphaworks.ibm.com/tech/p3peditor">P3P</a> header like this:</p>
<p>CP=&#8221;IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT&#8221;</p>
<p>There&#8217;s a lot to say here, I have a long standing view that P3P is generally useful but this kind of usage is pointless. Anyway for now just add it in your response and relax.</p>
<p>But still Safari rejects the cookies that iframes try to write. The rationale here is that Safari only wants to write cookies from websites that the user directly visits. It&#8217;s not a bad idea for privacy. Let&#8217;s assume that you are visiting a fan website for The Grudge! thegrudgefans.com is using  Google AdSense  (put any evil multibillion dollar internet ad service instead of Google <img src='http://s0.wp.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> ) to display you some ads or even just in the background. The AdSense is running inside an iframe and it writes a cookie on your computer indicating you&#8217;re a fan of nonsense horror teen movies. Now it is written on your face that you&#8217;re a fan of The Grudge. AdSense can use this cookie anywhere else in the internet. OK you got the idea.</p>
<p>The problem was this privacy feature in Safari was causing our Hyzobox <a href="http://docs.hyzonia.com/HyzoBox/User-Integration-Documentation/Default.aspx">User Integration</a> (a kind of Single Sign On service) to break. Safari users can always turn on a checkbox in the preferences to accept all cookies. But it&#8217;s not the case by default. The workaround is that the page that writes the cookies must be initiated as a result of a direct user request. Literally meaning that prior to writing any cookie you have to provide a hyperlink (an explicit anchor tag) in your iframe that takes the user to the page that writes the cookie.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/abstractform.wordpress.com/225/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/abstractform.wordpress.com/225/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/abstractform.wordpress.com/225/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/abstractform.wordpress.com/225/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/abstractform.wordpress.com/225/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/abstractform.wordpress.com/225/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/abstractform.wordpress.com/225/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/abstractform.wordpress.com/225/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/abstractform.wordpress.com/225/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/abstractform.wordpress.com/225/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/abstractform.wordpress.com/225/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/abstractform.wordpress.com/225/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/abstractform.wordpress.com/225/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/abstractform.wordpress.com/225/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=abstractform.wordpress.com&amp;blog=5674805&amp;post=225&amp;subd=abstractform&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://abstractform.wordpress.com/2010/02/10/iframe-cookies-in-safari/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Homam Hosseini</media:title>
		</media:content>
	</item>
		<item>
		<title>Overbranding</title>
		<link>http://abstractform.wordpress.com/2010/01/27/overbranding/</link>
		<comments>http://abstractform.wordpress.com/2010/01/27/overbranding/#comments</comments>
		<pubDate>Wed, 27 Jan 2010 16:08:01 +0000</pubDate>
		<dc:creator>Homam Hosseini</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[ux]]></category>

		<guid isPermaLink="false">http://abstractform.wordpress.com/?p=220</guid>
		<description><![CDATA[It&#8217;s a classic question I ask every UX/UI designer who I interview. What&#8217;s wrong in this picture? Tip: The same problem exists here in our own product: Conclusion: Who cares.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=abstractform.wordpress.com&amp;blog=5674805&amp;post=220&amp;subd=abstractform&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s a classic question I ask every UX/UI designer who I interview. What&#8217;s wrong in this picture?</p>
<p style="text-align:center;"><img class="aligncenter" title="XP" src="http://abstractform.files.wordpress.com/2010/01/xp1.png?w=413&#038;h=72" alt="" width="413" height="72" /></p>
<p>Tip: The same problem exists here in our own product:</p>
<p><a href="http://abstractform.files.wordpress.com/2010/01/overbranding.png"><img class="aligncenter size-full wp-image-219" title="overbranding" src="http://abstractform.files.wordpress.com/2010/01/overbranding.png?w=720" alt=""   /></a></p>
<p><a href="http://abstractform.files.wordpress.com/2010/01/xp1.png"></a>Conclusion: Who cares.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/abstractform.wordpress.com/220/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/abstractform.wordpress.com/220/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/abstractform.wordpress.com/220/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/abstractform.wordpress.com/220/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/abstractform.wordpress.com/220/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/abstractform.wordpress.com/220/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/abstractform.wordpress.com/220/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/abstractform.wordpress.com/220/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/abstractform.wordpress.com/220/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/abstractform.wordpress.com/220/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/abstractform.wordpress.com/220/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/abstractform.wordpress.com/220/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/abstractform.wordpress.com/220/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/abstractform.wordpress.com/220/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=abstractform.wordpress.com&amp;blog=5674805&amp;post=220&amp;subd=abstractform&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://abstractform.wordpress.com/2010/01/27/overbranding/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Homam Hosseini</media:title>
		</media:content>

		<media:content url="http://abstractform.files.wordpress.com/2010/01/xp1.png" medium="image">
			<media:title type="html">XP</media:title>
		</media:content>

		<media:content url="http://abstractform.files.wordpress.com/2010/01/overbranding.png" medium="image">
			<media:title type="html">overbranding</media:title>
		</media:content>
	</item>
		<item>
		<title>Higher spatial dimensions</title>
		<link>http://abstractform.wordpress.com/2009/12/15/higher-spatial-dimensions/</link>
		<comments>http://abstractform.wordpress.com/2009/12/15/higher-spatial-dimensions/#comments</comments>
		<pubDate>Tue, 15 Dec 2009 15:14:18 +0000</pubDate>
		<dc:creator>Homam Hosseini</dc:creator>
				<category><![CDATA[astronomy]]></category>
		<category><![CDATA[flatland]]></category>
		<category><![CDATA[model]]></category>
		<category><![CDATA[universe]]></category>

		<guid isPermaLink="false">http://abstractform.wordpress.com/?p=182</guid>
		<description><![CDATA[A few days ago I had an interesting discussions about the existence of other dimensions. In my experience most people who have heard about Big Bang, relativity or even inflationary theory are unfamiliar with have a vague understating of this concept. Although higher spatial dimensions are extremely easy to understand and even have applications in [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=abstractform.wordpress.com&amp;blog=5674805&amp;post=182&amp;subd=abstractform&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>A few days ago I had an interesting discussions about the existence of other dimensions. In my experience most people who have heard about Big Bang, relativity or even inflationary theory are unfamiliar with have a vague understating of this concept. Although higher spatial dimensions are extremely easy to understand and even have applications in everyday circumstances.</p>
<p>Most of us are familiar with the idea of flatlanders (thanks to <a href="http://www.youtube.com/watch?v=UnURElCzGc0">Carl Sagan</a>), 2-dimensional flat creatures that live on a plane, or a surface. A flatlander can never see a 3rd dimension but he can deal with it mathematically. A flatlander can certainly understand points, lines, circles and all other 2D geometrical objects. A flatlander needs 2 piece of information to identify any point in his universe: X and Y. He should have no problem in imagining line-lander creatures who need one piece of information to identify the positions in their universe: X. He can think that his flatland is made of infinite number of line-lands. To make a flatland you have to take a line-land and drag it in a direction orthogonal to it.</p>
<p>Flatlander knows that any position in line-land can be described by:</p>
<p><img src='http://s0.wp.com/latex.php?latex=Position_%7BLine%7D+%3D+%28X%29&amp;bg=fff&amp;fg=222&amp;s=0' alt='Position_{Line} = (X)' title='Position_{Line} = (X)' class='latex' /></p>
<p>And any position in flatland can be described by:</p>
<p><img src='http://s0.wp.com/latex.php?latex=Position_%7BFlat%7D+%3D++%28X+%2C+Y%29&amp;bg=fff&amp;fg=222&amp;s=0' alt='Position_{Flat} =  (X , Y)' title='Position_{Flat} =  (X , Y)' class='latex' /></p>
<p>Or</p>
<p><img src='http://s0.wp.com/latex.php?latex=Position_%7BFlat%7D+%3D+Position_%7BLine%7D+%2C+Y&amp;bg=fff&amp;fg=222&amp;s=0' alt='Position_{Flat} = Position_{Line} , Y' title='Position_{Flat} = Position_{Line} , Y' class='latex' /></p>
<p>Y is a dimension that is unknown to line-landers and is the direction that we dragged the line-land to create a flatland.</p>
<p>We as 3-dimensional creatures can think that our 3D world is made of a flatland, dragged in a direction orthogonal to it. Any position in our world can be described by:</p>
<p><img src='http://s0.wp.com/latex.php?latex=Position_%7BVolume%7D+%3D+%28X%2C+Y%2C+Z%29&amp;bg=fff&amp;fg=222&amp;s=0' alt='Position_{Volume} = (X, Y, Z)' title='Position_{Volume} = (X, Y, Z)' class='latex' /></p>
<p>Or</p>
<p><img src='http://s0.wp.com/latex.php?latex=Position_%7BVolume%7D+%3D+Position_%7BFlat%7D%2C+Z&amp;bg=fff&amp;fg=222&amp;s=0' alt='Position_{Volume} = Position_{Flat}, Z' title='Position_{Volume} = Position_{Flat}, Z' class='latex' /></p>
<p>Z is the new direction that is orthogonal to flatland.</p>
<p>You already got the picture, a 4-dimensional creature can drag our volume-land in a direction orthogonal to it to create his 4D world and so on.</p>
<p><img src='http://s0.wp.com/latex.php?latex=Position_%7B4D%7D+%3D+Position_%7BVolume%7D%2C+W&amp;bg=fff&amp;fg=222&amp;s=0' alt='Position_{4D} = Position_{Volume}, W' title='Position_{4D} = Position_{Volume}, W' class='latex' /> (W is the new dimension).</p>
<p>In other words:<br />
A line-lander has no idea of a flatland. The position is only X for him. He describes a 0-land by X.<br />
A flatlander describes a line-land by <img src='http://s0.wp.com/latex.php?latex=Y+%3D+%28X%29&amp;bg=fff&amp;fg=222&amp;s=0' alt='Y = (X)' title='Y = (X)' class='latex' />, a set of <img src='http://s0.wp.com/latex.php?latex=X&amp;bg=fff&amp;fg=222&amp;s=0' alt='X' title='X' class='latex' />s.<br />
A volume-lander describes a flatland by <img src='http://s0.wp.com/latex.php?latex=Z+%3D+%28X%2C+Y%29&amp;bg=fff&amp;fg=222&amp;s=0' alt='Z = (X, Y)' title='Z = (X, Y)' class='latex' />, a set of <img src='http://s0.wp.com/latex.php?latex=%28X%2C+Y%29&amp;bg=fff&amp;fg=222&amp;s=0' alt='(X, Y)' title='(X, Y)' class='latex' />s<br />
A 4D-lander describes a volume-land by <img src='http://s0.wp.com/latex.php?latex=W+%3D+%28X%2C+Y%2C+Z%29&amp;bg=fff&amp;fg=222&amp;s=0' alt='W = (X, Y, Z)' title='W = (X, Y, Z)' class='latex' />, a set of <img src='http://s0.wp.com/latex.php?latex=%28X%2C+Y%2C+Z%29&amp;bg=fff&amp;fg=222&amp;s=0' alt='(X, Y, Z)' title='(X, Y, Z)' class='latex' />s.</p>
<p>From elementary mathematics you must remember that a set of objects could be described by a function. For example if <img src='http://s0.wp.com/latex.php?latex=F&amp;bg=fff&amp;fg=222&amp;s=0' alt='F' title='F' class='latex' /> is a function defined on real numbers and for each real number that it receives it returns another real number then:<br />
<img src='http://s0.wp.com/latex.php?latex=y+%3D+F%28x%29&amp;bg=fff&amp;fg=222&amp;s=0' alt='y = F(x)' title='y = F(x)' class='latex' /><br />
Is the description of a line-land from a flatlander&#8217;s point of view.<br />
Other kinds of line-lands include:<br />
<img src='http://s0.wp.com/latex.php?latex=y+%3D+x&amp;bg=fff&amp;fg=222&amp;s=0' alt='y = x' title='y = x' class='latex' /><br />
<img src='http://s0.wp.com/latex.php?latex=y+%3D+4+x+%2B+5.12&amp;bg=fff&amp;fg=222&amp;s=0' alt='y = 4 x + 5.12' title='y = 4 x + 5.12' class='latex' /><br />
<img src='http://s0.wp.com/latex.php?latex=y+%3D+x%5E2&amp;bg=fff&amp;fg=222&amp;s=0' alt='y = x^2' title='y = x^2' class='latex' /><br />
<img src='http://s0.wp.com/latex.php?latex=y+%3D+%5Csin%28x%29&amp;bg=fff&amp;fg=222&amp;s=0' alt='y = &#92;sin(x)' title='y = &#92;sin(x)' class='latex' /><br />
<img src='http://s0.wp.com/latex.php?latex=y+%3D+2%28%5Csin%28x%29+%2B+%5Ccos%28x%29%29&amp;bg=fff&amp;fg=222&amp;s=0' alt='y = 2(&#92;sin(x) + &#92;cos(x))' title='y = 2(&#92;sin(x) + &#92;cos(x))' class='latex' /><br />
And so on.</p>
<p>The line-lander only knows about X. If somebody tells him that his line-land is a part of a flat-land he doesn’t immediately find out what F function describes his line-land the flatland. But F is easily known to the flatlanders who are studying the line-land. Generally F describes the shape of the universe in a higher spatial dimension.</p>
<p>Let&#8217;s talk about an interesting example. Assume that the line-land world as it is seen by our flatlanders is a circle. It means that <img src='http://s0.wp.com/latex.php?latex=F+%3D+%5Cpm+%5Csqrt%7Br%5E2-x%5E2-y%5E2%7D+&amp;bg=fff&amp;fg=222&amp;s=0' alt='F = &#92;pm &#92;sqrt{r^2-x^2-y^2} ' title='F = &#92;pm &#92;sqrt{r^2-x^2-y^2} ' class='latex' />. The poor line-lander has no idea about the 2-dimensional shape of his world but he can find it out.</p>
<p>The line-lander finds out that his world is indeed bounded if he starts walking toward a direction and reaches the starting point.</p>
<p>A sphere is a 3-dimensional circle, F for a sphere is:<br />
<img src='http://s0.wp.com/latex.php?latex=F+%3D+%5Cpm+%5Csqrt%7Br%5E2-x%5E2-y%5E2-z%5E2%7D+&amp;bg=fff&amp;fg=222&amp;s=0' alt='F = &#92;pm &#92;sqrt{r^2-x^2-y^2-z^2} ' title='F = &#92;pm &#92;sqrt{r^2-x^2-y^2-z^2} ' class='latex' /></p>
<p>Let&#8217;s rewrite these two equations in a more usual form:</p>
<p>1D Circle: <img src='http://s0.wp.com/latex.php?latex=x%5E2%2By%5E2+-+a%5E2+%3D+0&amp;bg=fff&amp;fg=222&amp;s=0' alt='x^2+y^2 - a^2 = 0' title='x^2+y^2 - a^2 = 0' class='latex' /><br />
2D Sphere: <img src='http://s0.wp.com/latex.php?latex=x%5E2+%2B+y%5E2+%2B+z%5E2+-+a%5E2+%3D+0&amp;bg=fff&amp;fg=222&amp;s=0' alt='x^2 + y^2 + z^2 - a^2 = 0' title='x^2 + y^2 + z^2 - a^2 = 0' class='latex' /></p>
<p>Look at the pattern:</p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td width="64" valign="top">0D</td>
<td width="112" valign="top">A   Pair of Points</td>
<td width="238" valign="top"><img src='http://s0.wp.com/latex.php?latex=x%5E2+++-+a%5E2+%3D+0&amp;bg=fff&amp;fg=222&amp;s=0' alt='x^2   - a^2 = 0' title='x^2   - a^2 = 0' class='latex' /></td>
<td width="288" valign="top"><img src='http://s0.wp.com/latex.php?latex=%5Comega_1+%3A%3D+%5Cleft+%28x%5E2+-+a%5E2+%5Cright+%29&amp;bg=fff&amp;fg=222&amp;s=0' alt='&#92;omega_1 := &#92;left (x^2 - a^2 &#92;right )' title='&#92;omega_1 := &#92;left (x^2 - a^2 &#92;right )' class='latex' /></td>
</tr>
<tr>
<td width="64" valign="top">1D</td>
<td width="112" valign="top">Circle</td>
<td width="238" valign="top"><img src='http://s0.wp.com/latex.php?latex=%28x%5E2+-+a%5E2%29+%2B+y%5E2+%3D+0&amp;bg=fff&amp;fg=222&amp;s=0' alt='(x^2 - a^2) + y^2 = 0' title='(x^2 - a^2) + y^2 = 0' class='latex' /></td>
<td width="288" valign="top"><img src='http://s0.wp.com/latex.php?latex=%5Comega_1+%2B+y%5E2+%3D+0%2C+%5C%3A+%5C%3A+%5Comega_2+%3A%3D++%5Cleft+%5B+%5Comega_1+%2B+y%5E2+%5Cright+%5D&amp;bg=fff&amp;fg=222&amp;s=0' alt='&#92;omega_1 + y^2 = 0, &#92;: &#92;: &#92;omega_2 :=  &#92;left [ &#92;omega_1 + y^2 &#92;right ]' title='&#92;omega_1 + y^2 = 0, &#92;: &#92;: &#92;omega_2 :=  &#92;left [ &#92;omega_1 + y^2 &#92;right ]' class='latex' /></td>
</tr>
<tr>
<td width="64" valign="top">2D</td>
<td width="112" valign="top">Sphere</td>
<td width="238" valign="top"><img src='http://s0.wp.com/latex.php?latex=%5Cleft+%5B%28x%5E2+-+a%5E2%29+%2B+y%5E2+%5Cright+%5D+%2B+z%5E2%3D+0&amp;bg=fff&amp;fg=222&amp;s=0' alt='&#92;left [(x^2 - a^2) + y^2 &#92;right ] + z^2= 0' title='&#92;left [(x^2 - a^2) + y^2 &#92;right ] + z^2= 0' class='latex' /></td>
<td width="288" valign="top"><img src='http://s0.wp.com/latex.php?latex=%5Comega_2+%2B+z%5E2+%3D+0%2C+%5C%3A+%5C%3A+%5Comega_3+%3A%3D+%5Cleft+%5C%7B+%5Cleft+%5B+%5Cleft+%28+x%5E2-a%5E2+%5Cright+%29+%2B+y%5E2+%5Cright+%5D+%2B+z%5E2+%5Cright+%5C%7D&amp;bg=fff&amp;fg=222&amp;s=0' alt='&#92;omega_2 + z^2 = 0, &#92;: &#92;: &#92;omega_3 := &#92;left &#92;{ &#92;left [ &#92;left ( x^2-a^2 &#92;right ) + y^2 &#92;right ] + z^2 &#92;right &#92;}' title='&#92;omega_2 + z^2 = 0, &#92;: &#92;: &#92;omega_3 := &#92;left &#92;{ &#92;left [ &#92;left ( x^2-a^2 &#92;right ) + y^2 &#92;right ] + z^2 &#92;right &#92;}' class='latex' /></td>
</tr>
<tr>
<td width="64" valign="top">3D</td>
<td width="112" valign="top">3-Sphere</td>
<td width="238" valign="top"><img src='http://s0.wp.com/latex.php?latex=%5Cleft+%5C%7B+%5Cleft+%5B%28x%5E2+-+a%5E2%29+%2B+y%5E2+%5Cright+%5D+%2B+z%5E2+%5Cright+%5C%7D+%2B+w%5E2+%3D+0&amp;bg=fff&amp;fg=222&amp;s=0' alt='&#92;left &#92;{ &#92;left [(x^2 - a^2) + y^2 &#92;right ] + z^2 &#92;right &#92;} + w^2 = 0' title='&#92;left &#92;{ &#92;left [(x^2 - a^2) + y^2 &#92;right ] + z^2 &#92;right &#92;} + w^2 = 0' class='latex' /></td>
<td width="288" valign="top"><img src='http://s0.wp.com/latex.php?latex=%5Comega_3+%2B+w%5E2+%3D+0&amp;bg=fff&amp;fg=222&amp;s=0' alt='&#92;omega_3 + w^2 = 0' title='&#92;omega_3 + w^2 = 0' class='latex' /></td>
</tr>
<tr>
<td width="64" valign="top">ND</td>
<td width="112" valign="top">N-Sphere</td>
<td width="238" valign="top"><img src='http://s0.wp.com/latex.php?latex=%5Csum+%7BX_%7Bn%5E2%7D%7D+-+a%5E2%2C+%5C%3A+%5C%3A+n+%3D+0+%5C%3A+to+%5C%3A+N&amp;bg=fff&amp;fg=222&amp;s=0' alt='&#92;sum {X_{n^2}} - a^2, &#92;: &#92;: n = 0 &#92;: to &#92;: N' title='&#92;sum {X_{n^2}} - a^2, &#92;: &#92;: n = 0 &#92;: to &#92;: N' class='latex' /></td>
<td width="288" valign="top"><img src='http://s0.wp.com/latex.php?latex=%5Comega_%7BN-1%7D+%2B+X_N%5E2+%3D+0&amp;bg=fff&amp;fg=222&amp;s=0' alt='&#92;omega_{N-1} + X_N^2 = 0' title='&#92;omega_{N-1} + X_N^2 = 0' class='latex' /></td>
</tr>
</tbody>
</table>
<p>The surface of a sphere could be described by many circles. The smallest circle at the north pole is a point, the radius of the circles grows as we reach the equator and then again shrinks back to 0 at south pole. This is best described in this form of spherical coordinates:</p>
<p><img src='http://s0.wp.com/latex.php?latex=x_1+%3Da%5Ccos%28%5Cphi_1%29&amp;bg=fff&amp;fg=222&amp;s=0' alt='x_1 =a&#92;cos(&#92;phi_1)' title='x_1 =a&#92;cos(&#92;phi_1)' class='latex' /> is a circle. A sphere is a collection of circles stacked on each other. The circles at north and south pole have 0 radius and the radius of the circle at equator is maximum (a). We can think that the radius of these circles change by: <img src='http://s0.wp.com/latex.php?latex=r+%3D+a%5Ccos%28%5Cphi_2%29&amp;bg=fff&amp;fg=222&amp;s=0' alt='r = a&#92;cos(&#92;phi_2)' title='r = a&#92;cos(&#92;phi_2)' class='latex' />. This <img src='http://s0.wp.com/latex.php?latex=%5Cphi_2&amp;bg=fff&amp;fg=222&amp;s=0' alt='&#92;phi_2' title='&#92;phi_2' class='latex' /> is orthogonal to <img src='http://s0.wp.com/latex.php?latex=%5Cphi_1&amp;bg=fff&amp;fg=222&amp;s=0' alt='&#92;phi_1' title='&#92;phi_1' class='latex' /> (and is in the new dimension).</p>
<p>So <img src='http://s0.wp.com/latex.php?latex=x_2+%3Da%5Ccos%28%5Cphi_2%29%5Csin%28%5Cphi_1%29&amp;bg=fff&amp;fg=222&amp;s=0' alt='x_2 =a&#92;cos(&#92;phi_2)&#92;sin(&#92;phi_1)' title='x_2 =a&#92;cos(&#92;phi_2)&#92;sin(&#92;phi_1)' class='latex' /> describes a sphere.</p>
<p>In the same sense you can think that a circle is made of many pairs of points. At the top of the circle the distance between the pairs is 0, it reaches a maximum in equator and again 0 in the bottom.</p>
<p>Now we can extend this model to higher dimension spheres. Take a 3D sphere with radius 0, increase the radius to a maximum and then shrink it back to 0; you have a 3-sphere.</p>
<p><img src='http://s0.wp.com/latex.php?latex=x_3+%3D+a%5Ccos%28%5Cphi_3%29sin%28%5Cphi_2%29%5Csin%28%5Cphi_1%29&amp;bg=fff&amp;fg=222&amp;s=0' alt='x_3 = a&#92;cos(&#92;phi_3)sin(&#92;phi_2)&#92;sin(&#92;phi_1)' title='x_3 = a&#92;cos(&#92;phi_3)sin(&#92;phi_2)&#92;sin(&#92;phi_1)' class='latex' /> is a 3-sphere (a 4 dimensional sphere)</p>
<p>This way you can make other higher dimensional shapes. Note that here we only talked about spatial dimensions.<br />
For example a stack of lines in Y-direction makes a square, a stack of flat squares in Z direction makes a cube and a stack of cubes in W direction makes a tesseract.</p>
<p>Take a look at the projection of a tesseract (4D cube) in 3D space <a href="http://www.youtube.com/watch?v=5xN4DxdiFrs">here</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/abstractform.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/abstractform.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/abstractform.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/abstractform.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/abstractform.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/abstractform.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/abstractform.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/abstractform.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/abstractform.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/abstractform.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/abstractform.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/abstractform.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/abstractform.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/abstractform.wordpress.com/182/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=abstractform.wordpress.com&amp;blog=5674805&amp;post=182&amp;subd=abstractform&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://abstractform.wordpress.com/2009/12/15/higher-spatial-dimensions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Homam Hosseini</media:title>
		</media:content>
	</item>
		<item>
		<title>Hollywood Principle</title>
		<link>http://abstractform.wordpress.com/2009/12/07/hollywood-principle/</link>
		<comments>http://abstractform.wordpress.com/2009/12/07/hollywood-principle/#comments</comments>
		<pubDate>Mon, 07 Dec 2009 22:57:53 +0000</pubDate>
		<dc:creator>Homam Hosseini</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[hyzonia]]></category>
		<category><![CDATA[IoC]]></category>

		<guid isPermaLink="false">http://abstractform.wordpress.com/?p=175</guid>
		<description><![CDATA[Today I was working on refactoring some names in Hyzobox In/Out API. It is my personal favorite piece of code in the whole platform. In summary it allows the publisher of the game to customize the game in runtime dynamically by injecting codes and executing some functions in the context of the game (In) and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=abstractform.wordpress.com&amp;blog=5674805&amp;post=175&amp;subd=abstractform&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Today I was working on refactoring some names in Hyzobox In/Out API. It is my personal favorite piece of code in the whole <a href="http://www.hyzonia.com">platform</a>. In summary it allows the publisher of the game to customize the game in runtime dynamically by injecting codes and executing some functions in the context of the game (In) and to get notified about the events that are occurring inside the game (Out).</p>
<p>Inversion of Control is very natural in JavaScript and it has been used extensively in In/Out API. It&#8217;s quite different from popular prototype pattern but most everyday JavaScript programmers use IoC even though they don&#8217;t usually notice it.</p>
<p>Here is a sample in our API:</p>
<p>We register an event listener in Hyzobox, waiting for landing view of the game to be loaded:</p>
<pre>
var hb = Hyzobox.createInstance();
var landingview_loaded = function(hbEvent) {
   // do something with hbEvent
}
hb.addEventListener('landingview_loaded', landingview_loaded);
</pre>
<p>It&#8217;s is clear that we don&#8217;t have control over when landingview_loaded event will be fired and its handler will be called.</p>
<p>hbEvent argument that is of type Hyzobox.Event has a data attribute that is of type Object. In this example the data is a LandingView instance. We can interact with this object in the event handler:</p>
<pre>
var landingview_loaded = function(hbEvent) {
   var view = hbEvent.data;
   view.inject('a-container-id', 'some text');
};
</pre>
<p>In this example we are injecting &#8216;some text&#8217; to an element identified by &#8216;a-container-id&#8217; inside landing view.</p>
<p>addEventListener() is part of Out and inject() is part of In API. If we want to listen to the events that are occurring inside a particular view, we should register their halnders after the view has been loaded:</p>
<pre>
var landingview_loaded = function(hbEvent) {
   var view = hbEvent.data;
   view.attachEventListener('playNow', function playNowHandler(playNowHbEvent) {
       // do something with playNowHbEvent
   });
};
</pre>
<p>And so on, we can have many nested Ins and Outs.</p>
<p>It&#8217;s easy to see that in these examples the control has been transferred to the event handlers. The caller raise the events but it&#8217;s the responsibility of the handlers to control the functionalities.</p>
<p>I don&#8217;t want to go into the the details now, because the work hasn&#8217;t yet been finished on these APIs. Once released, we will post them in <a href="http://docs.hyzonia.com">Hyzobox documentations</a> and <a href="http://tech.hyzonia.com">Hyzonia tech blog</a> in the following weeks.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/abstractform.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/abstractform.wordpress.com/175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/abstractform.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/abstractform.wordpress.com/175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/abstractform.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/abstractform.wordpress.com/175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/abstractform.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/abstractform.wordpress.com/175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/abstractform.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/abstractform.wordpress.com/175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/abstractform.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/abstractform.wordpress.com/175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/abstractform.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/abstractform.wordpress.com/175/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=abstractform.wordpress.com&amp;blog=5674805&amp;post=175&amp;subd=abstractform&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://abstractform.wordpress.com/2009/12/07/hollywood-principle/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Homam Hosseini</media:title>
		</media:content>
	</item>
		<item>
		<title>Microfinancing, Lending vs donating</title>
		<link>http://abstractform.wordpress.com/2009/11/29/lending-vs-donating/</link>
		<comments>http://abstractform.wordpress.com/2009/11/29/lending-vs-donating/#comments</comments>
		<pubDate>Sun, 29 Nov 2009 19:49:29 +0000</pubDate>
		<dc:creator>Homam Hosseini</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Me]]></category>
		<category><![CDATA[Politics]]></category>
		<category><![CDATA[atheism]]></category>
		<category><![CDATA[microfinancing]]></category>

		<guid isPermaLink="false">http://abstractform.wordpress.com/?p=166</guid>
		<description><![CDATA[I want to talk about what the brilliant idea microfinancing is. I grew up in an Islamic family &#8211; however in my childhood they were not as conservative as they are now. It&#8217;s a tradition in Iran and I think it is also an Islamic rule to donate some portion of your surplus to poor [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=abstractform.wordpress.com&amp;blog=5674805&amp;post=166&amp;subd=abstractform&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I want to talk about what the brilliant idea microfinancing is.</p>
<p>I grew up in an Islamic family &#8211; however in my childhood they were not as conservative as they are now. It&#8217;s a tradition in Iran and I think it is also an Islamic rule to donate some portion of your surplus to poor people; usually the people you know from your work, or in the neighborhood. Currently in Iran there is a well systematic Islamic donation process, and I think people are obliged to donate one fifth of their yearly surplus to this system. And no matter where you are, we are all used to see charities everywhere and in different occasions (like thanks giving or new year). Just a disclaimer that I&#8217;m by far not an expert in this area, but I&#8217;ve always believed charities are not a solution to poverty, they make it worse, they distribute poverty. They keep poor people poor. If the poor person is jobless, donations don&#8217;t help him in getting hired, and if the poor person is receiving a very low wage, the charity doesn&#8217;t urge the employer to pay more.</p>
<p>During the past months there were times that I was finding myself dangerously inclined toward social ideas and then I was swinging back to &#8216;prosperity&#8217; and capitalism. But this issue that you have to always start form some place bigger than zero to have a life in a capitalistic society had been bothering me. Now I think microfinancing is a reasonable solution for this problem.</p>
<p>Why do you want to donate to somebody and loose some money? Why don&#8217;t you lend him the money so he can start a business and pay you back? I understand that charities might be vital for some regions of the world, but I&#8217;m sure most of the donations that my family is doing in Iran will not be used in those regions.</p>
<p>&#8216;Carlos needs $1,100 to buy some pigs&#8217; he will return the loan in a year, but no bank is lending him, simply because the cost of processing the loan is higher than the profit. But this website: <a href="http://www.kiva.org">www.kiva.org</a> is making it possible for Carlos to raise the money in a matter of a week. Carlos will not be another homeless beggar, he is starting his own business and his future depends on how hard he works and how well he manages the business. He will not need charity and in a few months he should be able to even hire employees and extend his business.</p>
<p>I was impressed that my like-minded people are among the <a href="http://www.kiva.org/app.php?page=community&amp;kv_orderBy=amt_loaned&amp;kv_direction=DESC&amp;kv_page=1">top lenders</a> of Kiva. Yeah! I think superstitious people have a hard time digesting this idea that they, not God, can help people to stand on their own two feet and overcome poverty. And of course the LGBT community that are helping their entrepreneurs to achieve their own equality.<br />
That’s pretty all I wanted to say, I have something beautiful to think about tonight.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/abstractform.wordpress.com/166/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/abstractform.wordpress.com/166/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/abstractform.wordpress.com/166/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/abstractform.wordpress.com/166/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/abstractform.wordpress.com/166/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/abstractform.wordpress.com/166/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/abstractform.wordpress.com/166/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/abstractform.wordpress.com/166/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/abstractform.wordpress.com/166/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/abstractform.wordpress.com/166/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/abstractform.wordpress.com/166/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/abstractform.wordpress.com/166/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/abstractform.wordpress.com/166/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/abstractform.wordpress.com/166/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=abstractform.wordpress.com&amp;blog=5674805&amp;post=166&amp;subd=abstractform&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://abstractform.wordpress.com/2009/11/29/lending-vs-donating/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Homam Hosseini</media:title>
		</media:content>
	</item>
		<item>
		<title>Truth vs. Hollywood</title>
		<link>http://abstractform.wordpress.com/2009/11/15/truth-vs-hollywood/</link>
		<comments>http://abstractform.wordpress.com/2009/11/15/truth-vs-hollywood/#comments</comments>
		<pubDate>Sun, 15 Nov 2009 22:49:51 +0000</pubDate>
		<dc:creator>Homam Hosseini</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://abstractform.wordpress.com/?p=162</guid>
		<description><![CDATA[I was reading this interesting column in NY Times, Mistakes in Typography by Alice Rawsthorn. Honestly it&#8217;s the first time I ever looked at typography from this point of view. I can feel her view about typographical errors, usually I feel similar when I see a scientifically incorrect assertion in a movie for example. Sometimes [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=abstractform.wordpress.com&amp;blog=5674805&amp;post=162&amp;subd=abstractform&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I was reading this interesting column in NY Times, <a href="http://www.nytimes.com/2009/11/16/arts/16iht-design16.html?_r=1&amp;hp">Mistakes in Typography</a> by Alice Rawsthorn. Honestly it&#8217;s the first time I ever looked at typography from this point of view. I can feel her view about typographical errors, usually I feel similar when I see a scientifically incorrect assertion in a movie for example.</p>
<p>Sometimes I think movies are not textbooks, they just should not be too wrong. But changing the truth to make it more cinematic has been OK with me. If we want Hollywood appreciate scientific values, we have to realize its rules too.</p>
<p>For now, I&#8217;m just enjoying reading this article.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/abstractform.wordpress.com/162/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/abstractform.wordpress.com/162/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/abstractform.wordpress.com/162/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/abstractform.wordpress.com/162/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/abstractform.wordpress.com/162/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/abstractform.wordpress.com/162/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/abstractform.wordpress.com/162/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/abstractform.wordpress.com/162/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/abstractform.wordpress.com/162/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/abstractform.wordpress.com/162/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/abstractform.wordpress.com/162/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/abstractform.wordpress.com/162/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/abstractform.wordpress.com/162/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/abstractform.wordpress.com/162/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=abstractform.wordpress.com&amp;blog=5674805&amp;post=162&amp;subd=abstractform&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://abstractform.wordpress.com/2009/11/15/truth-vs-hollywood/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Homam Hosseini</media:title>
		</media:content>
	</item>
	</channel>
</rss>
