Vision through iPhone

November 27th, 2011 at 12:24 · Filed Under Blogging, Days in My Life, iPhone, Photography · Comment 

I have created a photography blog to post all photographs taken with iPhone. Check it out here.

November Rain

November 17th, 2011 at 16:17 · Filed Under At Home, At Work, Days in My Life, Music · Comment 

Time flies. It’s November again. 2011 is waning and 2012 is just before the doorstep. Soon we will be greeting “Hello 2012.”

There is no particular topic for this blog post but I just want to share with you one of my favorite rock song, “November Rain” by Guns N’ Roses.

It’s November and at this time of the year, the beginning of North-Eastern monsoon, brings a lot of rains. No word in the Webster can describe the mixed feelings of listening and smelling the rain together with the music. If you are somewhere so happened to have rain outside your window in the month of November, turn up the volume and watch the rain outside.

Perhaps you want to share with me your feeling?

Torenia fournieri

October 7th, 2011 at 11:05 · Filed Under At Home, Blogging, Days in My Life, Flowers and Plants, Gardening, Photography · Comment 

Torenia fournieri (Wishbone flower)

Thanks to Hisao Yamada-san, a friend from Steply, who has helped to identify the above flower. It is one of my favorites. The name is Torenia fournieri or Wishbone flower.

Go here for more photos of flowers and plants in my garden.

R.I.P. Steve Jobs

October 6th, 2011 at 20:58 · Filed Under Blogging, Days in My Life · Comment 

Steve Jobs

It was a shocking morning when I learned about Steve’s death from a friend’s message on my iPhone 4. Then, I confirmed the news by reading Apple’s website and Twitter on my iMac.

No words can adequately express my sadness. My condolences to his family.

Steve, you have been a great inspiration to me. Well, I worked today to its fullest and always will be. ”Never settle!”

Here is a video “The Crazy Ones” with Steve Jobs voiced over.

老同学重逢

September 13th, 2011 at 11:08 · Filed Under Blogging, Chinese, Classical, Days in My Life, Friends · Comment 

阔别廿余载,昨晚和老同学吴毅坚重逢一起在Movida用餐,并痛快地谈了二小时多得知其他同学的现况。原来还有很多位老同学还在本州工作,真希望能好好聚一聚。一时心血来潮,剪取自李白的《将进酒》送给友人。

君不见,黄河之水天上来,奔流到海不复回。
君不见,高堂明镜悲白发,朝如青丝暮成雪。
人生得意须尽欢,莫使金樽空对月。
与君歌一曲,请君为我侧耳听。
与尔同销万古愁。
--剪取自李白的《将进酒》。

How to detect infrared?

September 9th, 2011 at 14:11 · Filed Under Electronics, Projects · Comment 

Infrared (IR) light is electromagnetic radiation with wavelength longer than that of visible light. Its wavelength is measured from 0.74-300 micrometers based on the astronomy division scheme. The red visible light has a wavelength within 0.63-0.74 micrometers (630-740 nanometers). Our eye can detect or see visible light with wavelength ranging from 0.38 micrometers to 0.74 micrometers. Therefore, IR light is invisible to our eye.

Says you are working on electronic project that uses infrared LED, how can you tell if the IR LED is functioning, since IR light is invisible to us? An easy method is to use any cellphone or computer with a built-in camera to detect the IR light.

If you have a Mac, you can launch its PhotoBooth application and then position your IR LED device in front of the camera. If the IR LED is working, you will see it lights up. This method, however, cannot help you to decode the IR signals from the LED. For decoding purpose, you must use an IR receiver to capture the signals.

 

Regulus – My new (Lion) iMac

August 13th, 2011 at 14:37 · Filed Under Astronomy, At Home, At Work, Computing, Days in My Life, Mac OS X · Comment 

It has been my tradition to name my computers and mobile devices after the name of a moon, planet or star. This time is no exception.

The new OSX operating system 10.7, code-named Lion, was officially released by Apple, Inc. on July 20, 2011. In astrology, it was just two days before the Sun begins occupying Leo from July 22 to August 22. And I ordered my iMac and received it before the Sun leaves Leo.

