Showing posts with label tech. Show all posts
Showing posts with label tech. Show all posts

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.

More
Questions and Sample Answers For 2010 Competition
Official eGenting homepage

Wednesday, May 26, 2010

IBM Websphere Application Server 7 Training



Get to attend IBM training again these few days. It's always nice to break out of usual work routine.

Technical stuff:
Java EE is very complicated. EJB3, JPA, SOA, ESB, BPEL... Yea, they are "open standards" backed up by Sun and IBM. But there are open source libraries tools that try to scratch the same itch too. Personally, I would use whatever that works and cost me less time to learn and setup.

Being too high level and abstract means it would be a nightmare to troubleshoot when errors occurred. It's definitely nice to generate entity POJO and input forms in JSF with a few clicks though.

Setup clustering is as easy as typing a few commands. That's the difference between a free and paid solution I guess.

Wednesday, March 24, 2010

IBM DB2 XML Bootcamp


Get a chance to attend the IBM DB2 Seminar recently. It's a 3 days course.


The thick book that supposed to be covered in 3 days...
It's about how IBM database supports XML document (searching, query, indexing, optimization) natively. The instructor is from India. Need some time to get used to his slang.


They would actually queue up for the lift during peak hours. Not uncommon to see people rushing to the lift carrying his/her laptop with the lid halfway closing also.

IBM Plaza is a nice and comfortable place.
Walking distance to 1 Utama. Nice to walk around during lunch and after work. Still haven't bored of it yet. A good escape from usual work routine. =)

Friday, September 18, 2009

Maple Story sprites drawing tools


 Saw colourful illustrations at my friend's blog. Trying it out. So it works with chinese characters as well. Adobe Air. Interesting.

Link
Banned Story

Sunday, July 5, 2009

珍重再见我的 Dell Inspiron 6000


25th May 2005 我们第一次相会
连当年用来拍这张照片的Nikon 4300相机都坏了。

If money is not in the consideration, I would definitely get a laptop. Mac maybe. Just started working. 2 weeks of salary auto credit to my bank account. Not even exceeding 900.

Barely enough to replace the hard disk of the old desktop pc at home. Or just use the current external hard disk, but it would takes a lot of data removal.

Take out 2k+ to buy a desktop pc? Don't feel like spending with just 900 in my earning records so far.. =.= And 2k is the same as my monthly salary. Not really wise to use up all of the salary...

Why am I ranting? Well, my bro and sis need computer for study. And my 4 years old laptop seems to be the victim. Need to give this to my brother. It is bought by my parents. Don't have any stand on this. Time I used to set up my OS environment is nothing.

Either start from scratch or clone the whole thing, which is a hassle. Anyhow, I am migrating my soul from 1.6Ghz, 1.24GB RAM laptop into a 800Mhz desktop pc... duh.


Gift from relatives who went to Australia. Now my laptop has someone to hug him 24/7.

I'm used to using others pc, at university's lab, or during work. But still, go home and caress my beloved dell inspiron 6000 laptop is one of my main source of entertainment. No matter what pc I used at outside, only would feel at home using the laptop with the windows customized to my heart. Everything is so 理所当然.


历尽沧桑,非但不能安享晚年,还要披甲上阵。在弟弟的淫威下,安有全尸呼?

It has died once. And I replaced its hard disk. (23rd October 2007).
Open and clean the laptop fan. (8th August 2008).
Replace one of the RAM module to 1GB (9th August 2008).
Installed Vista and Ubuntu linux. But end up with Windows XP Pro anyway.

This could be the last or second last day to blog using this laptop.. Sob sob..

I guess nothing last forever and I suppose to expect the separation with my laptop eh? LCD monitor costs 300-400.. Hmm.. Still a lot of uncertainties in my future to invest on a desktop PC.


岁月的痕迹

I guess I'll just stick to the ubuntu box for the moment? Firefox and eclipse run fine actually.. And most of my thing is on the 'cloud', gmail,blogger, google docs, reader, twitter.

ok, let just try disk cloning..

p/s: thanks to blogging and flickr. Everything is recorded. =)
pps: 你要撑着。等我有钱了就帮你赎身..

Monday, May 11, 2009

SMS Jinx

When you were waiting for bus, commuting in the LRT, snorkeling at Redang island(=.=), do you have the urge to share the joy/funny/sad/grief/pain moment with your friends on the spot?

That's why I try to write this application. Reuse some codes from my final year project, polish up my rusty python skill, playing with facebook API, experimenting with Google App Engine.. That's kind of conclude what I have been doing these days.

Go to SMS Jinx and try it out. And remember to give me comment/suggestion/problems etc. =)

SMS is the most basic communication method in GSM 2.0. All of the current mobile phones support SMS. And it is cheap. Problem? Most of the foreign website such as blogger, facebook and twitter do not provide SMS service to Malaysia users. Well, even if it is provided, I wouldn't want to spend 25sen to send an international SMS to update my twitter status...

