Friday, October 26, 2007

Crime Prevention and Freedom

California is burning, for days. More than half a million people need to evacuate. Hundreds of homes destroyed. Headaches ahead for insurance companies measuring up the claims. The number of origins of fires indicate perhaps it was not caused by natural causes such as lightning, rather, by evil arsonists. Are we under fire attack from Al quealda? Experts say arsonists may not be external enemies of United States, it can be wacky kids obsessed with fire, disgruntled people seeking revenge, or oh-my-gosh firefighters themselves who want to show heroism.

Whatever it is, it is horrible destruction. I am suprised I haven't heard ultra conservative people saying it is an Act of God punishing those who practice um, inappropriate lifestyles in California.

If it was really arson, the guys who did this deserve burning at the stakes. Save that lethal injection to someone else. The trouble is: it is hard to prevent such horrible acts. Who is watching every forest for such offenders? It would be very hard to catch this guy.

One solution is the government creating patroling robot thrones like those seen in the video game Half Life 2. Those things monitor EVERYONE! OMG, that is totalitarianism like those in Half Life 2 and in the classic novel 1984.

Waita minute, Chicago (and many other places) already have such things: the police cameras at intersections that detect speeding and running red lights. We are one step toward totalitarianism!

How much freedom are we willing to give up to prevent crimes? Now that's a PhD thesis material.

Thursday, October 25, 2007

Hamlette

At Burger King, I discovered a new breakfast menu item: the 1 dollar Hamlette.

Ok, the bk.com site is not so working properly so I can't get you a link. BK needs to fix the site!

This is a egg and cheese sandwich with ham, sort of like a omelette with ham on a bun. It is smaller than the classic croissant. The crossiant is a hefty item, so the hamlette's size is right. The price of $1 is also so right.

How many people notice the name sounds like the Shakespeare classic Hamlet? Sounds like a smaller form of Hamlet. The suffix -let is also used in java applets, portlets, and piglet in the Winnie-the-Pooh world.

"To be or not to be, that is the question. "

Why is this line so famous? I don't know.
Today, Shakespeare stuff seems lengthy babbling in obselete language. It is so hard to make students enjoy this stuff. So Hamlet has a bad uncle who killed his dad and married his mom.... Hamlet saw the dad's ghost and seeked revenge, or was he obsessed with mom marrying his uncle? I never fully understand this thing (and have little intension to).

The also related classic Algebra 1 joke equation for that line is solving for x in x2 = 4b2.

Of course, it is +2b or -2b: 2 b. or not 2 b.

Terror buster

You are not going to believe what the CIA comes up with for anti-terrorism logo:

See this link:
http://weblogs.chicagotribune.com/news/politics/blog/2007/10/cia_terrorist_buster_logo.html

Do we need this logo? How does this battle terrorism?

Monday, October 22, 2007

Calculus music

I found the following from the web:
http://www.calculus-help.com/funstuff/carols.html
Out of the songs here, I like this one.

Riemann Sums
(sung to the tune of Jingle Bells)

Riemann Sums, Riemann Sums
Counting Areas
Of rectangles whose widths get small
We need to count them all
Riemann Sums, Riemann Sums
Counting Areas
Of rectangles whose widths get small
We need to count them all.

We learn to integrate
It's really lots of fun.
It's easier to find
Than those old Riemann Sums
We learn to sub a u
When things get sort of hard
But most of all we tabulate
When we get sick of parts.
[repeat the refrain]

Note: Without the Fundamental Theorem of Calculus, integrating would be a nightmare with Reimann sum... scientific progress would probably be HALTED. The fundamental theorem is such important result that it deserves such big name.

Monday, October 15, 2007

Hacking and Comics

http://xkcd.com/ is a great fun site for geeks. Ok, that is not a very favorable label. Let's call them technological people. Artwork is not great, just stick figures, but sometimes there are some great jokes. You are a techie if you understand all. Dilbert of course is another well known tech comics, and Dilbert seems to focus on wackyness of people instead in recent years.