In astronomy, Regulus or Alpha Leonis is the brightest star in Leo constellation. In Chinese, it is known as 轩辕十四, the Fourteenth Star of Xuanyuan. Regulus is also one of the brightest stars in the night sky. Together, with Eta Leonis (a fourth-magnitude star), they mark the lion’s heart.

My new 27″ iMac is a top range CTO model and will be the power horse for my works which include software development, some photography and design works. It is also the most powerful personal computer I have ever owned/purchased. Thus, Regulus is the best and most beautiful name for my new iMac.

Pluto will be passed down to my wife and kids after the data has been completely migrated to Regulus and a stable working environment is established.

iMac

iMac

 

Ada and Multiple Inheritance

July 28th, 2011 at 5:24 · Filed Under Ada, At Work, Call Me a Geek, Days in My Life, Software Development · Comment 

When developing an information system which computes real-life data, one of the most common problems a software developer may encounter is multiple inheritance. Inheritance is one of the four aspects in Object-Oriented Programming (OOP).

What is Object-Oriented?

Object-oriented technique organizes software as collection of discrete objects incorporate with data structures and behaviors. Take a software that keeps records of professors and students in a university for instance. Both professor and student are person. These three entities – professor, student and person are objects. A person has data structure such as name, gender and date of birth to make things simple. Both professor and student share the same data structure of person. A professor has employee number, salary, and room number. And a student has student number, courses and grades. Both professor and student have different behavior: to lecture and to learn respectively. We can let professor and student to inherit the same data structure and behavior from person. Person is superclass. Both professor and student are subclass. Now both professor and student can derive data structure and behavior from superclass person but at the same time, both can preserve their own data structure and behavior as professor and student respectively.

Multiple inheritance is where a subclass inherits from more than one super class. One of the most common problems with multiple inheritance is symmetry. Let subclass D inherits from superclasses B and C which inherit from another superclass A. This is called symmetric multiple inheritance.

Multiple inheritance is rather problematic at linguistic level. Many object-oriented programming languages support multiple inheritance and solve the problems in such a way that usually they cause surprises to their users. In the above example, the operations in A can be derived to B and C and overridden in any other ways by any one of them in D.

Ada provides different approach to implement multiple inheritance by simply not allowing user to get into such problem in the first place and to force the user to break the symmetry.

While I slip deeper into my software design, symmetric multiple inheritance occurs. I have two classes A and B where both of them inherit from object List.Node. Another subclass C inherits both superclass A and B. Ada forces me to break the symmetry by letting C to have a direct inheritance from A plus indirect secondary inheritance of B.


package List is
   type List is limited private;
   type Access_List is access List;

   type Node is tagged private;
   type Access_Node is access all Node'Class;

private

   type Node is tagged record
      Previous : Access_Node;
      Next       : Access_Node;
   end record;

   type List is limited record
      Head    : Access_Node := null;
      Tail       : Access_Node := null;
      Current : Access_Node := null;
      Count   : Unsigned := 0;
   end record;
end List;

   type A is new List.Node with private;

private

   type A is new List.Node with
      record
         Id   : Integer;
         Str  : String ( 1 .. 20 ) ;
      end record;

   type B is new List.Node with private;

private

   type B is new List.Node with
      record
         Precision : Float;
      end record;

   type C is new A with private;

private

   type C is new A with
      record
         Magic : B;
         Plate   : Integer;
      end record;

Deadly techniques of Uechiryu

July 26th, 2011 at 23:08 · Filed Under Karate, Kata and Bunkai, Martial Arts, Training Journal · Comment 

I have not been writing about martial arts (especially karate) for a very long time. But that does not mean I have stopped practicing. Life has been busy with works lately and today my “mood” suddenly revisits me and so I decide to write this post.

Many of you may be wondering what I have been up to in karate. Have I stopped training? Hell no. I have been reading a lot about human anatomy and meridian pressure points these days. I find them enlightening. I became interested in human anatomy after working on a project building a gynecology website.

Using the knowledge that I have learned about human anatomy, many questions about Uechiryu techniques have been answered. These techniques are extremely dangerous and deadly when applied with medical knowledge.

