Search within Lanny's blog:


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

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!

Tuesday, January 20, 2009

Robot of the Day: UAVs at BYU

Since in the previous post I talked about a BYU UAV demo dry run, I thought it might be a good idea to present some of the UAVs we used at BYU for research purposes.

The research group WiSAR (stands for Wilderness Search and Rescue) at BYU consists of faculty and students from three research labs: The MAGICC lab (ME and EE departments), the HCMI lab (CS department), and the Computer Vision lab (CS department). The objective of the research group is to investigate and develop technologies to support wilderness search and rescuers with an Unmanned Aeriel Vehicle (UAV).

In the past, we have been using UAVs built by the MAGICC lab students. The UAV in the picture below is named Madre (meaning the mothership in Spanish) and was built by the MAGGIC lab. Madre retired in 2008 and simply sits on top of a closet in our lab for displaying purposes only.


 
Madre: UAV built by BYU MAGICC Lab


Some students in the WiSAR group graduated and then decided to license technologies from BYU and start a local company making UAVs. The company is named Procerus and has been quite successful. So later we simply bought a plane from them. The second picture below shows the current UAV we use. We just called it "The UAV" because we couldn't come up with a good name.


 
UAV built by Procerus. It doesn't have a name. We call it "The UAV".


The fix-wing UAVs we used in our research are small, light, and have wingspans of 42-50 in. Each weights about 2 lbs. They are propelled by standard electric motors powered by lithium batteries -- good for up to 2 hours in the air.

The sensors onboard include three-axis rate gyroscopes, three-axis accelerometers, static and differential barometric pressure sensors, a global positioning system module, and a video camera on a gimballed mount. A 900 MHz radio transceiver is used for data communication and an analog 2.4 GHz transmitter is used for video downlink. The autopilot was designed at BYU and built on a small microprocessor. It stabilize the aircraft's roll and pitch angles and attitude, and also flies a UAV to desired altitude or to a waypoint.

Each UAV has many autonomous capabilities. For example, it can auto-launch (all you have to do is to throw it into the air), auto-land (crash land after spiraling down), and if the UAV loses communication with the base, it will automatically return to base and loiter around. The video below shows the auto-launching and auto-landing capabilities of Madre.




The gimballed camera onboard the UAV provides bird's eye view of the area. Because the UAV can quickly get to hard-to-reach areas and cover lots of grounds quickly, the visual information it provides can help wilderness search and rescuers improve situation awareness and support in search of a missing or injured person. The next video shows the kind of video the operator can see from the ground. (You can skip to the end to see the crash landing.)




Maybe you have noticed from the previous video that video data from the UAV is not easy to use (jitters, disorientation, too fast, etc.). That's why our research group developed video mosaicing algorithms to piece video frames together to help with the search task. This method enables video frames to stay in sight much longer for the video observer, thus, improving detectability.




We have also developed other automation to assist with the search and rescue work. Examples include automatically suggesting likely places to find missing person, various automatic path planning for the UAV, anomaly detection algorithms, etc. Those will be discussed in a separate blog post in the future.

The video below is a compilation of some other capabilities of the UAV made by the MAGICC lab, including obstacle avoidance, multiple UAV formation flight, etc. Too bad the audio track was disabled, but you can leave the music running from the videos above and then watch it in rhythm. :) Note that at the beginning of the video, the UAV was launched from inside BYU campus. Of course, this is no longer allowed due to tighter FCC rules and regulations!




Picture of the Day:



People have always wanted to roam the sky freely like birds.
I don't, because I've got UAVs.

Monday, January 19, 2009

My Research: BYU UAV Demo Dry Run

Hi, everyone who reads my blog! Happy New Year to all of you. Wish you a very exciting and productive new year! (See picture of the day below!) I only have one New Year resolution this year -- that is, to catch up with the blog! :) That means I'll have to post at least two blog entries each day! So get ready for a flood of interesting (and hopefully insightful) postings. Also be prepared for the strange parallel time/space I'll be living in.

Note that I am starting a new track today called "My Research." Postings with this tag will talk about AI/Robotics research I am working on. Hope you find inspirations in these postings and comments are especially welcome for this track!

