<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>ronny.haryan.to</title>
	
	<link>http://ronny.haryan.to</link>
	<description>Print: $9.50 -- Online: free</description>
	<lastBuildDate>Thu, 04 Feb 2010 13:05:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/ronnyharyanto" /><feedburner:info uri="ronnyharyanto" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Melbourne Bus Driver’s Prayer</title>
		<link>http://feedproxy.google.com/~r/ronnyharyanto/~3/m-aSTxZQoQw/</link>
		<comments>http://ronny.haryan.to/archives/2009/09/28/melbourne-bus-drivers-prayer/#comments</comments>
		<pubDate>Mon, 28 Sep 2009 12:00:06 +0000</pubDate>
		<dc:creator>ronny</dc:creator>
				<category><![CDATA[Funny]]></category>
		<category><![CDATA[christianity]]></category>
		<category><![CDATA[humour]]></category>
		<category><![CDATA[melbourne]]></category>

		<guid isPermaLink="false">http://ronny.haryan.to/?p=221</guid>
		<description><![CDATA[God, I hope you don&#8217;t mind my sense of humour. This is my Melbourne version of the Bus Driver&#8217;s Prayer. (The original version is Mat 6:9-13.) Please skip or stop reading now if you&#8217;re easily offended. Our Fawkner, who art in Hampton Hawthorn be thy name. Thy King's Park come; thy Williamstown, In Eltham as [...]]]></description>
			<content:encoded><![CDATA[<p>God, I hope you don&#8217;t mind my sense of humour. This is my Melbourne version of the <a href="http://en.wikipedia.org/wiki/Bus_Driver's_Prayer">Bus Driver&#8217;s Prayer</a>. (<em>The</em> original version is <a href="http://www.biblegateway.com/passage/?search=Matthew%206:9-13&amp;version=KJV">Mat 6:9-13</a>.)</p>

<p>Please skip or stop reading now if you&#8217;re easily offended.</p>

<blockquote><pre>Our Fawkner, who art in Hampton
Hawthorn be thy name.
Thy King's Park come; thy Williamstown,
In Eltham as it is in Hampton.
Give us this day our daily Burwood
And Footscray us our Kensington
As we Footscray those who Toorak against us.
And lead us not into Templestowe
But Donvale us from Yarraville
For thine is the King's Park,
and the Prahran, and the Glen Waverly,
For Malvern and Malvern.
Armadale.</pre>
</blockquote>
<img src="http://feeds.feedburner.com/~r/ronnyharyanto/~4/m-aSTxZQoQw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://ronny.haryan.to/archives/2009/09/28/melbourne-bus-drivers-prayer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://ronny.haryan.to/archives/2009/09/28/melbourne-bus-drivers-prayer/</feedburner:origLink></item>
		<item>
		<title>Build Your Own URL Shortening Service</title>
		<link>http://feedproxy.google.com/~r/ronnyharyanto/~3/DRWzavwKleQ/</link>
		<comments>http://ronny.haryan.to/archives/2009/04/07/build-your-own-url-shortening-service/#comments</comments>
		<pubDate>Tue, 07 Apr 2009 11:11:29 +0000</pubDate>
		<dc:creator>ronny</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://ronny.haryan.to/?p=191</guid>
		<description><![CDATA[Everyone seems to have their own favourite URL shortening service, TinyURL, is.gd, tr.im, pendek.in, and so on. Some even do more than just shorten URLs, e.g. tr.im can track stats. It&#8217;s relatively easy to roll own your own URL shortening service once you know the magic behind it. I&#8217;m going to explain the basic idea [...]]]></description>
			<content:encoded><![CDATA[<p>Everyone seems to have their own favourite URL shortening service, <a href="http://tinyurl.com">TinyURL</a>, <a href="http://is.gd">is.gd</a>, <a href="http://tr.im">tr.im</a>, <a href="http://pendek.in">pendek.in</a>, and so on. Some even do more than just shorten URLs, e.g. tr.im can track stats.</p>

<p>It&#8217;s relatively easy to roll own your own URL shortening service once you know the magic behind it. I&#8217;m going to explain the basic idea so you can start rolling out your own.</p>

<p><ins datetime="2009-04-13T08:35:39+00:00">UPDATE</ins>: check out <a href="http://github.com/jacobian/django-shorturls/tree/master">django-shorturls</a>, a Django app recently created by Simon Willison and Jacob Kaplan-Moss, it uses a similar base 62 approach.</p>

<p><span id="more-191"></span></p>

<h2>How it works</h2>

<p>The basic idea of how these services work is by storing URLs in a database, each with its own
unique ID, which is normally an integer. The ID is then magically converted into a series of
characters which can be used to make up a complete URL that people can pass around to people.</p>

<p>When someone opens the shortened URL with the code, the server will convert the code back into
the unique ID so that it can retrieve the URL in the database. Once the URL is retrieved then
the server will send a HTTP redirect response to the browser.</p>

<h2>The magic</h2>

<p>It&#8217;s not magic, really.</p>

<p>The conversion function from an integer to the short code must produce as short code as possible
while still being practical: the characters in the code must be valid for URLs, no &#8220;funny&#8221;
characters (&#8220;?&#8221;, &#8220;/&#8221;, &#8220;&amp;&#8221;, &#8220;%&#8221;, &#8220;+&#8221; are probably a bad idea).</p>

<p>One of the easiest functions to use for this purpose is to encode the integer (decimal,
base 10 number) into base 36.</p>

<p>Normally we use base 10 to count. In base 10 numbers we only have 10 possibilities (0 to 9) for each
digit before we need add another digit in front of it and roll over to the starting symbol
(&#8220;10&#8243; is two digits, because we have no more possibile symbol to use after &#8220;9&#8243;).</p>

<p>In base 16 (hexadecimal) we add 6 more symbols (&#8220;ABCDEF&#8221;) so that we can count to &#8220;F&#8221; (or 15)
before we need to add a digit in front and roll over to the starting symbol (&#8220;10&#8243;, or 16 in
hexadecimal). If you&#8217;re having trouble following, imagine having 16 fingers and 16 toes to
count with.</p>

<p>Same idea for base 36, but we add the whole 26 Roman alphabets, &#8220;A&#8221; to &#8220;Z&#8221;. So &#8220;Z&#8221; is 35
in base 36, and &#8220;10&#8243; is 36.</p>

<h2>How short is short?</h2>

<p>With a 3-digit base 10 numbers, we can only have 1000 possible combinations (0 to 999).
If I remember my high school math correctly, the formula is N<sup>D</sup> where N is the number of
possibilities for each digit (or the base number, 10 in this case), and D is the number
of digits (3 in this case), so 10<sup>3</sup> = 1000.</p>

<p>The goal is to have as many combinations as possible with as little number of digits as possible.
Since the number of digits will grow over time (as we store more URLs) then the only way
we can increase the number of possible combinations is by increasing the base number.</p>

<p>That&#8217;s why converting from base 10 to base 36 works.</p>

<p>So why stop at 36, you ask. As a matter of fact, we can make use of both uppercase and lowercase
letters of the alphabets so that we can use base 62. If you&#8217;re willing to have non-alphanumeric
characters in your short codes, you can even push it further with a few more characters. In fact,
this is what essentially base 64 encoding does. Be careful though, the commonly found <a href="http://en.wikipedia.org/wiki/Base64">base 64</a> encoding
normally works on <em>strings</em> instead of <em>numbers</em>, converting 6 bits of data at a time, and it
can add paddings, the output is 33.3% longer than the input. Quite different from what we want.</p>

<p>I would probably use base 62 because it&#8217;s slightly more pragmatic and it has less chance of screwing up, but if you insist on using
base 64 (for numbers, not strings), then I suggest you use &#8220;-&#8221; and &#8220;=&#8221; as the additional symbols.
I&#8217;d avoid underscores (&#8220;_&#8221;) because they can be hard to see in links, which are normally shown
underlined.</p>

<p>The following table shows the number of possibilities for some of the bases:</p>

<div class="scrollview">
<table id="comparison-table" border="0">
<thead>
<tr>
    <th>Digits</th>
    <th>Base 10</th>
    <th>Base 26</th>
    <th>Base 36</th>
    <th>Base 62</th>
    <th>Base 64</th>
</tr>
</thead>
<tbody>
<tr>
    <th>2</th>
    <td>100</td>
    <td>676</td>
    <td>1,296</td>
    <td>3,844</td>
    <td>4,096</td>
</tr>
<tr>
    <th>3</th>
    <td>1,000</td>
    <td>17,576</td>
    <td>46,656</td>
    <td>238,328</td>
    <td>262,144</td>
</tr>
<tr>
    <th>4</th>
    <td>10,000</td>
    <td>456,976</td>
    <td>1,679,616</td>
    <td>14,776,336</td>
    <td>16,777,216</td>
</tr>
<tr>
    <th>5</th>
    <td>100,000</td>
    <td>11,881,376</td>
    <td>60,466,176</td>
    <td>916,132,832</td>
    <td>1,073,741,824</td>
</tr>
<tr>
    <th>6</th>
    <td>1,000,000</td>
    <td>308,915,776</td>
    <td>2,176,782,336</td>
    <td>56,800,235,584</td>
    <td>68,719,476,736</td>
</tr>
</tbody>
</table>
</div>

<p>Say, you add 1 million new URLs every month on average. With base 62, it would take a little over a year to use up all the possible 4 digits, and after that it would take another 75 years to use up
all the possible 5 digits, and after that it would take another 4,658 years to use up all the
possible 6 digits, and so on.</p>

<p>It would probably take even longer to use up the digits if you don&#8217;t add URLs that are already in
the database. Conversely, you might use up the digits faster if you want to do per-user tracking,
for example.</p>

<h2>Sample code</h2>

<p>Here&#8217;s a simple Python code that you can use to convert an integer to a base N &#8220;number&#8221;
(actually string), and vice versa.</p>

<pre><code># Code adapted from: http://en.wikipedia.org/wiki/Base_36#Python_Conversion_Code
# This is base 62:
ALPHABETS = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"

def base_n_decode(s, alphabets=ALPHABETS):
    n = len(alphabets)
    rv = pos = 0
    charlist = list(s)
    charlist.reverse()
    for char in charlist:
        rv += alphabets.find(char) * n**pos
        pos += 1
    return rv

def base_n_encode(num, alphabets=ALPHABETS):
    n = len(alphabets)
    rv = ""
    while num != 0:
        rv = alphabets[num % n] + rv
        num /= n
    return rv
</code></pre>

<h2>Can&#8217;t we just use MD5?</h2>

<p>No. We can&#8217;t use hash functions like MD5, because hash functions are one-way, irreversible, meaning
we can&#8217;t get the original input just from knowing the hash code. Also, hash functions can have
collisions, meaning from one hash code there is a remote possibility that it &#8220;maps&#8221; back to two
or more URLs. Plus, the output of hash functions are normally long-ish fixed-length strings.</p>

<h2>So, what are you waiting for?</h2>

<p>Now that the magic is revealed, you can create your own URL shortening service. Be creative and
innovative so you can compete with all the other URL shortening services out there.</p>

<p>As a bonus, you can also use this technique to shorten the permalinks or absolute URLs for your
objects in your <a href="http://djangoproject.com">Django</a> (or Rails, etc.) websites. So instead of <code>http://example.com/post/12345</code>
it would be <code>http://example.com/post/3D7</code>. Note that this has nothing to do with security
whatsoever. The coded ID can still be reversed with some effort. And you shouldn&#8217;t rely on
obfuscation to protect anything anyway.</p>
<img src="http://feeds.feedburner.com/~r/ronnyharyanto/~4/DRWzavwKleQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://ronny.haryan.to/archives/2009/04/07/build-your-own-url-shortening-service/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://ronny.haryan.to/archives/2009/04/07/build-your-own-url-shortening-service/</feedburner:origLink></item>
		<item>
		<title>Bad Usability: IndosatM2 Member Site</title>
		<link>http://feedproxy.google.com/~r/ronnyharyanto/~3/XNTo2Q1C5WA/</link>
		<comments>http://ronny.haryan.to/archives/2009/01/23/bad-usability-indosatm2-member-site/#comments</comments>
		<pubDate>Fri, 23 Jan 2009 09:26:55 +0000</pubDate>
		<dc:creator>ronny</dc:creator>
				<category><![CDATA[Usability]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://ronny.haryan.to/?p=161</guid>
		<description><![CDATA[Many people mistakenly think that &#8220;web design&#8221; means making a website looks nice. Well, that&#8217;s only half of the equation. It&#8217;s so much more than just layout. One of the major elements in web design is usability, which roughly means making a website feels nice. The other half of the equation that many people tend [...]]]></description>
			<content:encoded><![CDATA[<p>Many people mistakenly think that &#8220;web design&#8221; means making a website <strong>looks</strong> nice. Well, that&#8217;s only half of the equation. It&#8217;s so much more than just layout. One of the major elements in web design is usability, which roughly means making a website <strong>feels</strong> nice. The other half of the equation that many people tend to forget. A successful web design normally requires balancing of these two major elements.</p>

<p><span id="more-161"></span></p>

<p>Bad usability, especially obvious ones, is one of my biggest pet peeves in web development. So when a website that I &#8212; and probably many others &#8212; frequently visit has a terrible usability, I have a mixed feeling of anger and frustration that I can only hold for so long. In the spirit of positive thinking, I&#8217;d like to channel out that anger and frustration through this (hopefully) constructive criticism.</p>

<h2>A Closer Look at the Problem</h2>

<p>Let&#8217;s take a look at <a href="http://www.indosatm2.com/">IndosatM2</a>&#8216;s <a href="https://www.indosatm2.com/my-account.php/login">member site</a> as an example.</p>

<p>First, I&#8217;d like to ask a question. What&#8217;s the main reason people go to their own ISP&#8217;s website? I bet checking their usage is one of them. It&#8217;s probably and arguably the number one reason, if not the only reason. It is for me at least, since my ISP doesn&#8217;t provide a Dashboard widget and no one has yet to write such widget to work with <a href="http://www.indosatm2.com/">IndosatM2</a>.</p>

<p>The most commonly used function should be as easy to reach and as quickly displayed as possible. It wouldn&#8217;t make sense to force the user to jump through many hoops just to get to the most frequently wanted information. So let&#8217;s count how many steps are required to check the usage for an IM2 subscriber.</p>

<h3>Step 1: Logging In</h3>

<p>The login form is not on the main indosatm2.com website, requiring users to click a link that goes to a separate login page. (Of course, one can bookmark the page for quicker future access.)</p>

<p><a href="http://ronny.haryan.to/wp-content/uploads/2009/01/1-login.jpg"><img src="http://ronny.haryan.to/wp-content/uploads/2009/01/1-login.jpg" alt="IM2 Login" title="IM2 Login" width="450" height="230" class="alignnone size-full wp-image-164" /></a></p>

<p>Things to note:</p>

<ul>
<li><a href="http://en.wikipedia.org/wiki/CAPTCHA">CAPTCHA</a>. On a login form? What&#8217;s the point?</li>
<li>The size and the location of the login form compared to the text on the side.</li>
<li>The order of the points in the text. The &#8220;Usage History&#8221; point is last.</li>
</ul>

<p>How to improve:</p>

<ul>
<li>Remove the CAPTCHA. To prevent or deter brute force login attacks, use
  delayed response on failed login attempts within a short period of time.
  Block the IP address (either temporarily or permanently) after 50 repeated
  failed logins within 5 minutes, or whatever is reasonable.</li>
<li>Make the login form bigger and place it in the center of the page. It <strong>is</strong> a login
  page after all, so the login form should be the center of attention. Move the text
  below the login form. Show the Usage History as the first item.</li>
</ul>

<h3>Step 2: Closing Useless Popup</h3>

<p><a href="http://ronny.haryan.to/wp-content/uploads/2009/01/2-popup.jpg"><img src="http://ronny.haryan.to/wp-content/uploads/2009/01/2-popup.jpg" alt="IM2 Useless Popup" title="IM2 Useless Popup" width="450" height="224" class="alignnone size-full wp-image-168" /></a></p>

<p>Things to note:</p>

<ul>
<li>Needs to click on OK to make it go away.</li>
<li>It serves no useful purpose.</li>
</ul>

<p>How to improve:</p>

<ul>
<li>Remove it altogether. We would know if the login is successful or not. Only tell us
  when something is <strong>not</strong> working, not when something is working. It&#8217;s like
  a little child yelling proudly everytime they managed to accomplish the smallest
  things: it&#8217;s cute at first but it gets annoying after 3 times. Yes,
  Mr(s). Programmer, I know you have mad Javascript skills, but who are you
  trying to impress? Let me guess, you got the inspiration from Windows&#8217;
  popup balloons?</li>
</ul>

<h3>Step 3: The Home Page</h3>

<p><a href="http://ronny.haryan.to/wp-content/uploads/2009/01/3-firstpage.jpg"><img src="http://ronny.haryan.to/wp-content/uploads/2009/01/3-firstpage.jpg" alt="IM2 member home" title="IM2 member home" width="450" height="268" class="alignnone size-full wp-image-170" /></a></p>

<p>Things to note:</p>

<ul>
<li>The size of the image.</li>
<li>How the image serves no useful purpose.</li>
<li>Needs to scroll down to see the actual contents.</li>
<li>How &#8220;Last Invoice&#8221; and &#8220;All Invoice&#8221; (sic) functions are highlighted in the home page.</li>
</ul>

<p>How to improve:</p>

<ul>
<li>There&#8217;s already a menu on the right side. Make it hierarchical so that the user
  can get straight to the function they want rather than requiring them to see
  an extra page that only contain the submenus.</li>
<li>The &#8220;Last Invoice&#8221; and &#8220;All Invoice&#8221; (sic) buttons can go away. They are no longer
  necessary. Instead, put the contents of step 4 and 5 directly into this page. Read
  more below.</li>
<li>Remove the obnoxious image. At least, don&#8217;t make it so big, or move it somewhere
  else, don&#8217;t make it the first thing I see when I log in.</li>
<li>This step can be eliminated.</li>
</ul>

<h3>Step 4: The Usage Page</h3>

<p><a href="http://ronny.haryan.to/wp-content/uploads/2009/01/4-usage.jpg"><img src="http://ronny.haryan.to/wp-content/uploads/2009/01/4-usage.jpg" alt="IM2 Useless Usage Page" title="IM2 Useless Usage Page" width="450" height="276" class="alignnone size-full wp-image-172" /></a></p>

<p>Things to note:</p>

<ul>
<li>It already knows what month and year it is now (they are shown as the default).</li>
<li>Needs to click &#8220;OK&#8221; to get the information for that month.</li>
<li>Hmm. What does &#8220;Cancel&#8221; do?</li>
<li>The obnoxious image that serves no useful purpose.</li>
<li>Needs to scroll down to see the actual contents.</li>
</ul>

<p>How to improve:</p>

<ul>
<li>Show the month selection box straight in the home page, instead of in a separate page.</li>
<li>Make last month as the default value. See &#8220;How to improve&#8221; in step 5 for the reasoning.</li>
<li>This step can be eliminated.</li>
</ul>

<h3>Step 5: Finally</h3>

<p><a href="http://ronny.haryan.to/wp-content/uploads/2009/01/5-finally.jpg"><img src="http://ronny.haryan.to/wp-content/uploads/2009/01/5-finally.jpg" alt="IM2 Usage" title="IM2 Usage" width="450" height="277" class="alignnone size-full wp-image-175" /></a></p>

<p>Things to note:</p>

<ul>
<li>Again, the obnoxious image and the scrolling down.</li>
<li>The inconsistent use of English and Indonesian.</li>
<li>There&#8217;s no easy way to see data for other months, must go back to step 4.</li>
</ul>

<p>How to improve:</p>

<ul>
<li>Show the results for the current month straight away in the home page. This is
  what most people want to see. And since you already know what month it is now,
  why don&#8217;t you just show me right away?</li>
<li>The system can detect what day of the month it is now. If it&#8217;s still early in the month
  the system can also show the total usage for last month in this page.</li>
<li>The month selection box in step 4 is always shown at the top (and optionally at
  the bottom) of the page with the default value set to last month.</li>
</ul>

<h2>Conclusion</h2>

<p>The steps can be reduced down from 5 to only 2 without sacrificing any functionalities. The most useful and frequently used features are highlighted and shown as reasonable and sensible defaults. Logging in should be easy (username and password, that&#8217;s it). Then the home page, containing the current month&#8217;s usage (probably the most commonly requested information), is shown right away, without any annoying popup. If the user needs to see data for other months, then the month selection box should already be accessible from the same page, showing the next commonly wanted information (last month&#8217;s usage).</p>

<h2>Other Examples?</h2>

<p>There is another public website that I use quite often and I find that it has plenty of rooms for improvement in terms of usability: <a href="https://ibank.klikbca.com/">KlikBCA</a>. But one can write a whole book on that website alone discussing what&#8217;s wrong and how to improve it.</p>

<p>Have you seen other public websites that can be improved in its usability?</p>
<img src="http://feeds.feedburner.com/~r/ronnyharyanto/~4/XNTo2Q1C5WA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://ronny.haryan.to/archives/2009/01/23/bad-usability-indosatm2-member-site/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		<feedburner:origLink>http://ronny.haryan.to/archives/2009/01/23/bad-usability-indosatm2-member-site/</feedburner:origLink></item>
		<item>
		<title>Live with it</title>
		<link>http://feedproxy.google.com/~r/ronnyharyanto/~3/GwH2kXh9Tn8/</link>
		<comments>http://ronny.haryan.to/archives/2008/10/15/live-with-it/#comments</comments>
		<pubDate>Wed, 15 Oct 2008 04:21:04 +0000</pubDate>
		<dc:creator>ronny</dc:creator>
				<category><![CDATA[Mac]]></category>

		<guid isPermaLink="false">http://ronny.haryan.to/archives/2008/10/15/live-with-it/</guid>
		<description><![CDATA[To everyone that&#8217;s been complaining about the size of newer LCD monitors that are getting bigger causing neck pains: DON&#8217;T SIT SO CLOSE TO THE MONITOR!]]></description>
			<content:encoded><![CDATA[<p>To everyone that&#8217;s been complaining about the size of newer LCD monitors that are getting bigger causing neck pains:</p>

<p>DON&#8217;T SIT SO CLOSE TO THE MONITOR!</p>
<img src="http://feeds.feedburner.com/~r/ronnyharyanto/~4/GwH2kXh9Tn8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://ronny.haryan.to/archives/2008/10/15/live-with-it/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		<feedburner:origLink>http://ronny.haryan.to/archives/2008/10/15/live-with-it/</feedburner:origLink></item>
		<item>
		<title>Announcing Pedantic Bastard</title>
		<link>http://feedproxy.google.com/~r/ronnyharyanto/~3/lavu6if1wzk/</link>
		<comments>http://ronny.haryan.to/archives/2008/09/17/announcing-pedantic-bastard/#comments</comments>
		<pubDate>Wed, 17 Sep 2008 12:48:21 +0000</pubDate>
		<dc:creator>ronny</dc:creator>
				<category><![CDATA[Lingua]]></category>

		<guid isPermaLink="false">http://ronny.haryan.to/archives/2008/09/17/announcing-pedantic-bastard/</guid>
		<description><![CDATA[Pedantic Bastard is a blog about being pedantic written by my alter ego. Please don&#8217;t read it.]]></description>
			<content:encoded><![CDATA[<p><a href="http://ronny.wordpress.com/">Pedantic Bastard</a> is a blog about being pedantic written by my alter ego. Please don&#8217;t read it.</p>
<img src="http://feeds.feedburner.com/~r/ronnyharyanto/~4/lavu6if1wzk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://ronny.haryan.to/archives/2008/09/17/announcing-pedantic-bastard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://ronny.haryan.to/archives/2008/09/17/announcing-pedantic-bastard/</feedburner:origLink></item>
		<item>
		<title>psycopg2 and 64-bit Apache on Leopard</title>
		<link>http://feedproxy.google.com/~r/ronnyharyanto/~3/mhXFMzbbByI/</link>
		<comments>http://ronny.haryan.to/archives/2008/09/12/psycopg2-and-64-bit-apache-on-leopard/#comments</comments>
		<pubDate>Fri, 12 Sep 2008 11:27:07 +0000</pubDate>
		<dc:creator>ronny</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://ronny.haryan.to/archives/2008/09/12/psycopg2-and-64-bit-apache-on-leopard/</guid>
		<description><![CDATA[The Apache httpd that comes with Mac OS X Leopard runs in 64-bit mode, so everything else that&#8217;s loaded, including mod_wsgi and psycopg2 must be able to run in 64-bit mode as well. Graham Dumpleton explained this behaviour in a post to the django-users mailing list. Compiling psycopg2 using MacPorts as well as from the [...]]]></description>
			<content:encoded><![CDATA[<p>The Apache httpd that comes with Mac OS X Leopard runs in 64-bit mode, so everything else that&#8217;s loaded, including <a href="http://code.google.com/p/modwsgi/">mod_wsgi</a> and <a href="http://initd.org/pub/software/psycopg/">psycopg2</a> must be able to run in 64-bit mode as well. Graham Dumpleton explained this behaviour in <a href="http://groups.google.com/group/django-users/msg/1c2537650eb3c79b">a post to the django-users mailing list</a>.</p>

<p>Compiling psycopg2 using MacPorts as well as from the tarball would result in something like this when loaded from a web application that runs on Apache:</p>

<pre><code>ImproperlyConfigured: Error loading psycopg2 module: dlopen(/Library/Python/2.5/site-packages/psycopg2/_psycopg.so, 2): no suitable image found.  Did find: /Library/Python/2.5/site-packages/psycopg2/_psycopg.so: no matching architecture in universal wrapper
</code></pre>

<p>So all I needed to do was force psycopg2 extension to be built for 64-bit as well as 32-bit. After extracting the latest psycopg2 source, do this instead:</p>

<pre><code>LDFLAGS="-arch ppc -arch i386 -arch x86_64" CFLAGS="-arch ppc -arch i386 -arch x86_64" python setup.py build
</code></pre>

<p>Then <code>sudo python setup.py install</code>. After that, check the .so file, it should look something like this:</p>

<pre><code>$ file /Library/Python/2.5/site-packages/psycopg2/_psycopg.so 
/Library/Python/2.5/site-packages/psycopg2/_psycopg.so: Mach-O universal binary with 3 architectures
/Library/Python/2.5/site-packages/psycopg2/_psycopg.so (for architecture i386): Mach-O bundle i386
/Library/Python/2.5/site-packages/psycopg2/_psycopg.so (for architecture ppc7400):      Mach-O bundle ppc
/Library/Python/2.5/site-packages/psycopg2/_psycopg.so (for architecture x86_64):       Mach-O 64-bit bundle x86_64
</code></pre>

<p>Don&#8217;t forget to restart Apache, and that should be it.</p>

<p>Update: It happened to <a href="http://www.pythonware.com/products/pil/">PIL</a> too, it was giving this error: <code>The _imaging C module is not installed</code>, so I had to do the same thing as above: <code>LDFLAGS=... CFLAGS=... python setup.py build</code> followed by <code>sudo python setup.py install</code>.</p>
<img src="http://feeds.feedburner.com/~r/ronnyharyanto/~4/mhXFMzbbByI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://ronny.haryan.to/archives/2008/09/12/psycopg2-and-64-bit-apache-on-leopard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://ronny.haryan.to/archives/2008/09/12/psycopg2-and-64-bit-apache-on-leopard/</feedburner:origLink></item>
		<item>
		<title>A designer must also be a user</title>
		<link>http://feedproxy.google.com/~r/ronnyharyanto/~3/cDDEgf9pWKc/</link>
		<comments>http://ronny.haryan.to/archives/2008/05/19/designer-must-also-be-a-user/#comments</comments>
		<pubDate>Mon, 19 May 2008 04:50:12 +0000</pubDate>
		<dc:creator>ronny</dc:creator>
				<category><![CDATA[Indonesia]]></category>
		<category><![CDATA[Usability]]></category>

		<guid isPermaLink="false">http://ronny.haryan.to/archives/2008/05/19/usability-nightmare-atm-bca-klikbca/</guid>
		<description><![CDATA[Pop quiz, hotshot. How do you navigate to the previous screen in a BCA ATM? If you&#8217;re like me and most people, you press &#8220;Cancel&#8221;, reinsert your card, punch in your PIN again, and navigate to the screen that you want. Try repeating that while finding a menu item and a few people line up [...]]]></description>
			<content:encoded><![CDATA[<p>Pop quiz, hotshot. How do you navigate to the <strong>previous</strong> screen in a <a href="https://ibank.klikbca.com/">BCA</a> ATM?</p>

<p>If you&#8217;re like me and most people, you press &#8220;Cancel&#8221;, reinsert your card, punch in your PIN again, and navigate to the screen that you want. Try repeating that while finding a menu item and a few people line up behind you and you keep reinserting the card back as soon as the machine pops it out.</p>

<p>I saw there were at least two buttons on the keypad that were unassigned and could have been programmed as a generic back button. Even if implementing a generic &#8220;back&#8221; button is too much effort, the &#8220;back&#8221; function could have been easily assigned to one of the side screen buttons.</p>

<p>And if you want to pay for a ticket, do you go to &#8220;Pembayaran&#8221; or &#8220;Pembelian&#8221; first?</p>

<p><a href="https://ibank.klikbca.com/">klikbca</a> is not any better. They seem to enjoy torturing their user. OK, rather than just complaining, I&#8217;ll straight away give one possible improvement to their balance checking interface. Merge the &#8220;Informasi Saldo&#8221; and &#8220;Mutasi&#8221; as one menu item called &#8220;Informasi Saldo&#8221;. Then, show the balance at the top and all the transactions for the past 31 days below it by default while still allowing the user to filter the transactions by date. Don&#8217;t ask the user to <strong>manually count (today &#8211; 31 days)</strong>, just show it. If the range I put is more than 31 days, then just show what you have up to 31 days, don&#8217;t ask me to correct the starting date if you can easily fix it for me. If the info is too much and I don&#8217;t want to see that much info, then I&#8217;ll filter it later. If it&#8217;s too much info to show in one page, split it up into multiple pages. This is common sense. Why force the user to jump extra hoops <em>every time</em>?</p>

<p>The default should be sensible, and the default should be chosen because most people use it that way, NOT because it&#8217;s easier to program it that way. In order to understand the user&#8217;s pains, a designer must see from the user&#8217;s perspective and use the things they&#8217;re designing themselves. My girlfriend pointed out to me that most of these usability idiocy is because the people who designed/created it don&#8217;t use it themselves very often, and I agree with her.</p>

<p>All these big companies providing services to the public must hire at least a usability expert rather than wasting their money on paying half-assed so-called &#8220;designers&#8221; (that is if they even hire designers, they probably just let the programmers do the design). I mean just look at their websites. If any of you is an Indosat M2 subscriber, you would know how terrible their website is when you check your internet usage, it looks like it&#8217;s designed and written by a high-school kid who just learned PHP. Who the hell in this Web 2.0 age uses pop ups to notify the user that the login was successful?! Yes, successful, <em>not</em> unsuccessful.</p>
<img src="http://feeds.feedburner.com/~r/ronnyharyanto/~4/cDDEgf9pWKc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://ronny.haryan.to/archives/2008/05/19/designer-must-also-be-a-user/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://ronny.haryan.to/archives/2008/05/19/designer-must-also-be-a-user/</feedburner:origLink></item>
		<item>
		<title>Secara Goblok</title>
		<link>http://feedproxy.google.com/~r/ronnyharyanto/~3/LaQvR2bw0bs/</link>
		<comments>http://ronny.haryan.to/archives/2008/04/18/secara-goblok/#comments</comments>
		<pubDate>Fri, 18 Apr 2008 03:05:30 +0000</pubDate>
		<dc:creator>ronny</dc:creator>
				<category><![CDATA[Indonesia]]></category>
		<category><![CDATA[Lingua]]></category>

		<guid isPermaLink="false">http://ronny.haryan.to/archives/2008/04/18/secara-goblok/</guid>
		<description><![CDATA[&#8220;Secara&#8221; artinya adalah &#8220;dengan cara&#8221;. Jangan pernah menggunakan kata secara jika yang anda maksud adalah soalnya atau karena atau sebab. Secara anda akan kedengaran seperti orang goblok jika menggunakan secara tidak pada tempatnya. See what I mean?]]></description>
			<content:encoded><![CDATA[<p><strong>&#8220;Secara&#8221; artinya adalah &#8220;dengan cara&#8221;.</strong> Jangan pernah menggunakan kata <strong>secara</strong> jika yang anda maksud adalah <strong>soalnya</strong> atau <strong>karena</strong> atau <strong>sebab</strong>. Secara anda akan kedengaran seperti orang goblok jika menggunakan <strong>secara</strong> tidak pada tempatnya. See what I mean?</p>
<img src="http://feeds.feedburner.com/~r/ronnyharyanto/~4/LaQvR2bw0bs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://ronny.haryan.to/archives/2008/04/18/secara-goblok/feed/</wfw:commentRss>
		<slash:comments>23</slash:comments>
		<feedburner:origLink>http://ronny.haryan.to/archives/2008/04/18/secara-goblok/</feedburner:origLink></item>
		<item>
		<title>Updates to Planet Terasi</title>
		<link>http://feedproxy.google.com/~r/ronnyharyanto/~3/xG2NvfHcIiI/</link>
		<comments>http://ronny.haryan.to/archives/2008/02/27/updates-to-planet-terasi/#comments</comments>
		<pubDate>Wed, 27 Feb 2008 07:17:46 +0000</pubDate>
		<dc:creator>ronny</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://ronny.haryan.to/archives/2008/02/27/updates-to-planet-terasi/</guid>
		<description><![CDATA[It&#8217;s been more than a year since a major update was done to Planet Terasi. The recent bru-ha-ha kinda forced me to do an update. So I did these: I clarified the general topic for Planet Terasi in the About Planet Terasi section, I also put clarification for inclusion (and rejection) in the contact page, [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been more than a year since a major update was done to <a href="http://planet.terasi.net/">Planet Terasi</a>. The recent <a href="http://rahard.wordpress.com/2008/02/25/soal-petisi-planet-terasi-itu/">bru-ha-ha</a> kinda forced me to do an update.</p>

<p>So I did these:</p>

<ul>
<li>I clarified the general topic for Planet Terasi in the About Planet Terasi section,</li>
<li>I also put clarification for inclusion (and rejection) in the <a href="http://planet.terasi.net/contact.php">contact page</a>,</li>
<li>I removed some of the non-functional feeds,</li>
<li>I removed some of the feeds due to complaints I received from readers,</li>
<li>I changed Budi Rahardjo&#8217;s feed to only include the tech section (Pak Budi: I know you asked me to remove your feeds from Planet Terasi, but I hope you don&#8217;t mind me keeping this one. If you do mind, please let me know, I will gladly remove it.)</li>
<li>I went through 188 inclusion requests sent to me via email (collected for over a year now) over a slow internet connection and reviewed all 188 blogs (the working ones anyway) to be included in Planet Terasi,</li>
<li>I decided to add 20 new blogs to Planet Terasi (can you name them all?),</li>
<li>I bugged my network administrator to open SSH access so I can update Planet Terasi,</li>
<li>I wrote this post.</li>
</ul>

<p>Most of the blogs from the 188 requests that I did not add are due to obvious splog (spam blog), off-topic, or unreachable when I reviewed them. Some of them are apparently very popular, very well written, and very well designed. I&#8217;m hoping I could post them here later so that you can still check them out if you like. I have added some of them to my personal aggregator.</p>

<p>I&#8217;m actually amazed and happy at the same time that people care enough about Planet Terasi to make a <a href="http://www.petitiononline.com/nobrinpt/">petition</a>. But it was not necessary. All you need to do is fill out the <a href="http://planet.terasi.net/contact.php">contact form</a> and talk to me. I appreciate all your input. And I hope I can keep Planet Terasi useful and fun to all its readers. Thanks for all your support.</p>
<img src="http://feeds.feedburner.com/~r/ronnyharyanto/~4/xG2NvfHcIiI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://ronny.haryan.to/archives/2008/02/27/updates-to-planet-terasi/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		<feedburner:origLink>http://ronny.haryan.to/archives/2008/02/27/updates-to-planet-terasi/</feedburner:origLink></item>
		<item>
		<title>“Thanks Before”</title>
		<link>http://feedproxy.google.com/~r/ronnyharyanto/~3/qA8sEiNUqE0/</link>
		<comments>http://ronny.haryan.to/archives/2007/11/29/thanks-before/#comments</comments>
		<pubDate>Thu, 29 Nov 2007 03:21:10 +0000</pubDate>
		<dc:creator>ronny</dc:creator>
				<category><![CDATA[Lingua]]></category>

		<guid isPermaLink="false">http://ronny.haryan.to/archives/2007/11/29/thanks-before/</guid>
		<description><![CDATA[&#8220;Thanks before.&#8221; &#8220;Same same.&#8221; &#8220;Don&#8217;t follow mix.&#8221; &#8220;Your children fruit is stupid very much.&#8221; &#8220;My body is not delicious.&#8221; I don&#8217;t know what the correct English translation is, so I will just assume that I can translate the words one by one, it should make sense, right? After all, each word can only have exactly [...]]]></description>
			<content:encoded><![CDATA[<blockquote>
  <p>&#8220;Thanks before.&#8221;</p>
  
  <p>&#8220;Same same.&#8221;</p>
  
  <p>&#8220;Don&#8217;t follow mix.&#8221;</p>
  
  <p>&#8220;Your children fruit is stupid very much.&#8221;</p>
  
  <p>&#8220;My body is not delicious.&#8221;</p>
</blockquote>

<p>I don&#8217;t know what the correct English translation is, so I will just <em>assume</em> that I can translate the words one by one, it should make sense, right? After all, each word can only have exactly one direct translation, right? It&#8217;s impossible that a word in one language can have more than one meaning in another language. And screw the context. We don&#8217;t need no context. And what did you say about culture? It has nothing to do with translating.</p>

<p><img src="http://ronny.haryan.to/wp-content/uploads/2007/11/ifnotnowmorewhen.jpg" class="noborder"/></p>

<p>Since we are very good with assumptions, we always assume everything we don&#8217;t know because we can&#8217;t be bothered to look for what&#8217;s right. Assuming is easier. Mathematicians do it often, why can&#8217;t we? If I just assume the problem doesn&#8217;t exist then it&#8217;s not there anymore. Problem solved. Wait, what problem?</p>

<p>OK, the next person who says &#8220;thanks before&#8221; has to send me cookies.</p>
<img src="http://feeds.feedburner.com/~r/ronnyharyanto/~4/qA8sEiNUqE0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://ronny.haryan.to/archives/2007/11/29/thanks-before/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://ronny.haryan.to/archives/2007/11/29/thanks-before/</feedburner:origLink></item>
	</channel>
</rss><!-- Dynamic page generated in 0.890 seconds. --><!-- Cached page generated by WP-Super-Cache on 2010-09-03 18:19:15 -->
