How I "Defeated" Jakarta’s Traffic Jam

Usually, I never complained about Jakarta’s traffic jam. Not before I moved to a new office and new house. Right now, I have to travel around 30km to go to the office (so it doubled to 60km to go back and forth). It was fun driving that long before the traffic jam get worse and worse (and the worst yet to come). So, this is how I play “cat and mouse” with the traffic jam.

Jakarta’s traffic jam is probably one of the worst things happened to the people work and live in this city. No one could escape from it. While I realize that I couldn’t handle it, I try to handle myself to become better on how to avoid it. So here’s my personal analysis on the traffic jam that might occur throughout the day and how, later, I can avoid it and gain more productivity.

Please keep in mind that this is just for my own case and if you want to try it, make sure you’re OK with that. I’m not responsible for any effects that might occurs along with this ‘trick’ :)

Let’s start.

00.00 – 05.00
This is absolutely the time when the road unoccupied the most. You can only see one or two cars for one minute or two. Those were probably someone who in a hurry to catch a plane at the airport or traders who brought their goods to the nearest market.

05.00 – 06.00
The road started to packed with cars and motorcycles as early risers don’t want to arrive at the office late. It’s not yet jammed but it’s potentially cause a traffic jam for the following hours.

06.00 – 10.00
The worst traffic jam occurred in this time frame. The early risers (who aren’t arrive at the office yet) and those who woke up late joined in the biggest mass parking ever in Jakarta (that is, the traffic jam).

10.00 – 14.00
Since so many people started at 06.00 – 10.00 mostly already arrived at the office, this time frame usually better than the previous one. Still jammed but better. this time frame might be filled with marketing people, those who “plan” to start late, people going in a meeting, and lunch.

14.00 – 17.00
Still better but packed in some sort of roads. For my case, it’s the second best time to drive towards some places.

17.00 – 20.00
The second biggest nightmare after the morning one. People returning from their offices to their home.

20.00 – 00.00
This is the second best unoccupied road.

First Strategy

I rarely found myself (never, perhaps?) departing between 06.00 – 10.00. I might have traveled for as long as 3 hours just to get to the office. So I usually departed at 10am/11am and traveled for about 2 hours (one hour less compared to 6am-10am). However, the road seems more and more packed at that range of time. 2 hours become 2.5 hours. So, I try to change the strategy.

Second Strategy

I still departed at 10am but I took the opposite direction. No, my office hasn’t move yet but I took to the direction where I can take the Commuter Line (electric train). I need only 15 minutes from my house to the train station. I usually waited for 30 minutes maximum to get to the next train and it took only 30 minutes – 45 minutes to travel from the current station to the office’s nearest station. Total time needed: 15 + 30 + 45 = 90 minutes. Quite fast. But…
I have less to no control over the train. When it stopped for some reasons like flood, electricity failure, accidents, etc., I have to wait for more than 2 – 4 hours just to get to the office. If the situation got worse, I might decided not to go to the office and work from home instead.

Not so good strategy but better than the first one, if and only if everything is under control.

Third Strategy

This is the best strategy ever until today. It seems impossible at first because I never done this before. This third strategy required me to be more discipline with my daily routine and I have to mentally change my biological time. Let me explain more.

This strategy required me to woke up at 3am (yes, 3am). I prepare my self for nearly one hour (take a bath, have an early breakfast, etc.) and I start to departed at 4am. Since the road is nearly empty, I arrived at the office at 4.30 – 4.45am. 30 – 45 minutes.

I started to work directly after I arrived. By the 8 or 9am, I have finished half of my tasks of that day. I took a little sleep (as little as 15 to 30 minutes max) and start again. My tasks usually all finished just before everyone and I have our lunch. I took the lunch and then I took one hour (1pm – 2pm) to make a plan on what I will gonna do tomorrow. I left the office at 2pm and arrived at home at 3pm.

This strategy is really hard at first since I have a “bad” habit not to go to bed before midnight. But for the sake of productivity and a healthy life, I have no reason not to try it. I tried to move my schedule (coding, reading, learn new tech) from 8pm – midnight to 4pm – 8pm so I didn’t have anything left after 8pm and I can go to bed before 9pm. It’s still hard but hey, I’m a programmer I could program my own mind to follow this trick. Finally, it works.

