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

<channel>
	<title>User Inspired, Technology Service &#38; Web Developer in Indonesia</title>
	<atom:link href="http://ui.co.id/feed" rel="self" type="application/rss+xml" />
	<link>http://ui.co.id</link>
	<description>Technology Services for Indonesia market</description>
	<lastBuildDate>Fri, 31 May 2013 01:46:26 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=4.3</generator>
	<item>
		<title>Stamps, Indonesia&#8217;s Elegant Loyalty System</title>
		<link>http://ui.co.id/projects/stamps-indonesias-elegant-loyalty-system</link>
		<comments>http://ui.co.id/projects/stamps-indonesias-elegant-loyalty-system#comments</comments>
		<pubDate>Fri, 31 May 2013 01:44:46 +0000</pubDate>
		<dc:creator><![CDATA[Selwin Ong]]></dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Projects]]></category>

		<guid isPermaLink="false">http://ui.co.id/?p=488</guid>
		<description><![CDATA[We are very proud to announce <a href = "http://stamps.co.id">Stamps, a loyalty app</a> you can use in Indonesia. It's a very easy to use loyalty/CRM  app that allows customers to better communicate with merchants.]]></description>
				<content:encoded><![CDATA[<p>After years of web development works, we are very proud to announce <a title="Stamps, Indonesia's Loyalty App" href="http://stamps.co.id">Stamps</a>, a loyalty app you can use in Indonesia. It&#8217;s a very easy to use loyalty/CRM  app that allows customers to better communicate with merchants.</p>
<p>We just came out of beta this month so please check it out if you haven&#8217;t. The address is at <a href="http://stamps.co.id">http://stamps.co.id</a></p>
]]></content:encoded>
			<wfw:commentRss>http://ui.co.id/projects/stamps-indonesias-elegant-loyalty-system/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Google Analytics to Measure Website Performance</title>
		<link>http://ui.co.id/blog/using-google-analytics-to-measure-website-performance</link>
		<comments>http://ui.co.id/blog/using-google-analytics-to-measure-website-performance#comments</comments>
		<pubDate>Thu, 03 Nov 2011 10:12:35 +0000</pubDate>
		<dc:creator><![CDATA[Selwin Ong]]></dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[google analytics]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[site speed]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://ui.co.id/?p=447</guid>
		<description><![CDATA[We previously talked about the importance of building fast websites and easy ways to achieve that by enabling gzip compression and using CSS sprites. That&#8217;s all well and good, but how do you know if the changes you made actually translate to faster website load times for your visitors? An easy way to measure this [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>We previously talked about the importance of building fast websites and easy ways to achieve that by <a href="http://ui.co.id/blog/speeding-up-website-gzip-compression">enabling gzip compression</a> and <a href="http://ui.co.id/blog/speeding-up-your-website-in-5-minutes-css-sprites">using CSS sprites</a>.</p>
<p>That&#8217;s all well and good, but how do you know if the changes you made actually translate to faster website load times for your visitors? An easy way to measure this is to use <a href="http://www.google.com/analytics/">Google Analytics</a>, an extremely popular analytics tool. Having performance data for your website is very nice in that it allows you to measure:</p>
<ul>
<li>Content &#8211; which landing pages are slowest?</li>
<li>Visitor &#8211; how does latency compare by visitor type or geographic region?</li>
<li>Technology &#8211; does browser, operating system or screen resolution impact latency metrics?</li>
<li>Performance &#8211; what is the most common load time, or the longest?</li>
</ul>
<p>This metric is not tracked by default, so you&#8217;ll have to slightly modify your tracking code by adding a &#8220;_trackPageLoadTime&#8221; parameter. For example:</p>
<pre lang="javascript">&lt;script type="text/javascript"&gt;// &lt;![CDATA[
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-XXX-1']);
  _gaq.push(['_trackPageview']);
  _gaq.push(['_trackPageLoadTime']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
// ]]&gt;&lt;/script&gt;</pre>
<p>Once implemented, you&#8217;ll be able to observe your website&#8217;s performance from the &#8220;Site speed&#8221; section in Google Analytics.</p>
<p><img class="aligncenter size-full wp-image-451" title="Google Analytics Site Speed" src="http://ui.co.id/wp-content/uploads/2011/11/site_speed-11-150x150.jpg" alt="" /></p>
]]></content:encoded>
			<wfw:commentRss>http://ui.co.id/blog/using-google-analytics-to-measure-website-performance/feed</wfw:commentRss>
		<slash:comments>1058</slash:comments>
		</item>
		<item>
		<title>Django 1.2, Google Font API and More!</title>
		<link>http://ui.co.id/blog/django-1-2-google-fonts-and-more</link>
		<comments>http://ui.co.id/blog/django-1-2-google-fonts-and-more#comments</comments>
		<pubDate>Fri, 21 May 2010 11:23:18 +0000</pubDate>
		<dc:creator><![CDATA[Selwin Ong]]></dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://ui.co.id/?p=433</guid>
		<description><![CDATA[This week is a good week for web developers with Google announcing a slew of new services at Google I/O 2010 conference, and an even better one for Python web developers because the new version of Django has arrived! Django 1.2 was released just a few days ago with many major features such as improved [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>This week is a good week for web developers with Google announcing a slew of new services at <a href = 'http://code.google.com/events/io/2010/'>Google I/O 2010 conference</a>, and an even better one for Python web developers because the new version of Django has arrived! </p>
<p>Django 1.2 was released just a few days ago with many major features such as <a href = 'http://docs.djangoproject.com/en/dev/releases/1.2/#improved-csrf-protection'>improved CSRF protection</a>, <a href = 'http://docs.djangoproject.com/en/dev/releases/1.2/#model-validation'>Model validation</a>, <a href = 'http://docs.djangoproject.com/en/dev/releases/1.2/#support-for-multiple-databases'>multiple database support</a> and many more, please read the full <a href = 'http://docs.djangoproject.com/en/dev/releases/1.2/'>release notes</a> for details. </p>
<p>There is one more thing that the release notes doesn&#8217;t say, though &#8211; and it&#8217;s really important for web developers in Indonesia. Django 1.2, the latest version of the world&#8217;s best web application framework now ships with Indonesian translation and localization! </p>
<p>The translation was contributed by us and we sent the translations to Django for inclusion only a few days before Django 1.2 was released. This marks our first contribution to the core Django framework (with more coming) with the hope that this contribution will boost Indonesia&#8217;s Django and Python communities. So give Django a spin and don&#8217;t forget to test out Indonesia&#8217;s localization format (&#8216;id&#8217; is the code) &#8211; if you find translations that can be better worded, by all means let us know and we will submit translation patches to further improve it.</p>
<p>And in case you haven&#8217;t heard, Google also announced a few incredibly useful services for developers. I am personally most excited about <a href = 'http://code.google.com/apis/webfonts/'>Google Font API</a> and <a href = 'http://code.google.com/apis/predict/'>Google Prediction API</a>. </p>
<p>Google Font API lets you easily use non standard font in websites only by adding one line of code:</p>
<pre lang='css'>
<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=INSERT_FONT_FAMILY_HERE">
</pre>
<p>You can read more about what was being talked about at Google I/O <a href = 'http://googleblog.blogspot.com/2010/05/google-io-2010-day-1-more-powerful-web.html'>here</a>, <a href = 'http://googleblog.blogspot.com/2010/05/android-froyo-with-some-sprinkles.html'>here</a> and <a href = "http://googleblog.blogspot.com/2010/05/announcing-google-tv-tv-meets-web-web.html">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://ui.co.id/blog/django-1-2-google-fonts-and-more/feed</wfw:commentRss>
		<slash:comments>5226</slash:comments>
		</item>
		<item>
		<title>Speed Up Django&#8217;s Unit Test with SQLite and Database Transaction</title>
		<link>http://ui.co.id/blog/speed-up-your-django-test</link>
		<comments>http://ui.co.id/blog/speed-up-your-django-test#comments</comments>
		<pubDate>Fri, 14 May 2010 08:19:48 +0000</pubDate>
		<dc:creator><![CDATA[Gilang Chandrasa]]></dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://ui.co.id/?p=413</guid>
		<description><![CDATA[Building test cases for your Django project is a good practice that can catch a lot of bugs during development but unfortunately, running a large number of test cases can take quite some time. One of our Django projects which has 215 tests takes 460.117s to complete with MySQL&#8217;s MyISAM storage engine on a relatively [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Building test cases for your Django project is a good practice that can catch a lot of bugs during development but unfortunately, running a large number of test cases can take quite some time. </p>
<p>One of our Django projects which has 215 tests takes 460.117s to complete with MySQL&#8217;s MyISAM storage engine on a relatively modern Core 2 Duo box with 4GB of RAM. But we later found out that we can run the tests much faster if we run the tests using <a href="http://www.sqlite.org/">SQLite</a> database. To illustrate this, the test that took 460.117s to complete in MySQL only took 6.919s in SQLite. That is very huge improvement (roughly 65x) and will save your time. According to <a href = 'http://docs.djangoproject.com/en/dev/topics/testing/'>Django&#8217;s documentation</a>, the reason for the huge speed boost is because when used to run tests, SQLite will create databases in memory, bypassing the filesystem entirely so SQLite is definitely a huge time saver when used to run tests.</p>
<p>Switching to SQLite engine is easy, all you need to do is change your database settings (in settings.py) from:</p>
<pre lang="python">
DATABASE_ENGINE = 'mysql'    
DATABASE_NAME = 'db_name' 
DATABASE_USER = 'username'         
DATABASE_PASSWORD = 'password' 
</pre>
<p>to</p>
<pre lang="python">
DATABASE_ENGINE = 'sqlite3'    
DATABASE_NAME = 'test.db'
DATABASE_USER = ''         
DATABASE_PASSWORD = '' 
</pre>
<p>But it&#8217;s changing your database settings every time you want to run tests is very annoying. One solution to avoid this hassle is to append <a href="http://seanhayes.name/2010/01/09/test-database-django/">http://seanhayes.name/2010/01/09/test-database-django/</a>a few lines of code</a> to the end of settings.py (you have to add this <strong>below</strong> the main database configuration so it properly overwrites your default configuration).</p>
<pre lang="python">
...
if 'test' in sys.argv:
    DATABASE_ENGINE = 'sqlite3'          
    DATABASE_NAME = 'test.db'
...
</pre>
<p>Now, every time we call manage.py test in our project, it will automatically use SQLite engine to run. </p>
<p>We can even improve this further by modifying Django&#8217;s setup and tear down methods to use database transaction. Instead of tearing down the tables every time a test is made, we use SQLite&#8217;s rollback function to revert our test table&#8217;s state to when we first set it up. The code below shows how to do exactly this (taken from <a href="http://yummyapplepie.wordpress.com/2008/07/14/speed-up-your-functional-django-tests/">Yummy Apple Pie&#8217;s blog</a>):</p>
<pre lang="python">
from django.db import transaction
from django.core import mail
from django.test import TestCase as DjangoTestCase
from django.core.management import call_command
from django.conf import settings
from django.core.urlresolvers import clear_url_caches

class TestCase(DjangoTestCase):

    def _pre_setup(self):
        transaction.enter_transaction_management()
        transaction.managed(True)
        if hasattr(self, 'fixtures'):
            # We have to use this slightly awkward syntax due to the fact
            # that we're using *args and **kwargs together.
            call_command('loaddata', *self.fixtures, **{'verbosity': 0})
        if hasattr(self, 'urls'):
            self._old_root_urlconf = settings.ROOT_URLCONF
            settings.ROOT_URLCONF = self.urls
            clear_url_caches()
        mail.outbox = []

    def _post_teardown(self):
        transaction.rollback()
        super(TestCase, self)._post_teardown()
</pre>
<p>Happy coding and hope this post encourages you to use Django&#8217;s excellent testing framework more extensively!</p>
<p>Credits:</p>
<ol>
<li><a href="http://yummyapplepie.wordpress.com/2008/07/14/speed-up-your-functional-django-tests/">http://yummyapplepie.wordpress.com/2008/07/14/speed-up-your-functional-django-tests/</a></li>
<li><a href="http://seanhayes.name/2010/01/09/test-database-django/">http://seanhayes.name/2010/01/09/test-database-django/</a></li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://ui.co.id/blog/speed-up-your-django-test/feed</wfw:commentRss>
		<slash:comments>7558</slash:comments>
		</item>
		<item>
		<title>Generic Field Filtering in Django</title>
		<link>http://ui.co.id/blog/generic-field-filtering-in-django</link>
		<comments>http://ui.co.id/blog/generic-field-filtering-in-django#comments</comments>
		<pubDate>Fri, 23 Apr 2010 06:51:34 +0000</pubDate>
		<dc:creator><![CDATA[charlie]]></dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://ui.co.id/?p=398</guid>
		<description><![CDATA[Creating a generic and reusable application needs a lot of time and effort but thankfully Django framework provides us with many convenient tools. This time I will write about how to filter a model with Django&#8217;s contenttypes framework. The contenttypes framework is useful, especially when you want to create a generic model that can reference [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Creating a generic and reusable application needs a lot of time and effort but thankfully Django framework provides us with many convenient tools. This time I will write about how to filter a model with Django&#8217;s contenttypes framework. The contenttypes framework is useful, especially when you want to create a generic model that can reference any other model listed in your application such as historical data of an object.</p>
<p>For example, I have these models in my application :</p>
<blockquote>
<pre lang="python">class History(models.Model):
    content_type = models.ForeignKey(ContentType)
    object_id = models.PositiveIntegerField()
    content_object = generic.GenericForeignKey('content_type', 'object_id')
    action_time = models.DateTimeField(auto_now=True)
    message = models.CharField(max_length=100)
    action_type = models.PositiveSmallIntegerField()

</pre>
<pre lang="python">class SalesOrder(models.Model):
    subject = models.CharField(max_length=100, db_index=True)
    client = models.CharField(max_length=100)
    value = models.PositiveIntegerField()

class PurchaseOrder(models.Model):
    subject = models.CharField(max_length=100, db_index=True)
    vendor = models.ForeignKey(Contact, db_index=True)
    value = models.PositiveIntegerField()</pre>
</blockquote>
<p>Sometimes we want to filter the history model by instance, but unfortunately Django&#8217;s filter method does not allow us to directly filter the model by content_object i.e. (history_list = History.objects.filter(content_object=SalesOrder.objects.get(pk = 1)) &lt;&#8211; this won&#8217;t do).</p>
<p>There are a few ways to get around this problem, but I&#8217;ll try to explain how to do it in the simplest yet reliable way (since I&#8217;m new in python-django programming, there might be another way to solve this case more efficiently).</p>
<p>From the model declarations above we can assume that a history instance can refer to both SalesOrder&#8217;s or PurchaseOrder&#8217;s instances. So how do I filter for all history instances referring to a specific SalesOrder?  Here is how:</p>
<blockquote>
<pre lang="python">
#We first get the SalesOrder object :
salesorder = SalesOrder.objects.get(pk=1)

#Then we need to get the SalesOrder's content type:
content_type = ContentType.objects.get_for_model(salesorder)
#ContentType is a model in django that store information about the models installed in your project, and new instances of ContentTypes are automatically created whenever new models are installed.
#and the final step :
history_list = History.objects.filter(content_type=content_type, object_id = salesorder.id)
</pre>
</blockquote>
<p>We can also do it without first getting the object instance to save an extra database hit, assuming we already know the primary key of the object we want to filter for. Here is how we do it if we want to filter for a PurchaseOrder instance</p>
<blockquote>
<pre lang="python">
content_type = ContentType.objects.get(model=PurchaseOrder._meta.module_name)
#and do filtering as in the first example given :
history_list = History.objects.filter(content_type=content_type, object_id = purchaseorder_id)</pre>
</blockquote>
<p>Easy isn&#8217;t it? Happy trying and don&#8217;t give up too fast ^^.</p>
<p>bible : <a href="http://docs.djangoproject.com/en/1.1/ref/contrib/contenttypes/#ref-contrib-contenttypes">http://docs.djangoproject.com/en/1.1/ref/contrib/contenttypes/#ref-contrib-contenttypes</a></p>
]]></content:encoded>
			<wfw:commentRss>http://ui.co.id/blog/generic-field-filtering-in-django/feed</wfw:commentRss>
		<slash:comments>2527</slash:comments>
		</item>
		<item>
		<title>Asynchronous send_mail() in Django</title>
		<link>http://ui.co.id/blog/asynchronous-send_mail-in-django</link>
		<comments>http://ui.co.id/blog/asynchronous-send_mail-in-django#comments</comments>
		<pubDate>Fri, 09 Apr 2010 07:32:57 +0000</pubDate>
		<dc:creator><![CDATA[Selwin Ong]]></dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://ui.co.id/?p=389</guid>
		<description><![CDATA[Django, our web development framework of choice provides many useful functions, send_mail() being one of them which we frequently use. Though convenient, send_mail() in Django is a synchronous operation &#8211; meaning Django will wait for the mail sending process to finish before continuing other tasks. This is not usually that big of a deal if [&#8230;]]]></description>
				<content:encoded><![CDATA[<p><a href = 'http://www.djangoproject.com/'>Django</a>, our web development framework of choice provides many useful functions, send_mail() being one of them which we frequently use. </p>
<p>Though convenient, send_mail() in Django is a synchronous operation &#8211; meaning Django will wait for the mail sending process to finish before continuing other tasks. This is not usually that big of a deal if the mail server Django is configured to use is located in the same site (and has low latency), but in cases where the mail server is not located in the same cloud, this could give the impression that your website is slow, especially in sites with relatively slow internet connectivity (like Indonesia).</p>
<p>Consider a really common scenario where an application automatically sends an email verification message to a newly registered user. If configured to use a third party SMTP server like Gmail, the email sending process takes close to half a second if our app is located in Jakarta. This means that we are adding close a half a second of latency before rendering a response to the user, making our app look sluggish (in reality the user creation process itself takes less than 50ms).</p>
<p>So one of our engineers Gilang wrote a simple wrapper around Django&#8217;s send_mail() to perform the task asynchronously using Python&#8217;s threading.</p>
<pre lang="python">
class EmailThread(threading.Thread):
    def __init__(self, subject, body, from_email, recipient_list, fail_silently, html):
        self.subject = subject
        self.body = body
        self.recipient_list = recipient_list
        self.from_email = from_email
        self.fail_silently = fail_silently
        self.html = html
        threading.Thread.__init__(self)

    def run (self):
        msg = EmailMultiAlternatives(self.subject, self.body, self.from_email, self.recipient_list)
        if self.html:
            msg.attach_alternative(self.html, "text/html")
        msg.send(self.fail_silently)

def send_mail(subject, body, from_email, recipient_list, fail_silently=False, html=None, *args, **kwargs):
    EmailThread(subject, body, from_email, recipient_list, fail_silently, html).start()</pre>
<p>To use this small wrapper simply put django_asynchronous_send_mail to your Python path and import it as send_mail():</p>
<pre lang="python">
try:
    from django_asynchronous_send_mail import send_mail
except:
    from django.core.mail import send_mail
</pre>
<p>The syntax is the same as Django&#8217;s built in send_mail() so you don&#8217;t need to change anything. It also supports HTML email:</p>
<pre lang="python">
send_mail('Subject here', 'Here is the message.', 'from@example.com', ['to@example.com'], fail_silently=False, html = '<HTML_TEXT_HERE>')</pre>
<p>The full source code is available at <a href = 'http://github.com/ui/django_asynchronous_send_mail'>GitHub</a>. Obviously, this is a very simple wrapper aimed only to make Django send_mail() behave asynchronously, if you want more advanced featuers like mail queuing or scheduling you should look at other alternatives such as <a href = 'http://github.com/jtauber/django-mailer/'>Django Mailer</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://ui.co.id/blog/asynchronous-send_mail-in-django/feed</wfw:commentRss>
		<slash:comments>2597</slash:comments>
		</item>
		<item>
		<title>Running Django with MySQL on Snow Leopard</title>
		<link>http://ui.co.id/blog/running-django-with-mysql-on-snow-leopard</link>
		<comments>http://ui.co.id/blog/running-django-with-mysql-on-snow-leopard#comments</comments>
		<pubDate>Fri, 05 Feb 2010 08:30:36 +0000</pubDate>
		<dc:creator><![CDATA[Selwin Ong]]></dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://ui.co.id/?p=381</guid>
		<description><![CDATA[Getting Django (or Python) to play nice with MySQL on Apple&#8217;s Mac OS X 10.6 Snow Leopard is really easy: Install MySQL. You can get the DMG from MySQL&#8217;s official download site (make sure you get the 64 bit version because Snow Leopard runs Python in 64bit) Type the following commands into terminal and you [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Getting Django (or Python)  to play nice with MySQL on Apple&#8217;s Mac OS X 10.6 Snow Leopard is really easy:</p>
<ol>
<li>Install MySQL. You can get the DMG from <a href = 'http://dev.mysql.com/downloads/mysql/'>MySQL&#8217;s official download site</a>  (<strong>make sure you get the 64 bit</strong> version because Snow Leopard runs Python in 64bit)</li>
<li>Type the following commands into terminal and you should be all set:
</li>
</ol>
<pre lang="bash">
PATH=/usr/local/mysql/bin:$PATH
sudo easy_install mysql-python
</pre>
<p>Assuming that you already have Django setup properly and configured to run using MySQL, all you need to do is run manage.py runserver</p>
<p>If you run into errors similar to this, you are probably running MySQL in 32 bit, upgrading to 64bit of MySQL should fix this (this happened to me when I upgraded my OS from 10.5 Leopard to 10.6 Snow Leopard):</p>
<pre lang="bash">
Unhandled exception in thread started by <function inner_run at 0x5fd2f0>
Traceback (most recent call last):
  File "/Library/Python/2.6/site-packages/django/core/management/commands/runserver.py", line 48, in inner_run
    self.validate(display_num_errors=True)
  File "/Library/Python/2.6/site-packages/django/core/management/base.py", line 249, in validate
    num_errors = get_validation_errors(s, app)
  File "/Library/Python/2.6/site-packages/django/core/management/validation.py", line 22, in get_validation_errors
    from django.db import models, connection
  File "/Library/Python/2.6/site-packages/django/db/__init__.py", line 41, in <module>
    backend = load_backend(settings.DATABASE_ENGINE)
  File "/Library/Python/2.6/site-packages/django/db/__init__.py", line 17, in load_backend
    return import_module('.base', 'django.db.backends.%s' % backend_name)
  File "/Library/Python/2.6/site-packages/django/utils/importlib.py", line 35, in import_module
    __import__(name)
  File "/Library/Python/2.6/site-packages/django/db/backends/mysql/base.py", line 13, in <module>
    raise ImproperlyConfigured("Error loading MySQLdb module: %s" % e)
django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: dynamic module does not define init function (init_mysql)
</pre>
<p>If, for some reason you prefer to stick with 32bit MySQL, you can also tell Python to run in 32bit mode by typing the following command into terminal (<a href = 'http://www.jaharmi.com/2009/08/29/python_32_bit_execution_on_snow_leopard'>source</a>):</p>
<pre lang="bash">
defaults write com.apple.versioner.python Prefer-32-Bit -bool yes
</pre>
<p>To switch back to running Python in 64bit:</p>
<pre lang="bash">
defaults write com.apple.versioner.python Prefer-32-Bit -bool no
</pre>
<p>Hope this bit of info helps some of you Django/MySQL developers out there :).</p>
]]></content:encoded>
			<wfw:commentRss>http://ui.co.id/blog/running-django-with-mysql-on-snow-leopard/feed</wfw:commentRss>
		<slash:comments>974</slash:comments>
		</item>
		<item>
		<title>Merry Christmas and Happy New Year 2010</title>
		<link>http://ui.co.id/blog/merry-christmas-and-happy-new-year-2010</link>
		<comments>http://ui.co.id/blog/merry-christmas-and-happy-new-year-2010#comments</comments>
		<pubDate>Thu, 24 Dec 2009 06:35:41 +0000</pubDate>
		<dc:creator><![CDATA[Joe]]></dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://ui.co.id/?p=345</guid>
		<description><![CDATA[]]></description>
				<content:encoded><![CDATA[<p><object id="test1" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="498" height="380" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://ui.co.id/wp-content/uploads/2009/12/UI-Xmas-Card.swf" /><param name="name" value="Xmas" /><embed id="test1" type="application/x-shockwave-flash" width="498" height="380" src="http://ui.co.id/wp-content/uploads/2009/12/UI-Xmas-Card.swf" name="Xmas"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://ui.co.id/blog/merry-christmas-and-happy-new-year-2010/feed</wfw:commentRss>
		<slash:comments>3097</slash:comments>
		</item>
		<item>
		<title>Simulating Slow Internet Connection for Website Performance Testing</title>
		<link>http://ui.co.id/blog/slowing-down-your-localhost-connection</link>
		<comments>http://ui.co.id/blog/slowing-down-your-localhost-connection#comments</comments>
		<pubDate>Fri, 06 Nov 2009 07:34:06 +0000</pubDate>
		<dc:creator><![CDATA[Gilang Chandrasa]]></dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://ui.co.id/?p=319</guid>
		<description><![CDATA[When building website, sometimes we need to see how our website run in slow internet connection.

What I want to show you right now is how to simulating slow internet connection...]]></description>
				<content:encoded><![CDATA[<p>I joined this army at November, 2nd 2009, so this is my first week in this basecamp.<br />
My name is Gilang Chandrasa, and I&#8217;m one of UI web developer.</p>
<p>What I want to show you right now is how to simulate slow internet connection.<br />
Why?</p>
<ul>
<li>Checking AJAX functions in slow connection</li>
<li>Measuring if my website is still acceptable in slow connection</li>
</ul>
<p>For windows user, you can use Firefox add ons called <a href="https://addons.mozilla.org/en-US/firefox/addon/5917">Firefox Throttle</a>.<br />
Firefox Throttle only available for windows, if not this would be a great plugin to have on OS X and Linux.</p>
<p>For *nix user, you can rely on tool caled iprelay.<br />
Ubuntu user can install this tool with this command :</p>
<pre lang="bash">
$sudo apt-get install iprelay
</pre>
<p>To simulate 56Kbps internet connection, type this in your terminal :</p>
<pre lang="bash">
$iprelay -b 56000 8001:localhost:80
</pre>
<p>When you type this address http://localhost:8001/ in your browser, you&#8217;ll have 56Kbps connection to your localhost.</p>
]]></content:encoded>
			<wfw:commentRss>http://ui.co.id/blog/slowing-down-your-localhost-connection/feed</wfw:commentRss>
		<slash:comments>3000</slash:comments>
		</item>
		<item>
		<title>Speeding Up Your Website in 5 Minutes (CSS Sprites)</title>
		<link>http://ui.co.id/blog/speeding-up-your-website-in-5-minutes-css-sprites</link>
		<comments>http://ui.co.id/blog/speeding-up-your-website-in-5-minutes-css-sprites#comments</comments>
		<pubDate>Fri, 30 Oct 2009 10:23:48 +0000</pubDate>
		<dc:creator><![CDATA[Selwin Ong]]></dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://ui.co.id/?p=315</guid>
		<description><![CDATA[I would like to once again stress the importance of building a highly optimized website, this time by highlighting some facts presented in the <a href = 'http://en.oreilly.com/velocity2009'>Velocity 2009</a> performance &#038; scalability conference...]]></description>
				<content:encoded><![CDATA[<p>In the <a href="http://ui.co.id/blog/speeding-up-website-gzip-compression">first article of our website optimization series</a> we discussed about the importance of reducing page load times by compressing text based files served by our website. </p>
<p>I would like to once again stress the importance of building a highly optimized website, this time by highlighting some facts presented in the <a href = 'http://en.oreilly.com/velocity2009'>Velocity 2009</a> performance &#038; scalability conference. In this conference <a href = 'http://www.shopzilla.com'>Shopzilla</a>, an online price comparison website shared their findings that increasing their page load times from 4-6 seconds to 1.5 seconds increased their conversion rate from 7 to 12%! </p>
<div id="attachment_316" style="width: 410px" class="wp-caption aligncenter"><a href="http://www.artzstudio.com/2009/06/web-performance-impact-on-revenue-velocity-09-highlights/"><img src="http://ui.co.id/wp-content/uploads/2009/10/shopzilla-performance-summary.png" alt="Reduced page load time leads to increased revenue and page views" title="Reduced page load time leads to increased revenue and page views" width="400" height="300" class="size-full wp-image-316" /></a><p class="wp-caption-text">Image courtesy of artzstudio</p></div>
<p>If in the first article we showed you how to reduce page load time by decreasing the number of bytes needed to be moved across the network, now we will tackle this issue from a different angle &#8211; reducing the number of items that need to be loaded. Each element in a web page (image, icons, external JavaScript and CSS files) represents a request that needs to be served by the server. The less items that need to be served, the faster the load time, plain and simple. </p>
<p>A popular technique to minimize the number of server requests is called <a href = 'http://css-tricks.com/css-sprites/>CSS sprites</a>. CSS sprites speeds up page load time by combining multiple images into one single image. This technique have two advantages:<br />
1. Significantly reduces the number of HTTP requests (if you combine 8 icons into one, you are reducing the number of HTTP requests by 7)<br />
2. Reduces the overall file size</p>
<p>To illustrate the benefit, consider these two seemingly identical pages. The first one is rendered using CSS sprites technique (in which case we combined 8 icons into one single image) while the second one is rendered using conventional icons. To measure the performance gains brought about by CSS sprites we will use <a href = 'http://tools.pingdom.com/'>Pingdom&#8217;s website testing tool</a> that shows how quickly a page loads.</p>
<p><img alt="" src="http://ui.co.id/wp-content/uploads/2009/11/pingdom-sprite.png" title="Load time of a page with CSS sprites are greatly reduced" class="alignnone" width="550" height="65" /></p>
<p><img alt="" src="http://ui.co.id/wp-content/uploads/2009/11/pingdom-regular.png" title="Load time of regular web page with many icons" class="alignnone" width="550" height="226" /></p>
<p>The first page (with CSS sprites) is rendered in 0.9 seconds, while the second page (regular icons) is rendered in 2.4 seconds &#8211; quite a big difference! Furthermore, if we look closely, the image sprite is only 4.96 KB big, while the total size of 8 different icons is 9.72 KB so not only CSS sprites reduce the number of HTTP requests, but it also reduces the aggregate file size.</p>
<p>Using this technique is really easy:<br />
1. Visit <a href = 'http://css-sprit.es/'>css-sprit.es</a><br />
2. Upload the images you want to combine<br />
3. After you&#8217;re done uploading the images press on the &#8220;Create CSS Sprite&#8221; button<br />
4. Download the resultant image sprite and CSS codes<br />
5. Paste it into your HTML code</p>
<p>Aside from increasing website performance, you could also use techniques that <a href = 'http://www.alistapart.com/articles/sprites2/'>combine JavaScript animation with CSS sprites</a> to make attractive navigation menus. Smashing Magazine has this <a href = 'http://www.smashingmagazine.com/2009/04/27/the-mystery-of-css-sprites-techniques-tools-and-tutorials/'>excellent write up about CSS sprites</a> that you might want to read.</p>
]]></content:encoded>
			<wfw:commentRss>http://ui.co.id/blog/speeding-up-your-website-in-5-minutes-css-sprites/feed</wfw:commentRss>
		<slash:comments>1983</slash:comments>
		</item>
	</channel>
</rss>
