Wednesday, November 30, 2016

ASUS K501 Laptop - booting off a thumb drive and making the M.2 SSD C:

I have a brand new Asus K501U laptop. It comes with a measly 16GB m.2 SSD (D:). I am glad for that because it means not paying an expensive premium for more.

Windows 10 was on 2.5" 1TB hard drive (D:), and it was almost unusable (after having been using a SSD for Windows for more than a year) with the non-stop disk thrashing. It was a 30-second wait for the Start menu to show after pressing the Windows key.

I bought myself a Samsung 850EVO 500GB SATA M.2 for less than US$200. It installed easily (I took the risk of leaving the battery online because I couldn't figure out how to remove that battery connector) and it was totally compatible. Asus kept reminding me that installing my own M.2 SSD voided the warranty. However, there were no stickers or seals so I could put back the original 16GB one if I ever need to seek servicing.

My goal was to use the M.2 SSD for Windows (C:) and then to move the 2.5" 1TB SSD over for my data.

The darn thing was that I could not boot Windows 10 off a thumb drive to install the OS onto the M.2 SSD and making it the C: drive. I wasted a lot of time finding out how because only one of the following EIGHT permutations work:

  1. Secure Boot: Enabled or Disabled
  2. SATA mode: ACHI or RAID
  3. Launch CSM: Enabled or Disabled
One with think that the latest Windows 10 would be UEFI and secure and all that. The right answer is:
  1. Secure Boot: Disabled
  2. SATA mode: ACHI
  3. Launch CSM: Enabled
After managing to boot off the USB, I still could not install Windows 10 onto the SSD. The error was:

We couldn't install Windows in the location you chose. Please check your media drive. Here's more information about what happened: 0x80300024

I had to physically remove the 2.5" hard drive first. Maybe it's because the hard drive had claimed the C: label.

Thursday, July 21, 2016

What you can do with one cheap lousy camera

National Geographic prides itself in sending photographers armed with tens of thousands of dollars of equipment across vast distances to take great pictures. Big deal! I think it's a bigger challenge to see what you can capture from one spot on planet Earth, with just one cheap lousy camera.

What you see here are pictures all taken from one place, my home. From the meta data you can tell that a cheap Nikon was used before 2007 and a cheap Canon was used after that. Both are below $300 and not SLRs, and if cameras with those specifications are still built today, they would probably cost $50.

In the pictures shown here:

  • All are real living things, except for the thing in the sky and the paper snake, the latter taken by a 5-year old.
  • All are taken in their natural environment except for one, and that is the civet cat which is caged.
  • All living things are live (other than the obviously dead lizard which was not the subject anyway) and in their natural pose except for one.  See if you can pick out which.

#1 Not a living thing.

I Googled and found that the life-span of a kingfisher is seven years or longer. Do you think the following are the exact same bird over the years?  Lest you think that these are just stationary objects, do be reminded that you have only a few seconds when you creep to within two meters of a bird.

#2 Kingfisher in 2008

#3 Kingfisher in 2009

#4 Kingfisher in 2010.

#5 Kingfisher 2011

#6 Kingfisher in 2012
#7 Kingfisher in 2013

#8 Tiger Moth

#9 This worm carries its house with it all the time. It is about a centimeter long. It climbs walls, about one storey a day.  Please help to identify this.

#10 Is this the same worm?

#11 A beetle?

#12 Resting on one leg

#13 It wasn't easy taking a flying bat in the confines of a small room.

#14 Taken from the bedroom window

#15 An eagle?
#16 Female koel just prior to pouncing on a pregnant bulbul

#17 A heron

#18 The same heron in a different pose

#19 The same fixed lens camera that took this from 1cm away also took the next picture.

#20 240,000 miles away using the same camera

#21 What do think the lens settings was?

#22 The civet cat of the species that caused SARS. It was drowned in hot water shortly after, by the authorities.

#23 Looks like a bullet train!

#24 Weighing less than a gram, but can kill a full-grown adult.

#25 One spring, a magpie robin flew more than 100 trips a day to build a nest on top of our cooking gas tank.

#26 A pole-vaulting dragonfly

#27 A sleepy guy that forgot to change its colors

#28 The lizard was transported at high speed.

#29 A sunbird feeding. Picture is right side up, bird is upside down.

The next few pictures record the metamorphosis of the Painted Jezebel butterfly. The pictures were taken over a few seasons without me being aware that they were the same type of butterfly. The oldest and latest pictures were taken more than 14 months apart.

#30 One day, a butterfly came... [2012-Nov-19]

#31 ... and laid twelve eggs. [2012-Nov-19]

#32 Four days later.  The longer side of each egg is about 1mm long. [2012-Nov-23]

#33 Ten days later [2012-Oct-23]

#34 How they grew, without tripping over one another [2012-May-14]

#35 22 days after the eggs were laid [2012-Nov-03]

#36 Finally free! (Eggs+31 days) [2011-Sep-13]

Meanwhile a few feet away:

#37 What can this giant be?  Twelve of them finished up a whole shrub in ten hours.  None survived to pupahood.
Butterflies deserve their own page, see here.  

With some imagination, lots can be done even if locked down within a 1,000 square-foot spot in the middle of a concrete jungle.

Conclusion?  It's not the camera.  It's the operator, smart.

But when the amateurish camera takes 5 seconds to boot and 3 fingers to focus, it requires harder work and much suffering.

Saturday, June 11, 2016

Supplementary Documentation for Facebook Messenger Platform


Handle all data types in the callback

There is only one callback url for all Messenger events. The type of callback (for example when a message is submited by a user to your page) is determined by the data payload attached to the POST callback to your url. There is no clearly obvious field in the data to identify the type of callback. It is necessary to unravel the json object received to figure out what type of callback it is.

Depending on the language you are using for your web coding, it may be straightforward or complicated to even find out which json class the payload belongs to.

The Facebook documentation does not specify the various json formats the Webhook can send. It merely gives one example each of the five types listed. There is minimal or no description of what each data field mean. You are expected to figure out from their English field names.

Design your code to handle gracefully all json data structures, including those you are not interested in or are not ready to process. If you don't, and if your web server hits an exception, it will return a 500 Internal server error and Facebook will automatically disable your Webhook.

Friday, April 15, 2016

DANGER - Facebook Messenger

Imagine your email software has this feature:

As you are reading an email you are corresponding with person A, there is a button. By clicking it and selecting another person B, all the emails you have with person A in the past are immediately forwarded to person B, without warning.
The email forwarding is executed virtually. Instead of physically forwarding each mail one by one to person B's mail server, basically your mail software gives access to Person B, at his own leisure, to browse EVERY of your email with person A. If you had done this by mistake, there is no process to cancel because the "forwarding" process is complete the moment person B is selected. There is no Undo option. You can scream and run round the room, but person B will continue, at any time in the future, to be able to read EVERY single email you had with person A.

If you are a careful person that would never do such a silly thing, person A could click the Add button and the outcome will be exactly the same.

The above is essentially what Facebook chat is about.

The moment a conversation participant Adds someone (can be anyone that pops up in the auto-complete list when you type some characters) to a conversation, that person has read access to every single message in the existing conversation back to the very first message, which could have been written many years ago. There is no cancelation option. The beautiful thing is the the person newly added can take his time to browse through your entire conversation, any time in the future, from any computer, by simply logging in to No other software or app is necessary. There is no time expiry.

A touch of finesse is that if you, in a moment of panic or frustration, delete the entire conversation from your account, that person can continue to read ALL the messages, while you are now locked out! The Facebook chat delete function is to remove the person performing the delete operation from a conversation, not the other persons in the conversation. Sweet, isn't it?

Don't worry, there is no one to call for help, because there are no phone numbers available.

Facebook support persons helpfully explain that Adding is like forwarding email. Like email, you cannot retract an email once it's forwarded. The slight difference is that you are not simply forwarding an email, but the complete Inbox, Sent folder, offline folders, archive folders, backup folders, etc.

If you are in a group conversation, whether it be private family matters or confidential company plans, anyone in the conversation, intentionally or otherwise, can just simply Add another party and the damage is done, COMPLETE, courtesy of Facebook technology.

When you Add a person to the conversation, the following warning message is missing:
By Adding xxxxx, you are authorizing her to read every existing message in this entire conversation. She will be able to read all of them even if you Remove her from the conversation in the future. Warning: there is no Undo function and the release of messages is irreversible. If this is not your intention, click Cancel to abort.
It is a simple matter to remove a person from a conversation's access list when he/she is Removed from the conversation, so that the damage can at least be limited to a few pagefuls. But maybe the Perl language used at Facebook has some limitations.

You have been warned.

Tuesday, April 12, 2016


Unless it's OK for your EVERY message to be published to the whole world, Facebook Messenger must not be used for any group conversations.

I am referring to Facebook chat groups, not Facebook groups. There are basically no options to control Facebook chat groups.

Any member of the conversation can add any person, Friend or not, to an existing conversation!

So, even if there were no ill intentions, an accidental addition of someone else means TOTAL COMPLETE leakage.

Even if you Remove that unintended person immediately, that person can view the WHOLE conversation, every message, since the group was created. There is no way to stop this.

In the first place, while you can easily Add a person to a conversation from, there is no way to Remove him or her on this same site. You have to do it from the Messenger app from the phone or

Removal of a participant merely stops new messages from going to that person. He or see can still continue to see EVERY single message in the conversation up to the time the Remove was done. He can do this at his own leisure, any time in the future, for as long as he likes, from any computer in the world, by just signing in to

So if you were having a discussion on some confidential or commercially sensitive stuff, the moment someone is accidentally added, every message in the discussion can now be viewed by the whole world. There is no gate to lock.

In contrast, WhatsApp allows a participant to see only new group messages created after the time he or she joins a group.

Saturday, April 9, 2016

The Gap

I did not take out my calculator when I wrote this, but I think it will help a skeptical world if we can gather more evidence of what happened between 4,000B.C. and 3,000B.C.

Which of and how did Shem, Ham or Japeth become your great, great... grandfather? How did the two kangaroos on the ark land in Australia?

The answers are meant and waiting to be discovered.  "It is the glory of God to conceal things, but the glory of kings is to search things out." - Proverbs 25:2 ESV