Monday, July 30, 2007

No More Air Stunts Please

At Ohio a veteran stunt pilot was killed while performing a stunt. The next day the show continues.

How outrageous is this?

Look, if another air stunt accident happen not only the pilot dies and the plane destroyed, the debris can fall on the fans, or on innocent bystanders.
People seem to have absolutely no sympathy and just want to continue to watching this (sorry, boring) stuff.

Look, just how fun it is to watch loops and colored smokes come out? Besides, there are BIG risks involved. This is just not worth risking lives to do this. Just what do air stunts accomplish? Other than oohs-and-ahs. When an accident occur, should we mourn for the fallen one and realize this is something not to continue?

Pilots have difficult job to do. Just look at the complexity of their control panels. It is already huge accomplishment to know how to fly a plane. Their job is to handle a plane safely, don't need to perform stunts.

Another plane related news: news choppers crash into each other. Whoa. Newsreporting has gone too far. Just a reporter saying "there is a high speed chase" is enough. Pilots and Photographers' lives are too precious to risk. Also, I don't need a chopper giving me how busy is the Dan Ryan. A camera from a taller building will do. Too big risK (and too costy) for this type of reporting.

Some people die for money; some birds die for birdseeds. Pilots should not die for stunts and aggressive journalism.

Friday, July 27, 2007

5 Biggest Unsolved Problems for 5 Dollars

The discount bin at bookstores contain old books and extra copies of unwanted books. One type of books in particular is abundant in the discount bin: astronomy books. The universe is so big and full of wonders yet most people only focus on the everyday business in the relatively tiny earth. So great astronomy writers: think twice before publishing another masterpiece. Wonders of the world are many; but readers are few. Besides astronomy books, sometimes among the unwanted books are little treasure books.

I found The Five biggest Unsolved Problems in Science for about 5 dollars. This is a great read for high school students and beyond. It also comes with great cartoon commentary. It is written by professors who know what they're talking about, yet done a great job at explaining it to general public. This book talks about a basic, yet big unsolved problem in physics, biology, chemistry, geology, and astronomy.

What does mass come from? What chemical reactions form life? Weather forecasting possible? What is structure and function of the proteome? Why is the universe expanding?

Posing questions is easy. Just list them (I just did). This book does a lot more. It starts with a good discussion of scientific method itself. You get a very nice presentation of backgrounds of the current discoveries in each field. This is like going to a great introductory class with your favorite professor. Each subject has an exciting journey of discovery. Though I have to admit I find the biology and chemistry section a bit difficult because I have little prior background.

I like the touch of comedy in the cartoon commentaries throughout.

About Science: we have come a long long way from philosophers who tell us ideas out of nowhere. But yet as we discover more, we discover how little we actually know. The universe is still full of mysteries and wonders.

Tuesday, July 24, 2007

GUI Web Swing

I am not talking Spiderman. Nor talking specifically about ultra difficult Java swing. Rather I am talking about the swing of preference from thin client to thick client in web app.

Pre-Web
In the beginning of personal computing (pre-Web) there was 80x25 character MS-DOS. Newbies wonder where was the husband MR-DOS, and do you have to make an appointment to see DR-DOS. Oh those days are old. People demanded more than standard input/output. Blinking cursor and scrolling text to top of screen is not enough. Then standard controls such as buttons, scrollbars, menubars are invented and graphics interface GUI simply push DOS out the window.

The problem is this: it is much more difficult to program in GUI. Programmers who only knew command-line programming will almost certainly faint if they see a Windows SDK Hello World program for the first time. Ok, take a deep breath and look here when you are ready.

Paradigm Shift
The whole paradigm is different! No longer a program has a beginning and and end. Windows take over! It is event driven! When someone click a button, Windows will notify you! You've gotta handle the message. Complex programming is one of the cost of prettier UI. Fortunately, few need to handle raw Windows programming now.

Given such complexity, if there are no other tools to make it easier, I'll say the number of programmers would be as few as the number of Latin scholars because only the elites can handle this type of stuff.

Fortunately there are easier things such as Visual Basic and Delphi that makes such programming easier. As we get a good handle on writing full blown GUI apps, then there comes the World Wide Web.

