Search within Lanny's blog:


Leave me comments so I know people are actually reading my blogs! Thanks!

Monday, January 26, 2009

Robot of the Day: MQ-1 Predator

The MQ-1 Predator is probably the most famous UAV (Unmanned Aerial Vehicle) of all times. It was developed by General Atomics Aeronautical Systems for the USAF (U.S. Air Force) and the CIA.

Photo credit: U.S. Air Force

The MQ-1 Predator UAV has a wingspan of 47.8 ft (14.8m), can fly a maximum of 135 miles per hour, and can stay in the air for 14 hours. The cost for an early production was around $3.2 million.

Initially it was only a reconnaissance system allowing the remote operators to acquire aerial video in real-time. After the CIA deployed the Predator UAVs to Afghanistan, they expressed strong desire to add the capability of firing Hellfire missiles from Predator UAVs to kill terrorists. So it was done. On February 4, 2002, a CIA Predator attacked a convoy of sports utility vehicles, killing a suspected al Qaeda leader who the CIA thought were Osama Bin Laden.

The Predator UAV requires a satellite link and is operated by two pilots (most likely in a military base in Nevada) sitting in front of cockpit like devices. The control of the UAV falls under the tele-operation category because most decisions are made by human operators.

The first video below showcases the capabilities of the MQ-1 Predator to quickly track down a moving vehicle (note that it is much easier to tracking a lone moving car in a desert compared to tracking down the same car, say, in LA traffic). The second video shows firing of the missiles.






An unknown number of Predator UAVs are also used by the U.S. Customs and Border Patrol. I would guess these Predators don't shoot missiles at illegal aliens.

Picture of the Day:


Residents in Norway were stunned by the beautiful yet mysterious light show. Turned out it was caused by the malfunction of a Russian missile test. Follow this link to read more.

Saturday, January 24, 2009

Paper Review: A Comparison of Event Models for Naive Bayes Text Classi cation

This paper is written by Andrew McCallum (Just Research) and Kamal Nigam (Carnegie Mellon University) and published at an AAAI-98 workshop on learning for text categorization. This is a seminal paper cited by 1426 papers according to Google Scholar!

Two text classification approaches, the multi-variate Bernoulli model and the multinomial model, both use the naïve Bayes assumption. This paper tries to differentiate the two models and compare their performances empirically on five text corpora.



In text classification, a naïve Bayes classifier assumes that the probability of each word occurring in a document is independent of the occurrence of other words in the document and is independent of the word’s context and position in the document. This assumption simplifies learning dramatically when the number of attributes (features) is large. Both approaches use training data to calculate estimates of the generative model and then uses Bayes’ rule to calculate the posterior probability of each class given the evidence of the test document. Then the class most probable is selected.

One major difference between these two approaches is that the multi-variate Bernoulli model doesn’t care about word frequency in documents, while the multinomial model does. Another difference is that the multi-variate Bernoulli model explicitly includes the non-occurrence probability words that do not appear in the document.

When selecting features, in order to reduce vocabulary size, only words that have the highest average mutual information with the class variable are kept. Average mutual information is the difference between the entropy of the class variable and the entropy of the class variable conditioned on the absence or presence of the word.

Five text corpora are used and they are Yahoo! ‘Science’ hierarchy, Industry Sector, Newsgroups, WebKB, and Reuters. Empirical results show that the multi-variate Bernoulli model works well with small vocabulary sizes, but the multinomial model performs better at larger vocabulary sizes. The multinomial model produced on average a 27% reduction in error over the multi-variate Bernoulli model at any vocabulary size.




The boringness of a paper is inverse proportional to the amount of time it takes to put the reader to sleep.




Video of the Day:


You have to watch past 0:40 to really appreciate it! It's an LCD!

Friday, January 23, 2009

Random Thoughts: Y2K all over again in 2010

Many of you probably still have some vague memories about the Y2K bug. Come on, it was only 10 years ago. Many people thought it was going to be the end of the world for all computers; catastrophes caused by failing computers were going to happen everywhere; people were going to be killed!


So what happened? Nothing major really? A little glitch here and there, but people kept living their normal life. Why such a big hype before, but so quite afterward? It was because many programmers and engineers paid great attention to the Y2K bug and worked diligently before the millennium passing to make sure things went okay. I could clearly remember where I celebrated the new millennium at -- next to my servers at work, to make sure nothing fails when time went pass 0:00am on 1/1/00.

So what was really the Y2K bug. In simple words, a lot of programs only use two digits to store year and assumes the first two digits of the year will always be 19. that means after the last two digits turned from 99 to 00, the first two digits remained the same, resulting in 1900.

