Eternity be damned

On and off, I do join some folks for jamming sessions. Once in a while during those sessions, I do suddenly find myself caught in some songs where there were just 3 to 4 chords maximum that just kept on cycling mindlessly one after the other.

Such occasions are a real torture to the soul, most especially when you ran out of new ideas what to do over those re-current chords. The torture is especially acute when you know that there outside this 4 chords are a whole universe of chords to explore.

Lately observing the people around me that have entered the work force. It seems their daily lives are imposed strictly within the limits of those 3 to 4 metaphor chords. From an outsider’s stand point, life seemed unbearably tasteless, in a sense tortorous.

I suddenly recalled from one of my lectures in Computer security how random numbers one after the other are created. Random numbers in computing are articifically created through the segmentation of an extremely large prime number. Within the domains of the prime number, all occurances appear random. However once past the pre-specified domain, a pattern starts to appear and becomes painfully apparently

Example:

13 expressed in binary will be 1110111100110010001110

We take a section of 4 places each time at an increment of 1 place per interation

1: 1110
2: 1101
3: 1011
4: 0111
5: 1111

23: 1110

On iteration 24th we get 1110 which is exactly simlar to 1

What has first been interesting has started suddenly to become boring, unpredictable and uninformative (Law of Anthrophy) Each additional iteration becomes less and less significant.

Translating it back to every life, we start to live more and more like machines losing our souls to the daily toils of live all for this false sense of security, the need to modulate back to iteration 1, once all available iteration within the set has been exhausted.

Exploring the exceptions available within our limited environment, I suddenly found that though my life has been rather random thus far, it has started to modulate back unto itself. It is starting to get really boring.

The possible solutions I could think of are either to getting myself into a new environment or seriously attempting at getting myself old and senile way ahead of my time.

The first seems pretty hard, with Alena serving as the drag, chaining me to this limited set of permutations with her inherent god be damned need for security and predicability. The second seems highly impossible, considering the fact I am no from the medical field by training.

Perhaps a third then. I think I should quietly slip away once all work has been settled for the year. India looks pretty foreign and exotic a place to explore. Perhaps I should even volunteer myself to work there in one of those NGO venues. That’d be a nice change of sets.

Imagining a existance that last for eternity, where all possible permutations has be tried and exhausted, life be really tortorous that way. Thankfully, we dont live forever.

Security or imprisonment?

I finished my assignment with Ivy where I was playing the role of the zombie. It was late, I walked towards Singapore River, buying myself a pack of beedi along the way. The wind was blowing. The night was restive

I sat down by the river where I lighted my stick. Sitting there by the river, I relapsed into a thoughtful mood.

I imagined myself a orphan with no kin in this world and no home to return to, surviving by etching out a living on the streets with my wits. Today was one of those fortunate days where I managed some penny in my pocket. This evening I will not go hungry. Puffing away on my beedi, I smiled to myself. Was such a life a sad and miserable one or was it one free from the shackles of kinship?

I seeked further into this imaginative world of mine. Such a person must indeed feel terrible loneliness at times, however such profound sense of loneliness must be intermittenly mixed with a deep sense of peace, a peace which is hard to be found when bounded by ties and kinship but only in solitude. To live this life perhaps demands a great fortitude then. Such a life must perhaps be one that is bitter but yet at the same time sweetness, one that must be very beautiful indeed.

21st century monsters

I brought Alena the other day to town with the intention of catching a movie, however Jim called somewhere along the way to invite for a networking session with some SEO gurus and our movie excursion was shortlived. Instead we ended up in Borders bookshop.

I always knew that books was for me greater source of temption than other commodities like cars, alcohol, branded goods or even girls. Unlike other stuff, each and every book was like a door way into some alternate reality, chance to dump here and now for something other worldly. A world of imagination where anything is possible.

Once in the shop I was spoilt for choices. There were so many books all over the place, taking a glance at their prefaces, most of them looked really inviting. Fixing my eyes on the wide selection, I eventually picked for myself “Dracula – the undead” and a book from “A series of unfortunate events” for Alena.

Thus I spent the next two days devouring my book from cover to cover. It is a sequel to the 19th classic Dracula by Bram Stoker.

This sequel is authored by one of his descendent and written based on notes left by the departed author presented Dracula in a different light.

