Tuesday, April 16, 2013

Amsterdam Here I Come

There's no rejected pray. When pray seems not granted immediately, it could mean 3 things:

  1. Our pray is suspended to more appropriate time
  2. Our pray is replaced with something we need more
  3. Our pray is granted at the hereafter with something bigger


About some years ago, I put a simple facebook status. I forgot its detail, but more or less it said something like "Amsterdam here I come!!!". At that time honestly I just babbling. Babbling from the heart.

Since I was child, I always hope can live abroad. At that time, the way that I think could be the path to that dream is through post graduate study. That's why, there was a time when I'd tried to apply several sholarship. Speaking Europe, I was inspired by Edensor novel by Andrea Hirata. Europe is one of my dream land. Anyway, I failed in many sholarships appication about 3 years in the row. Little bit frustrated, but somehow I realize that there are so many lessons from those experiences. I learn to be more persistent, to be more grateful, to be more excellent.

This month I received interesting surprise. I will fly to Amsterdam for one ocassion. Exactly the old dream that come true. For some people flying to Europe is a simple thing. Maybe it just the matter of purchasing the ticket. But for me it was special experience. Unfortunately I cannot see the snow at this time since now has been spring in western Europe. At least perhaps I can see beautiful tulip blomming in a wide garden.

This experience is one simple proof for the prior statement I've mentioned. There is no rejected pray. Never lost your patience, your enthusiasm and at the same time always put your best effort in anything you want to achieve.



Life is short. Life is too precious to be ordinary. World is too beautiful to left it unseen.

Amsterdam, here I come!

Friday, January 11, 2013

Legoland Malaysia Review

This post was half way written since September last year. I just can finish it right now, because my laziness.

This post will share about my first visit to the large newest theme park in South East Asia. It is exactly located in Malaysia. I will talk about Legoland.

Legoland Malaysia is the first Legoland park in Asia. At first time I was little bit reluctant when prepared plan to visit this place. From some review on internet, some of people said that Legoland is child oriented theme park that probably not suitable for adult. This consideration is really matter, because I plan to visit there with my wife. Two adults visits child theme park seems not sound good. But later I decide just to visit there while my wife still here in her summer holiday.

The adult ticket for Legoland is 140 MYR. In Singapore dollar it will be around 56 SGD. It is quite expensive and have small differences with more well known theme park, Universal Studio Singapore at about 68 SGD. But still we just decide to buy and try. After browsing Groupon, we found a nice offer. By paying 52.90 SGD we got one Legoland ticket include return bus coach from and to Singapore. We book departure date on 15 September 2012, exactly at grand opening date of the park.
The Ticket

We went from Singapore Flyer as the starting point. My booking confirmation show our departure at 8.30. But later I realized the tour provider made a mistake. We supposed to depart on 9.00 AM. Several minutes before 9.00 I queue for exchanging my booking confirmation sheet with two tickets. Then several minutes after 9.00 the bus departed. Legoland is located in Johor area. It takes less than 90 minutes travel time from Singapore. So we were arriving before 10.30. First impression when we arrived: It was so hot!!

Actually we were anticipated that in grand opening day there would be a lot people came. Yes they were so many people, but not so many as our expected. In the ticketing counter the queue was so long. Maybe around 100 people were queueing. We were lucky already purchased the ticket so we don't need to queue.

First thing first was to take foto in the front of Legoland logo. Because it was quite hot we just enter the park after scaning ticket barcode. At the entrace we can take a Legoland map. Legoland is divided into several section. I didn't remember exactly all sections. But it about 8 section with around 40 shows, rides and attractions. All section is located arround circle area with one interesting poin that we cannot find in another theme park. It is Miniland. In Miniland we can find a lot of buildings and landmarks miniature from Malaysia and several countries in South East Asia built in Lego. I think this section is best of the best in Legoland. We can spent plenty of time take a photo in this area. The best time to visit this place will be at afternoon when the sun goes down. Beside Landmark made by Lego, in all over park we will see a lot of interesting figure, animal or structure also made by Lego.