Interestingly enough, when everyone's clock went from 11:59pm 12/31/2009 to 12:00am 1/1/2010, a bug similar to the Y2K bug hit the world (especially Europe) and caused all kinds of havoc:
  • ATMs and point of sale machines rejected debit cards of 30 million people in Germany since New Year's Day
  • Similar problem occurred in Australia where point of sale machines skipped ahead to 2016 rather than 2010
  • Symantec's software (anti-virus, anti-spam, etc.) treated all new updates from the company as old data and refused to update
  • Some users of mobile phones also reported that they started to receive messages dated in the future: 2016
  • Palm had to release a new version of the operating system so their customers' Palm Pre phones would continue to sync and the calendar program would continue to function
I feel really sorry for the many Germans who got stranded at ski resorts because they had no way of paying hotel and restaurant bills. Many people also had to stay in long lines to withdraw cash from the counter. This really goes against the holiday spirit! But who is here to blame for this Y2010 crisis?

A French (credit) card manufacture, Gemaltao, had admitted that the problem was because of a programming failure, which affected chips on credit cards and debit cards. The estimated damage is over €300m.

So how could a software bug cause 2010 to turn into 2016? My guess would be that the programmer used a hexadecimal data type instead of the decimal data type for the last two digits of the year field. Let me explain here.

For decimal numbers, each additional digit would mean 10 units of the previous digit. For example:

10 = 1 x 10 + 0
15 = 1 x 10 + 5
123 = 1 x 10 x 10 + 2 x 10 + 3

For hexadecimal numbers, each additional digit would mean 16 units of the previous digit. Therefore, the same representations in the previous examples would mean very different numbers in decimal:

Hex 10 = Decimal 1 x 16 + 0 = Decimal 16
Hex 15 = Decimal 1 x 16 + 5 = Decimal 21
Hex 123 = Decimal 1 x 16 x 16 + 2 x 16 + 3 = Decimal 291

If you look at the first example closely, you'll see that year 10 in hexadecimal turned into year 16 in decimal. This also means the program at fault still only used two digits to represent the year field (probably assuming 20 for the first two digits to save memory), but used the wrong data type.

The other merit of the story is that when people are relying on technology more and more nowadays, what consequences do we face if some key technologies fail? We can only do so much to anticipate certain failures (such as the Y2K bug), and when failure strikes, we suffer.

To think further, what if the failure were caused intentionally by criminals? I don't see them taking over the world easily, but they can certainly cause a lot of damage (disruption of power grid comes to mind). How can we get ready to deal with this kind of challenges? I guess that is an open question still waiting to be answered...


"Always code as if the person who ends up maintaining your code will be a violent psychopath who knows where you live." -- Martin Golding





Picture of the Day:


Look at all those people stranded at the Austrian ski resort!! :)

Thursday, January 22, 2009

Joy of Life: Volume 1 Chapter 2

Volume One: The City by the Sea
-- written by Maoni

Chapter 2: The Nameless Yellow Book

As far as Fan Xian was concerned, maybe the only benefit of a second life was that he could freely move his limbs. He could run and jump all he wanted now. That was indeed a very gratifying feeling. It would probably be very difficult for people who had not suffered from the same kind of illness to truly appreciate the joy.
“This must be a blessing from Heaven,” he comforted himself.
It took him all four years to finally comprehend it and accept the fact. Now that he had the opportunity to live again, why not make it a good one? Since God was so kind to bestow upon him a brand new life, just for consideration of God’s feelings, he should live it sincerely. For instance, since he could move now, why not move some more?
 Therefore, all the servants of the Count’s Manor soon learned that this baseborn Young Master was not the idling type[1].
