Saturday, June 28, 2014

Solve Rubik’s Cube in 7 Steps

3/29/2014

Unbrick MK809

1/19/2014

Bricked when flashing Picuntu 4.5 for RK3188 chipset by forcing a RK3066 loader.
Finless has some instructions how to unbrick.

Based on instructions given at http://forum.androidgadget.co.uk/showthread.php?tid=4, short-circuiting pin6 and pin7 while powering on put the device in Mask Rom mode.  Flashing was successful with Finless 1.8 or Recovery Rom and the device finally booted after loose HDMI cable is fixed.

Friday, February 24, 2012

What Makes A Good Software Architect

A good architect must have a global view of the product. Knowing everything inside out by facts certainly helps but it's far from enough. It's more important to make following developers successful and that's not by dumping work on them the way a slave-master dumping work on slaves.

The most desirable quality of a good architect is to solve a puzzle with least pieces. As the product evolves, more and more features are added and the product's complexity grows, sometimes exponentially when the architect makes a bad decision. It's all the responsibility of an architect to reduce complexity rather than introduce more. When a project is late on some new feature and everybody is playing Whac-a-bug, likely the feature has introduced some uncontrollable complexity and the architect is at fault.

A good architect must aim before shoot, taking the time to scout for the right target. Squandering all the ammo on a wrong target is the worst an architect can do.  More often then not, the architect will claim afterwards that it is the right target. Thus another desirable quality of a good architect is to admit mistake and fix the mess. When a team is dragged by the ego of its architect on a death march and coming out "victoriously" by delivering crappy code with wrecked morale, it can often mysteriously strengthen the I-am-right belief of the architect. Without noticing the debt accumulated during the "victory", the architect boldly embarks the ship for another adventure and only finds out the crew is not rowing for him anymore.

A good architect, especially one promoted from a good programmer, must not assume that programmers implementing the architecture also bear the same qualities. Surely a few of them do and they eventually grow into architects themselves but most are just average Joe. Giving average Joe some work grossly greater than what he can take is to set him up for failure. Miracles can happen sometimes but a project relying on miracles goes down fast. Instead, a good architect must be able to slice and dice a hard problem into smaller easy ones so that average Joe can take on the easy problems. Blaming on average Joe's inability to deliver always hides the architect's inability to reduce complexity.

Friday, January 20, 2012

Surviving Tar Pits

How can one survive tar pits once trapped? This was probably asked by the only human who was trapped in the great tar pits. He might have got an answer but he didn't have the luck to benefit from the answer. Consequently, his genes ended up in the pits and didn't get passed to later generations.

An animal would struggle but struggling only makes it sink deeper. It would call for help too, just like the baby mammoth calling its mom and getting the mom trapped as well.

We human are different. Suppose it was his lucky day. He called for help and his best friend, pairing with him in the hunting today, rushed to rescue. What must he do first?

He must yell, "Stop! Danger! Don't get anywhere close." He must realize that this was not a situation that more people in the tar pits could help so he must keep his best friend out of the tar pits first. Then what must he do?

He must explain the situation and come up with a rescue plan with his friend. If his friend could reach him on a solid ground, he could be pulled out just like people pulling out rods from a tar pool in Page Museum. More likely, there was no solid ground close to him. Now the rescue must rely on some tools.

His friend happened to have some rope, which was prepared for tying up preys. He managed to free one hand and raised it high. His friend tied a hoop and lassoed the hand. He clinched to the rope with all his might while his friend pulled the rope firmly and steadily. Bit by bit, he was out of the tar pits.

He survived but he was too sticky to hug his friend. So he told his friend that he would pay pack with five buffalo. His friend laughed, "You can just pull me out next time."

They went back to the tribe to tell everyone about the story and the tribe told other tribes nearby. Since then, nobody was ever consumed by the great tar pits. What a triumph!

An intelligent species, like human, differs from other species in the abilities of judging the situation, communicating effectively, cooperating socially, using tools to extend physical limits, learning from experiences to avoid repetitive mistakes and passing all that, i.e. knowledge, to later generations. Without any of such abilities, we would certainly see much more human remains in the great tar pits.

The Great Tar Pits

I took one week vacation at the end of last year around Los Angels area. It was very nice to leave behind cold New York and enjoy warm southern California. Besides that, the most impressive visit was not to Hollywood, Beverly Hills or Universal Studio, but rather Page Museum. It was a museum where I expected to see fossils of dinosaurs when I first heard of it but I was completely wrong and yet happily surprised.

It's a local museum and by local I mean that all the fossils there were dug out of the area right out side the museum. And how many fossils? Millions of them!

