曾国藩自立下課程十二條

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.

马来西亚华裔是猪-没错!

May 31st, 2011 at 22:43 · Filed Under Blogging, Chinese, Critiques, Politics, Social · Comment 

Ibrahim Ali和他的同僚说Cina是猪,一点都没错,反而吾觉​得妙极。

“猪相”:它们的吃”很省”(猪食),它们老爱在一角落​臭挤(猪圈),它们永远看似很”满足”(猪样),但“开​心”是装/堆出来(猪也会涂口红),它们甘受宰制(猪脑​),它们有发癫的时侯(猪嚎嚎大叫时)。它们爱窝裹斗,​猪咬猪,自己打自己人。当狼来了,个个夹着尾巴鸟兽散。​可怜一两只被牺牲在狼的血盆大口之下泪流满面,认命!

iPhone makes quick astronomy

April 16th, 2011 at 23:49 · Filed Under Astronomy, At Home, Education, iPhone · Comment 

I’ve always wanted to get into astronomy since the late 1990s but could not make it due to busy schedules (yeah lame excuse, I know), lack of mentor, not having a clue how to find and identify objects in the sky, etc.

Then, last night I stumbled upon an iPhone app, SkyView which uses Augmented Reality (AR) to reveal the current positions of planets, stars, constellation, satellites and even the International Space Station (ISS)!

I demonstrated the wonder of the app to my kids outside our home just now. Although the sky was cloudy, we could still see the moon so I used the moon as the reference. SkyView accurately revealed the exact position of the moon on my iPhone screen. Tonight, we found a lot of constellations, including Virgo which was behind the moon. Next to the moon was Saturn, as illustrated in Figure 1.

iPhone SkyView Astronomy

Figure 1: Virgo, moon and Saturn.