In a sense it seems that societies’ notion of reality and attitued has changed very much over the past century. This change is evident when contrasting the monster then and the monster now. 19th century presented Dracula as an all powerful inhumanly blood thirsty creature of the night, 21st centruy presented this familiar monster in a humanified manner along with human strength and weakness. No longer was he presented as the absolute evil, he was instead presented as a living breathing entity with his own character, thoughts and emotions. He seemed to me to be pretty much like the Vampire Lestate in Anne Rice’s chronicals of the vampire. A creature lost in this fast changing world where traditions get eroded faster than they were built, full of fear, slowly finding his way about. He seemed a reflection of the 21st century human.

Illogic women

Seriously, Alena is not the most logical person on earth. Was just attempting to continue my argument with her just now. The whole thing started last week when we were at the Kota Tinggi WaterFalls Resort, which ended with my sleeping out doors for the entire night with lots of mosquitoes as my bed mates.

So here went the entire flow of the argument this night.

“Look I am the most annoying person on earth”. I stated

“Yes you are.” she affirmed what I said.

“Also, we only argue and fight when we are together” I continued my exposition

“Yes it is true too.” She continued

“We are not happy together.” I stated

She didn’t reply to this.

“Since both of us are not happy together we should part. Since you do find me annoying why continue hanging around me and get annoyed. Shouldn’t you be attempting to maximize your happinese? that is what the normal thing that all humans should do. Happinese maximization.”

“Anyways, I don’t like to spend time fighting and quarrelling. I seriously have better things to do with my life, like enjoying myself and relaxing by the beach. ”

“You are so annoying. ” She finally replied

“Yes, I am. So why are you even trying to keep me around? The natural thing to do is to leave me and get some peace for yourself elsewhere. Anyways didn’t you tell me to get lost the other night? ” I asked

“Well, I told you to get lost, but just temporarily.” She declared.

“What crap is this? When I get lost, I will of course get lost forever. That is the most natural and consistant thing to do isn’t it? ”

“Why are you so annoying? ”

“Look I am annoying, in fact I am the most annoying person on this entire Earth. And I don’t want to annoy you any more. So why don’t you just let me leave and you get someone else? if it is money you want, there are tons guys out there that are richer and even more that will be willing to treat you better than I do. So why me? Then again, you are already working you should be starting to get your pay soon too. So why even bother getting a guy? You can even buy your own cigarettes nows. ” I declared.

“Who on earth is like you. Are you crazy?” she screams

“Yes, I am and I am going to retire into monkhood in Thailand next year after Chinese New Year when things gets quiet over here. If you want to you can join me but only as a nun. ”

“You are crazy! ” she said frustrated.

“Yes I am, and being a normal and rational person you should leave. It is only for your own good. ”

“No I won’t. ” she said

“Are you crazy too? Don’t waste your time on a crazy person like.”

And the whole stupid argument continues. How come it is never possible to convince her that it is only for her own better good that she leaves me alone and seek out someone else.

Damn it. What I truly want is just some peace and quiet. Here I am instead as if stuck with a tenacious chewing gum that refuses to get off my shoes, irregardless of how hard I try to ply it off.

Perhaps I should attempt at another method to convince her that being annoyed, quarrelled and fought by me is not the best way to live life.

United States Political Scene is Turning into Taiwan’s

Jim sent me an email in the morning with a link to the video.

It is here. In the video was this guy that is attacking a particular US representative of the white house who looks up to Mao Tze Dong.

Curious at first, I took a look at what he had to say. After reading the whole scenario, I am seriously of the opinion that he is simply trying to make something out of nothing.

That representative was seeking inspiration from how Chairman Mao managed to establish a country from a territory that has been encrouched by so many foreign powers.

Truth is, he did screw up terribly with his internal policy after he setup the country. And this is the point that Glenn Beck in the video was driving at.

So basically Chairman Mao was referred to under very different context and really there seem no point reason with his whole big brawl.

I had no idea American politics can be so entertaining until recently. Boy and I thought only Taiwan’s was interesting. Haha

How to install a big database in an MySQL server

Normally when installing a small database on the mysql server, one does not meet much problems simply execute the script in any mysql client would do.

However when installing a big database it suddenly becomes a whole new story all together.

Pumping too much data or too long a query string to the database would result in the failure of the MySql client or the MySQL server to go away.

During such scenarios, one will necessarily have to write up one’s own script. In most cases, it would be written in PHP.

A simple way to do it is as written below.

<?php
//This file holds the functions needed for handling all interactions with the MYSQL database

