Friday, October 29, 2010

Petaling Street food 茨廠街的食物 (たべもの)


Roti Banjir x2 (RM 0.30 each)
Milo Ice (RM 1.60)

南香鸡饭 (RM 4.70)
Chicken Rice Nan Heong
けいにく と ごはん

Petaling Street is full of surprises everyday. ~

Saturday, October 23, 2010

eGenting programming competition 2010

Time : 10.00 am to 6.00 pm
Venue : Wisma Genting
Nature : Open-book handwritten programming task

Total 4 questions. "You are NOT expected to answer all of the questions" is written on the first page of the question paper. Interesting.

Had been studying the eGenting 2008 questions for the last few days. Not as tough as Google Code Jam but requires a lot of effort and time as we need to compile the code using our brain and write everything on a physical paper! Even now I can feel the pain in my wrist and arm. Miss the Eclipse IDE very much.

Thanks to 1 year of working experience, I'm more familiar with the date time libraries and Java Collections now. Even though it might not be an elegant solution, but at least I get to delegate tedious or specific logic flow to the existing libraries.

Briefly talks about the questions here.

1st question deals with the airplane propeller balancing error. No physics knowledge needed. "It's a searching problem. Not mathematics." hinted Mr.Searcy after the lunch break. Well, I did not have time to answer this question. Still have a lot of room to improve on my mathematics and algorithm.

2nd question is the easiest among all of the question. I was worried about the memory constraint initially as 2 millions of random records are to be insert, removed and verified randomly. Java HashMap is used to solve this problem. I would be vomiting blood if need to write out a map data structure implementation in C. Long lost memory.

3rd question. Report generation with some calculations. Skipped.

4th question. Extension of the 3rd question. Simulation of the interaction between 100 customers and 12 vending machines. Need to cater for the vending machine attendants that will maintain the machine everyday as well.

Did not use the thread and sleep() method as suggested by Mr. Searcy. After flipping through the Java Collections in the book, decided to use Priority Queue with a generic Person class that implements comparable. Each vending machine is represented by a priority queue and automatically sorted by the time of the person arrived. Person can be a customer or vending machine attendant. Did not manage to put everything on the paper. Hopefully the examiner can fill in the gap and understand what I wrote.

Questions and Sample Answers For 2010 Competition
Official eGenting homepage

Sunday, October 10, 2010

Lunch at Khuntai Restaurant

What I did on 10.10.10?
Went to a Khuntai Restaurant (Thai restaurant) with friends.

Tomyam soup

Steamed lemon fish

Overall nice food. Enjoyed very much. Thanks to ZY for the recommendation.

Address: (PJ Branch)
6, Jalan 5/44,
Petaling Garden,
Off Jalan Gasing,
4600 Petaling Jaya, Selangor.

Monday, October 4, 2010