Swing to thin client
Whoah. Information from another computer can be seen in yours! Soon, everyone and their dogs have websites. In the old days it was like reading newspaper, everything is read-only. Then people demanded interactive sites! and online commerce! Then HTML is supplied with a few basic controls such as editbox and submit buttons and voila. HTML buttons and controls are so very easy. (ok, the processing is a bit harder, that's another topic). Program become simpler: HTML form, submit, load another form.

With HTML and browsers, full blown applications suddenly become less important. It seems like Microsoft Office are what everyone will ever need. The world is content with basic (and boring) controls such as editbox, radio button, textareas. This is thin client. Most are happy with display->submit->display scheme of http.

Swing to thick client
When asynchronous Javascript (AJAX) was added in IE5, nobody even noticed, but suddenly someone make use of it and added more interaction. This makes apps more functional. Everyone is fascinated by the zooming ability of google maps (compared to old yahoo maps).

Now people are tired of boring controls, people demand heavier, richer clients, inside a webpage. Java has swing library for so long, yet it is super duper complex and hard to make it run on a webpage. Java's AWT was fairly easy, but not very powerful, and now nobody likes Java applets.

Flash is THE thing. Powerful, lots of cool effects, graphic intense (but expensive). Just look at how many cool sites and games are written in Flash. Java GUI is simply inferior. Flash had not met the fate of Java applets where is it labeled as dangerous and browsers won't even load it. But it isn't so easy to do a flash app. The GUI of Flash is quite complex, and it isn't a typical code-compile-build that programmers are used to.

It seems all books focus on the graphics aspect of it. Can it have some data entry forms, talk to database and do some business? Possible, but not obvious.


The pendulum is swinging back to thick clients. Customers now demand more functionality that combines beautiful UI.


Enter Adobe Flex: script based language that produce Flash files.
It lets you build flash business apps quickly. But it is strangely combining javascript-like code and form description code. And it may take a while to get used to. Sun (Java) tries to do the same, with JavaFX. They mess up their own good Java language! Sun loses another battle if you ask me.

I have long waited for fun new things in programming. Flex is it.

Let's see if I turn my math demo programs to Flash....

Monday, July 23, 2007

Transformers

Steven Spielburg brought the long forgotten 20+ year old cartoon/comics back to life. The 1986 TF movie was and still is THE greatest movie I've ever seen. It will be hard to surpass it. Steven Spielburg does not guarantee great movie. War of the Worlds was a disappointment. I watched some promo materials of the Transformers and didn't like the modern, ugly alien looking robots. They are supposed to be human-like. Thankfully this movie has a lot of actions and not so disappointing.

Cars turning into robots. Robots in disguise. Perhaps long ago some Japanese guy somehow "see" a robot within a car and created this cartoon series. The Transformers started on earth and the story was long moved back to Cybertron with little humans involved. The 1986 movie ended with a Golden Age: Cybertron was restored and (yes!) the autobots have won. This time we are back to earth.

The last time I saw the cartoons was with unpopular new things such as headmasters and Throttle Bots and even Beast things. Everyone is too tired of it and it deserves a 20 year rest. I am glad the movie didn't include the annoying newer things.

This story also share some similarity with the 1986 movie: with the spy character Decepticon cassette Laserbeak spying on the autobot. This time you get a UGLY looking thing (Soundwave?) tapping info from the Pentagon about "the cube". This ugly thing makes this movie disgusting. :(

For half the movie the transformers don't talk. Ok, Bumblebee (now a cool Camero instead of a Beetle)'s voice is damaged, what about the Decepticons? They never talk in their Cybertonian language. Prime and others also come on too late.

Wassup with that scorpion-like Decepticon destroying things in the beginning. The Transformers were NEVER monster destroyers like War of the Worlds. But Hollywood demand actions and blow-em-ups. Human soldiers: do you realize your weapons are quite worthless against the Transformers after rounds of shooting?

We should watch the Transformers like watching people with various personality with a robot body: the philosophical and willing-to-sacrifice leader Optimus Prime. The pure evil of Megatron. The jealousy of Starscream, and the loyalty of others. They also play different roles: Ratchet (the ambulance) is supposed to salvage damages, Jazz the break dancer and Bumblebee as a close friend to human and the comic relief. Starscream deserves some time revealing his ambition in this movie.

Ok, we turned the clock back to the first few episodes. There were no "giants", no dinobots. And yikes, Prime has that Ax/Sword and Megatron has that medival club which only appeared once! What happened to the laser guns and prime's signature cannon? There are perhaps too many guns from the human already. Ratchet, Ironhide, and even Starscream are supposed to be DEAD from the 1986 movie. Their comeback signifies the clock has turned back to their time on earth.

This movie adds modern factor: Where did you learn our language? Prime says "from the World Wide Web". Where did you learn about the glasses? "from eBay". This makes modern teenagers chuckle.

The Deceptions: yikes they are ugly, and only autobots are supposed to be cars. There are only a few Deception cars. This movie has a bunch more. What are they? Who is the guy in mustache? They need a bit of colors.

Explosive actions throughout. It is good they bring back the classic "one shall stand, one shall fall" duel between Prime and Megatron. But these guys don't get it. It ought to be QUIET. Just Prime and Megatron: nothing else. The fight deserves to be longer, and Megatron ought to talk more and be more evil in general. He also needs a cannon in his right arm.

It is not all about autobots rages their battle to destroy the evil forces of the decepticons. The comic scenes of the autobots hiding in Sam's house is fun. Bumblebee releasing lubricants is also fun.

The movie ended with unleashing the power of the cube, rough equvalent to Hot Rod unleashing the power of the matrix to destroy Unicorn in 1986. But why does prime insist to put inside him to sacrifice? Besides, prime doesn't look that defeated.

Added bonus: Megan Fox. Of course she adds this movie's appeal to teenagers. Good movie: ***.

Ugly little spy robot and autobots besides Bumblebee come in too late take 1 star off.

Friday, July 20, 2007

Take for Granted

Yesterday my car won't start. Battery is dead. That is AFTER I reached QUeenie's workplace to pick her up. Can't really pick her up.

The Volkswagon had gave me more serious problems before, but never not able to start. One time the battery died on me when I am braking! I have to restart in middle of intersection and fortunately it was able to start. But not last night.

So I called up a hero to come over to jumpstart. Ok it worked! The cable is the FIRST thing I bought when I got my car. Good that I have it.

Last time when the battery died in middle of road (but able to restart) I took it to the dealer. Some hoses and pipes needed clean up and the battery was weak, the guy says. But changing the battery would cost me a whooping $200. The battery never seem to have a problem so I ignored it, and it worked for months until yesterday. I shouldn't have ignore. But too busy in life.

TODO: change that battery. And it requires some wild wrenches that another friend has. Isn't it great to have friends you can rely on?

We take for granted many things: like turning the key would start car. Actually a hundred things must work before the car can start. We turn on the faucet and water come out, and there are many pipes need to install for this to happen.

Heck, even waking up is tremendously complicated process of the brain that even scientists have no complete idea of how that works. There are too many things we take for granted. So be thankful.

Solving Checkers

Checkers is a fairly simple game (meaning simple rules) that many kids enjoy. All pieces are the same, and Whoa, you can keep killing the opponent's pieces by repeating jumping. If a foolish move is made, your opponent can wipe out a lot of your pieces in 1 move. I don't like it as much as chess because there is not as much strategy involved.

This seemingly simple game turns out to be a very difficult program that sparkled big research, and now the perfect checker program that cannot be beaten is written. See here for details.

Though Deep Blue beat the top human player, according to the article, chess is much more difficult than checker and require a lot more research to solve.

Ok, big the point is: why bother solving these games? Someone has to pay years to fund this type of research.

I hope this problem does have some practical use for that money to be well spent.

This reflects human curiosity: the if-there-is-a-problem-i-am-going-solve-it attitude. I wrote a little Sudoku program to solve the popular puzzle too.

This also is the fame factor, which explains why people do strange things to get on the Guiness book of records. Perhaps the CNN article justified all that years of programming work. Ok, my Sudoku program is not going to win any fame (a mere trial-and-error approach)

Ok, I've got a suggestion: have the perfect checker program play another instance (copy) of it. Fun to see how programs try to outsmart each other? Sometimes I have computer chess play against each other.

Which program will win? Draw all the time isn't so fun anymore? (like tic-tac-toe)

Tuesday, July 17, 2007

Horrible Iraq reports

Some reports I've read say bloodthirsty American soldiers shooting innocents in Iraq is common place. They won't talk, just shoot. See here. Of course, you don't see this type of report on CNN.

The American public either don't care or helplessly watch ourselves become a nation of terror. The sad fact is: many of us don't even know.

But this is nothing new. Time has diluted the memories of those who read about horrible acts of American soliders slaughtering villages in Vietnam (and MUCH more, some of which are not in your history books)

You give young people AK47 (and all sorts of other weapons) and put them into a zone where their life can end anytime due to roadside bombs and suicide bombers. What do you expect them to do?

If you are surrounded by aggressive foreigners who killed your friends and families and you have no food, no job, nothing, what would you do?

Endless cycles of revenge do not solve anything.

We've got to have plans to withdraw. Withdraw first, deal with everything else later. Besides, that Iraqi president say withdraw anytime, right? Just how many tax dollars and innocent lives are we going to waste?

Tuesday, July 10, 2007

IBM talks math

I saw this link from IBM's website.

That stuff in the background is all high school freshman Algebra 1 stuff. A basic education requires every high school students know all that. (But most will forget it VERY quickly) When was the last time you saw a hyperbola? Survey a hundred random college graduates on street, I am sure not more than 5 able to tell me the equation of a hyperbola. (ok, x^2+y^2=1 gives you a unit circle, but x^2-y^2=1 ) gives you a unit hyperbola).

Math majors are in demand, article says.

Although you hear reports like that, pure math guys still won't be able to find work (unless you are REAL good so you can do professional math research at universities.) In school I used to work minimum wage as office boy in the math office and I stuffed hundreds and hundreds of rejection letters into envelopes. Look, there are only a few spots in schools, you won't be able to get in unless you are REAL good. Fierce competitions in the few spots in teaching too.

Ok, perhaps you don't have to work in academic institution. You can work for the industries. But where is math in need? Financial markets or some high tech research institution. You will need FAR FAR more than Algebra 1 and even Calculus 1,2,3. And you can't just learn math alone. Financial things, statistics, computer science are must for a math related career. I think math skills is only a small part of a successful math related career.

The headline should say: quantitative analysts with good math skills wanted.

To promote more interest in math, we need a very fun, high budget math education TV show, like Bill Nye the science guy. I don't need to watch adults doing fractions on channel 20 filmed in 1970s again. We should demand more from adults. Fractions is an elementary school topic.

Monday, July 9, 2007

I do not embrace programming frameworks

In the beginning (ok, around 1994) there was HTML, it is so easy that everyone learned how to do <b> <i> tags.
But the most powerful tag is the <img src=file.gif> tag. You can add images! If the WWW only has text and no images, it would never grow to be this big. It was easy back then.

Soon there was need to do form entry! Textboxes, memo fields, radio buttons and dropdown were added. Though crude UI are pale compared to full blown Windows app people were still happy, even to this date.
Now it gets a bit harder. How do we process that form data? Little programs known as CGI to parse text was the first answer,

then there was quick-and-dirty VBScript, and there was Servlets, then everyone was tired of out.println("<title>Hello</title>"); that JSP was invented. A bit tougher than plain HTML but still very manageable.

If it is easy then there is no industry! So got to make it elaborate! Computer scientists need PhD theses. Industries need products! Ok, HTML is just markups and fixed set of tags. Too easy! So got to make it difficult to appear professional! How about you define your own tags: Enter XML. That alone flooded industry for parsing and all sorts of programs to support it.

Here is a fact of life: people write sloppy code if they can.

ASP and JSP are easy but they allow you to write sloppy stuff where you put your presentation code, logic and database code

all in one file. It isn't necessarily BAD, because at least I only have 1 file to look.

The industry's solution to remediate that is design patterns and frameworks! People blindly embrace them without really knowing the evils or merits of such things. XML configurations! Everyone is excited with it so let's let that spice up the framework with properitary XML configs. That makes the easiest tasks difficult. What file is called next? What method will be called by the frameworks? It becomes a very difficult question in frameworks as they are tied by hairy XML configs. Waita minute you are giving me a bunch of NEW HTML tags in the form of tag libraries? I wish JSP never even allow you to define your own tags. If you let people define their own tags, they go wild.

The disciplined programmer can do their own code nicely, without restricting themselves into any frameworks. Sometimes frameworks take away the creative factor in programming.

Oh frameworks can have new versions. And new versions are not compatible with older ones? Now that's nuts. Just why do I have to bend myself to fit your new framework? and new versions of it?

If people write sloppy code in easy environments, they would also write sloppy code in your framework. If something is broken, is it from the bad code or from the bad framework? Are frameworks good or are they evil?

Monday, July 2, 2007

10 year anniversary of 1997

It has been a decade since the Chinese take over of Hong Kong. "One Country Two Systems" put into test! Magazines have predicted doom of the Pearl of the East. Many had little confidence of mainland China's ability to run Hong Kong. Yet Hong Kong is still here, not quite as miserable as many have predicted.

Who remembers the Opium Wars? Though it was pure evil agression, most people in Hong Kong no longer detest the British as they are no longer pushing opium on us. Rather, many embrace foreign rule.

Most enjoyed the freedom and prosperity in Hong Kong as we watch the turmoils in China over some dark periods. Many have feared China's takeover. The 1989 Tinanenmen Square incident alone had many fear tanks running over in Hong Kong and people seek hard to find ways to immigrate out. Besides military actions I am also afraid of forcing us to use simplified Chinese!

This is the reason why I am in America.

Look, if your country's citizens embrace foreign rule or living as foreigners that reflects your country has some problems?

Few has imagine the growth of Chinese economoy nowadays in pre-1997 days. Nowadays many are learning Chinese and hope to do business there. China suddenly become the worlds biggest market and producer.

It is too early to China will rise to the top of the world as the next dominant player in world stage. There is MUCH more catch-ups China need to do, including basic things like product safety. Weed out that government corruptions. Have a plan to help the poor folks in poverty. Educate the vast number of people. Weed out those poor translated English signs in Beijing is a good step. But to fix all of it, do we have to wait for China to host Olympics in every city?

For Hong Kong, it is best to not to influence too much and let them handle their own affairs as Deng has promised. Now what about after that 50 years. Ok, we'll let a whole new generation worry about these. The economic growth of China has also cost much of the air pollution in HongKong. Fix them!