//These are the details for setting up a connection
define(‘DB_HOST’, ‘localhost’); // database host
define(‘DB_USER’, ‘your_user_name’); // username
define(‘DB_PASS’, ‘your_password’); // password
define(‘DB_NAME’, ‘your_database_name’); // database name

$conn = mysql_connect(DB_HOST,DB_USER,DB_PASS) or die(‘could not connect to database’.DB_HOST);
mysql_select_db(DB_NAME) or die(‘could not connect to database ‘.DB_NAME);

//selects from the database
function connect_query($query){
$rs = mysql_query($query);
if(!$rs){
die($query.'<br>’.’Invalid query: ‘ . mysql_error());
}
else{
return $rs;
}
}

//generic insert
function connect_insert($table_name , $data_array){

$data_keys = ”;
$data_values = ”;

$array_keys = array_keys($data_array);
for($x =0 ; $x < count($array_keys )-1 ; $x++){
$curr_key = $array_keys[$x];
$curr_value = $data_array[$curr_key ];
$data_keys .= $curr_key.” , “;
$data_values .= “‘”.$curr_value.”‘ , “;
}

$curr_key = $array_keys[count($array_keys )-1];
$curr_value = $data_array[$curr_key];
$data_keys .= $curr_key;
$data_values .= “‘”.$curr_value.”‘”;

$query = “insert into $table_name($data_keys) values($data_values)”;
connect_query($query);
}

//returns a row in the results. Use int types as pointers in array
function connect_fetch_row($result){
return mysql_fetch_row($result);
}

//returns a row in the results. Use name as pointers in array
function connect_fetch_array($result){
return mysql_fetch_array($result);
}
function connect_latest_id(){
return mysql_insert_id();
}

$my_sqls = file_get_contents(“sql_file.sql”);
$my_sqls = explode(“;\r\n”, $my_sqls);

$count = 1;
foreach($my_sqls as $curr_sql_statement){
connect_query($curr_sql_statement);
echo $count.” of “.count($my_sqls).” statements executed \r\n”;
$count++;
sleep(1);
}

?>

Set Theory – a way of solving problems

I have thinking of writing about this post for the longest time. Sometimes while on the train some while working on some problems. Always when I am thinking some things seriously.

I first got in touch with Set theory when I was in Secondary School.

And some where along the way me and this theory went our separate ways. It was only in the university that I came in touch with this long lost friend. It was during this particular module called discrete math where I was once again re-introduced to him. This time, in its no nonsense form. No more does the lecture draw nice looking tables or circles but rather it said hello in crpytic mathematic expressions.

It has been stuck with me ever since.

Now in the real working world dealing with logistic problems everyday, it has become almost an integral part of my life. Each and everyday, I would be presented with real world problems that needed solving.

Each time I would bring out my arsenal of problem solving tactics the first and foremost will always be this trusty friend of mine. Set Theory. Once in a while being lazy, I do try to do it some other way. Always though, the solution I formulated would come crashing down in my face had I not applied this good old friend of mine.

The reason as to why this theory is so helpful is that when applied correctly, the eventually formulated solution will be sound at least within parameters predefined.

Of course in scenarios where the solution fails, it was mainly due to the fact that I mis- identified certain subsets where intersection existed between two different pre-defined groups, hence muddling up the architecture of my solution. It thus demands for the application of the set theory in a more rigorous depth. Seeing what the situation demands, there is no other way but to do as required.

I spoke to Pasha today to brief him on another assignment of which the subset I was passing to him to solve. On the way sending him home, he did raise one very important question which I had to consider.

“You know the thing about being a programmer, there is a definite lifespan being one. It is similar as being an athelete. Somewhere along the way as you grow older your mind become dull and ill-focused. When you reach that stage you should start to realise your days as a programmer as being numbered. ”

Perhaps that might be true if you put it as a physical ability. Then again a skill when practised and honed day in and out especially one that is in the mind, shouldn’t it only get better and better overtime.

Guess it was not supposed to be so. Peter is a feng shui master who analyses the locations of places and proposes the necessary design for that place. He mentioned once back when he was younger he could do it. Nowadays, he mind fails him. Lack of vitality does affects the ability for the brain to perform.

Then what perhaps is a person suppose to do when he does become older and starts losing his edge? Perhaps what he has left then is his ability to relay on his accumulated experience. Then again experiences are not the most reliable of things, especially in this day and age, when everything is in a state of flux.

In this day of extremistan nothing is really reliable and can be considered stable in the long run. What then can we bank on? The ability to delegate task to other then. This is a skill that I am just really beginning to build upon as I am slowly starting to realise the importance of it. One only has 24 hours a day. While time to time, one is required to solve problems that requires an effort more than 24 hours within a 24 hours span. The strenght of one man alone is never enough. These are especially true in real world situations.

The chief of problems then that will increasingly become more and more important over time is to acquire talents and keep them. There are lots of human resource out there in the society really but what the ability to acquire the right kind of talent for the right task is a challenge most of the time.

Recalling on how the warlord Liu Bei acquired and kept the loyalty of Zhang Fei, Guan Yu, Zhuge Liang the pillars of the empire he would eventually build. That seriously was a much more challenging feat than fighting and winning the wars the fought.

Jayan or was it Garis once told me, a man before the age of thirty has little or no people management skills. I do agree him. Our raging hormones, while good as a source of drive to help us conquer anything we set our mind to, often puts us in a rash and sometimes agressive disposition that is not really a good state of mind to maintain and manage a team. In this natural state we are better workers than managers.

I wonder how it do be like when I do pass the age of 35 and where would I land up in. The future remains a mystery still, beyong the realms which I could apply my good friend the set theory.

Lately, I have been feeling a foreboding sense of doom that seem to be impending over the horizon. I wonder what that might be. During less occupied times, I do mentally go through each and everything in my immediate surrounding and project them into the worst case scenarios over time just so as to reassure myself as well as to do some damage control if need be. Still unknowningly this sense sense of dread would creep upon me.

Just the other day, after my meeting with lawrence, I seeked recluse in the Saint Andrew’s cathedral. I did find peace during that one hour. It was much needed.

1 full year of hard work, I realised to myself, I had not the opportunity to take time of and mentally sort out my path and re-center myself. I seriously feel very uncomfortable in this situation.

Without focus and proper centering, it is so easy to overlook stuff and sometime critical ones.

Oh well, IsAllah as my friend Sian usually says. It is all in the hands of God. There is only so far one can look into the future.

Making Firefox perform faster

Recently my firefox application started to slow down when I type URL of a particular web site into the locations most especially when I typed an incorred URL.

I got really annoyed with it and hence decided to find out once and for all what the hell is happening. I used to love using Firefox before until recently.

Hence I chanced upon this site.

Following the instructions, I clicked on Tools > Options > Privacy.

I landed up on this particular page where I set Firefox to suggest Nothings when I am using the locations bar. Thereafter I applied the changes.

Immediately, I suddenly liked using FireFox again.

Next thing next to consider is how to reduce the loading time. That remains a question to be solved.

Work around for JQuery easing for Internet Explorer

Once again, I am using the easing funtion in the JQuery library to create some really cool animations this time for Genesis Motors.

I have been using this library for quite a while now for a few online projects.

Here are a list of some of them:

The latest project Genesis Motors requires that content be allowed to slide in and slide off stage.

Sample code

<script>
$(document).ready(function(){

$(“#side_bar_<?php echo $page->ID; ?>”).click(function(event){
//alert(curr_content);
menu_animation_active = true;

new_menu_slider_id = ‘#’+<?php echo $page->ID; ?>+”_banner” ;
//alert($(curr_content));

$(curr_content).animate({left:’-1200px’},600, function(){

$(curr_content).hide();

// Wait until the above has finished, then do the rest
//alert(new_menu_slider_id);
curr_content = new_menu_slider_id;
$(curr_content ).css(“left”,”1200px”);
$(curr_content ).show();
$(curr_content ).animate({left:’0′},{duration:500});

menu_animation_active = false;

});
});
})

