Tuesday, April 27, 2010

HTML5: the markup strikes back

HTML is a very simple markup language. Want boldface? wrap it with <b> and </b>. Want new line? do a break. <br>. So simple. Yet so many so-called programmers even had problem with that. There are other text markup languages, such as the ultra ugly RTF for Word Docs (save a Word file in RTF and you will know what I mean), and scientists favorite LaTex requires at least grad student status, definitely not for dummies. (Nowadays there are WYSIWYG Latex editing)

If the web language is as difficult as LaTex, there will be be no Web.

HTML does a very fine job of easily marking up text, soon people want more: web forms... soon little buttons that does things, and soon, videos!

There are things such as Flash and Flex and Silverlight to do much richer stuff.
HTML didn't need any changes for decades because we bypass its shortcoming with plugins.

The simplicity of HTML is actually its beauty!

Now HTML fights back. HTML5 can do videos and 2D drawing and even more types in < input > tag. See here for a good tutorial.

Ha! Browsers may or may not support it, and your browser may only support part of the specs.

We've seen that before: browser wars.

HTML5 is only relevant when big players IE, FF fully support it. I actually don't need HTML5 features. I didn't need those for decades (and you probably don't either)

Monday, April 26, 2010

Hawking on Aliens

Stephen Hawking thinks aliens are dangerous. News says. He compares with Columbus and the Native Americans.

I agree. And I am no rocket scientist nor astrophysicist.
See, the farthest we can go is the moon, and outer space aliens must be much more advanced. But if the aliens are so advanced, they don't need to mind the earth.

And that's the very plot of many science fiction and cartoon? Well in science fiction, there must be a earth-saving protagonist! Our protectors may be from space themselves! Like the Autobots!

I played Space Invaders since the 1970s. If they come in arrays and I have a cannon I am ready as I have decades of experience!

Don't worry. Invaders are not attacking us yet. Worry about earthlings attacking other earthlings first.

Friday, April 23, 2010

Hello Android World

Since the success of the Palm, I knew computing will be moving to handheld devices. PDA that looks like a little notebook are all gone. They just have to look like phones to continue life. The stylus is so out of style.

Years ago I played with Metrowerk CodeWarrior and wrote programs for the Palm. Of course that is totally obsolete for today.

J2ME is around for a LONG time. A typical phone probably has a bunch of J2ME little games on it. However, it just is not so hot. For instance, I rarely ever see an ad hiring J2ME programmers.

So what's hot today: it's gotta be the iPhone and Android.

iPhone requires a Mac and it speaks Objective C. Objective C is around for a LONG time as an alternative to C++ in adding object oriented capabilities to C. Gosh it got some weirdo syntax!
C++ was the truly "better C" alternative. I ain't shelling out money to buy a Mac either. I just can't stand the italic font on the keyboard and no delete key and just one mouse button(!).

I prefer to use my current machine and use more intuitive syntax, so I prefer learning Android, with a Java library instead of battling the wackiness of Objective C.

Here is Hello World for Android that I went through.

Originally, it was disappointment... that emulator just gives me "A N D R O I D", and not the Hello Android as shown in the screenshot... That's because it takes almost a minute for the emulator to boot up! I hope to learn to program a few things on it... hmm, but I don't even have an Android phone. If I actually made something useful I'll buy one.

Saturday, April 17, 2010

Hero Saving People From the Rubbles

There is a volunteer working in the earthquake shaken QingHai province from Hong Kong who lost his life while saving some people. True heroism indeed.

The Chief Executive in Hong Kong says this:


特首曾蔭權昨日亦在個人網誌讚揚黃福榮的事蹟觸動內地和本港市民,萬分敬仰他無私奉獻、捨身成仁的精神,引以為榮。曾蔭權引用《聖經》馬太福音「慈悲的人有福了」,


Full story in here.

Mr. Tsang's quote should come from the "8 Beatitude". See here for all 8 of them. Ok, his Catholic Bible has a different translation.

But the absolute true heroes who do "acts of righteousness" does not need honor, just quietly do work behind the scene.

Just look at the next chapter. Matthew 6:1-3:

Be careful not to do your 'acts of righteousness' before men, to be seen by them. If you do, you will have no reward from your Father in heaven.

"So when you give to the needy, do not announce it with trumpets, as the hypocrites do in the synagogues and on the streets, to be honored by men. I tell you the truth, they have received their reward in full. But when you give to the needy, do not let your left hand know what your right hand is doing,


I am sure the brave volunteer does not want to be honored worldwide. He just want to quietly help.

So, go help the needy (but don't tell me).

Ok, money rich modern China: how come there are so many needy that needs help?

Thursday, April 15, 2010

Fireball!

Oh my gosh, a fireball in middle of sky! Details here.

Meteor? (a strange one if it is). Some sort of missile? UFO?! Can't deny it this time. Videos are here to prove it. Don't tell me this is a weather balloon. I hope someone follows this star like the 3 Wise Men and get to the bottom of it. Did it land?

But news of earthquakes, anti-government protests, ruthless shootings, and all other news may eclipse this one, unless friends from outer space land.

Wednesday, April 14, 2010

I vs We

Watch out IPad,
WePad is coming soon.

Everyone is so hyped up with the IPad. Look at the number of media coverage. Yes, this is a revolutionary product... The laptop is here for decades but it is hard to work with it without a desk with the attached keyboard, really.
Nobody cares if Dell or Sony comes up with a leaner meaner laptop... because it is still a laptop. It takes innovation to catch attention. Well tablet PC thing is nothing too new idea either. I am not sure why earlier products didn't catch much attention, maybe it is too bulky and is just a twisted laptop... The innovation is not great enough. But look, Star Trek people pretend to be using tablet devices for decades! Someone should have thought if that is feasible.. Ok I can tell you this: warping is not so possible.

If it is an Apple product, it will be hyped. The only failed Apple product that I know of is the Apple Newton...

That WePad... the name is a copy cat! and they copied it in a bad way. The WePad producer don't get it... it is the "I" that matters. It is a personal product. WePad? IPhone users don't plan to share their *I*Phone with you.

To beat the iPad, you need something even better, with a even cooler name.
Apple Newton's rival name should have been... Liebnitz! (Calculus students know what I mean)

A good Apple iPad's name? Um,... How about MyTablet? Ok, it isn't super good name, but I think it is better name than WePad.

Sunday, April 11, 2010

Chinese Python

While looking at some programming links I came across Python (which I have looked at briefly a few years ago). It another C-like language with its own syntax and of course its own unique features. This language has no blocks! No braces or 'begin' or 'end'.

ANY programming language like these just takes a while to get used to. Employers: don't doubt my ability.

Structured languages (C,C++,Pascal,Java,etc, that you compile) and functional languages (LISP, Scheme, etc, that gives you an interactive console read-eval-print) used to be completely separate things and the modern trend is: mix them up like making shrimp fried rice. Examples that I know of: Ruby, Python, Groovy.

People loves lists, maps, and nameless (lambda) functions! Ok, these things are nothing new. LISP has these in the 60s. The traditional types int,char,arrays in C/C++/Java are simply not trendy enough it seems.

A particular interesting thing I saw is
Chinese Python.

With Unicode, programming languages is not English only! But, English is the best universal language for programming. It is slower to type up Chinese isn't it? And, Chinese is only readable by your Chinese programmers, unless you pipe it to google translate or something. Portability has always been a goal of programming language isn't it?

Saved it in ANSI-mode instead? Boom, all your Chinese code becomes question marks.

Observation in the sample Python code in wiki.

你认为中文程式语言有存在价值吗 ? (Do you think Chinese programming languages has some values?)
"不然" is so old school term (I like it).
My take is this: 中文并没有作为程式语言的价值. (No, Chinese does not have value as a programming language)

Last note: Please don't name languages after fearsome looking animals like snakes, asp, or Python.

O'Reilly would of course put such fearsome looking thing in the cover of their books.

Wednesday, April 7, 2010

Supply Side Solution to Healthcare

Why is health care even a topic of controversy? The problem is this: no one is able to afford it without insurance. See a doctor? Boom, $200 an hour just to take a look at you. Need some medication? Boom, another $50. Got longer term problems? Need a surgery? Boom, at least a few thousand dollars. Need to stay a night at hospital? We are talking thousands a night. Even if your body recovers, your finance won't.

Something is obviously wrong here: outrageous expensive! Money hungry doctors and hospitals will say, well we need to pay insurance too! We are afraid that you sue!

Why are doctors so expensive? One day my high school economics teacher asks that. One student replied, "Doctor's work is so important, one mistake you can die, so they deserve that money".
Then the teacher asks, "how did you come to school today?". The student: "by bus?"
Then the teacher says "well, one mistake the bus driver make, you and dozens of others will die". The teacher says, "The answer is this: Supply and Demand, there are more people who can drive a bus than to heal you"

Now this was a great way to introduce the concept of "Supply and Demand" that I still remember after decades.

Ok, there are so few medical school spots that the brightest students fight themselves for.
Anything less than 4.0 GPA? The students will scream in frustration.
How many of these medical students actually want to HELP people? Helping people is just the by-product of the millions of dollars they will make by robbing the sick.

How about this: use that govt money to build more medical schools, train more students, and build more hospitals to let everyone have more access to health care. The "Invisible Hand" will bring the cost down. Make laws to CAP costs. AND, that actually create JOBS.

Monday, April 5, 2010

Internet enabled toothbrush?

People loves to predict the future. See this link for people talking about making an internet toothbrush to track how often you brush.

Sure, the electric tooth brush is a great thing because it can brush faster (and therefore cleaner). Make it a game so that your brushing record is on the internet? Who is going to care and who is going to pay a even more expensive toothbrush? My wallet already dent quite a bit to buy replacement heads of a regular electric toothbrush (close to $10 a piece).

Some (um, naive) people predict the future by applying Euclid's First Axiom. See two points? connect them and ooh there is a line. Yesterday: regular toothbrush. Today: electric toothbrush. Tomorrow: internet toothbrush. Did someone predict long ago that all your home appliances is internet enabled? For example: program your powerful phone to start your oven so that by the time you get home your pizza is ready.

Sure, theoretically possible. But I don't think the human race has reached this point of laziness. And the most important point: people are not going to pay for this minor convenience or make a game out of everything.

Thursday, April 1, 2010

Outrageous comment and fundraising?

The vice president thought he is off microphone and made an outrageous comment


As he was stepping away from the podium, the vice president leaned in to Obama and said, "This is a big f***king deal."


See here for details.

Come on, as a public figure, you just don't use that kind of language. Whether it is or is not a BFD is under endless debate. But it is not debatable that this is outrageous. I think the fellow Americans deserve an apology of some sort.

Oh, and the Democrats are going to raise funds selling BFD T-shirts? Unbelievable.

Then why not lift the ban of profanity words on TV, and let the f-word flow in every conversation. America has just degraded themselves to a bunch of lowly uneducated people.

Got to be April Fool

Google changes name to "Topeka"?


This is their link.

It's got to be April Fool joke of some sort.