If you have not noticed, there's a section on the right side of my blog called "Blog Labels." This is a good way to filter out postings you might find interesting to you. For example, there's a label for each book I translate. The only drawback is that you'll have to read backwards. :) Also if you like my postings, please follow my blog (see right side). I am interested to see how many people really like my postings, and the more people liking my postings, the more motivated I will be! Okay, enough babbling, let's move on to the real fun stuff.

=============================================

Part of my research is about how to use an Unmanned Aerial Vehicle (UAV) to support Wilderness Search and Rescue (which we refer to as WiSAR). On November 14, 2009, our research group performed a field dry run in Elberta, Utah (a place in the middle of nowhere) in preparation for an upcoming demo for the Utah County Search and Rescue people.

Utahans love outdoor activities because we are blessed with lots of beautiful mountains and wilderness. As a side effect, there's also a great demand for wilderness search and rescue because people get injured/lost/missing in the wilderness. The goal of our research group is to use UAV technologies to support wilderness search and rescue operations. Obviously, real-time video from a UAV with bird's eye view can provide useful information for the search and rescuers, especially for areas that are hard to reach quickly. The UAV can also cover an area much faster than search and rescuers on foot. Our research group has been working on this for several years and made good progress. However, the technologies will only be able to make a difference if the search and rescuers find them useful and start using them. That was the reason why we are eager to do a demo for the real search and rescuers. And the purpose of the dry run is to make sure all technology components are ready.

The previous day's weather forecast predicted snow in the next day. Sure enough, when I left home at 7:30am, the ground was covered by snow. Elberta is about one hour drive from BYU campus. Interestingly, weather got better and better as I drove, and by the time I arrived at Elberta at 9:00am, there was no snow!


 
Elberta, Utah, early morning!


For our research, we use a fix-wing propeller-powered model-plane kind of UAV shown in the picture below. We also have a nice trailer, which has a power generator, some mounted LCD monitors, a long table, and even a microwave!


 
Fix-wing UAV and its container



 
Outside look of the trailer (showing the power generator)



 
Inside view of the trailer



It took about 30 minutes to get everything set up. Meanwhile, an umbrella (marking the location of the missing person) had also been placed in a distance from the "command post." By 9:45am, we were ready to throw the plane into the air (literally, that's how we launch the UAV, because the UAV has built-in intelligence for auto-launching).


 
Ready? Launch!



Inside the trailer, we have two laptops running. One laptop is used to control the UAV with a program called Phairwell (don't ask me. I didn't pick the name), where the operator can set waypoints for the UAV to follow (or a flight pattern). The operator can also control the UAV's heading, speed, roll/pitch/yaw, height above ground, altitude, etc., etc. Another laptop is used to view video feed coming down from the UAV. It is worth mentioning that the video frames are actually mosaiced together so the video observer can view a larger area while each video frame stays on the screen for an extended time for the ease of searching.


 
Laptop running the UAV control software Phairwell



 
Laptop running video mosaicing software


Amazingly, the weather turned into something perfect! There's nothing more we could have asked!

 
Sunny Elberta! What a beautiful day!


The dry run was quite successful. We performed several flights and fixed a few glitches, especially with the auto landing control. The picture below shows how the UAV lands (yes, it's a crash landing). The picture was actually taken from a previous field trial because it is quite difficult to try to keep the UAV in the camera frame.


 
UAV auto-landing


At 11:30am, just when we were ready to enjoy our lunch (subway sandwiches) after a successful dry run, guess what, it started to snow!!

 

We ended up packing everything first, and then had our lunch inside the trailer (aren't we glad there is a microwave in the trailer!). There's me packing in the snow in the picture below. Don't ask me why those other two were doing synchronized penguin walk in the background, cause I don't know!





That's it! We were fortunate enough to have a window of nice weather (against the weather forecast prediction) for the dry run, and we were ready for the demo!!

See the complete gallery for the dry run
Download geo-tagged photos for Google Earth view (double click the kml file)

Picture of the Day:



Wish you all a very exciting New Year! Hee-Ha!