What it is left now is training and more training to attain surgical precision strike in applying these techniques.

Bersih 2.0: The truth that cannot be covered

July 11th, 2011 at 22:52 · Filed Under Humanity, Kuala Lumpur, Malaysia, Politics, Social · Comment 

Which is the truth? The government of Malaysia has his own stories. The people of Malaysia who took part in the Bersih 2.0 rally last Saturday (July 9, 2011) have their own stories as well. True, not true. True, not true?

If you are in doubt of Bersih 2.0, please check out their website at http://bersih.org.
I am not going to write a long post here. The video below speaks louder than any words on earth.

Please watch the video carefully until the end then tell me which is the truth. If you have the slightest conscience, I am sure you will cry. I cried after watching the video and there is nothing shameful to tell everyone that I cried.

Fortunately, the man in the video who collapsed into unconsciousness has survived. Another man named Baharuddin Ahmad who was at KLCC during the rally, however, collapsed and died after being suffocated by the tear gas which was fired directly at his group by the FRU. A man has sacrificed his life while battling against the brutality of police and the tyranny of his own government.

Whilst one man is down, many thousands will rise for him!

 

Bersih 2.0 Worldwide

July 11th, 2011 at 15:35 · Filed Under Kuala Lumpur, Malaysia, Politics, Social · Comment 

I shed tears while watching this video. This is so damn touching.

Bersih 2.0: The ancient Chinese philosophy

July 10th, 2011 at 21:54 · Filed Under Chinese, Kuala Lumpur, Malaysia, Philosophy, Politics · 1 Comment 

Not long after Datuk Seri Najib Tun Razak became our prime minister on April 3, 2009, he made a four-day official visit to China from June 2 to 5 the same year. During the visit, he mentioned his father’s special relationship with China. His father, Abdul Razak, was Malaysia’s 2nd prime minister and first established diplomatic relationship with China in 1974.

Recently, before the Bersih 2.0 rally, he and his son Nor Ashman took part in a radio interview on One FM Morning Kaki program. Ashman greeted in Mandarin and the Prime Minister greeted in Cantonese.

One can easily tell that our Prime Minister is trying to impress the Chinese Malaysians how he embraces China, her language and her culture. That’s a good gesture of course. Unfortunately, the Bersih 2.0 rally which took place in Kuala Lumpur yesterday (July 9, 2011) has discredited what he has been portraying thus far.

You see, the Chinese language is not something that can be learned in a few months’ time or a few visits to China. It certainly cannot be learned using Google Translate or any other language translator on the Internet.

If our Prime Minister had studied and understood the Chinese wisdom below, what  happened yesterday would not have happened. Managing and ruling a country is not as simple as “早晨,大家好,我系Najib。” (Good morning, how is everyone? I am Najib).

Lastly, this applies to those MCA eunuchs as well. Being Chinese descendants and speaking Mandarin as your mother tongue means little or next to nothing in embracing the Chinese culture. Your mentality is only equivalent to that of the uneducated peasants in the society in ancient China.

不 尚 賢 , 使 民 不 爭。
不 貴 難 得 之 貨 , 使 民 不 為 盜 。
不 見 可 欲 , 使 民 心 不 亂 。
是 以 聖 人 之 治 ,
虛 其 心 ,
實 其 腹 ,
弱 其 志 ,
強 其 骨 。
常 使 民 無 知 無 欲 。
使 夫 智 者 不 敢 為 也 。
為 無 為 , 則 無 不 治 。

Bersih 2.0 – Love to my country

July 9th, 2011 at 23:05 · Filed Under Blogging, Critiques, Days in My Life, Kuala Lumpur, Malacca, Malaysia, Politics, Social · Comment 

Today, July 9, 2011 is the day tens of thousands of Bersih 2.0 supporters marched in Kuala Lumpur peacefully for the good cause to seek electoral reform for a clean and fair election. There are plenty of information spreading on the Internet about Bersih 2.0 rally so I am not going to repeat everything here.

One thing for sure, this rally has changed my perception and the spirit of a true Malaysia, where all races – Malays, Indians and Chinese united under one cause despite of the unwarranted, tyrannical acts by the National Front government and the police. I have never felt more proud of being a Malaysian.

