Android is a dirty phone

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
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.

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.

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
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
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.

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.

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.

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.

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.

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
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.

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.

Increase your productivity with iPhone apps
My 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.

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:

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.
Paymo 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.
With 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.
Things 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.
Evernote 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.
Invoice2Go 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.
Dropbox 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
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
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!
The dining philosophers problem
Five philosophers sitting at a circular table do one of the two things: eating or thinking. While eating, they are not thinking, and while thinking, they are not eating. A large bowl of rice is placed at the center of the table. One chopstick is placed in between each pair of adjacent philosophers and as such, each philosopher has one chopstick to his left and another to his right. To eat, one must have a pair of chopsticks, but because there are only five chopsticks on the table, thus at most two philosophers can eat at one time.
If every philosopher takes the chopstick to his left, then no one will be able to eat throughout the dinner session. How to ensure everyone of them will have the chance to eat, if they do not talk to each other, and hence negotiation is not possible?
In retrospect to the problem statement above and to make the situation more interesting or worse:
Each philosopher thinks for t seconds and eats for n seconds. At every x seconds after eating, the philosopher begins to starve. When he is starving, he begins to grump and no longer thinks. At z seconds, the starving philosopher will die if he still does not eat. This creates competition for resources (chopsticks in this case) and prioritizes starving philosophers.
Can Chandy-Misra solution solve this problem?
Transverse Myelitis
Just came back from the hospital after visiting my uncle. He has been admitted to hospital last evening. He was admitted to the General Hospital last Thursday and was discharged this Sunday. No conclusion from the GH.
His doctor came in when I was there. He said my uncle suffers from acute Transverse Myelitis.
Transverse Myelitis (TM) is a neurological syndrome caused by the inflammation of spinal cord. It is a complicated disease and takes times to eradicate inflammation. His doctor has done lumbar MRI today. They will do another thoracic MRI tomorrow to confirm clinical diagnosis.
Flash of the titans
Apple’s decision for not to implement Adobe’s Flash into iPhone OS has turned Adobe-Apple relationship sour. In an open letter from Steve Job, he has written clearly about Flash’s weaknesses and a firm stance against Adobe’s Flash. I absolutely agree with Steve based on my experience with Flash. I would say: “Flash is nice to look at, but is a nightmare to have it!”
A week or two before Apple published Job’s open letter, I learned about an open source Flash project called Gnash from Twit. You can listen to the podcast here.
I really don’t believe in develop-once-deploy-everywhere development concept. I am more a native application guy because I only believe in native performance without relying on third party software components to run the applications. My experience with Tweedeck served as a wonderful example.
Tweetdeck was developed using Adobe’s AIR and Flash technology and is a develop-once-deploy-everywhere kind of application. Its user interface on the Mac really sucks. It looks more like a Windows application rather than Mac’s native Cocoa application. One thing annoyed me was that I had to upgrade Adobe’s AIR whenever it became available. I feel happier for not running Tweetdeck now.
A Java application has its downsides as well. It too depends on Sun’s JVM (Java Virtual Machine). Java has never become an implementation language in my software development career. Only recently when I began to involve in web application development, I have to work with JavaScript. The experience is awful, in my experience.
It is understood why Adobe is so furious about Apple’s decision not to allow Flash on its mobile platform. The reason is obvious: Adobe loses its grip on Apple’s mobile devices and has been discounted in Apple’s mobile computing gameplay. But Apple is not an easy-to-squeeze apple, it is huge and capable.
Apple has been working on an open web standard HTML5 and Apple’s own version of Flash, Gianduia. With HTML5, Apple’s computing platform becomes even more open, unlike otherwise as Adobe claimed. Both are exciting new technologies which I would like to implement to the web application I am developing.
I will write more about HTML5 and Gianduia when I have found time to research more about these two.
Timeless memories
I used to have the desire which my ashes will be carried away by ocean waves and winds. This morning, I came across this website, Glass Remembrance, where a person’s ashes can be made into beautiful hand-made glass art.
I like to be preserved this way after my death. My children can have a portion of “me” in a nice decorative glass flower in their home, if they want to.
Nuclear power plant for Malaysia?
Two days ago, the Malaysian government announced that the country is considering to have nuclear power plant by 2021. This was certainly a good news, but after a while of mind mingling, I think the implementation could be a disaster!
The nuclear energy is the greenest energy currently available on Earth. James Lovelock, a scientist, environmentalist, futurologist and the father of Gaia Hypothesis wrote in his book: “The Vanishing Face of Gaia: A Final Warning”, that the nuclear energy is indeed greener than any other form of power generating plants including solar voltaic and wind energy farm. A 1GW wind farm requires 2 millions tons of concrete, enough to build 30,000 homes for 100,000 people. That quantity of concrete would release 1 million tons of carbon dioxide into the air.
The under-construction Bakun Dam, located in Sarawak on the Balui River, will be the tallest concrete-faced rockfill dam in the world and the largest dam in Asia outside of China. Its powerhouse with 8 penstocks to powertrains comprising 8 vertical shaft Francis turbines of 300MW each, 8 air-cooled generators of 360MVA each and 8 oil-immersed transformers (360MVA each) will generate about 2.4GW of electricity. The dam has 16.71 million cubic meters of filled volume. With catchment area of 14,750 km square, its gross storage capacity is 43,800 million cubic meters. How much concrete is required to build this dam? How much carbon dioxide will be released by the concrete? How much biodiversity would have perished under catchment area that large?
I read from various sources about people’s objections (including politicians’) of this nuclear energy project. This should not be a political issue and never be one. This should be an environmental, safety and social-economic issues at top.
TNB, the sole electricity distributor/supplier in Malaysia is not the sole energy producer. TNB buys, under contract, energy from many other producers. Unfair advantages, unscrupulous practice and increasing fuel cost in the produce-supply chain have contributed to rising energy cost, leading Malaysians to cry foul. The substandard service provided by TNB worsens the situation. As a corporation with revenue of MYR25.75 billion and net income of MYR2.6 billion as of fiscal year 2008, TNB is cutting more corners to reduce its operating costs and to maximize its profit with unhealthy practices, e.g. bi-monthly meter reading practice has stirred uproars in recent week. Being greenest, nuclear energy is more profitable than any other energy production. Could this help to reduce electricity cost for Malaysians considering the unhealthy practices and unfair advantages TNB has in its glossary bag?
I am not going to write more about TNB’s malpractice and sluggish substandard service. Ask any Malaysians, they will be able to tell you stories whole day and night. Instead, I am going to write more about safety.
The next question: Is it really safe to have nuclear power plant in Malaysia? This question does not imply that nuclear power plant is not safe. Rather, the human factors in managing and operating the nuclear power plant.
Alongside the nuclear physics in the power plant is the safety critical computer system, which includes both hardware and software, that is used to control and monitor the nuclear power plant. This safety critical system is the most crucial part and the entire operation of a nuclear power plant heavily relies on it.
Safety critical system is a computer (including software), electronic or electromechanical system whose failure may be a catastrophe, causing injury or death to human beings. This safety critical system comprises high integrity software. The safety critical system, both hardware and software, will likely be integrated and maintained by foreign contractors.
Nuclear power plant software are developed using Ada and/or SPARK programming language. SPARK is a subset of Ada. In the mid 1990s, UTM (University Technology Malaysia) KL campus was teaching Ada in CASE (Center for Advanced Software Engineering). At that time, CASE was a collaboration between UTM and Thomson CSF under special arrangement between the government of France and Malaysia. The Ada course was not long lived. Two years later, it was replaced by Java due to ignorance and market driven trends. Java is not a suitable candidate for high integrity, safety critical, real-time and distributed application development. Today, none of the universities in Malaysia is teaching Ada. According to my hitherto knowledge, apparently none of the Malaysia academies have submitted any high integrity and safety critical system related papers in international conferences and scientific journals.
It does not only require software engineers with Ada or SPARK knowledge. In safety critical software engineering, the individual developers, the entire team and organization are required to go through rigorous software development and safety critical validation processes. It takes years to achieve Carnegie-Mellon’s SEI (Software Engineering Institute) CMM (Capability Maturity Model) Level 5. Safety critical system development requires utterly strong discipline and engineering ethics in every requirement, design, development, testing and maintenance process and every process needs to be validated. Other than software process, there are many other non-software related risk assessments to comply.
Malaysia lacks qualified software engineers of such competency to develop and to maintain high integrity software system. It is costly to maintain such system by contract. The maintenance will increase the cost of energy production and hence will be borne by consumers.
The safety critical system of a nuclear power plant must be thoroughly tested with proven track records. With the loosey-goosey attitude of many Malaysians, will they have capability to manage the system and safety critical issues? Will they be effective to respond to emergencies, for example, system shutdown or nuclear melt down?
The disposal of nuclear waste poses another safety issue. If the engine of a RMAF (Royal Malaysia Air Force) fighter jet could go missing and be exported, can you imagine the potential hazard of missing nuclear waste?
Objection should be rational, not emotional. It is imbecilic to politicize the objection without scrutinizing facts. I, in my book, embrace nuclear energy for it is the greenest energy. On the contrary, I do not have any confidence in the management of safety related issues in Malaysia.
Fierce battle at Hulu Selangor by-election?
I, sometimes, find it interesting to follow politics in Malaysia. Although it is more fatuous, it has gotten the charm to fluctuate one’s emotion. I too find it mind boggling as it provides a detailed dissection of people’s (including politicians’) mentality and maturity as well.
The candidate from Pakatan Rakyat or People’s Coalition is Zaid Ibrahim, a well known household name to every Malaysians. He quit Barisan Nasional or National Coalition and later joined PKR because he found BN’s doings are against his principle. A man of principle, he is.
What is the reason for PKR to field Zaid in this by-election? Zaid is an intellectual man. He will be best known and accepted in a city constituency where more working professionals or literates can easily understand his capabilities and visions. I have no intention to scorn the intelligence or intellectual level of the people of Hulu Selangor. There may be many professionals working in the city are from Hulu Selangor.
Is Zaid Ibrahim a sure win by PR? Or is PR desperate to find a good candidate from its arsenal, looking at the number of PR’s members turned “Froggies”?
I hope democracy will prevail this Sunday.


Listen to my podcast