<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <title>Reza Muhammad</title>
    <link rel="alternate" type="text/html" href="http://rezmuh.sixceedinc.com/" />
    <link rel="self" type="application/atom+xml" href="http://rezmuh.sixceedinc.com/atom.xml" />
    <id>tag:rezmuh.sixceedinc.com,2010-02-17://5</id>
    <updated>2010-02-22T06:46:09Z</updated>
    <subtitle>A Technology Enthusiast</subtitle>
    <generator uri="http://www.sixapart.com/movabletype/">Movable Type 5.01</generator>

<entry>
    <title>Create a Simple App with Django and MongoDB: Part 1</title>
    <link rel="alternate" type="text/html" href="http://rezmuh.sixceedinc.com/2010/02/create-a-simple-app-with-django-and-mongodb-part-1.html" />
    <id>tag:rezmuh.sixceedinc.com,2010://5.17</id>

    <published>2010-02-21T16:36:05Z</published>
    <updated>2010-02-22T06:46:09Z</updated>

    <summary>In my previous post, I talked about using MongoDB. Once I felt I started to grasp the idea of it, I wanted to try to use it in a more useful application. This is my first attempt on creating an...</summary>
    <author>
        <name>Reza Muhammad</name>
        
    </author>
    
        <category term="Database" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Python" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="django" label="django" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="mongodb" label="mongodb" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="mongoengine" label="mongoengine" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="pymongo" label="pymongo" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://rezmuh.sixceedinc.com/">
        <![CDATA[<p>In my previous post, I talked about using MongoDB.  Once I felt I
started to grasp the idea of it, I wanted to try to use it in a more useful application.
This is my first attempt on creating an application on Django using MongoDB.
If there is something wrong in what I do, please let me know.  I'll be more than happy to receive suggestions.</p>

<p>This is a first part of a (supposedly) multiple series, but I am no expert by any means.
I'm writing these down as a way to explore more about MongoDB, and if I can finish this multiple series, 
I will then start evaluating whether MongoDB is suitable for any of my projects.
Today, we are only going scratch the surface by focusing on creating documents and inserting some data to those documents. 
Hopefully, the other parts of this series will be updated in a more predictable timeframe.</p>

<h3>Application Background</h3>

<p>As an experiment, I was thinking to create a simple application where I can create tickets with multiple statuses 
(kind of like an issue tracker, but a simple one).  I also want to know if there are any updates to its status over the time.</p>

<p>I learned most of this stuff from <a href="http://github.com/hmarr/django-mumblr" title="Django-Mumblr">Django-Mumblr</a>, 
and <a href="http://hmarr.com/mongoengine/index.html" title="MongoEngine">MongoEngine documentation</a>. So thanks to them for making it opensource.</p>

<h3>Requirements</h3>

<p>In order to make Django work with MongoDB, we need to have a Python driver for MongoDB.  It's called pyMongo, and you can download it with <code>pip</code>, or <code>easy_install</code>.
Another library we need to have is MongoEngine, an ORM-like (they call it Object-Document-Mapper) library that interacts with MongoDB.  MongoEngine itself needs pyMongo, 
so instead of working with whatever API pyMongo provides, we are going to use MongoEngine API instead.  To install MongoEngine, you can run:</p>

<pre><code>$ sudo pip install mongoengine
</code></pre>

<p>The above command will install mongoengine, as well as pymongo.</p>

<h3>Creating Django Environment</h3>

<p>We will start by having a project, and one application.  We run:</p>

<pre><code>$ django-admin.py startproject mongoticket
$ cd mongoticket
$ python manage.py startapp ticket
</code></pre>

<p>Once the project (mongoticket) and the application (ticket) is created, we need to create a connection to tell Django to access which database. 
In <code>settings.py</code> under the project directory, we need to add these two lines:</p>

<pre><code>from mongoengine import connect
connect('ticket', 'dummy', 'dummy')
</code></pre>

<p>This tells that the project will use a database called "ticket" with a user "dummy" and a password "dummy". 
If you need to learn more on how to create MongoDB database with authentication, you can see my reference 
from <a href="" title="http://rezmuh.sixceedinc.com/2010/02/basic-commands-to-get-you-started-with-mongodb.html">my other post</a></p>

<h3>Creating a Document Schema</h3>

<p>I think I mentioned it before that MongoDB itself is a schema-free database engine. 
However, I think having schema is still better than not having schema at all. 
Some rows can have more fields than the others, but for the most part, they should have some identical fields. 
This is what MongoEngine provides. Besides, I think I'm still used to the concept of RDBMS, so not having a schema at all still frightens me.</p>

<p>Anyway, let's create a file called <code>document.py</code> inside <code>ticket</code> directory, and here's the content of the file:</p>

<pre><code>from mongoengine import *

class Status(Document):
    name = StringField()


class TicketStatus(EmbeddedDocument):
    before = ReferenceField(Status)
    after = ReferenceField(Status)
    changed_on = DateTimeField()


class Ticket(Document):
    description = StringField(required=True, unique=True)
    created_on = DateTimeField()
    changes = ListField(EmbeddedDocumentField(TicketStatus))
</code></pre>

<ol>
<li><p>Status Document</p>

<p>Status will be a holder to define statuses.  They will only have a few entries such as 'New', 'Accepted', 'On Progress', 'Closed', 'Rejected' and so on. 
If we were using a Django ORM, we could've done it with Choices, but I am not sure if MongoEngine supports that, so we use document instead.</p></li>
<li><p>Ticket Document</p>

<p>Another document is called Ticket.  As you can see here, the fields for Ticket is description, created_on and changes. 
In changes field, I want to have a list of dictionary that tells me when have the statuses been updated.  </p>

<p>For example, if I create a ticket called "fix this bug", I want to know when this ticket was created, when was it accepted, on progress, and finished. 
In the end, I want to know how long does it take to finish a bug.</p>

<p>In ORM, this is similar to ManyToOne relationships. In MongoDB, we don't have to as it is a non-relational database engine.</p></li>
<li><p>TicketStatus Document</p>

<p>The third document we have is TicketStatus but it inherits from <code>EmbeddedDocument</code> rather than <code>Document</code>.  With EmbeddedDocument, we can embed a particular document to another document. 
In this case, a <code>changes</code> field in Ticket document will have a list of multiple TicketStatus document. This is similar to <code>Ticket.objects.ticketstatus_set.all()</code> in Django ORM 
but the difference is TicketStatus collection is never written to the database.</p>

<p>before and after field is similar to ForeignKey in ORM.  It references from Status Document.</p></li>
</ol>

<p>Now we are ready to start inserting some data to the database</p>

<h3>Inserting Data to the Database</h3>

<p>Since we are only going to inserting data in this part, we are not going to create views yet.  Rather, we will work on Python shell. 
We will probably start working on views functions on the next series.</p>

<p>Now, let's create entries to our Status document.  Inside your Django project directory (mongoticket), run:</p>

<pre><code>$ python manage.py shell
... snip ...
&gt;&gt;&gt; from ticket.document import Status, TicketStatus, Ticket
&gt;&gt;&gt; from datetime import datetime
&gt;&gt;&gt;
&gt;&gt;&gt; Status(name='New').save()
&gt;&gt;&gt; Status(name='On Progress').save()
&gt;&gt;&gt; Status(name='Rejected').save()
&gt;&gt;&gt; Status(name='Closed').save()
&gt;&gt;&gt; 
&gt;&gt;&gt; new = Status.objects(name='New')[0]
&gt;&gt;&gt; progress = Status.objects(name='On Progress')[0]
&gt;&gt;&gt; rejected = Status.objects(name='Rejected')[0]
&gt;&gt;&gt; closed = Status.objects(name='Closed')[0]
</code></pre>

<p>These are the basic statuses we are going to have.  In reality, we probably need more, but we will just start with the basics.</p>

<p>Next, let's create a ticket:</p>

<pre><code>&gt;&gt;&gt; new_ticket = Ticket(description='Creating a Document', created_on=datetime.now())
&gt;&gt;&gt; new_ticket.save()
</code></pre>

<p>You can now access its fields from <code>new_ticket.description</code> and <code>new_ticket.created_on</code></p>

<p>Once we have our ticket, let's try to add some changes to it.  For example, assuming that the first created ticket has a status of 'New', 
now let's move it to 'On Progress' as if a ticket has been accepted and someone is working on it.</p>

<pre><code>&gt;&gt;&gt; new_to_progress = TicketStatus(before=new, after=progress, 
...     changed_on=datetime.now())
&gt;&gt;&gt; q = Ticket.objects(id=new_ticket.id)
&gt;&gt;&gt; q.update(push__changes=new_to_progress)
</code></pre>

<p>If you notice earlier, <code>changes</code> field in Ticket document contains a list of embedded documents of TicketStatus document. 
So what we did was, we created a TicketStatus object, we look for the ticket we want to add the its changes to, and we push the object to the <code>changes</code> list.</p>

<p>Let's say that moments later the ticket has been taken care of, and it is now done.  We want to add another TicketStatus to be embedded in Ticket document to identify this. 
For that, we do:</p>

<pre><code>&gt;&gt;&gt; close_ticket = TicketStatus(before=progress, after=closed, 
...     changed_on=datetime.now())
&gt;&gt;&gt; q.update(push__changes=close_ticket)
</code></pre>

<p>So now, we should have a ticket called 'Create a document' where it has been created, moved to 'On Progress', and finally 'Closed'.  Let's make sure if it works correctly.</p>

<pre><code>&gt;&gt;&gt; q = Ticket.objects(id=new_ticket.id)[0]
&gt;&gt;&gt; for i in q.changes:
...     'From \'%s\' =&gt; \'%s\', on %s' % (i.before.name, i.after.name, 
...     i.changed_on.strftime("%B %d, %Y at %I:%M %p"))
... 
u"From 'New' =&gt; 'On Progress', on February 21, 2010 at 08:11 AM"
u"From 'On Progress' =&gt; 'Closed', on February 21, 2010 at 08:23 AM"
&gt;&gt;&gt;
</code></pre>

<p>There you go, it is exactly what we wanted.</p>

<p>That is it for this series.  We have created a document schema in <code>document.py</code>, created some objects for each documents and we link them as well as embedding documents to another document. 
Hopefully, this is helpful for you who are just starting to work with MongoDB on Django. 
Stay tune for the next series as we will start creating views functions and accessing it from the web.</p>

<p>If you have any comments or suggestions, please let me know.</p>
]]>
        

    </content>
