A place to breathe

Sunday, August 31, 2008

Selamat Hari Merdeka!


Saya sebagai rakyat Malaysia, merasa bangga dan terharu dengan sambutan Hari Kemerdekaan Kali ke-51. Saya ingin mengucapkan kepada semua rakyat Malaysia:

Selamat Hari Merdeka!

Saturday, August 30, 2008

Budget 2009, and me (and maybe you)

As the child growing up in the 90's, you can't escape the PC + Internet boom - it happens, and your government wants to get involved.

So they set up funding to work on figuring out how to work with this strange machines called personal computers, spend millions (if not billions) of Ringgit from public funds, and try to transform you to some kind of computer whiz.

I'm one of them - and needless to say, the government sadly slowly abandoning the project.
And what are they focusing on now? Agriculture. That's right. Agriculture.

This is something like trying to figure out how to fix the broken PC. When it didn't work, we went home and say - "Kid, enough of these computer stuff, let's just get back to something that we are good at since the beginning of the days - farming"

This is a boo boo. Just look at the Malaysia Budget 2009 (you find the Link that suits your need, either from Utusan, DAP, etc). And see, where do they throw the baby project called "MSC"?
Do they know how much resources that they've spent, and it still doesn't work?

We have so much stuff here in Penang ready to be tapped, but they don't see it!. And always go back to Agriculture, agriculture, etc. What gets into their mind!.

I haven't gone to Arts, yet. Am I demanding too much? We all do as Malaysians. Maybe because of that, the Government never correct. Or are they?

OK, forget it. Why don't we just survive and do our own thing. Let's do some kind of computer stuff at home. Hooked up that damned TM Net Streamyx and enjoy the sluggish Internet at a very expensive rate. Didn't they see this?

Friday, August 29, 2008

Ping pong

I'm currently catching up with Ping Pong. Next week, I'm joining a little tournament here so I need to practice (it's funny, considering that I haven't been playing much for so long).

No matter, Ping Pong is here. Wanna play ping pong with me? Let me know.

Thursday, August 28, 2008

Static in C++

I think the keyword "static" in C++ is the most confusing. First of all, the behavior is not the same as in C, and within C++, the behavior is different between variable and function.

Generally, we can think of the keyword static to mean to have the variable to be "global" i.e, can be seen/used by any function within the program execution. But this is a limited definition. The static keyword in C/C++ means more than that.

In C:
1. Global entity declared as static is only "global" for that particular file. Other files cannot see that global variable. (Confused?).
The "file" is referred to as "translation unit". It meant to refer to as "statically allocated". Don't get confused. Just think of a file as a "translation unit", and the static variable can be seen only by the functions defined in that file.

In C++, it was fixed by introduction of "namespace".

In C++:
1. static object:
An object defined within a function, and the value persists across lifetime of a program.

2. static member:
A member variable that is associated with the class itself, rather than the object of the class. The idea is to provide a sort of "global" access, but with the object-oriented enforcement. Just think about that - you can use a static member to store some values visible to those who declared the class. Whether you can modify the static member or not, it depends on whether the static member is declared as public or private.

OK, the one that we want to give attention is this - how static members behave?

Static Function:

1. No "this" pointer: Static member has no object attached to it, so you can't access it with "this" pointer.
2. Cannot use virtual andconst with them. I'm not going into this (maybe later).

Static Variable

1. We cannot specified static variable inside body class, except with following keyword const (e.g static const int num = 78;)
2. Static variable must be defined outside the class


By the way, why do you care about keyword static? Ask yourself.

Wednesday, August 27, 2008

Wall-E and global warming

Watched the movie Wall-E yesterday (it's Disney's!). Pixar's next rookie (after John Lesseter), Andrew Stanton, is exploring the message of global warming.

In the future, the whole world will be full of garbage. Only robots collecting trashes exist, and occasionally, Earth are swept by some sort of typhoons.

The whole entire population left the earth, to faraway galaxy, boarding a huge spaceship called "Axiom". The whole entire population are at their extreme laziness:

They just sit on a floating chair, and all their foods and their needs are served by robots. They can't even stand up. Their body are fat, and they do nothing except chatting with their friends on the screen of the moving chair. And the chair will move in a specified direction and they don't seem to have control over it. Thus, they just know some part of the ship, and not all (some people don't know where the pool is).

One of the robot called Wall-E still collection garbage. He met "Eva", when Eva was sent by a huge spaceship for a mission - to find life on earth (in this movie's case, a plant).

Wall-E fell in love with Eva, and gave a plant that he found in an old fridge. "Eva" grabbed the plant, put it in her stomach and automatically shut down. Later, "Eva" was grabbed by the spaceship. Wall-E managed to grab the spaceship to follow where Eva goes.

Conflict

Axiom's Captain want to grab the plant and go home, but the Navigator called "Auto" (because it is always in Auto mode), wouldn't allow it because the instruction of the company that run the Axiom spaceship called "Buy and Large", due to high toxic level on Earth (I thought about it again, it's probably an excuse to run his business). By the way, Axiom has been running for 700 years.
With much struggle, Captain finally managed to switch "Auto" to "Manual".

At the same time, Wall-E was thrown back to Earth together with the plant, but saved by Eva.

Together, with the help of the savvy Captain and people on the ship, Eva and Wall-E managed to put the plant on the ship, and Axiom went back to Earth.

End

Wall-E and Eva finally get together on Earth. And the earth population is back and managed to plant the trees.

Tuesday, August 26, 2008

All .... Night!

I'm stunned with a very beautiful montage at the end of a film "Dogville" (Nicole Kidman).

And accompanying it is a song by David Bowie's beautiful song - Young Americans.

You should check out the movie, and the song, and the montage at the end.

By the way, Dogville itself is very minimalist and I like that.

About Me

I'm currently a software engineer. My specific interest is games and networking. I'm running software company called Nusantara Software.