Me and Wife at front of Legoland Gate

Bali in Miniland
We don't want to play in rush. So we didn't try too much attractions and rides. Several that we had tried are as follow. First is Legoland express. Simple large train build with structure like Lego that will move slowly around center of Legoland. Second we plan to try Project X. Some kind of 4 seater roller coaster. But we decide to cancel riding after queueing and saw several time that ride was jammed. Third ride we were trying Wave Racer. It was quite interesting ride. We were spinning in the middle of the pool on the ride that we can control to move to or from center. Sometime there will waterbomb that can make us little bit wet. Fourth we were riding a roller coaster. There are two roller coaster in Legoland The Dragon and The Dragon Apprentice(if we count Project X as roller coaster there will be three). The Dragon Apprentice is smaller and less challenged Roller Coaster, that's why we decide to ride it instead of The Dragon. Fifth, we ride some kind of carrosel with name Merlin Challenge. Sixth, we were trying Kids Power Toys. This ride will make some turn and we can pull and release a rope that connected to our sit. Not too special but still quite interesting. We plan to ride viewing tower but it was currently checked for some problem. The viewing tower will move the cabin from bottom to several meters high to the top where we can see suround view of whole Legoland.
Lego Einstein

The next attraction that we try was 4D show. Every hour usually will be played different movie. The show is played for about 10 to 15 minutes. The show is not so uncommon right now. 4D show with 3D movie, wind blow and snow. After watching 4D we ride Dino Island. This is water slider ride. This ride was exciting, although we can find similar ride in other theme park. The next ride is Lost Kingdom. We ride a kind of train with a gun attached there. On the way in we can use that laser gun to shoot a lot of 'evil' object with a censor. Every time we hit the target our score will be incremented on display at front of us.

The time move so fast. Our bus will pick up us around 9 PM to go back to Singapore. Before going out we alocate last time to ride Lego Boating School. Actually this is the most boring ride that we tried that day. Even we have to queue almost one hour. But since I went with my wife, it was still very enjoyable moment.

Finally we going out. Buy some KFC for our dinner on the bus otw back home.

In conclusion, I would like to say with given ticket price and the available ride and experiences that we can get, visiting Legoland is worth to visit.

Saturday, January 5, 2013

First Phone Interview for Software Development Engineer Position in Amazon.com


About few months ago, one of amazon.com recruiter asking my CV through Linkedin and invite me for the recruitment that would be conducted in Singapore. The position is for Software Development Engineer that will be based in Seattle, US. With full of interest I decided to sent the CV and answer several question she asked. Unfortunately only few days before recruitment date, she informed me again that cannot proceed me further. At that time they can only proceed Singaporean or Australian citizen because US visa quota limit consideration for other citizenship including me as Indonesian (H-1B visa if I am not mistake). But she promised that in the beginning of 2013 (when visa limit quota will be reset) there will be another recruitment process.

Her promise is right. Just about 2 weeks ago another amazon recruiter contact me and offering one phone interview schedule for AWS Software Development Engineer position. With full enthusiasm I send her my available date and time. I also do some of researches for the preparation. According to the information I have gathered from internet, amazon.com interview will be very technical and involve writing code. Until job offer, candidate have to pass up to 3 phone interview and whole day onsite interview.  I read many books about coding interview, other books about algorithm and some books about cloud computing. I also practiced a lot solving some coding problems.

Finally the interview has been conducted this Saturday morning 6.00 AM GMT+8 (Friday 2.00PM Seattle time). The interview who called me is very nice. He speak very clearly and we discussed a lot while I try to solve some coding problem. At the beginning he introduce himself then start asked some of my background, my project, what I did, etc. Next he asked some basic question about java keyword. Then finally we arrived at the coding challenge.

The first problem is: "Given binary search tree, write a method that will return the next node from given node!". Actually I have been anticipating such questions. But since I have to write in interview nuance, it make me little bit nervous and under pressure. I wrote the code in one online coding collaboration website, so both of us can see what I have written in real-time  After struggling some minutes finally I can finish the solution. I am not sure whether he satisfied or not.