Programming is fun, when I am trying to solve my own problems. Webpage designing still sucks to the max though. I doubt that I will be a good webpage designer, ever. Anyhow, I come up with a Step 1 -> Step 3 approach. Should be simple enough to follow. Idea came from Blogger welcome page.

Users management is a troublesome issue. I try to avoid having users to register before they can use the system. Anyway, it is not possible. I need to have a userid to store the phone number and other account information. Thanks to Google SDK, it's easy to outsource the user login system. I only have to get and store the userid and Google would manage the password, cookie and authentication for me. Great. I wonder whether people would hesitate to the Google account login prompt though. It's 100% safe, HTTPS and check the verified certificate if you know what you are doing.

I realize there are a lot of API(s) made available to developers. And there are countless things you can do from generate a random friend to post facebook status message as the user credential.

Another interesting problem come when I have to find a way to make sure the messages are coming from valid user instead of attacker. Researched for 1-2 days about this. What complicates the matter is that my system consists of Java client and Python server. Great! It's difficult to find a secure implementation of encryption or hashing algorithm on both platform. In the end I settled with HMAC hashing algorithm and both the server and client understand that.

I realize that facebook uses MD5 for authentication. Duh.. Then my application would be safer than facebook theoretically. I'm using SHA256 with HMAC algorithm to makes the secret key harder to be determined. Not to forget those nonce and random numbers. Uh huh..

I'm starting to see the beauty of python.
Case insensitive? abc.lower(). done!
Substring? cde(3:)

Never miss the brackets and messy complicated declarations in java and other languages.

Similar services at Malaysia (I've never try them):
Pacmee (look expensive.)
Twitter Malaysia gateway (018 though)

Read more...

Tuesday, May 5, 2009

Facebook application


What I've been doing lately?
My rusty python skill enables me to create a Facebook application using the Facebook API. Why Python? So that Google can host it for free. Hahaha..

It's called "Random Friend". Simple application that shows you one random friend and remind you to keep in touch with him/her. Try it out!

Next goal? Keep it as secret at the moment. ^^

Friday, April 10, 2009

PSP wifi internet


Could not connect to my home WiFi network with PSP.
Turn off WEP WPA encryption. Turn off MAC filter.
Still can't connect.

After searching around the net, I found the culprit.
PSP only support WiFi B mode. (My router is set to accept G mode client only.)

Tadaa~
Googling happily with PSP

Monday, April 6, 2009

cannot detect PSP in usb mode

Had a little problem when plug in the USB cable into my laptop and it is not detected.

1. Choose USB mode from the PSP setting, BEFORE plug the cable in.
2. PSP screen show USB mode.
3. Plug the cables in. It should be detected as storage device. Cheers.

Note: Check the connection. Plug them in properly.

Tried to transfer game into my relative's PSP. Hacked firmware. Just have to copy paste the game ISO file. In this case, FF: Tactics. I thought it would be different story and improved gameplay compare to the PS1 version. Well, just minor improvement here and there. It's a great game anyway. I like it.
Read more...

Tuesday, January 13, 2009

Maxis Broadband

什么东西都要试一试
希望7天后真的可以给回我100令吉


Open up the plastic holder.


USB Modem in action

Plug in then the setup will autorun to install the Maxis software. Should be something like a thumbdrive inside the modem which do the tricks.

快吗??
不知道
没有讯号
不是坏了就是我宿舍不能用
有机会去外面试试

Friday, December 5, 2008

Sharing internet connection with ad hoc Wi-Fi network

Left my WRT54G Wi-Fi router back at university apartment. Have to set up internet connection sharing with the crappy interface of Windows XP. I knew it would be hit and miss experience. I tried to do this few years ago.

What I can share with the other brave soul who want to attempt this is, the host need to set up a static IP address, gateway and DNS server point to the static IP given to the host. If you are lost now then stop and go buy a router.

Assuming you connect to internet with pppoe (streamyx), then on the Advance tab choose the share the internet connection. Choose Wireless Connection from the list.

That should be it.

Monday, November 3, 2008

Depth of field 景深


Now you see the purple crystal


Now you don't

Playing with the new camera focus point. >"<

Posted by Picasa

Sunday, November 2, 2008

Canon IXUS 860IS


The box


"The" camera


Free tripod

RM999
3.0 inch LCD
3.8x Optical zoom
15 second maximum shutter speed
Maximum ISO 1600, but sure a lot of noise
Face recognition, Optical image stabilizer
Enhanced macro shoot (auto cropping with the wide lens)
Auto stitch panorama pictures (useless for me)
Can't set Aperture manually though

Responsive in term of time to turn on until it is ready to take picture. (Compare to Nikon 4300, 4-5 years ago)


Long shutter speed, low ISO. Night scene.

It's been a long time since I get to play with digital camera(Crappy phone camera doesn't count). Everything seems clearer now. See the world through the camera lens. Where is my DSLR?