A quote from a friend of mine from Hong Kong:

Democracy won’t come to you, is you go and get it. if you have chance just speak out loud, or shout from the rooftop. – Atropos

And from famous actor Clint Eastwood

Sometimes if you want to see a change for the better, you have to take things into your own hands. – Clint Eastwood

What happened today on July 9, 2011 will be written in the history of Malaysia. This is the day when fellow Malaysians stood up bravely to defend their civil liberties which have long been disrespected by the ruling government since independence. I don’t want my children, when they grow up, ask me: “Dad, what had you done on July 9, 2011?” and I can’t answer them. So I decided to wear yellow (the signature color of Bersih) and walked in town to show support. Honestly, as a father of three and the breadwinner for my family, such decision was not without fear. Why fear you may ask? Perhaps Malaysia is the only region in the world where you can be arrested for merely wearing yellow. And being arrested is one thing, how you would be treated after arrest is another.

This morning, I wore a yellow T-shirt and moved around at certain parts of the town. In the afternoon, after meeting my client at his office, I walked from Hatten Square, crossed the main road, and walked length of Dataran Pahlawan in the same T-shirt.

Having been following up the rally happenings in Kuala Lumpur since morning, I thought I could at least feel a little of the Bersih atmosphere here in Melaka. Disappointedly, I only saw large crowds, mostly Chinese, hanging out at Hatten Square and Dataran Pahlawan happily as usual. Everyone seemed carefree and undisturbed by the fact that thousands of people were being treated inhumanly by the police just because they wanted to ask for a clean democracy for all Malaysians. I hardly spotted one that wore yellow. If you look at the photos taken during the Bersih rally, you can see most of the protestors are Malays, relatively few Chinese took part in the rally. I am not being racist here, my point is there are too many Chinese Malaysians who simply don’t give a damn to the wellbeing of the country. They don’t even care to vote. All they care about are how much money they can make and how well they can live. With such attitudes, no wonder the Chinese are being called “pendatang” or squatters in spite of the fact that they are born in Malaysia. I think these people really deserve such labeling.

Although what I did was insignificant and actually nothing compared to those who had risked being arrested, injured or even losing their life to join the Bersih 2.0 movement in Kuala Lumpur today, I am glad that I have made one tiny step to conquer my fear by wearing yellow and walking on busy road and in busy malls in the heart of Melaka, with the spirit of Bersih (Clean).

If you want to conquer fear, don’t sit home and think about it. Go out and get busy. – Dale Carnegie

曾国藩自立下課程十二條

June 3rd, 2011 at 11:30 · Filed Under Blogging, Chinese, Classical, Days in My Life, Education, Philosophy · Comment 
曾国藩是中國近代政治家、军事家、理学家、文學家,清朝“中兴名臣”之一,官至武英殿大学士、两江总督。同治年間封一等毅勇侯,世袭罔替。

在维基百科读了他的史记,对他开始敬仰他。以下是他為自己立下課程十二條:
  1. 主敬:整齊嚴肅,清明在躬,如日之升。
  2. 靜坐:每日不拘何時,靜坐四刻,正位凝命,如鼎之鎮。
  3. 早起:黎明即起,醒後勿沾戀。
  4. 讀書不二:一書未完,不看他書。
  5. 讀史:念三史(指《史記》、《漢書》、《後漢書》),每日圈點十頁,雖有事不間斷。
  6. 謹言:刻刻留心,第一工夫。
  7. 養氣:氣藏丹田,無不可對人言之事。
  8. 保身:節勞、節欲、節飲食。
  9. 日知其所無:每日讀書,記錄心得語。
  10. 月無忘其所能:每月作詩文數首,以驗積理的多寡,養氣之盛否。
  11. 作字:飯後寫字半時。
  12. 夜不出門。

AdaStar Informatics new website launched!

June 2nd, 2011 at 5:28 · Filed Under Blogging · Comment 

The website of AdaStar Informatics was not updated for quite a while. Finally, we have managed to roll out a new website. In addition, the website can also be accessed at adastar.co.uk.

Next Page »