Total time: 45 minutes (to office) + 1 hour (go home) = 1hrs 45minutes.


Now, let’s compare total time needed to go back and forth.

First strategy: 2hrs + 2hrs = 4 hours (minimum).
Second strategy: 90mins + 90mins = 3 hours.
Third strategy: 1 hours 45 minutes.

With this much time reduced, I stick with the third strategy until today and I’m happy with that. More productivity gain, more time for families, more time for hobbies, more time for coding, and more time for doing almost anything necessarily essentials for my life and my future.

The Joel Test in Real Life and How I Try to Get 12 Points

When I was assigned as a CTO, I was very excited. I think it’s time for me to brought the joy and delight of coding. So I wrote my plan ahead and I have a commitment to applied the Joel Test. It’s not an easy road though and in my one and a half year as a CTO, I will share how I have achieved more than a half of them.

It’s pretty easy to achieve all of them, 12 points, when you work for a company like Google, Facebook, Yahoo or even Microsoft (yes, Joel said that Microsoft always run at 12 full-time. Incredible!). When I was at Yahoo, people were really supportive and we always try to achieve perfection in building and crafting a software. It would be different if you work for a company where not all people understand about Software Craftmanship. It’s more difficult when you work for a company (or clients) who has a type of “yesterday is the deadline.” Those kind of companies (and probably clients?) didn’t understand about planning, priority and design. The Joel Test will help you, my friend, and me to be not only an ordinary developer, but also an outstanding developer who always ship the best crafting code ever written.

Let’s get started.

Continue reading

How I Become More Productive in 2013

2013 is no more.

I’ve been struggling with too many distractions and interruptions that forced me to make a promise to revenge in the name of productivity. I’ve been doing one way or another to shake things up and counting the seconds on what I’ve done on my laptops.

Before I spit the things out that make me productive over the year, let’s admit some things that were truly distractions.

First and the most addictive one was Twitter. I’ve been struggling finding the way on how to make myself better at handling the Twitter’s stream but finally I found the way how to deal with such a hard-to-defeat distraction.

Second was email. I frequently found myself staring at Gmail more than often instead of doing something real. I do the fast-switching from Inbox, Spam, Trash, and labels such as android-dev, YouTube and Quora Weekly Digest just to see what’s new in it.

Anything else such as Facebook, Google+ and games on my tablet are distractions too, but not really disturbing since I rarely spent my time on those things. Fortunately, I don’t have any account (or maybe I just forgot the password and never logged back in) on Path, Instagram, and a bunch of me-too-chat-apps out there (however, I still stick with Google Hangout, Whatsapp, and Skype).

So, these are the things I’ve made throughout 2013 that made me more productive than ever:

Continue reading

Random Name API: One Hour Weekend Project

It might be not completed yet (name it “beta”) but I hope it helps everyone who in needs to generate random names (which is not just practically generate random chars but also human-readable names).


where nm is the number of names to be generated (in integer).


will generate 5 random names along with their gender (“M” indicates “male” and “F” indicates “female”).

The number of names is practically unlimited (in theory), but to keep the requests as efficient as possible (because I’m only using one dyno for the app), I’ve limited the number to 100 per request. However, you can use your script in any language to do the loop to get as many result as you want.

SSHMe, How I Manage and Connect to Many Servers

I’m not going to add another ‘me-too’ solution but if you wanted to know similar solutions, you can see here.

OK, here’s the situation.

I have many servers to maintain and connect to but every time I want to connect to one or two of those servers, I need to open my notes and type the username I have (along with the password) and the specific port, if any.

For example, I want to connect to machine A with IP using root to specific port 12020. So here’s what I’m doing:

$ ssh -l root -p 12020
root@'s password:

Now, I also want to connect to machine B with with IP using ‘ksetyadi’ to specific port 1224.

$ ssh -l ksetyadi -p 1224
ksetyadi@'s password:

This is easy when I only have one or two servers but actually, I have more than 5, actually 12, servers to maintain and using the old way is not easy anymore. Not fun.

So, what is the fun way according to me?

I opened my favorite code editor and start making my life easier and fun again.

Without further ado, see the code on Github.

A Guide to Running Unit Test using PHPUnit on Yii Framework

Let me tell you something:

TDD doesn’t drive towards good design, it drives away towards bad design. If you know what good design is, the result is a better design – Nat Pryce