Right through the entrance, there were a few metal rods in a big bucket to test the physical strength of visitors. Everybody would stop by to pull up a rod and nobody could do it with one fast pull. The only way to do it is to pull firmly and steadily to work against the powerful suction at the other end of the rod. What's at the other end? A pool of asphalt, or simply put, tar.

It was big pools of tar that trapped hundreds of thousands of animals from 10,000 years ago to 40,000 years ago! According to the staff, it takes only two inches of tar to immobilize the strongest animal during the age, mammoth. The danger was also under disguise with grass and water on top. One prey was trapped while seeking food and water, drawing predators to feast and later scavengers to clean up, and all of them ended up being trapped. Very often an entire food chain was mercilessly consumed by the powerful tar pits.

There are numerous amazing displays, mammoth mother and baby, sabre toothed tigers (Okay, cats), a wall of hundreds of wolf skulls, various birds and insects ... but no dinosaurs since their extinction was 65 million years ago and that was way before the time of the tar pits.

I couldn't help asking whether any human remains were found. The answer was just one. Our human ancestors were smart enough to understand the danger of tar pits; otherwise, humans would have become extinct just like mammoths and sabre toothed cats.

Friday, December 23, 2011

My Refrigerator Is Buzzing and Clicking

It's the wonderful time of the year, time to relax and time to enjoy food. I never thought that loading up the refrigerator would have caused 24 hours of stress.

It all started yesterday afternoon when the refrigerator started buzzing and clicking. It was like a click, 10 seconds of high pitch buzzing and another click, repeating every 2-3 minutes. The fan was running all the time but the compressor was not humming. Not a good sign. Meanwhile, frozen food in the freezer was thawing, water accumulating at the bottom. It's a head-scratching moment. The settings were reasonable, just normal cold and they had always been that way. After poking around for a while, I finally noticed the freezer was not tightly closed and I could see light coming out from the side seal. With a few unsuccessful tries to close it tight, I realized there must be something in the way. It turned out to be a box that fell off from the pile to the back, obstructing the drawer. After some rearrangement of all the holiday food, the freezer shut tightly but the buzzing and the clicking didn't go away. Hoping the refrigerator would recover by itself, I just let it run this way overnight.

This morning, the refrigerator didn't appear to be any better at all, still desperately trying to kick start. Last time when the same refrigerator stopped working, there was a smell of burnt plastic and it took a repairman to figure out the relay besides the compressor was burnt. Later I learned from the repairman that I could just order a new part and put it on myself. That I did and the refrigerator had been running fine till now. Determined to save a hundred bucks this time, I disconnected the refrigerator and opened up the back cover. Everything looked clean from last repair but the compressor was hot and I couldn't put my hand on it. I removed the relay, wondering if it somehow had gone bad. However, unlike last time, it smelled normal and had no rattling pieces inside. Now I got worried. Googling the web showed two possibilities, bad relay or bad compressor. If it's the latter, better to get a new refrigerator than a new compressor.

There was still hope from what I understood after reading a lot forums and articles. The compressor was too hot so it refused to start, a mechanism for self protection. The initial reason for getting hot was that it worked too hard to reach the preset temperature while the freezer was not shut tight. After the freezer was fixed, it remained hot because trying to start repeatedly drew some heavy current that kept it hot. So the hope was to just let it cool down and get out of the dead cycle. After 3 hours, the compressor felt only lukewarm. Time to plug it in, with fingers crossed. To my surprise and to my expectation, the compressor started immediately. Now the humming noise only made it a singing angel. In order not to overheat the compressor again, I turned higher the temperature settings and turned on a box fan to take away the heat more quickly. Hopefully once the holiday food cools down, things will be back to normal again.

There is definitely some design issue here. A marginal user error, that is, a small box of food blocking the freezer from shutting tight, caused the entire unit to malfunction. I would expect the compressor to work normally once the freezer was shut tight. To break out of the dead cycle of getting too hot while trying to restart, the compressor should be improved so it doesn't get hotter when restart fails due to overheating.

References:
http://www.blog.applianceoutletservice.com/2008/11/my-refrigerator-is-clicking.html
http://tech.akom.net/archives/31-Getting-your-refrigerator-to-run-without-a-start-relay-while-you-wait-for-the-part.html

Sunday, December 18, 2011

Microwave Oven Competition: ItWorx vs. LAH

LAH Corp. has been making world-class microwave ovens for many years. It's probably the last thing to come across the minds of LAH management that its ovens would stop selling, until ItWorx seemingly came out from nowhere. However, LAH always has a way to turn things around and here is the story.