</script>

Works fine with in firefox but not Internet Explore.

The problem is that when the current content slides out, even when the content is in the area it is not suppose to show, it still remains visible.

Trying hard to recall what I did the other time to solve the porblem I finally remembered. The trick to work around this is to add the following styling to the container that is holding all the sliding contents as well.

overflow:hidden;
position:relative;

Once you have added these two styles to the container, the Internet Explorer will know that this container is on the same level as the sliding contents within hence will restrict the contents from floating on an unattached z-index above the main layer.

Personal space

I step home today after a long day at work outside. The place was empty, my parents were out, my brother was still at work. I was thankful.

Alena called in the afternoon. I told her I was busy, I was in the midst of a meeting with Linda a photographer from Russia then. Linda though Russian of Nationality seemed more of Mongolian descent, thanks perhaps to the legacy of Genghis Khan.

I met up with Satheesh thereafter to discuss about the hardware procurement we were working on, we stayed at Tiong Bahru till 9pm. He left shortly there after with Amba.

As the taxi left carrying Satheesh and Amba along. I stood there by the side of the road considering what to do next. The thought of squeezing with the rest of the home coming commuting crowd and then perhaps to a house with the television blasting away and the annoying lights blasting away was a major turn off.

I opted instead for the other option. Walking past a grocery store I bought myself a pack of cigarettes and started walking towards the near by park, perhaps for some peace and quiet.