Not too far away from our moon, we found three satellites, the COSMOS 1536 (below the moon), COSMOS 1975 (slightly above the horizon but behind the apartment and MIDORI II (ADEOS-II) (further to the right of the moon). See their illustration in Figure 2, 3 and 4 respectively.

Figure 2: COSMOS 1536

Figure 2: COSMOS 1536

Figure 3: COSMOS 1975

Figure 3: COSMOS 1975

Figure 4: MIDORI II (ADEOS-II)

Figure 4: MIDORI II (ADEOS-II)

Beside these, we also found the Hubble space telescope and the ISS (International Space Station). Both of them were below the horizon and behind (or under?) our house!

Figure 5: Hubble space telescope and ISS

Figure 5: Hubble space telescope and ISS

The SkyView app is a great iPhone app for astronomy hobbyists and perfect education tool for both parents and kids. It’s certainly worth investing. It costs only $1 and there is also a stripped down version which is free.

Run Software Update from Terminal on Mac OS X

February 18th, 2011 at 11:24 · Filed Under At Work, Call Me a Geek, Computing, HOWTO, Mac OS X · Comment 

Every Mac comes with an application called Software Update, which automatically check for, download and install any available software updates. The application will prompt you to restart your Mac if necessary.

Although the automation of software update and restart is convenient most of the time, it can be quite an annoyance when you are in the midst of works, where the reminder window keeps popping up.

To avoid this annoying pop-up, you can run software update in Terminal (command line) and restart your Mac as you wish, using the following command:

 sudo softwareupdate -i -a 

This is also convenient for managing software update remotely over slow Internet connection. Logging in via ssh instead of remote desktop will reduce the high bandwidth requirement and yet still get the job done.

The waking of a sleeping beauty

September 10th, 2010 at 15:18 · Filed Under Ada, At Play, Blogging, Days in My Life, Software Development · 2 Comments 

I wrote a board game called AdaOthello way back in 2001 using Ada (of course) and GtkAda. AdaOthello is quite a beautiful piece of GUI that I had created for the first time using GtkAda on Linux. Unfortunately, I don’t have the time to improve the game engine and port it to Mac OS X. It became a sleeping beauty!

On August 27, Gustaf Thorslund contacted me about his wish to use my code and continue the development of AdaOthello. Today, I received another email from Gustaf informing me that he has revived the project.

First, I would like to express my gratitude to Gustaf to take my code, make a second home for it, and taking it to a new height. I originally released AdaOthello under GPL 2.0 or later and I continue to wish to keep it that way.

You can find AdaOthello at its second home here.

Android is a dirty phone

July 21st, 2010 at 12:24 · Filed Under Blogging, Call Me a Geek, Mac OS X, Phones · 7 Comments 

Android sex chat

Android has been regarded as a savior to those who hate to be controlled and tied down by Apple’s strictly guarded iPhone. It is also one of the competitors closest to iPhone. While Apple’s latest iPhone 4 has a new feature called “FaceTime”, the Android on the other hand gets Sex.

FaceTime is a feature to make video call from iPhone 4 to iPhone 4 over Wi-Fi. No special account or screen name is required to make video calls. Therefore, users can forget about Skype and Apple’s iChat AV. Certainly, FaceTime is a great aide for people with hearing impairment and mute to communicate using sign language.

There are plenty of sex/porn apps for Android devices. There is even an adult-exclusive app store called MiKandi to cater such need. Now the store has reached a new milestone, introducing the first live adult web-cam streaming app for mobile devices called Sex Live Chat. You can read the story here. With live sex chat, you can watch the party on the other side engaged in some actions, and vice versa, if you like to. I will let your imagination run wild.

It is pathetic for a brilliant mobile platform to resort to sexual elements to promote its use. This greatly contrasts with Apple’s iDevices where you can find a wild variety of education apps along with useful business and productivity apps, etc, more than you can imagine.

As a parent, I will invest in iDevices for my kids and never an Android device. The latter is well analogized to the pest in our household.

iOS 4.0.1

July 16th, 2010 at 13:05 · Filed Under Blogging, Call Me a Geek, Computing, iPhone, Mac OS X · Comment 

Yesterday, Apple released iOS 4 update, which was one day before its press conference. The iOS 4.0.1 has obviously made the signal bar look taller. According to various media and blogs, the update is reportedly to have new software (new formula) to calculate the signal strength and to display it more accurately. Read here and here.

iPhone 3GS and iOS 4.0.1

The above screenshot shows the signal bar on my iPhone 3GS with iOS 4. By comparing with the screenshot below, it is obvious that the signal bar (especially bar 1 and 2) has become taller.

iPhone 3GS and iOS 4.0.1

At the same location (my desk), I covered the back of my iPhone 3GS with my palm, the signal would drop 1 to 3 bars after about 22 seconds. After updating to iOS 4.0.1, I repeated the test. The signal bar would reduce 1 bar after more than 25 seconds.

Well, this is a very low tech test and is not accountable to conclude that the new software in iOS 4.0.1 has displayed the signal strength more accurately. Anyway, there is a huge difference before and after.

Embrace Life

July 14th, 2010 at 12:16 · Filed Under At Home, At Work, Blogging, Days in My Life, Family · Comment 

It was a beautiful morning, starting with a cup of coffee and a few slices of toast, I began to read some articles on the Internet. The articles are related to my software project as well as some other stuffs regarding productivity and supplementary.

Among all I was reading, there was one that caught my attention, the one that I paused all my activities, and let it touch deeply into my heart. I can’t help to shed my tears.

This is the most beautiful and touching commercial I’ve ever watched. Besides the artistic and beautiful photography, the video portrays how beautiful life is and how fragile it can be. Take a moment off your work (yes, I know you are busy) to watch this video. I bet and I hope it will make you realize how beautiful our lives are.

Enjoy!

This is the new “wear your seatbelt” ad the UK is doing – started by a man not hired to do it, but because the cause is important to him, he came up with this idea, and now it’s being hailed across the world as a ‘beautiful’ commercial. And now the video has become so popular with the general public that people are forwarding it to friends/family on their own so quickly that it has spread all over the world in a very short time.

You can watch here too.

Today, Tomorrow and Todo

July 8th, 2010 at 19:07 · Filed Under At Work, Blogging, Days in My Life, Productivity · Comment 

Last night, I was reading a blog post at Time Management Ninja (aka TMNinja). In “The Secret of Today Versus Todo“,  what did you get done today is important. But sometimes it will not be the case. Someday, things just don’t work out as you wished.

For the past two weeks, I had been bugged by a silly tiny bug in one of my codes. Things weren’t moving at all. They were all still and my progress in a software project was stagnant. Before the bug was identified and removed, I could not move on to other tasks as they were highly dependent on the unit testing of that particular buggy code.

Yesterday, I finally managed to debug it and deducted 5 tasks. In actual fact, I only completed one task but deleted four. The four tasks which I deleted were no longer applicable because I completed one task which was dependent on the other four. I deleted them because they became obsolete.

So, yesterday, I completed one task that would allow me to complete more tasks today. In other words, imagine that we were traveling on a time machine to yesterday, it would be: today I completed one task and tomorrow I will be able to move on to other tasks. Confusing, isn’t it?

For a software developer, someday he/she will write many lines of code, perhaps a thousand. But someday, he/she will only write just one line of code or perhaps none. When the productivity is only one line of code for a day, is it too low? It is not. Sometimes, that single line of code will serve as a connector to many pieces of code together. That one single line that software developer has produced today, will allow many tasks to be completed tomorrow.

Praise yourself if you have got only one task done today because you will complete more tomorrow. The caveat, however, is that you do not make this an excuse for not having done so much today.

Catching HTML bugs with Safari 5

A bug in a seemingly harmless HTML code had been bugging me for almost 2 weeks. I was sort of yanking my hair while trying to trace the bug which messed up the HTML page. The debugging task was even harder because I work on a HTML template with an extension .THTML. The template does not only contain standard HTML but also tags which are only recognized by AWS (Ada Web Server) . This template file is parsed by the web application (I am developing), which has AWS library, before it is dispatched as raw HTML code to a browser.

In my design, I break down the HTML template into header, body and footer so that I can reuse the common codes in header and footer. That means, all the body templates are without <html> tag. This missing <html> tag disables the syntax-coloring feature of code editor, leading to a more laborious code reading.

Before this, I had gone through every line of html source code in the template file umpteen times. This “obscure” bug, if not removed, would throw a monkey wrench in my works. I browsed the Internet and read articles in hope that I would get some clues. So, I was reading a few articles about Extensions in Safari 5. Extensions are not really impressive to me as I do not need to add missing functionalities to my browser. Safari itself is more than enough for my daily browsing activities. Somehow, my curiosity had driven me to enable the Develop menu in Safari 5. After activating it, I noticed some debugging tools in the menu. I enabled the web inspector by selecting Show Web Inspector in the Develop menu (Figure 1) then navigated to the web page I wanted to debug. To use these debugging tools, the Develop menu must first be activated. Here is a simple guide to enabling the menu.

Safari 5

Figure 1

Safari 5 immediately detected two error messages as shown in Figure 2. These two errors were easily corrected. After removing these unmatched </div> tags, my web page still did not show up properly with the intended layout.

Safari 5 Show Web Inspector

Figure 2

Then I selected the Elements tab and it showed me the page source in debugging mode as shown in Figure 3. I instantly spotted the <div class=”data-base-layer”> tag which was supposed to be in the <div id=”container”> tag.

Safari 5 Show Web Inspector

Figure 3

I clicked on the little grey triangles in the left pane to expand the <div id=”container”> tag and the <form> tag. There were two <div class=”data-base-layer”> tags (labelled as “1″ in Figure 4) and the one in label “2″ was supposed to be right after them.

Safari 5 Show Web Inspector

Figure 4

I checked the source file again and they seemed to be in the correct place. Further investigation finally reviewed that there were two very tiny typos lurking somewhere within the second <div class=”data-base-layer”> tag as shown in Figure 5.

Safari 5 Show Web Inspector

Figure 5

The web inspector in Safari 5 has helped me to identify errors effortlessly. If only I had such inquisitiveness two weeks ago, I would have saved so much time and efforts in debugging my HTML codes. An proverb says: “Curiosity killed the cat.” It is not always true, at least in this case. I will say: “Curiosity saved the donkey.”

Enable Develop menu in Safari 5

July 7th, 2010 at 12:09 · Filed Under Blogging, Call Me a Geek, Computing, HOWTO, Mac OS X, Software Development, Web · 3 Comments 

One of the new features for Safari 5 is the Develop mode. It allows web developers to debug HTML code on Safari. Before you can use this feature, you must enable the Develop menu first. Here’s how you can do it:

Click on Safari menu and select Preferences. In the preferences window, select the Advanced tab and then click the checkbox for Show Develop menu in menu bar.

Safari 5

The Develop menu will then appear in Safari menu bar. Select Show Web Inspector to inspect your HTML code. You can also activate extensions support by selecting Enable Extensions in Develop menu. Extensions let you add those missing features.

Safari 5

Increase your productivity with iPhone apps

July 5th, 2010 at 12:26 · Filed Under Computing, Gadgets, iPhone, Mac OS X, Productivity, Technology · 1 Comment 

PalmPilotMy first PDA was PalmPilot Professional (photo to right) produced by U.S. Robotics (later as Palm, Inc.). I bought it  in 1998 but I did not use it often due to limited apps. My use was restricted to Calendar, Address and Todo. It was a huge hassle to purchase apps for PalmPilot because there was no single app store like Apple’s App Store. Commercial apps for Palm Pilot at that time were hard to come by. The device went dead during a flight from KLIA to Taipei transit via Singapore on September 11, 2001. I guess it was fried by ESD (electrostatic discharge) while I walked on the carpeted corridor in Changi airport terminal.

Two years later, I bought a Sharp Zaurus SL-5500. It ran Zaurus and OPIE GUI environment. The Zaurus SL-5500 was Sharp’s first PDA to run Linux. Linux was the main reason I chose Zaurus. It was fast and colorful (at that time). It came with a couple of useful apps and desktop sync software. Syncing to a desktop running on Linux was good. After using it for a few months, some commercial apps which I bought, began to crash more often after I updated the operating system. I gave it up after a few attempts to restore the original operating system. Here is the photo of Zaurus (I managed to find its charger) with iPhone lying beside it. Well look at its size! The iPhone 3GS is half the thickness of Zaurus.

Zaurus and iPhone

The other drawback of the Zaurus is its retractable physical keyboard. The keys are too small for my fingers and typing is real pain. So, BlackBerry with physical keyboard is totally out of the game. Here is the picture of Zaurus with its keyboard and iPhone with the virtual-touch keyboard for comparison:

Zaurus and iPhne

I was tempted by HP and Toshiba but, hey, they ran on Windows. No way! In early 2008. I purchased a 2nd generation, 32GB iPod Touch. I was immediately captured by its charms. In December 2009, I got a 32GB iPhone 3GS. My response was: “Damn! I should have gotten it earlier.”

Both PalmPilot and Zaurus need stylus to tap on their screens. If you lose your stylus, you need to buy a new one. iPhone is more convenient because everything is manipulated with your fingers. Apple’s innovative multi-touch screen gives more user experience and more operability to the device.

All I can say, I have never used other PDAs like I use my iPhone. I mostly use my iPhone in my work (especially) and for fun during leisure (social networking, music, games and etc.) Here are some apps I use to boost my productivity while I am on the move and even at my desk.

iPhone PaymoPaymo is a free online time tracking and billing service. With a small fee, user can upgrade the service for unlimited users and invoices. I use Paymo to track my time spent on various projects and business/work related activities. The Paymo free iPhone app works in both online and offline mode. When I am out to support my clients, and/or having business or technical meeting and discussion, I can easily track my time with this tiny useful app.

iPhone app OmniFocusWith design based on the concepts and techniques described in David Allen’s book, “Getting Things Done”, OmniFocus for iPhone is a powerful to-do app that let you stay focused in whatever you are doing or trying to complete. The app is priced at $19.99 which is a little bit on the high side. I was hesitating for a while because of the price. After using it, I will say, “Save your money for OmniFocus and forget about other to-do apps.” Before this, I was using Things and I am still using it. The only reason I want to keep Things is that it allows assigning teammates to your tasks. OmniFocus is more comprehensive than Things and it let you stay focused in getting your jobs done, which is most important. Besides, you can sync your data via MobileMe, Bonjour, WebDAV server or locally mounted disk on your Mac. Personally, I think it is worth the investment.

iPhone app ThingsThings is an easy-to-use to-do app priced at $9.99. It’s a good alternative to OmniFocus if you are on a tight budget. The price tag of $9.99 is considered quite high especially there are some free to-do apps, but to do a good job, Things will be above average. Unlike OmniFocus, syncing can only be done with a WiFi at your local area network where your Mac is running the desktop version of Things. One feature which I don’t like is its ability to assign more than one tag to your tasks. Too many tags confuse me.

iPhone app EvernoteEvernote is a free online service which let you save your ideas in the form of texts, voice memos or photos. You can save a web clip or PDF. Syncing between multiple devices and Macs over the Internet is a breeze. I use it while I am writing computer codes to note down what I have done and new ideas that come along. You can tag your documents for easy retrieval later. If you would like to enjoy a larger storage and monthly usage bandwidth, you can upgrade the service to Evernote Premium for $5 a month or $45 a year. Evernote is a good companion for notetaking while you are working, engaged in meetings and discussion and even at leisure.

iPhone app Invoice2GoInvoice2Go allows me to issue invoices on the go without a notebook or desktop computer. With it, I no longer need to go back to office to issue invoices. It saves me a lot of time from traveling back and forth between office and clients. Just email the invoices to your clients and you can make the delivery right away. For only $9.99, it saves you time and gasoline.

iPhone app DropboxDropbox is a free online storage service. You can take any file with you on your iPhone to meetings. Your co-workers or clients can drop files to your Dropbox and you can pick them up anytime, anywhere on your iDevice or Mac, provided they are connected to the Internet. It also allows you to share your files on Facebook or Twitter via link. By getting your friend to sign up you can earn 250MB of extra free disk space (up to 8GB) for every new account created. Click here to sign up.

Rumors Around iPhone 4

June 29th, 2010 at 11:27 · Filed Under iPhone · Comment 

There were rumors before Steve Jobs launched the long awaited iPhone 4 during WWDC 2010 early this month. Apple, Inc. is probably the only company in the world that is able to spur worldwide thrill about its products, especially iPhone. Just look at the number of people eagerly queueing for hours to receive their pre-ordered iPhone 4 last week.

No single person or thing is perfect. Soon after people got hold of their new iPhone, there came the reception problem. The antenna of the new iPhone 4 is located at the bottom left corner of the phone (away from the user’s skull/brain), which is a clever requirement forced by FCC. By holding the iPhone in your palm will short-circuit the antenna and the signal will be attenuated after a few seconds. Some people have even experimented on this issue so well that they have concluded that the signal (and call) will be totally attenuated within 10 seconds.

Then, there is even a Steve Jobs sham on Twitter spreading unofficial information that Apple may recall iPhone 4. And then a legitimate news media (read here) has fallen into this takeoff.

Since Steve returned to Apple and started to revamp Apple’s product lines, there have been constant stimulations and endless excitement and rumors you can religiously look forward to for every 3 months. Even if you are not an Apple user, you will be affected as well.

I am fascinated by the propelled rumors and how Steve Jobs deals with these grapevines. Steve Jobs is undoubtedly the CEO of 21st century!

Macintosh – Insanely Great

June 27th, 2010 at 9:30 · Filed Under Blogging · Comment 

I remember that I was waiting to be accepted as a member of my school’s computer club. No Macintosh but Commodore Vic 20 with only 4 (or 8 ) 5 KB of memory and cassette tape drive. I came in contact with a Macintosh in a computer shop in 1987 and I fell in love with it too. Unfortunately, its price was exorbitantly high and I could not afford a Macintosh back then.

This video shows the young Steve Jobs revealing the insanely great Macintosh in 1984. It is so classic and what a nostalgia!

« Previous PageNext Page »