I want to share my experience in setting up unit test (and later integrate it in CI –Continuous Integration) on my development machine. Hope this will save your time, my fellow developers, without going through of all errors and warnings I was stuck with before.

I’m not an expert on Yii even though I have years of experience in PHP. In fact, this is the first time I’m using Yii. In the real world where I live, work and play, I use CodeIgniter and CakePHP. In terms of TDD, I started using it almost 2 years ago (thanks to Yahoo!) and always using it in almost every projects including Android (Java) and Python.

FYI, I’m using MacBookPro with MAMP PRO (PHP 5.3.6) installed. It wouldn’t be too difficult for you if you use Linux since it’s a similar process. If you use Windows, well, then goodluck! ;)

Let’s get started.

Continue reading

Merge Sort: The Algorithm

This is it. The last time I wrote about Merge Sort was last night last week and now I will show you the fun.

So here’s the code I’ve written in 9 minutes 42 seconds (almost 10 minutes!) straight.

from random import randint

def sample_list(n, r):
    result = []
    for c in range(0, n):
        result.append(randint(0, r))

    return result

def merge(left, right):
    i, j = 0, 0

    result = []

    while i < len(left) and j < len(right):
        if left[i] <= right[j]:
            i += 1
            j += 1

    if i < len(left):
        result += left[i:]

    if j < len(right):
        result += right[j:]

    return result

def sort(mylist):
    if len(mylist) < 2:
        return mylist

    midlist = len(mylist) / 2
    left_list = mylist[:midlist]
    right_list = mylist[midlist:]

    left_list, right_list = sort(left_list), sort(right_list)
    return merge(left_list, right_list)

if __name__ == '__main__':
    l = sample_list(10, 1000)
    print 'Unsorted list'
    print l
    print '\nSorted list'

Pretty easy, right? Let me know if you have any comments or questions!

The Beauty of Merge Sort

First or second year of Computer Science’s students should not be surprised with this as this is one of the main subjects that must be mastered in order to advance to the next year. This subject usually taught in parallel with another algorithm in a lecture called “Introduction to Algorithm” or “Data Structures and Algorithm” depending on your campus.

It’s been years since I’ve got this material from university and I always come back to this subject again and again. Merge sort is one of the basic sorting algorithm but I still amazed with the way it do the sorting. So I set this weekend to visit the material again plus adding some more information about the merge sort into my head that once I’ve never known before (I’m not a nerd while back at the university so I don’t ‘eat’ everything my lecturer gave to me).

Let’s start with the easy one.

Continue reading

My First Day with Pebble and Why I Like It

It all began with a post from Kickstarter.

I’m really obsessed with technologies that can be customized and potentially useful in the future such as Google Glass, Android and so on. If some technologies come up and it says that I can create apps on top of it or it can be customized with coding, I definitely want to try it. So I decided to bought Pebble.

It doesn’t take too long for the shipping to be arrived (between 2 to 3 weeks). By the time I received the package, I opened it up and wore it on my wrist. It fits my wrist and really comfortable. I wore it for a whole day, reading the developer’s documentation, trying to make a simple ‘Hello World’ and reading specification on how to communicate with other devices using Bluetooth.

My simple conclusion is: I like it, and this is why I like Pebble.

Continue reading

10 Things That Make Cool Drivers, Cool

Driving is always my favorite activity since I was at high school. I never bored sitting behind the wheel and put my leg onto the gas pedal and push it hard. I used to be a (street) racer. I don’t mind running over 190kph using Mitsubishi Galant 2002 v6 2.4L on a Cikampek highway or running over 140kph using Honda Civic on a main road connecting Purworejo and Yogyakarta just to chase a BMW and a modified version of Corolla at 12AM and after that, running as fast as possible along with those cars as police chased us on the back (thank God I never get caught because I suddenly turned to the nearest gas station and hide while the police still chasing those two cars).

Jeez, those were my “dark ages” when I was young and now, as I’m become older, I always remind myself how important it is to be cool while driving.

“What.., wait! So you want to say that those 190kph thing-y and the pursuit wasn’t cool?”, someone asked me.

My answer when I was doing that: I felt pretty cool.

My answer recently until today and beyond: No.

Why? Simply because I have another definition of coolness while driving a car. Let me tell you.

Continue reading