I sat at the far edge of the park. facing away from the main walkway and lit myself a cigarette. Puffing away, I stared at the empty lots that was supposed to be the school field during day time. My mind wandered. Suppose the vacant lot remains but the buildings around it didn’t exist. Instead there were miles and miles of grass land stretching all the way to the horizon, the wind meanwhile gently blowing and howling. A desolate land untouched by human hands. That would have been the perfect place to be for some hiatus.

A cat came running from the open gates of the field then. Light of step, full of life and energy, it seemed happy with life until perhaps the next time it goes hungry. Unlike the cat at home, it knows no boundaries it was free. It trotted along the path beside the other runners, an equal.

A passerby came then to this little corner of the park I was occupying. This inexplicable sense of annoyance aroused within me. Being an overcrowded territory as we have here in Singapore. I had no other choice than to accomodated this unwelcomed presence. I felt like crying then. This fragile little desolate paradise I was building within my mind was shattered within an instance.

I left then slowly trodding towards the nearest MRT station. Standing at the platform awaiting the next train to arrive, I felt a deep sense of dread as I prepared myself for the next on slaught of crowd.

The train soon arrived thereafter, I step into the train and closed my eyes willing myself away from this reality to a far away place. More and more did I felt it was important. I had lashed out at an old man the other day in the train on my way home after a long night and it was deeply regretted. The fault was not his but the lack of space on trains nowadays, my lack of sleep and short fuse.

4 stops left… I momentarily returned to reality when the trained arrived at commonwealth station. I grasped in a lung of air and went back to my own world.

3 stops left… I considered Alena. I had texted while I was at the park asking what she wanted of me. She had replied nothing and asked we should meet tonight. I rejected her offer then.

“I am tired. I wish to be alone by myself” I explained.

“Alrite head home early love” she replied.

I stopped replying thereafter.

I wonder to myself sometimes, why was it that she similar to my mom thinks that it was weird and outlandish to choose being alone.

“You should be thankful I am around or else you would just be here alone at the park so bored and lonely. ” she boasted once when we were sitting in the park. Truth was I would have been more thankful had she not been around. With her or even any one by my side especially during those state of mind I was in would have only added to my level of agitation. My mind during those times would just be imprisoned here and now, when it needed most to be let free to wander and roam down the unknown space and time of the cosmic universe and alternate realities.

“Don’t you ever dream? ” I asked her a few nights ago while we were sitting in the void deck.

“I used to but not anymore ” she replied

“What happened? ”

“I finally realised it was impractical. ”

“What then were you dreaming of?”

“I used to imagine I was a princess or a being of another species. That one day I would fly far far away. Away from this place. It was just not realistic. i stopped dreaming then. ”

“No you shouldn’t because that is what really keep us alive. Dreams. Without them, we would just be machines, soulless.”

Typing away the lock to my door suddenly rattled. So be it! my family has returned so much for my personal space for thoughts. But it was definitely enjoyable for a while to be sitting alone in front of my computer with nothing but the night light on and Jazz music playing in the background.

Darkness, this none entity, I truly love it. It was really like a shroud, an impermiable membrane that separates me and the rest of the world, giving me space to create my own.

Soon if my predictions are correct, mom would step in the room and ask “why is the room all dark?” Thereafter against my protest she would switch the annoying flourescent lamp on and I will of course lash out at her. She is ignorant in this manner.

Sometimes I think to myself, if perhaps one day I do own a property of my parents would be most welcomed to visit once in a while but be definitely banned from ever moving in. Such a act would slowly but surely force me into the mental asylum in the long run.

I like my space as it is, the darkness and the imaginary world residing within.