“Young Master, come down please! I beg of you!”
At the moment, Fan Xian was sitting at the very top of the rockwork hill in the courtyard, staring at the ocean horizon in the far distance, smiling.
In the eyes of the servant girl, the fact that a four-year-old would climb that high together with such a mature smile on his face clearly indicated that the little fellow had gone completely mad.
The crowd by the foot of the rockwork hill gradually grew in size and soon there were seven or eight servants surrounding the rockwork hill worried sick.
Although the Count of Southernland was in His Majesty’s favor, neither his rank of nobility nor the post he held was of great importance. Naturally the income wouldn’t be very impressive. Even if there was quite a bit of income, the majority of the money wouldn’t be spent on his mother and a baseborn son. Therefore, the Count’s Manor didn’t have many servants.
Seeing the worried faces of the people at the foot of the rockwork hill, Fan Xian let out a sigh and eventually climbed down.
“I am just doing a little bit exercise. What’s there to worry about?”
The servants obviously had grown accustomed to the Young Master’s odd habit of speaking in an adult’s tongue. Wasting no time, they quickly grabbed him and sent him into the bathtub.
After Fan Xian had been thoroughly cleaned from head to toe, he was soon picked up by a servant girl. Holding the Young Master in her arms, the girl caressed his face, grinning jokingly.
“Young Master is as pretty as a girl. I wonder which little miss will be so fortunate to be your bride when you grow up.”
Fan Xian didn’t reply and kept a stupid look. He didn’t want to flirt with a teenage girl through the tongue of a four-year-old kid. He would never consider such a tasteless act – he’d rather wait till at least six before taking on such grand challenges.
“Time for your nap, my little boss!” The servant girl smacked the little kid gently on the behind.
For the servants, it was always beyond their understanding why the Young Master of the Count’s Manor, who had began to demonstrate clear signs of naughtiness and disobedience despite his young age, would display the kind of self-discipline and assiduity only shown from grown-ups when it came to certain things: for example, taking naps.
For anyone who had a normal childhood, it would probably be difficult to forget in the old days how great battles were fought against those big devils who forced them to take naps in the beautiful and enchanting sunshine of the early afternoon.
Among those devils, some were called Dads, others were called Moms, and some were even called Teachers.
Young Master Fan Xian never exhibited the need for anyone to force him into a nap. Every day by noon, he would put on the most lovely and innocent smile and submissively go back to his bedroom to take a nap. He also wouldn’t make any noise during the nap.
At first the Old Madam had great doubts, and even assigned servant girls to monitor the kid, thinking he was just pretending to be taking a nap and would make some kind of trouble in bed instead. For the next half a year, their close monitoring only revealed that the kid was truly sleeping very soundly. So soundly that it proved to be quite difficult to wake him up.
Ever since then, the servant girls never paid more attention, and only kept their watch outside while the Young Master took his naps.
It was the summer time. Naturally, the servant girls were quite weary. Leaning slightly, they swayed the fans in their hands occasionally, as small flying insects danced swiftly in the breeze.
……
……
After returning to the bedroom, Fan Xian climbed into bed. Lifting up the bamboo matting on top, he gingerly pulled out a book from the secret casing he hollowed out himself.
The cover of the book appeared slightly yellowish, as though it was quite aged. There was nothing on the cover, not a single character, other than a few silk fabric patterns embroidered onto the edge and the corners. It was unclear whether these patterns really meant anything, except that the end stroke of each pattern curled up, like clouds flowing in the wind or the large and loose sleeve corner of ancient robes.
He opened the book gently and turned to page seven. It was the drawing of a naked male figure whose body was covered by some vaguely seen red lines. Whatever paint was used to draw these lines, it must have been special, because it seemed to have created this visual illusion that the lines were slowly flowing toward a certain direction.
Fan Shen[2] heaved a sigh. With the look of a mere four-year-old, he dared not reveal his true self. Luckily he had this book to help him kill some of the boring time.
The book had been left for him by that blind youngster named Five-Bamboo, when he was still an infant.
Fan Shen always remembered that blind youngster, the servant of his mother in this world.
Many years back when he had found himself trapped inside the infant’s body, the youngster held him in his arms. During the journey all the way from the Capital City to this port by the sea, the blind youngster probably thought that he wouldn’t remember anything for his young age, however, the soul of Fan Shen was not that of an ignorant infant. Along the journey, he could clearly sense the sincere consideration for the little baby coming directly from the blind youngster’s heart. There was no pretending.
For whatever reason, the blind youngster left right away as soon as he escorted the baby to the Manor of the Count of Southernland, despite the Old Madam’s strong urging for him to stay. Before his departure, he had placed the book right next to the little baby.
This had troubled Fan Shen for quite a while. Shouldn’t this servant be worried about the possibility of him starting to practice things out of the book blindly? But soon he thought of the answer. Being a young kid, there was no way for him to recognize the writings in the book. Then of course such a problem wouldn’t have existed.
Fan Shen happened to know the characters of this world, and after such a dramatic reincarnation, he’d have no problem believing in things such as ghosts or celestial beings. He had no doubt that this book, which looked very much like a prop in a Hong Kong TVB TV series, contained the secret methods of developing some sort of inner energy.
Too bad the book didn’t have a name. Otherwise, he could have asked those kids on the street about it and find out whether this type of inner energy was any good.
Fan Shen couldn’t help but giggle when he reflected on these thoughts. Since God gave him the opportunity of a second life, he’d better cherish it. A manuscript for inner energy was something great that he didn’t have in his own world. Even if this nameless manuscript was no good, it didn’t stop him from practicing it ever since he was one year old.
One can’t really start any earlier than that unless someone starts training as a fetus still inside their mother’s womb.
There was absolutely no one else in this world, including those few Supreme Grand Masters who were pretty much regarded as deity beings by the common people, no matter what kind of geniuses they were, who could have started developing inner energy almost right after birth like Fan Shen did.
“How do you call this? This is called the early bird gets the worm. It’s also called the slow walker needs a head start. Besides, I am no dumber than those who are just starting their training,” Fan Shen thought to himself.
He could already feel a stream of inner energy slowly circulating around his body following the lines shown in the book. That was a very relaxing feeling, as though a warm stream of water was rinsing every inch of his inner organs.
Gradually, his mind went into a trance, and soon he fell asleep comfortably in bed.