The second problem he just asked me to get element with second most highest occurrences from and array of object.

example:
someArrays = {"xx", "yy", "xx", "yy", "zz", "xx"}
xx shown up 3 times
yy shown up 2 times <-- this is the second most occurances
zz shown up 1 times

Actually this is also not should be too difficult. First, iterate onel time the array and push every object occurrences into a hashtable. Second, iterate hashtable and return the second most occured. But I was struggling how to get the key of most occurred object. I will write the solution in here, later.

Last, finally he asked me if I have any question. I just asked about what he do in Amazon. I also asked how many person inside one team. In conclusion I feel not satisfied with my interview. I supposed to perform better. But I should not be regret. I can use this experience as a trigger to learn more so can be more prepared if face same experience again. Not sure whether I can have next interview or not, but it is enjoying experience.

Wednesday, January 2, 2013

Fibonacci Sequence With and Without Recursion


Fibonacci sequence is sequence with subsequent number is the sum of the previous two. See snapshot below from wikipedia.

We can implement this algorithm either using recursion or without. Let see both.Before the implementation let see how is the sequence defined for every F(n).

F(0) = 1 or F(0) = 0 in some definition
F(1) = 1
F(n) = F(n-1) + F(n-2)

Now these are implementation using Java

With Recursion
int fibo(int in){
 if(n <= 1){
  return n
 }else{
  return fibo(n-1) + fibo(n-2);
 }
}
Without Recursion
int fibo(int n){
 if(n <= 1){
  return n;
 }
 int fibo = 1;
 int fiboPrev = 1;
 for(int i = 2; i < n; ++i){
  int temp = fibo;
  fibo += fiboPrev;
  fiboPrev = temp;
 }
 return fibo;
}

Sunday, December 16, 2012

Update Twitter Using Python Tweepy


I just spending sometime to play with tweepy. This post will show how to use that lib to access Twitter API.

First, install python (obviously). Second, install (if not installed yet) easy_install a tool to install python package easily. Refer to this http://pypi.python.org/pypi/setuptools

Go to console and check if easy_install instalation.



Now install tweepy module if not available yet.


Next create application in twitter so we can access the API. Go to this URL: https://dev.twitter.com/apps and create new application


Please note in there is a configuration to set application type.


After application has been created, we need some special authorization to access API. Twitter use OAuth. There are 4 important values that we have to note:
OAuth Consumer Key
OAuth Consumer Secret


and
Access Token
Access Token Secret


The last two are the token which is granted by our application user later.

Enough for configuration, now go to python console (I am using iPython) evaluate following code:

import tweepy
# provide all the keys and secrets
CONSUMER_KEY = 'the_key'
CONSUMER_SECRET = 'the_secret'
ACCESS_TOKEN = 'the_token'
ACCESS_SECRET = 'the_token_secret'
auth = tweepy.OAuthHandler(CONSUMER_KEY, CONSUMER_SECRET)
auth.set_access_token(ACCESS_TOKEN,ACCESS_SECRET)
api = tweepy.API(auth)

# do anything you want now
api.friends()
api.update_status('Hello world from Tweepy')

Thursday, December 13, 2012

A Short Reflection of Age Increment


"Life is beautiful. Be grateful for everything you have but keep fighting to achieve every of your dreams"


Age is nothing rather than just a number increment. However the increment of age should be a great moment to do self evaluation. More mature a person should made him more wise and not the opposite, older but become more childish. Hopefully I can became the first type.

Like several years before, this writing will try to reflect what I feel and what I want to be afterwards. Indirectly it will be a kind of evaluation and resolution.

Start from evaluation. I get married now for more than full year. Although I am having long distance marriage but still, more or less I have to try and be more mature compared at the time I was single. But I think I have to be more expressive to show my love to my wife because at the other side my wife also always give many gifts and surprises. Including this wonderful video for my birthday.


And also an awesome cake surprise



Second I already work in Singapore for more than full year as well. There many things I have learnt for that range time. More demanding job and multicultural environment for instance. All of those things are shaping and improving me more.