</entry>

<entry>
    <title>Basic Commands to Get You Started with MongoDB</title>
    <link rel="alternate" type="text/html" href="http://rezmuh.sixceedinc.com/2010/02/basic-commands-to-get-you-started-with-mongodb.html" />
    <id>tag:rezmuh.sixceedinc.com,2010://5.16</id>

    <published>2010-02-18T13:16:48Z</published>
    <updated>2010-02-18T13:20:05Z</updated>

    <summary>MongoDB is a schema-free, document-oriented and non-relational database engine. For more information about MongoDB, their website, a Wikipedia Entry or these screencasts will probably explain it better than I do. I wanted to try MongoDB out of curiousity. While there...</summary>
    <author>
        <name>Reza Muhammad</name>
        
    </author>
    
        <category term="Database" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="mongodb" label="MongoDB" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="nosql" label="NoSQL" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://rezmuh.sixceedinc.com/">
        <![CDATA[<p><a href="http://www.mongodb.org" title="MongoDB">MongoDB</a> is a schema-free, document-oriented and non-relational database engine. For more information about MongoDB, <a href="http://mongodb.org/display/DOCS/Home">their website</a>, <a href="http://en.wikipedia.org/wiki/MongoDB">a Wikipedia Entry</a>  or <a href="http://nosql.mypopescu.com/post/304497261/introduction-to-mongodb-screencast">these screencasts</a> will probably explain it better than I do.</p>

<p>I wanted to try MongoDB out of curiousity.  While there are other options to document-oriented database engine such as <a href="http://couchdb.apache.org/">CouchDB</a>, or <a href="http://1978th.net/tokyotyrant/">Tokyo Tyrant</a>, I decided to go with MongoDB because I find their documentation is easy to follow.</p>

<p>After fiddling with MongoDB for a few hours, I thought I'd write down a few basic commands to get you started with MongoDB.  Coming from a RDBMS background like <a href="http://www.mysql.com">MySQL</a> and <a href="http://www.postgresql.org">PostgreSQL</a>, I found some of these commands are quite useful for me to get me going with MongoDB.  Hopefully, it can help you too if you are thinking to give MongoDB a shot.</p>

<p>As a quick note, a few symbols are repetitively used, and these are the common conventions (if you will):</p>

<ol>
<li><code>$</code> identifies that the command is executed from the command prompt</li>
<li><code>&gt;</code> identifies that the command is executed from MongoDB shell prompt</li>
</ol>

<h3>Installing MongoDB</h3>

<p>Download from <a href="http://www.mongodb.org/display/DOCS/Downloads" title="MongoDB Website">MongoDB Website</a>.  Once downloaded, extract the file and you will be presented with a directories containing MongoDB executables.</p>

<p>Assuming the folder created is called mongodb and it is located in <code>/home/rezmuh/mongodb</code>.  You should have the following commands and folders:</p>

<pre><code>$ ls
GNU-AGPL-3.0        bin         mongodb.log
README          include
THIRD-PARTY-NOTICES lib
</code></pre>

<h3>Run MongoDB as a daemon</h3>

<p>By default, MongoDB is running on port 27017, and database files are located in /data/db/ directory.  So, make sure there is no application running on that port, and /data/db exists.</p>

<pre><code>$ pwd
/home/rezmuh/mongodb
$ mkdir -p /data/db/
$ bin/mongod --fork --logpath ./mongodb.log --logappend
</code></pre>

<h3>Create a new user</h3>

<pre><code>$ bin/mongo
&gt; use admin
&gt; db.addUser('dummy, 'dummy')
{ "user" : "dummy", "pwd" : "734b8c8ddfce845642c258769bb3e936" }
</code></pre>

<p>If you see a similar message to the above, it means that a user 'dummy' with password 'dummy' is successfully created. Now, we want to make sure that MongoDB is running with autentication.</p>

<p>In order to do that, we need to restart MongoDB daemon to use authentication:</p>

<pre><code>$ killall mongod
$ bin/mongod --fork --logpath ./mongodb.log --logappend --auth
forked process: [...]
all output going to: ./mongodb.log
</code></pre>

<h3>Connecting to a Database with authentication</h3>

<pre><code>$ bin/mongo -u [username] -p [password] [db name]
</code></pre>

<p>As a reminder, MongoDB seems to handle users within a database.  So from the previous commands, we created a user 'dummy' for 'admin' database.</p>

<p>So at this point, we can only run:</p>

<pre><code>$ bin/mongo -u dummy -p dummy admin
</code></pre>

<p>This will connect admin database as a user 'dummy'.</p>

<h3>Create a new Database</h3>

<pre><code>&gt; use new_database
</code></pre>

<p>In MongoDB, <code>use new_database</code> will switch our access to the 'new_database' database.  If the database does not exist, it will automatically create it for you.</p>

<p>To create a new user to <code>new_database</code>, run:</p>

<pre><code>&gt; db.addUser('dummy', 'differentpassword')
</code></pre>

<p>To access your new_database with a specified user, run:</p>

<pre><code>$ bin/mongo -u dummy -p differentpassword new_database
MongoDB shell version: 1.2.2
url: new_database
connecting to: new_database
type "help" for help
</code></pre>

<p>The above commands show that a user 'dummy' is created to access 'new_database' but it has a different password than the one who can access database 'admin'</p>

<h3>Deleting a database</h3>

<pre><code>&gt; use [db name]
&gt; db.dropDatabase()
</code></pre>

<h3>Working with Collections (Tables)</h3>

<pre><code>&gt; use new_database
&gt; db.profile.save({name: 'Reza Muhammad', blog: 'http://rezmuh.sixceedinc.com'})
&gt; db.profile.find()
{ "_id" : ObjectId("4b7d2bdfe003af231920152a"), "name" : "Reza Muhammad", "blog" : "http://rezmuh.sixceedinc.com" }
&gt; show collections
profile
system.indexes
system.users
</code></pre>

<p>The above commands will insert 'Reza Muhammad' to a field name, and 'http://rezmuh.sixceedinc.com' to a field blog in a profile table.  If the table does not exist, it will create it automatically.
The <code>show collections</code> commands will list all the collections exist in the database.  In this case, profile collection exists because we already created one (through <code>db.profile.save()</code>)</p>

<p>Since MongoDB is a schema-free database engine, you can also create a new record in profile collection that has different fields than previous mentioned.</p>

<h3>Some Useful Commands</h3>

<ol>
<li>Use <code>bin/mongo</code> to to a MongoDB server without authentication</li>
<li>User <code>bin/mongo -u [username] -p [password] [db name]</code> to connect to a [db name] database with a specified username and password</li>
<li><code>show dbs</code> lists all the available databases</li>
<li><code>use [db name]</code> will let you access the database if it exists. Otherwise, it will create a new database</li>
<li><code>show collections</code> will give you a list of collections (tables) in the database</li>
<li>To get a list of data in a specific collection, use <code>db.[collection name].find()</code></li>
<li>To get a list of all available methods within a collection, run <code>db.[collection name].help()</code></li>
<li><code>db.getName()</code> will inform you the database name you're currently accessing</li>
<li><code>db.dropDatabase()</code> will drop the current database you're accessing</li>
<li><code>db.addUser('[username]', '[password]')</code> will create a new user for to access the current database</li>
<li><code>db.help()</code> lists all the available methods you can use within a database</li>
</ol>

<p>So there you go, those were the commands to get me started with MongoDB.</p>
]]>
        

    </content>
</entry>

<entry>
    <title>Playing Around with Habari</title>
    <link rel="alternate" type="text/html" href="http://rezmuh.sixceedinc.com/2010/02/playing-around-with-habari.html" />
    <id>tag:rezmuh.sixceedinc.com,2010://5.15</id>

    <published>2010-02-16T10:46:07Z</published>
    <updated>2010-02-16T10:47:38Z</updated>

    <summary>Habari Project is a relatively new Blogging Platform or Blogging software. The project started more or less two years ago, and the current milestone is at version 0.6.3. Habari claims to be different than other blogging platform, technically and non-technically....</summary>
    <author>
        <name>Reza Muhammad</name>
        
    </author>
    
        <category term="Reviews" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="blogging" label="blogging" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="habari" label="habari" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://rezmuh.sixceedinc.com/">
        <![CDATA[<p><a href="http:/habariproject.org">Habari Project</a> is a relatively new Blogging Platform or Blogging software.  The project started more or less two years ago, and the current milestone is at version 0.6.3. Habari claims to be different than other blogging platform, <a href="http://wiki.habariproject.org/en/FAQ#How_is_this_different_from_the_eleventy_billion_other_blog_packages.3F">technically</a> and <a href="http://wiki.habariproject.org/en/Getting_Involved">non-technically</a>.  For more complete description of Habari, it is wiser to look at their <a href="http://habariproject.org">website</a></p>

<p>Habari is written in PHP5, and uses PHP Data Objects (PDO) to connect to databases.  My initial interest in Habari is their PostgreSQL support.  I am using PostgreSQL in my server and since most of my applications already use PostgreSQL, I'm a little hesitant to install MySQL just for one blog.  With the recent documentation hinting that <a href="http://www.movabletype.org/documentation/system-requirements.html#database-requirements">Movable Type will drop PostgreSQL</a> in the near future, I thought I might as well look at other blogging platform that has PostgreSQL support.  And Habari offers this functionality.</p>

<p>Things I like about Habari are:</p>

<ol>
<li>PostgreSQL support.</li>
<li>Simple Admin Interface.</li>
<li>There are relatively many available <a href="http://wiki.habariproject.org/en/Available_Plugins">plugins</a> and <a href="http://wiki.habariproject.org/en/Available_Themes">themes</a>.</li>
<li>Creating custom plugins (and supposedly themes too, but I have not tried it) are quite easy.</li>
</ol>

<p>The things I think they can improve on are:</p>

<ol>
<li>More plugins and themes (they are never enough, right?)</li>
<li>Support for Categories (Habari only uses tags for each entry)</li>
<li>Some kind of WYSIWYG editor when creating  an entry.</li>
<li>Documentation can use </li>
</ol>

<p>My first impressions on Habari are mostly good.  I do not find lots of bad things about the software other than they can use more contributors to speed things up.  Technically, I like what they do.  Creating plugin is quite simple, and their documentation on this area is passable to get you started.  I've already started to create a simple plugin, and I like how simple it is.</p>

<h3>Some Pictures</h3>

<p>These are some screenshots to get you idea how Habari Admin page looks like.</p>

<p>Admin dashboard page:</p>

<p><img src="http://rezmuh.sixceedinc.com/2010/02/16/habari-dashboard.jpg" alt="Admin Dashboard Page" title="Admin Dashboard Page" /></p>

<p>Admin Menu:</p>

<p><img src="http://rezmuh.sixceedinc.com/2010/02/16/habari-dashboard-hover.jpg" alt="Admin Menu Hover" title="Admin Menu" /></p>

<p>New Entry:</p>

<p><img src="http://rezmuh.sixceedinc.com/2010/02/16/habari-new-entry.jpg" alt="Dashboard New Entry" title="Dashboard New Entry" /></p>
]]>
        

    </content>
</entry>

<entry>
    <title>Finally, A New Theme for Movable Type 5</title>
    <link rel="alternate" type="text/html" href="http://rezmuh.sixceedinc.com/2010/02/finally-a-new-theme-for-movable-type-5.html" />
    <id>tag:rezmuh.sixceedinc.com,2010://5.14</id>

    <published>2010-02-15T14:46:06Z</published>
    <updated>2010-02-15T14:59:14Z</updated>

    <summary>For the past few days I&apos;ve been looking for Movable Type 5 templates. I couldn&apos;t find them. Most of the templates I found were for Movable Type 4, and I was hesitant to try it on my blog. I haven&apos;t...</summary>
    <author>
        <name>Reza Muhammad</name>
        
    </author>
    
    <category term="movabletype" label="Movable Type" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="mtthemes" label="MT Themes" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://rezmuh.sixceedinc.com/">
        <![CDATA[<p>For the past few days I've been looking for Movable Type 5 templates.  I couldn't find them.  Most of the templates I found were for Movable Type 4, and I was hesitant to try it on my blog.</p>

<p>I haven't created a theme for any blog engine yet, and I've heard good things about MT's template tags that they are customizable and flexible.  From my experience though, they are quite complicated.  It is true that the template tags are very flexible and Movable Type has lots of template tags that they even have a list of <a href="http://www.movabletype.org/documentation/appendices/tags/template-tag-types.html#app">appendices</a> for it.</p>

<p>I created this theme in a relatively short amount of time, so there might be some bugs here and there.  These are some of the things that I have in this theme:</p>

<ol>
<li>This theme is based on Pico theme from MT5's default install.</li>
<li>Navigation panel are moved to the top and "hidden" until you click on the navigation.  It lists only Category (if the blog doesn't have any categories, it will list 10 most popular tags by entries), pages, monthly archives, and search box.</li>
<li>Default font is using Helvetica Neueu Light, Helvetica Neue, Helvetica, Arial, and lastly is regular sans-serif.  I know they are not standard fonts but I happen to like them very much.  Since I do not have too many visitors on my blog, the font issues is something I'm willing to sacrifice.</li>
<li>I only enabled monthly archives, and category archives since I do not use other types of archives.</li>
<li>This time does not have different looks on multiple columns such as "wide-thin-thin", "thin-wide-thin" and more.  I only made one.</li>
</ol>

<p>I think that's pretty much what I have for this theme.  If you have any comments please let me know.  Also, if there people who like this theme, I don't mind publishing it for the rest of you :)</p>
]]>
        

    </content>
</entry>

<entry>
    <title>Testing a Blog Post from Mobile Device</title>
    <link rel="alternate" type="text/html" href="http://rezmuh.sixceedinc.com/2010/02/testing-a-blog-post-from-mobile-device.html" />
    <id>tag:rezmuh.sixceedinc.com,2010://5.13</id>

    <published>2010-02-12T18:34:09Z</published>
    <updated>2010-02-12T18:38:16Z</updated>

    <summary>Unlike Wordpress, it is rather hard to find a native iPhone application for Movable Type. Six Apart teams have a Typepad application for iPhone, but not Movable Type. For iPhone i found two application that supports Movable Type, BlogPress and...</summary>
    <author>
        <name>Reza Muhammad</name>
        
    </author>
    
    <category term="iphone" label="iPhone" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="movabletype" label="Movable Type" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://rezmuh.sixceedinc.com/">
        <![CDATA[<p>Unlike Wordpress, it is rather hard to find a native iPhone application for Movable Type. Six Apart teams have a <a href="www.typepad.com">Typepad</a> application for iPhone, but not Movable Type.  For iPhone i found two application that supports Movable Type, BlogPress and BlogWriter.</p>

<p>I&#8217;m currently trying out BlogWriter Free to see how it works.  Connections to MT is going through XML-RPC.  As for the application itself, it&#8217;s pretty basic. There&#8217;s no WYSIWYG when posting entries, so I&#8217;m not sure what the format will look like.</p>

<p>I&#8217;m going to try this for a few days to see if I like it. </p>
]]>
        

    </content>
</entry>

<entry>
    <title>Little Tips on Upgrading to MovableType 5</title>
    <link rel="alternate" type="text/html" href="http://rezmuh.sixceedinc.com/2010/02/little-tips-on-upgrading-to-movabletype-5.html" />
    <id>tag:rezmuh.sixceedinc.com,2010://5.11</id>

    <published>2010-02-10T08:59:50Z</published>
    <updated>2010-02-10T09:00:09Z</updated>

    <summary><![CDATA[I have to admit, I don't exactly follow MovableType's progress. &nbsp;Even though I am using MT for my blog, I hardly pay attention anything related to it. &nbsp;Yesterday, I decided to upgrade my blog to the latest MovableType release. &nbsp;As...]]></summary>
    <author>
        <name>Reza Muhammad</name>
        
    </author>
    
    <category term="movabletype" label="MovableType" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="mt5" label="MT5" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="upgradingmovabletype" label="Upgrading MovableType" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://rezmuh.sixceedinc.com/">
        <![CDATA[I have to admit, I don't exactly follow MovableType's progress. &nbsp;Even though I am using MT for my blog, I hardly pay attention anything related to it. &nbsp;Yesterday, I decided to upgrade my blog to the latest MovableType release. &nbsp;As I went to <a href="http://www.movabletype.org">MT's website</a>, MovableType 5 is the current available release. &nbsp;So I downloaded that. &nbsp;Without reading too much about what changes and what not, I simply read what the upgrade process was like.<div><br /></div><div>When I upgraded, I only made a physical backup of my blog, but not the database since I read that there's a mt-upgrade.cgi file where it will upgrade the database for you (super!). After the upgrading process finished, I was puzzled. &nbsp;The admin look is totally different, and apparently MT5 has a different way of treating blogs than MT4.</div><div><br /></div><div><font class="Apple-style-span" style="font-size: 1.25em; "><font class="Apple-style-span" style="font-size: 1.25em; "><font class="Apple-style-span" style="font-size: 0.8em; ">Blogs, or Websites? Hmm..</font></font></font></div><div><font class="Apple-style-span" style="font-size: 1.25em; "><font class="Apple-style-span" style="font-size: 1.25em; "><font class="Apple-style-span" style="font-size: 0.8em; "><font class="Apple-style-span" style="font-size: 0.8em; "><br /></font></font></font></font></div><div><font class="Apple-style-span" style="font-size: 1.25em; "><font class="Apple-style-span" style="font-size: 1.25em; "><font class="Apple-style-span" style="font-size: 0.8em; "><font class="Apple-style-span" style="font-size: 0.8em; ">In MT4, once you installed MovableType, you start by creating a blog, and you're ready to blog right away. &nbsp;This behaviour changes in MT5</font></font></font></font></div><div><s><br /></s></div><div><font class="Apple-style-span" style="font-size: 1.25em; "><font class="Apple-style-span" style="font-size: 1.25em; "><font class="Apple-style-span" style="font-size: 0.8em; "><font class="Apple-style-span" style="font-size: 0.8em; ">In MT5, I need to have a website first before I can have a blog. Within a website I can create multiple blogs. &nbsp;Websites and blogs should have different URL. &nbsp;If they are the same, the first published site (or blog) will be the one that's &nbsp;available from the browser.</font></font></font></font></div><div><font class="Apple-style-span" style="font-size: 1.25em; "><font class="Apple-style-span" style="font-size: 1.25em; "><font class="Apple-style-span" style="font-size: 0.8em; "><font class="Apple-style-span" style="font-size: 0.8em; "><br /></font></font></font></font></div><div><font class="Apple-style-span" style="font-size: 1.25em; "><font class="Apple-style-span" style="font-size: 1.25em; "><font class="Apple-style-span" style="font-size: 0.8em; "><font class="Apple-style-span" style="font-size: 0.8em; "><font class="Apple-style-span" style="font-size: 1.25em; ">Creating a Website</font></font></font></font></font></div><div><font class="Apple-style-span" style="font-size: 1.25em; "><font class="Apple-style-span" style="font-size: 1.25em; "><font class="Apple-style-span" style="font-size: 0.8em; "><font class="Apple-style-span" style="font-size: 0.8em; "><font class="Apple-style-span" style="font-size: 1.25em; "><font class="Apple-style-span" style="font-size: 0.8em; "><font class="Apple-style-span" style="font-size: 0.8em; "><font class="Apple-style-span" style="font-size: 1.25em; "><br /></font></font></font></font></font></font></font></font></div><div>To create a website, I went to the admin panel and click on "Create a Website". &nbsp;If I only wanted to have a blog, I still need to create a website first. &nbsp;I inserted the URL of the website (it is the same as my blog URL), the Root of the website (also the same with my Blog Root), then I clicked "Save", but <b>I did not publish</b>&nbsp;the website. &nbsp;After the website is created, I can create a blog.</div><div><br /></div><div><font class="Apple-style-span" style="font-size: 1.25em; ">Creating a Blog</font></div><div><font class="Apple-style-span" style="font-size: 1.25em; "><font class="Apple-style-span" style="font-size: 0.8em; "><br /></font></font></div><div><font class="Apple-style-span" style="font-size: 1.25em; "><font class="Apple-style-span" style="font-size: 0.8em; ">In the dashboard page of the admin panel, I can now see my new created website. &nbsp;Within the website, there is a button called "New Blog". &nbsp;I clicked that and it lets me input my blog information.</font></font></div><div><font class="Apple-style-span" style="font-size: 1.25em; "><font class="Apple-style-span" style="font-size: 0.8em; "><br /></font></font></div><div><font class="Apple-style-span" style="font-size: 1.25em; "><font class="Apple-style-span" style="font-size: 0.8em; ">I use the same name for my blog as I did for my website (Reza Muhammad), my blog url is the same as my website url (http://rezmuh.sixceedinc.com), and my blog root is also the same as my website. Then I clicked "Create".</font></font></div><div><font class="Apple-style-span" style="font-size: 1.25em; "><font class="Apple-style-span" style="font-size: 0.8em; "><br /></font></font></div><div><font class="Apple-style-span" style="font-size: 1.25em; "><font class="Apple-style-span" style="font-size: 0.8em; ">After the new blog is created, then I can publish the blog. &nbsp;At this point, I have a new blog running on MT5. &nbsp;</font></font></div><div><font class="Apple-style-span" style="font-size: 1.25em; "><font class="Apple-style-span" style="font-size: 0.8em; "><br /></font></font></div><div><font class="Apple-style-span" style="font-size: 1.25em; "><font class="Apple-style-span" style="font-size: 0.8em; "><font class="Apple-style-span" style="font-size: 1.25em; ">Restoring Old Blog Entries and Comments</font></font></font></div><div><br /></div><div><font class="Apple-style-span" style="font-size: 1.25em; "><font class="Apple-style-span" style="font-size: 0.8em; ">What I noticed after my blog is running is that all of my blog entries from MT4 exists on the table, but I cannot access it from the admin panel. &nbsp;To restore all of my blog entries and comments (which are not alot, as you can see), here's what I did:</font></font></div><div><font class="Apple-style-span" style="font-size: 1.25em; "><font class="Apple-style-span" style="font-size: 0.8em; "><br /></font></font></div><div><ol><li>Go to your blog in the admin panel, then you will see that the address bar is something like:&nbsp;<i>http://domain_name/mt-directory/mt.cgi?__mode=dashboard&amp;blog_id=&lt;blog_id_number&gt;</i>. &nbsp;Now, the reason why my entries and comments are not shown is because my old blog_id is different than my new blog_id.</li><li>To make my entries show, I went into the SQL command prompt (I use PostgreSQL), I did:&nbsp;<i>UPDATE mt_entry SET entry_blog_id = &lt;blog_id_number&gt;;</i></li><li>The last thing I need is to also make my old coments shown. &nbsp;For that, I did:&nbsp;<i>UPDATE mt_comment SET comment_blog_id = &lt;blog_id_number&gt;;</i></li></ol><div>That was all I had to do. &nbsp;After I did those two steps, my old entries and comments are now back :)</div><div><br /></div><div>If you happen to have a similar problem as I was, this post will probably help you. I have a hard time looking for MT5 documentation, so this tip will hopefully also help me in the future in case of similar problem arises.</div></div>]]>
        
    </content>
</entry>

<entry>
    <title>Blog Engine moved to Movable Type, Feed Address Change</title>
    <link rel="alternate" type="text/html" href="http://rezmuh.sixceedinc.com/2009/07/blog-engine-moved-to-movable-type-feed-address-change.html" />
    <id>tag:rezmuh.sixceedinc.com,2009://1.9</id>

    <published>2009-07-09T04:11:35Z</published>
    <updated>2010-02-13T07:25:13Z</updated>

    <summary><![CDATA[Hi,This is a quick note to those who have been following my blog. As a part of my "Massive Migration" (I will talk on this on the upcoming articles), I migrated my blog engine from Wordpress to Movable Type. &nbsp;In...]]></summary>
    <author>
        <name>Reza Muhammad</name>
        
    </author>
    
        <category term="Miscellaneous" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="movabletype" label="Movable Type" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="sixceed" label="Sixceed" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="wordpress" label="Wordpress" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://rezmuh.sixceedinc.com/">
        <![CDATA[Hi,<div><br /></div><div>This is a quick note to those who have been following my blog. As a part of my "Massive Migration" (I will talk on this on the upcoming articles), I migrated my blog engine from <a href="http://www.wordpress.org">Wordpress</a> to <a href="http://www.movabletype.com">Movable Type</a>. &nbsp;In result, these are some of the changes you might notice:</div><div><br /></div><div><ul><li><b>Entries URL are different</b>. By default, uses /yyyy/mm/article-slug.html. &nbsp;This is what I have on my blog now. &nbsp;Previously, it was /yyyy/mm/article-slug/. &nbsp;So the difference is it uses the ".html" extension from now on. &nbsp;I hope, this will improve performance, since I can cache it better.</li><li><b>Feed Address Change. </b>Although I have been using <a href="http://www.feedburner.com">FeedBurner</a>&nbsp;to centralize my feed, I was told that since I changed feed subscription from RSS to Atom (It seems this is the default with Movable Type), FeedBurner had to rebuild my entries feed. &nbsp;So, for those of you who have subscribed to my feed, you might want to update my feed to: <a href="http://feeds.feedburner.com/rezmuh">http://feeds.feedburner.com/rezmuh</a></li></ul><br /></div><div>That is all I have to say for now. &nbsp;I will update more in the near future. I have quite a few ideas I want to talk about :)</div>]]>
        
    </content>
</entry>

<entry>
    <title>Setting up PIL with libjpeg on Mac OS X Leopard</title>
    <link rel="alternate" type="text/html" href="http://rezmuh.sixceedinc.com/2009/04/setting-up-pil-with-libjpeg-on-mac-os-x-leopard.html" />
    <id>tag:tmp.sixceedinc.com,2009://1.8</id>

    <published>2009-04-01T09:18:33Z</published>
    <updated>2010-02-15T14:42:11Z</updated>

    <summary>Background For the past few months I&apos;ve been playing around with Django, and it has come to a situation where I need Imaging Library to fulfill my project&apos;s requirements. In Python, it is handled with PIL. So, here&apos;s what I...</summary>
    <author>
        <name>Reza Muhammad</name>
        
    </author>
    
        <category term="Python" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="django" label="django" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="libjpeg" label="libjpeg" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="pil" label="pil" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="python" label="Python" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://rezmuh.sixceedinc.com/">
        <![CDATA[<h3>Background</h3>

<p>For the past few months I've been playing around with <a title="Django Project" href="http://www.djangoproject.org">Django</a>, and it has come to a situation where I need Imaging Library to fulfill my project's requirements. In Python, it is handled with PIL. So, here's what I did to setup PIL with libjpeg support on Mac OS X Leopard.</p>

<p>Default vanilla Mac OS X install doesn't have libjpeg by default, so I need to install them first.</p>

<h3>Methods of Installing PIL on Leopard</h3>

<p>There are a few methods you can use to install PIL on Mac OS X, they are:</p>

<ol>
<li>Install libjpeg from source, and then also install PIL from source</li>
<li>Use <a href="http://www.macports.com">MacPorts</a> / <a href="http://www.finkproject.org">fink</a> to install libjpeg and PIL automatically</li>
<li>Or, you can also install libjpeg from MacPorts, and then PIL from source</li>
</ol>

<p>I decided to use the third approach. First of all, I'm still not confident to install library from source, and also I want to use binary form where as much as possible.&nbsp;Also, I didn't install everything from MacPorts even though they are available. My primary reason is, if I installed PIL from MacPorts, it will also install Python, which I don't want. Apple already included Python in the default install. If you prefer to use fink over MacPorts, you can also do this</p>

<h3>Installation</h3>

<ol>
<li>Download <a href="http://svn.macports.org/repository/macports/downloads/MacPorts-1.7.1/MacPorts-1.7.1-10.5-Leopard.dmg">MacPorts</a> and run the installer</li>
<li>Install libjpeg by using these command lines: <code>sudo port install jpeg</code>. This will install libjpeg in "<em>/opt/local/lib</em>"</li>
<li>Download PIL from source from <a href="http://effbot.org/downloads/Imaging-1.1.6.tar.gz">pythonware</a></li>
<li><p>Extract the file:</p>

<pre><code>$ tar zxvf Imaging-1.1.6.tar.gz
$ cd Imaging-1.1.6
</code></pre></li>
<li><p>Edit setup.py, and change the line JPEG_ROOT to:
<code>JPEG_ROOT = "/opt/local/lib/libjpeg.dylib"</code></p></li>
<li>Compile and build the source: <code>sudo python setup.py install</code></li>
</ol>

<p>The above step will install PIL package in "<em>/Library/Python/2.5/site-packages/</em>". This is the default directory where Python packages are located in Mac OS X.</p>

<h3>Verify the Package</h3>

<p>Now, here's what I did to check whether PIL was successfully installed on my computer.</p>

<p>In Python interpreter, I did the following:</p>

<pre><code>% python
Python 2.5.1 (r251:54863, Nov 12 2008, 17:08:51)
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type "help", "copyright", "credits" or "license" for more
&amp;gt;&amp;gt;&amp;gt; import Image
&amp;gt;&amp;gt;&amp;gt; image = Image.open("/Users/rezmuh/test-image.jpg")
&amp;gt;&amp;gt;&amp;gt; image.save("/Users/rezmuh/pil-image.jpg")
&amp;gt;&amp;gt;&amp;gt; ^D
</code></pre>

<p>If there is no error and you can see the new image copied from an old image, then congratulations, PIL is successfully installed :)</p>

<p>If you know any simpler ways to install PIL, please let me know</p>
]]>
        

    </content>
</entry>

<entry>
    <title>PHP Frameworks: So many options, few are sufficient</title>
    <link rel="alternate" type="text/html" href="http://rezmuh.sixceedinc.com/2009/01/php-frameworks-so-many-options-few-are-sufficient.html" />
    <id>tag:tmp.sixceedinc.com,2009://1.7</id>

    <published>2009-01-09T17:18:01Z</published>
    <updated>2010-02-13T07:27:26Z</updated>

    <summary>For the past few months I have been playing around with CakePHP. Most of the people who have used PHP frameworks have probably heard of it. CakePHP&apos;s features are quite good, and extensive. Their function names are quite self explanatory...</summary>
    <author>
        <name>Reza Muhammad</name>
        
    </author>
    
        <category term="Reviews" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="cakephp" label="cakephp" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="codeigniter" label="codeigniter" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="phpframework" label="php framework" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="symfony" label="symfony" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="zendframework" label="zend framework" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://rezmuh.sixceedinc.com/">
        <![CDATA[<span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="headache11.jpg" src="http://rezmuh.sixceedinc.com/2009/07/09/01/headache11.jpg" width="240" height="286" class="mt-image-left" style="float: left; margin: 0 20px 20px 0;" /></span><p>For the past few months I have been playing around with <a href="http://www.cakephp.org">CakePHP</a>. Most of the people who have used PHP frameworks have probably heard of it. CakePHP's features are quite good, and extensive. Their function names are quite self explanatory that I don't need to look at the API documentation very often. But after a while, I'm starting to look at its ugliness. I am now starting to try different frameworks to see which I like best. This article are some of the things I like and I dont like from each of the frameworks.<br /><br /></p><h1>CakePHP</h1><p>I found CakePHP to be one of the easiest framework to get started right away. Their documentation was quite helpful to get me going to start my first "simple" application.</p><p>However, the more I played with the framework, I started to feel like I was forced to do certain things because it was the "Cake way". One of their main features is "conventions over configurations". This might seem quite useful at first, but I've past that stage, and now I feel that feature is becoming more of a burden. Their conventions are very strict. For example, you need to have a model in a singular form, and a controller in a plural form. It's so strict that I didn't even know that "data" is a plural word of "datum". I thought data could be used as singular, and plural word. I even <a href="http://www.english-zone.com/spelling/plurals.html" target="_blank">searched</a> for it. It turned out I was wrong. This singular-plural-word thingy is not always useful for me since I'm not always developing application in English. In Indonesian, there is no such thing that differentiate singular and plural words.</p><p>Another thing I don't like about CakePHP is that their data validations are tied with the models. Sometimes you need to have different validations on the same model depending on the forms (assuming you have more than one form to do data manipulation on your model).</p><h1>CodeIgniter</h1><p>Next, I looked at CodeIgniter. I have to admit that I have never tried CodeIgniter, I've only looked at their documentation. My first impression was, their documentation is superb. That's also what I've been hearing from people who've used the framework. While skimming through their documentation, I noticed that the syntax and their idealogies are very similar to CakePHP, and I thought I would feel right at home.</p><p>Some of the noticable differences from CakePHP are CodeIgniter doesn't force you to have a model for each controllers you have, and data validations are located in forms. And I've also heard that generally CodeIgniter gives you alot more freedom (in terms of how you code) compared to CakePHP.</p><p>Another good thing I've heard about CodeIgniter is that it's very fast. Part of the reasons why it is so fast is because CodeIgniter doesn't use OOP on all of their codes, and this was said that it could gain performance.</p><p>However, out of all the good things I've heard about CodeIgniter, it doesn't have the "corporate" feel. Funny i feel that way since it is actually developped by a company called <a href="http://ellislab.com/" target="_blank">EllisLab</a>. Another thing I don't like about CodeIgniter is that I have to "load" everything for each functions I create. I might be wrong on this, I've only looked at their documentation. But it seems that you have to call the template, and helpers everytime.</p><h1>Symfony</h1><p>Then, I continued my next journey to <a href="http://www.symfony-project.org" target="_blank">symfony</a>. Some of the good things I've hear about symfony is that it's an enterprise-ready kind of framework. Having been used at various sites by Yahoo! and some other professional websites, I thought the performance would be good.</p><p>Then, I tried to search about its performance but I couldn't get a recent benchmarks. If you have any, please let me know. But from a one-year-old benchmark, symfony performed quite slow even though the test case didnt exactly prove any real life usage.</p><p>Symfony has a very extensive documentation, which they call "The Book". Alot of topics are covered thoroughly, my only gripe is their documentation structure since I'm not used to it.</p><p>Another thing I'm interested in Symfony is their CLI (Command Line Interface). Their CLI seems very powerful. You can generate codes (CakePHP's bake does this too), insert sql queries, and so on. Although at this point, I think they have too many features on their CLI.</p><p>The other thing I don't like so much about symfony is their extensive use of YAML for the configurations. I definitely choose YAML over XML for configurations, but there seems to be alot.<br /><br /></p><h1>Zend Framework</h1><p>Last but not least, I looked at <a href="http://framework.zend.com" target="_blank">Zend Framework</a>. I've been avoiding to use Zend Framework because they don't look like a framework. It's been discussed very often that Zend Framework looks more like a sets of libraries that are ready to use. And I agree with that.</p><p>However, I finally tried it, and tried some of the examples given from the quickstart guide at their documentation, and I couldn't stop thinking, why do I have to go through all of this stuff just to get my framework up and running? Those things are creating directories (controllers, models, application, etc), .htaccess file, bootstrap file, index.php file, and more. My goal on using a framework is so that I can get my web applications done faster, but this itty-bitty work at the beginning turns me off.</p><p>The good side about ZF is that their collections of "libraries" are very complete. From creating RSS feeds to creating a Web service, they have it. And I find this very useful when I need to build a complex web applications.</p><p>Another good thing about ZF is, well, Zend. Who should be able to create a better software than the maker of the language itself? At least that's what I hoped for when I first heard about ZF. It is obviously not the best framework now, but it might change in the future.</p><h1>Conclusion</h1><p>After looking at these frameworks, I'm still having doubts which of the frameworks should I invest my time in. But these days, I'm leaning towards either Symfony, or Zend Framework, although Zend Framework probably has a bigger chance, only because it's developed by Zend. After all, if ZF will become a standard de-facto of PHP framework, it will be easier for me to look for programmers who understand ZF.</p><p>Also, I'm quite aware that most of the features of each frameworks I mentioned above can be overridden (for Example, validation in CakePHP, YAML in Symfony), but those are the default settings on their respective frameworks.</p><p>This post doesn't mean to be a flame, or anything, they are simply my point of view. This doesn't intend to "attack" any supporters of any framework they are proud of. Also, you should probably read this with a grain of salt :)</p><br class="final-break" />]]>
        
    </content>
</entry>

<entry>
    <title>Is PHP really that bad?</title>
    <link rel="alternate" type="text/html" href="http://rezmuh.sixceedinc.com/2008/09/is-php-really-that-bad.html" />
    <id>tag:tmp.sixceedinc.com,2008://1.6</id>

    <published>2008-09-13T10:06:55Z</published>
    <updated>2010-02-13T07:52:05Z</updated>

    <summary>First of all, let me state that I don&#8217;t think I&#8217;m an expert programmer, but I think I&#8217;ve learned programming from some very good people (at my previous work) who were perfectionists in terms of how the code should look...</summary>
    <author>
        <name>Reza Muhammad</name>
        
    </author>
    
        <category term="PHP" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="http://rezmuh.sixceedinc.com/">
        <![CDATA[<p>First of all, let me state that I don&#8217;t think I&#8217;m an expert programmer, but I think I&#8217;ve learned programming from some very good people (at my previous work) who were perfectionists in terms of how the code should look like.Â </p>

<p>When I first started programming (it has not been long, trust me), I started to work on a real-project using PHP. Â I was taught to use it because PHP is considerably easy to learn. Â I believed it, after all, lots of universities in Indonesia didn&#8217;t have PHP in their curriculum, yet there were so many PHP developers in Indonesia. Â I thought these people must&#8217;ve been self-taught, hence the languge itself isn&#8217;t really difficult.Â It turned out to be true. Â PHP isn&#8217;t really hard. Â I&#8217;m now used to it, even though I&#8217;m still looking at other programming language to learn from.</p>

<p>When I worked as a developer in the past, my employer was very strict on coding style. Â Everything has to look similar from one file to another. Â We also followed (kinda) MVC where View should not interact to the Model right away. Â Instead, it will be the controller&#8217;s job. Â We also tried to maintain that there should be no PHP codes in HTML files or vice versa. Â The solution was to use Smarty, for better or worse.Â </p>

<p>Some of the strictness we used were:</p>

<blockquote>We use:

$n = count ($var);
for ($i = 0; $i &lt; $n; $i++);

Instead of:

for ($i = 0; $i &lt; count ($var); $i++);</blockquote>

<p>Also, spacing between characters, variable assignments, calculation, curly braces, and all that stuff are maintained. No one is allowed to write:</p>

<blockquote>for($i=0;$i&lt;$n;$i++);</blockquote>

<p>Well, one line of code might not matter. Â But if you have hundreds or thousands of files, your eyes will eventually be tired to read some of these codes. To cut story short, we used <a href="http://en.wikipedia.org/wiki/Indent_style#K.26R_style">K&amp;R</a> style as much as possible.</p>

<p>Now, my problem is, I resigned from my old company, and started on my own business, and I&#8217;m still doing PHP work. Â For the first few months I could work by myself. But sooner or later, I started to need some help from other developers, so the job vacancies began.</p>

<p>Here&#8217;s what I found out when I interviewed and tested some of the guys:</p>

<ul>
    <li>Their codes are truly a mess. No indentation, no spaces between assignments, calculations, and etc.</li>
    <li>They don&#8217;t understand the concept of MVC. So, they write their codes on Dreamweaver where they can mix the HTML codes and PHP codes</li>
    <li>Even worse, some of them don&#8217;t even know how to write codes from scratch. One of the applicants actually asked me if I had a PHP file where he could edit and finish it.</li>
</ul>

<p>I know that some of the problems I faced was because some of these people might &#8220;lie&#8221; on their resume, or maybe their codes was good enough for their former employer. Now, this leads me to my question:</p>

<p>Is PHP really that bad? Don&#8217;t people learn how to code nicely so that others can read/understand them? Is it because of the IDE? Or is it because PHP is not in our universities&#8217; curriculum so that people practice PHP in different ways (I noticed Java people or .NET people don&#8217;t have these problems since they are taught in the University)?</p>

<p>The last thing is, is PHP really that easy to learn that it becomes a disadvantage, where people can just abuse the language, in terms of how it is written?</p>
]]>
        

    </content>
</entry>

<entry>
    <title>iPhone 2.0 firmware jailbroken with PwnageTool: The Good, The Bad, and The Ugly</title>
    <link rel="alternate" type="text/html" href="http://rezmuh.sixceedinc.com/2008/07/iphone-20-firmware-jailbroken-with-pwnagetool-the-good-the-bad-and-the-ugly.html" />
    <id>tag:tmp.sixceedinc.com,2008://1.5</id>

    <published>2008-07-21T03:58:38Z</published>
    <updated>2010-02-13T07:56:03Z</updated>

    <summary>Recently, the iPhone Dev Team just released a PwnageTool 2.0.1, an update to PwnageTool 2.0 that was released yesterday.Â  This tool will activate, jailbreak, and unlock your iPhone with iPhone 2.0 firmware.Â  My first generation iPhone was successfully upgraded to...</summary>
    <author>
        <name>Reza Muhammad</name>
        
    </author>
    
        <category term="iPhone" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="apple" label="Apple" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="iphone" label="iPhone" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="iphone20firmware" label="iphone 2.0 firmware" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="pwnagetool" label="pwnagetool" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://rezmuh.sixceedinc.com/">
        <![CDATA[<p>Recently, the <a title="iPhone Dev Team" href="http://blog.iphone-dev.org/">iPhone Dev Team</a> just released a <a title="PwageTool" href="http://blog.iphone-dev.org/post/42931306/pwnagetool-2-0-1">PwnageTool 2.0.1</a>, an update to <a title="PwnageTool 2.0" href="http://blog.iphone-dev.org/post/42858313/thanks-for-waiting">PwnageTool 2.0</a> that was released yesterday.Â  This tool will activate, jailbreak, and unlock your iPhone with iPhone 2.0 firmware.Â  My first generation iPhone was successfully upgraded to iPhone 2.0 firmware and now running quite smooth.</p>

<h2>What Works and What Not</h2>

<ul>
    <li>Currently, PwnageTool will activate, jailbreak and unlock iPhone first generation even though you had used ZiPhone, iJailbreak, or other methods.</li>
    <li>It works on iPod Touch.</li>
    <li>It will activate, and jailbreak iPhone 3G, but it cannot unlock it yet. So, if you&#8217;re with carriers that is not in partnership with Apple, you cannot use your iPhone to send/receive calls or messages.
Â </li>
</ul>

<h2>The Procedure</h2>

<p>PwnageTool 2.0/2.0.1 will create a custom iPhone 2.0 firmware for you to upgrade/restore.Â  It will read from the original 2.0 firmware from Apple, the 3.9 and 4.6 baseband, and then create a custom firmware.Â  The new firmware will be located in your Desktop, by default.Â  Finally, you can use iTunes to restore your iPhone with the firmware that is created by PwnageTool.</p>

<h2>Pre-requisites</h2>

<p>In order to create a new firmware by PwnageTool, you will need the following:</p>

<ul>
    <li>iTunes 7.7 or higher</li>
    <li>An originalÂ iPhone 2.0 firmware from Apple. You can download them through iTunes.Â  Choose &#8220;Download Only&#8221; as opposed to &#8220;Download and Install&#8221;</li>
    <li>3.9 and 4.6 baseband files. You can download them <a title="Boot Loader" href="http://rapidshare.com/files/131008012/boot_loader.zip">here</a></li>
    <li>Last but not last, the <a title="PwnageTool" href="http://thebigboss.org/repofiles/nonrepo/PwnageTool_2.0.1.zip">PwageTool</a> <a title="PwnageTool" href="http://www.hackint0sh.org/forum/mirror/PwnageTool_2.0.1.zip">itself</a>.</li>
</ul>

<h2>Upgrading Steps:</h2>

<p>Make sure you remember where you save your 3.9 and 4.6 baseband files in case the PwnageTool cannot find the file.</p>

<ul>
    <li>Start PwnageTool</li>
    <li>Choose which iPhone or iPhone touch you have.</li>
    <li>Select which firmware you want to use. By default, your downloaded firmware is located in ~/Library/iTunes/iPhone Software Updates</li>
    <li>Select the baseband files.Â  If PwnageTool cannot find the files in your computer, it will ask if you want to search on the web. Choose &#8220;no&#8221;, as it will let you search the files on your computer manually.</li>
    <li>Pwnage Tool will ask whether you are a legit iPhone user.Â  The difference is, if you choose yes, it will only jailbreak the iPhone.Â  Choose &#8220;no&#8221; if you want to activate, jailbreak, and unlock your iPhone.</li>
    <li>PwnageTool will ask you to reset your phone into a DFU mode.</li>
    <li>When your phone is on DFU mode, press &#8220;alt&#8221; and click on Restore.Â  Choose the firmware that PwnageTool created. By default, it is on your Desktop.</li>
    <li>When the restoring process finish, your phone will launch BootNeuter automatically.Â  This will upgrade your baseband to 4.6.Â  Your iPhone will reboot after it upgrades to 4.6 baseband.</li>
    <li>Voila, you can now happily running iPhone 2.0 firmware.</li>
</ul>

<h2>Conclusion</h2>

<h3>The Good</h3>

<p>The are lots of new features that is added to iPhone 2.0 but I haven&#8217;t used all of them.Â  <a href="http://www.apple.com/iphone/softwareupdate/">Apple&#8217;s website</a> has a summary of these features.Â  But one thing that I like a lot is the &#8220;AppStore&#8221;.Â  I can download and install alot of iPhone applications and games.Â  Some other features I like is &#8220;Contact Search&#8221;. You can now search for your contacts rather than flicking it up and down (if you have lots of contacts on your phone, flicking takes time too).Â  Oh and their &#8220;Email Management&#8221; is awesome.Â  You can select multiple entries to delete/move emails as opposed to deleting/moving them one by one.</p>

<h3>The Bad</h3>

<p>If you have been on an unlock phone for quite some time, you must have heard about Installer.app.Â  Well, Installer.app is not compatible with iPhone 2.0 yet.Â  So there is only Cydia.Â  Some people might like Cydia, but personally I&#8217;m not looking to install Python or OpenSSL and some sorts on my iPhone (command line tools like these are the area where Cydia shines).</p>

<h3>The Ugly</h3>

<p>Now, this is the first time I&#8217;ve used PwnageTool.Â  Previously, I used iJailbreak to jailbreak and activate my phone.Â  One thing that really distracts my eyes is they changed the apple logo during boot time to a pineapple.Â  My first reaction was, &#8220;WTF?&#8221;.Â  But then I got a jailbreak 2.0 for free, so I can&#8217;t really complain.Â  I just have to live with a Pineapple&#8217;s iPhone, not Apple&#8217;s iPhone :P</p>
]]>
        

    </content>
</entry>

<entry>
    <title>My journey of finding an impressive web hosting: From DreamHost to ANHosting to WebFaction</title>
    <link rel="alternate" type="text/html" href="http://rezmuh.sixceedinc.com/2008/07/my-journey-of-finding-an-impressive-web-hosting-from-dreamhost-to-anhosting-to-webfaction.html" />
    <id>tag:tmp.sixceedinc.com,2008://1.4</id>

    <published>2008-07-18T10:21:20Z</published>
    <updated>2009-07-09T03:57:35Z</updated>

    <summary>Over the years, I have used many web hosting services, and their quality services varied from poor to great. Since I&apos;m from Indonesia, I&apos;ve also tried IndonesianÂ Web Hosting. Â  Generally speaking, Indonesian Web Hosting services are average.Â  If you don&apos;t...</summary>
    <author>
        <name>Reza Muhammad</name>
        
    </author>
    
        <category term="Miscellaneous" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="anhosting" label="ANHosting" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="dreamhost" label="DreamHost" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="webfaction" label="WebFaction" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="webhosting" label="Web Hosting" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://rezmuh.sixceedinc.com/">
        <![CDATA[<p>Over the years, I have used many web hosting services, and their quality services varied from poor to great. Since I'm from Indonesia, I've also tried <a title="a3+ media" href="http://www.a3plusmedia.net/">Indonesian</a>Â <a title="Master Web Network" href="http://www.masterweb.net/">Web Hosting</a>. Â </p>

<p>Generally speaking, Indonesian Web Hosting services are average.Â  If you don't care about about disk space limitations, or bandwidth usage, they are sufficient enough. Alot of Indonesian Web Hosting services offer less than 1GB disk space and 5GB - 100GB bandwidth usage.</p>

<p>However, I wanted more, not necessary need them though :).Â  I like to think if I have multiple websites on the same host, I want to be able keep my web hosting plan. Now, I just started my own company (sixceed), and one of our service is building websites.Â  If clients don't want to have their own web hosting plan, I want my hosting plan to be able to handle those websites. SSH Access is also a plus for me.Â  I hate having to fix my codes and then upload them through FTP.Â  I'd rather fix it on the server using their built-in text editor.Â  SSH can also be useful when running web applications that involve command line utility such as: Django, Ruby on Rails, and some others.Â  Control panel is also what I'm looking for in a web host.Â  I hate cPanel.Â  I hate it a lot.Â  I have the functionality of it, I hate the way it works, and I hate the way it looks.Â  So, my criteria when looking for a web hosting service is flexibility for my sites to expand, ssh access, and a great control panel.</p>

<h2>DreamHost</h2>

<p><span style="font-weight: normal;">In the past, I have used <a title="DreamHost" href="http://www.dreamhost.com">DreamHost</a>.Â  Their web hosting service is great.Â  It offers 500GB disk space, 5TB bandwidth usage, SSH access, and a great control panel.Â  The price is not too bad either, starting from $5.95/month to $10.95/month depending how long you are willing to pay in advanced.Â  My only gripe about DreamHost was they refused to setup my account.Â  I had an account with them a few years back, then I terminated it because I didn't intend on using it anymore.Â  I signed up again a few months ago, but they said they couldn't setup my account, and they refund the money. Pretty weird, huh? So, i searched for other web hosting and never look back.</span></p>

<p>Â </p>

<h2>ANHosting</h2>

<p><a title="ANHosting" href="http://www.midphase.com/newaff/redir.pl?a=0.493151631512777&amp;c=2&amp;creative=Banners|ANHosting|TextLinks|TextLink&amp;redirURL=">ANHosting</a> is owned by <a title="midPhase" href="http://www.midphase.com/newaff/redir.pl?a=0.493151631512777&amp;c=1&amp;creative=Banners|midPhase|TextLinks|TextLink&amp;redirURL=">midPhase</a>, and it has mixed reviews.Â  It offers 500GB disk space, and 5TG bandwidth usage.Â  The hosting package supports only 20 domains (DreamHost offers unlimited domains). SSH access is optional, meaning you have to pay more if you want to get the feature.Â  So is Awstats.Â  ANHosting's default package include Webalizer, but you have to pay more to have Awstats installed on your web hosting plan.Â  The hosting plan costs about $6.95/month.Â  I also have a coupon code: <span><strong>ANHOST911</strong> </span>for 2 months free orÂ <span> <strong>SAVINGCENTER</strong><strong>-93818</strong> </span>for 3 months free if you're interested in joining ANHosting.Â  Both of them are valid until December 31, 2008. ANHosting uses cPanel, which I do not like. During my time with ANHosting, it went pretty well, it's just that whenever I look at the cPanel, it made me want to move to other hosting. And I did.</p>

<h2>WebFaction</h2>

<p>Currently, I host my domains on <a title="WebFaction" href="http://www.webfaction.com?affiliate=rezmuh">WebFaction</a>.Â  WebFaction offers four web hosting plans for you to choose.Â  I went with the cheapest one since I had no idea how good they were.Â  The disk space is a bummer, they only offer 10GB (it's only about 2% worth of disk space than what DreamHost or WebFaction offer), and 600GB bandwith usage.Â  positive side of WebFaction are they provide unlimited domains, unlimited MySQL databases, and SSH access.Â  They even have sets of software collections like WordPress, Ruby on Rails, Django, Turbo Gears, Awstats, and more.Â  You only need to choose what type of applications you want, and what domain will be using that application, then you're website is built.Â  Their <a title="WebFaction Control Panel Screencasts" href="http://www.webfaction.com/demos/">screencasts</a> made me signed up with WebFaction.</p>

<p>In summary, these are the advantages and disadvantages of each Web Hosting services I've used.</p>

<h2>DreamHost</h2>

<h3>Advantages</h3>

<ul>
    <li>Very Affordable</li>
    <li>Great Control Panel</li>
    <li>Custom Scripts</li>
    <li>Very generous with disk space &amp; bandwidth</li>
</ul>

<h3>Disadvantages</h3>

<ul>
    <li>Support sucks</li>
    <li>Different host for databases; a little slower to fetch data from database.</li>
    <li>Account activation rejected</li>
</ul>

<h2>ANHosting</h2>

<h3>Advantages</h3>

<ul>
    <li>Cheaper than DreamHost. Especially they have lots of available coupons</li>
    <li>Database relies on the same host</li>
    <li>One free domain for life</li>
</ul>

<h3>Disadvantages</h3>

<ul>
    <li>Limited flexibility (they use cPanel)</li>
    <li>Account activation is a hassle. It took me three days until I had to call them to ask for an account activation.</li>
    <li>Free domain might not be able to be transferred to other registrars.</li>
</ul>

<h2>WebFaction</h2>

<h3>Advantages</h3>

<ul>
    <li>They use cutting-edge software</li>
    <li>Great Control Panel</li>
    <li>Custom scripts</li>
    <li>Database relies on the same host</li>
</ul>

<h3>Disadvantages</h3>

<ul>
    <li>Disk space is limited</li>
    <li>Quite expensive</li>
</ul>

<p>In summary, I'm very happy with my current Web Hosting company, <a title="WebFaction" href="http://www.webfaction.com?affiliate=rezmuh">WebFaction</a>. I wish they will upgrade our disk space usage in the near future. Â Since they support WebDav, the addition of disk space will be beneficial :) So, where do you host your websites?</p>
]]>
        

    </content>
</entry>

<entry>
    <title>A little introduction - This just started</title>
    <link rel="alternate" type="text/html" href="http://rezmuh.sixceedinc.com/2008/07/a-little-introduction-this-just-started.html" />
    <id>tag:tmp.sixceedinc.com,2008://1.3</id>

    <published>2008-07-14T09:19:40Z</published>
    <updated>2009-07-09T03:57:35Z</updated>

    <summary>Hello, It took me months to start on blogging again. Â After a few months of installing Wordpress, but does not write anything to it, I finally decided to start again. Nowadays, I don&apos;t really have a lot of free time,...</summary>
    <author>
        <name>Reza Muhammad</name>
        
    </author>
    
        <category term="Miscellaneous" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="http://rezmuh.sixceedinc.com/">
        <![CDATA[<p>Hello,</p>

<p>It took me months to start on blogging again. Â After a few months of installing Wordpress, but does not write anything to it, I finally decided to start again.</p>

<p>Nowadays, I don't really have a lot of free time, so new posts probably won't be as frequent as I would like for it to happen.</p>

<p>The content of this blog will mostly related to technologies. I hate to talk about personal, as I think I should write them on a notebook instead of publishing on the Internet. Although I can't blame people who write some kind of "diaries" on their blog. Hey, it's theirs, not mine.</p>

<p>The theme of this blog is taken from <a title="WordPress Template" href="http://wordpresstemplates.name" target="_self">WordPress Template</a>, and they're free :) One of the reasons it took so long for me to start blogging again because I thought I would create a custom template for WordPress. But then it took so long to start creating new idea of a template. Besides, most of these free templates available online already suits my needs.</p>

<p>That's about the little introduction from me. Hopefully there will be more posts soon :)</p>
]]>
        

    </content>
</entry>

</feed>