If you understand this comic: http://xkcd.com/327/, you know about a hacking technique known as SQL Injection!



This is a well known, simple to implement trick used by hackers.

We usually implement a search box by creating a SQL statement out of the search string entered by a user and then carry out the search and display result. One symbol to watch out for is the single quote, and the double dash. Single quote is for closing literals, and double slash is the start of comments. Every SQL programmers know that.

Check out the third box in the comics. The intended query may be
SELECT * FROM STUDENTS WHERE LASTNAME='Robert'
when the user enters "Robert" in the search box. Watch that single quote and double dash used together! The query becomes
SELECT * FROM STUDENTS  WHERE LASTNAME='Robert'; DROP TABLE Students;  --';
Whoa! The evil user sneaked in the DROP TABLE statement which wiped out the data! That double dash ignores the rest of the commands that can generate a syntax error.

Anti-Virus software and firewall do not totally prevent hackers.

What do you suggest to improve this code? (I have several suggestions, stay tuned)

Pushed off the cliff

In Hong Kong, a physchologically disturbed mom tossed her 12 year girl and 9 year old boy off their building apartment and then jumped. The three in family instantly died. (and this is not the first such incident in Hong Kong)

Horrible reality.

This is a very poor family and the father has cancer, draining away the resources of the already poor family. The hefty fees of doctors aren't helping either.

Doctors should work like lawyers: they shouldn't get paid unless they cure the patients. Now THAT'S healthcare reform.

So the mom is getting more and more psychologically disturbed. Death to her, is better than life. She sees no hope in the kids either, probably believing no one else can take care of them. There is supposed to be help from the social workers. However, just what resources can they provide? Can anyone provide a cure for cancer and get them financially back on track?

But the kids are innocent! Ok, perhaps the mom and dad are probably not so guilty either. She should have seeked for help... Should have been a bit more optimistic.

But the woman is already pyschologically disturbed. How can anyone reason with her?
If she DIDN'T jump, the most we can do is give her multiple life sentences. Is that a solution either?

But how many cases like these are out there? Sometimes, pain is disclosed only when it is too late. So many folks struggle, yet so little help is available.

That's the dark side of life.

Yet we shouldn't think that way. We SHOULD think life is preferable than death. Watch the ants! Chinese proverb and Solomon proverb says. The Chinese version says, look, the ants are fighting to live. Solomon says, look, the ants are working hard, you lazy bumps.

Friday, October 12, 2007

Huge CTA fare hike

From the transitchicago.com site and bulletins all over the trains, if no additional funding from the state, on November 4th:

Rail fares will rise to $2.00 (using Chicago Card/Chicago Card Plus) or $2.50 off-peak and $3.00 peak (using Transit Cards or cash). Peak periods are 6:30-9:30AM and 4:00-7:00PM on weekdays.


Don't just read the first sentence. Look folks, this is not increasing 25 cents to $2.00. It is going up to whooping $3.00 if you use cash! (Is it a discrimination of some sort if you don't use the Chicago Card?) Just how many people are going to take the trains during non-peak hours?

CTA is now whining VERY loud for fundings. Their message urge: write or call up your state congressman.

I don't even know who are my congressmen. I am already an elite, I know the names of the 2 state senators to the US government. Go ask 100 random people from Illinois, I am sure not many able to tell you that. Ok, I am now supposed to find the name of the unknown state congressmen (not Durbin or Obama), and whine to them how much I need the CTA to stay at the ok-I-can-bear-with-fare of $1.75. Do you think they can help?

If the state government can relieve us from this, where did that money going to come from? Taxpayers like myself.

The end result will be people will boycott the CTA, and drive, and making commute miserable. CTA still won't get funding because less payers pay. Riders spend more time and money on commute. Lose-lose situation forseeable.

Monday, October 8, 2007

Deadly Day for Marathon

I never go admire in oooh-and-ah for people who live in super huge mansions or drive sleek sports car. These guys may have inherited a fortune or got lucky in their investments, or even do something illegal... Ok even if they are in real successful in business in perfect upright way, how about live in a more humble life and donate some $ to the needy. But I admire in ooh-and-ah for those who can run marathons. No amount of money can buy a tough body.