[1] Remember, “Xian” means leisure, idle and unoccupied.
[2] I guess the author used the original name here because he wanted to emphasize that the main character felt more like being himself when he didn’t have to pretend to be the young kid.


Now support the author Maoni by clicking this link, and support the translator Lanny by following my blog! :)



Lanny's Law of Success: Efficiency improves exponentially as deadlines approaches.

Corollary: To improve efficiency, set more deadlines.





Video of the Day: Kung Fu Baby!



Wednesday, January 21, 2009

Random Thoughts: Worst products of CES 2010

CES (Consumer Electronics Show) is the world's largest consumer technology tradeshow where many latest technology innovation are revealed and exhibited, and this year's show is happening right now at Las Vegas.

I ran across an article in the Huffington Post listing some of the worst products of CES2010. I must confess that I am utterly amazed by the creativity and innovativity involved for some of the products selected. I'll show three of them here (also with embedded videos), and hopefully you'll enjoy them as much as I did! So here you go!

1. As Seen On TV Hat

Ever found yourself utterly bored from what you are doing and would rather watch your favorite movie instead? Now for only $19.95, there's a solution for you: A baseball hat that let's watch movies anywhere, anytime (as long as you are wearing the hat)! Now you can jog outside (a desert is recommended) while watching a movie; or you can hike that boring hiking trail and enjoying a thriller (stay away from the cliff, not that kind of a thriller); how about enjoying a comedy show while waiting for a deer to show up near your hiding spot in the hunting trip? The possibilities are limitless -- that is, if you don't mind looking a little bit, well, how to say it -- out of place!


 
(Photo Credit: Endadget)




2. Phubby Wrist Cubby

Ever felt sad, depressed, distressed, because you couldn't feel the vibration of your phone and miss important phone calls? Were you ever mad at yourself because you couldn't find your cell phone or ipod? Ever felt disgruntled because you missed your better half's call while playing soccer or football? No worries! For only $12.95, your problem is solved! You can now carry your phone (or your keys, or your wallet, or your change money) anywhere doing whatever!

(Disclaimer: you are solely responsible for whatever you carry in your Phubby if you decide to shower/bath or swim)

What's even better: you can put rocks there to strengthen your arm muscles. You can even carry your pet bird or turtle with you anywhere you go, and you can even feel their heartbeat (they won't suffocate because they can breath through the holes)! Well, on second thought, I don't know if you'll be able to feel the heartbeat of your pet turtle. To make it even better, you can pick your favorite color or pictures for a Phubby Hip Cubby to carry your concealed weapon! What are you waiting for! Go to phubby.com and get yours!


 
(Photo Credit: The Huffington Post)




3. Android-powered Microwave

Ever craved for a machine that will let you browse the Internet for a picture of your favorite food, and then with a simple push of a button, cook it for you? Well, at least you can do the browsing part with this wonderful Microwave that runs Google's cell phone operating system: Android. Maybe this will help keep your better half stick around the kitchen area more often because she could browse all the wonderful recipes online? But wait? I am the one microwaving TV-dinner all the time. Where's Android-powered stove? Anyone saw that at CES2010?


 
(Photo Credit: UberGizmo)




If you want to read more about these uniquely interesting products exhibited at CES2010, see a slide show of them here. Or you can watch this video below, named "7 Weirdest, Wackiest Products From CES 2010", which covers some of them.



Video of the Day:

Since we are on the subject of CES2010. Here's a product people actually thought were very good: An undestructable hard drive that will withstand fire, water, drop, and a 35000 lb tractor. Here I present you: ioSafe!


Disclaimer: Criminals, don't use this hard drive!