Next is about what I want to achieve. I want to make it simple and less material oriented. "I want to be always grateful and humble in life". To do some tangible elaboration, I want to be an expert in my field but at the same time can give significant positive impact  to society, perhaps by being a speaker, writer, teacher or just a good programmer which can make some positive contribution (hopefully not become too cliche) for a better world. More specific, I want to be a good father this year (hopefully Allah can trust me). I want to have some shelter for my family soon. I want to write a book to leave trace that I've never exist in this world. Want to have some more wonderful job and activity.

So different with previous year post I don't want to make too long bullshit explanation bit instead just make small thing become true. "To be more grateful and more humble".

For the closing I just want to make same quote by myself for reminder to myself. "Life is beautiful. Be grateful for everything you have but keep fighting to achieve every of your dreams".



Friday, November 30, 2012

A Retrospective of First Wedding Anniversary: Why Your wife must be the most important person in universe?


This month is special month. In November I celebrate my anniversary of marriage and my wife birthday. I get married on 19 November 2011. So, I have been married for 1 year. Time flies. Everything feels just like yesterday. I can remember almost all scenery on last year. How we (me and my wife) were preparing all the wedding things in very short time. I don't wanna re-share again about all those express preparation. I already blabbed somewhere else. I just want to make a retrospective for this one year marriage.

Most of the people will get marriage one time. Some of unlucky couple will decided to divorce. Decision to get married is the most difficult thing to decide for most people. Even more, for religious person, marriage is a commitment to God.

Marriage is often symbolized as a ship with a husband as the captain and the wife as a navigator. Both of them have important role. Captain cannot drive alone and navigator cannot take over the ship. Harmony between husband and wife will determine whether the ship will sail smoothly to the right direction or at the worst case there is possibility the ship will sink when conflict is escalated become so big.

Regarding that ship analogy, there is one value that always emphasized by my parent in laws since the first time I propose my wife. Usually person will choose a spouse based on similarity. Same hobby, same style, same behavior  same education level, same interest, same common attitude, etc. Human love someone who similar with them. This is important because what is the point of married with totally different people. But we have to realize as well that, there is no identical human. Even twin sibling will have considerable differences. More and more for the case man and woman which are fundamentally different. The key is the leverage the differences for the good thing. For example complementing each other. If wife is an expert of speaking and husband is a good writer maybe they can share their knowledge that will make both of them expert of writing and speaking. Of course this is only very shallow example.

After one year, although most of time me and my wife are in long distance, I can conclude several things about marriage. Marriage is sweet at one side but also challenging at the other side. But undoubtedly  marriage will make us fell more peaceful and  Because we will arrive at the position where we have somebody to rely on. There are several challenges as well. Some significant examples are conflict and egoism. It is almost impossible for two human that spent most time together, day and night, summer to summer for don't have any conflict at all. Conflict is a spices in a marriage said some wise person. But too many spices will not the food taste good even can make it throw to the rubbish bin as a garbage.

At the end of this post I want to share a story.

***

One day in one philosophy lecture in one of good university, professor ask a question to the class. "Who are 10 most important person in your life which you will spent most of your life with them? Write in on paper" said the professor.

The student start writing some names. Logically most of them will write closest family like parents, children, spouse, best friends, etc until the list fill up to ten person.

"Now remove 5 of them!" Ask the professor.

In confussion student try to follow the order. Most of them again will remove the so not close person in their life. The will stroke so not best friend. So the 5 person in the list will consist only very important person for them.

"Now remove 4 of them. Leave only one trully most important person for you."

Confussion getting higher. Now the student start to think very hard who have to be removed and leaving only one person. Until sometime the professor ask the class to stop their activity. Then he ask one of his most brilian student to reveal the aswer.

"If I could only choose one, she must be my wife. My wife is the most important person in this world." Said the student.

"Why?" Ask the professor.

"Parents are important, children are important. But in this life we cannot choose who are our parent and who are our children. God decide for us. In other side I choose my wife when the same time she choose me. So if I can select one as the most important person in this world, I will only select my wife"