It takes a lot of training and a lot of determinition. Anyone who can finish a 26 mile marathon, even not the slowest guy is a huge accomplishment. If any of my friends ask me to support them financially when they run for certain charities I would certainly give!

There is a downside of the marathon: they have to block roads for hours. Um, how about just running along the lakeshore back and forth? I am sure that is more than 26 miles. Don't block my neighborhood's traffic please.

There is even a darker side of marathon: it can be deadly, especially on a 90 degrees October day.

A 35-year-old police officer who looks perfectly healthy died at the marathon. The news says "it is not confirmed if it is heat related until an autopsy is performed". Duh, what else can it be? There are also hundreds taken to the hospital.

Dear folks, please check your hearts to make sure you are capable before running. Be sure to STOP and REST when you can't handle. There is no need to risk your life to the finish line.

Waita minute. Why do they run the 26 miles in the first place??

Ok it is a road-blocking, public, 'look-ma-I-am-tough-guy' sports event. The first marathon was ran because there was some Greek guy trying to run back to his hometown to announce their enemies are defeated. Unfortunately phones weren't invented back then. Both that Greek empire and their enemies are long gone. We now run marathons to challenge the human capability. Why do people twist and jump and somersault and all that in Olympics too? Also trying to max out human capability. I believe if we run perhaps just 5 miles, regularly, to maintain health, is good enough isn't it?

Perhaps the honorable police officer would live if it is not 90 degrees in October. His real cause of death cannot be found in the autopsy. It is the horror of global warming.
Too much damage has been done on earth and it is striking back. If all that determinition in marathon training is used to come up with solving such crisis, I believe there may be better days for earth tomorrow.

Friday, October 5, 2007

Great stuff on HongKong Radio RTHK

Besides radio talk, there are many education materials! This is the site: http://www.rthk.org.hk/
Great flash animation and great background music!

I especially like:

Chinese history
http://www.rthk.org.hk/chiculture/fivethousandyears/index.htm

Chinese poetry
http://www.rthk.org.hk/chiculture/chipoem/

I think great education material revitalized with great animation is a field of tremendous potential.
Imagine how history books become more lively if I can hear Martin Lurther King speak while reading his biography. Imagine how much better a teach-yourself-piano or guitar book will be if we can hear a tune. Ok, this is not entirely new idea. I already have a piano book that points me to a particular track on the accompanying CD. How about just click/tap right on it. Can't be done on just paper, of course.

Books turning to ebooks with electronic reader is becoming more common. Modern ebook reader actually looks like reading paper now.
Children have been playing with pseudo animated books for years, like press a button to hear Mickey Mouse talk.
How about letting readers click on books like Flash programs on a computer to enhance reading experience?

My almost impossible long term goal: learn enough flash and art skills to enhance my java applets for my book.
Ok, I probably will never have the time and effort nor the talent.

Tuesday, October 2, 2007

Constitution and Christian Nation

I read this note in CNN

McCain also said he agreed with a recent poll that 55 percent of Americans believe the U.S. Constitution establishes a Christian nation. "I would probably have to say yes, that the Constitution established the United States of America as a Christian nation," he said.


People simply don't know the Constitution and don't know the Bible. Where do you find 3 branches of government in the Bible? The Constitution founders deliberately leave out any reference to deity. Here is what's in the Constitution: the first amendment, which guarantees religious freedom.

Politicians ought to talk issues, how to solve problems, and not trying to draw votes from clueless believers.

McCain explained his statement:

On Sunday night, McCain sought to clarify his remarks while campaigning in Hollis, New Hampshire. "What I do mean to say is the United States of America was founded on the values of Judeo-Christian values, which were translated by our founding fathers which is basically the rights of human dignity and human rights," he said.

Ok, what about the slaves, the Native Americans, and the indenture servants building the railroads? In modern days, what about the American soldiers ruthlessly killing poor civilians in various conflicts?