Sunday, April 29, 2007

so why kids well being is always after the convenience of officials in China?

It was such a shame, a fire in Kelamayi, Xinjiang (Uyghur ) province in China, happened in 12/8/1994, took away 288 best of the elementary and junior high school students' lives. Whats more shameful, was that haunting voice in the chaos and panic, "kids, please let the city official escape first". Thrity five teachers died, most in postures covering their students under their arms. All city officials were safe! What a stunning and heart wrenching record. Here is a link to that saga 12 years ago (in Chinese) http://www.rhineblue.com/?p=48

It is revealled lately, http://blog.sina.com.cn/u/4cddcfb50100087p, that 2 years ago, precisely 9/15/2005, in Danfeng county, Shaanxi province (China of course), there was show at some festival, when it was raining that day. Some 100 elementary school kid were set sitting right in front of the honor seats, for the county officials and local celebraties. The kids were instructed not to umbrella, so that the audience at the honor seats won't get their sights blocked. The show went on for over 2 hours in the rain, which is how long the kids sitting there wet, soaked, uncovered, and shivering. Apparantly no one cared.

A culture that bullies its kids, treats the weak like nothing.

确实令人拍案叫绝。
第1是老师。马屁拍得不惜代价,哪怕是国家的未来。一副奴才相。 事实是,如此为人师表,岂是不耽误国家的未来??? 国家且不提,这些孩子自己的未来如何? 如此“老师”,连孩子的健康都不关心,何以关心他们的成长? 做这样的老师,亏心不?当孩子们叫你老师的时候,脸红不? 如果您的职业是屠夫便也罢了。 但您想没有想过您是个什莫东西? 想一想好不?
我不知道那些领导同志们只不知道为什么孩子们没有遮雨。如果不知道,情有可原。但,我同样不知道那些领导同志们看没看到孩子们没有遮雨。如果看到,天理不容!如果没有看到,混蛋逻辑!当然,并不是每一个领导同志都是有头脑的。我尽量担待。但没有头脑,也没有良心不成?
哦,贾平凹。曾经满羡慕你的文笔。但只有文笔,没有头脑,更没有良心,你恐怕还不及一个酸臭文人。你最多也只是个文,但终究不是个人。 可惜了。

when does a 32 bit overflow?

A very interesting self experienced, sw engineering related case, I like to share with you….

What I had was a super long avi file, from a trip I took many years ago. It is on my hard drive, and I was trying to back up onto DVD discs, and free some space on my pc. The file was 44.5 GB in size. Not a 20 hour mpeg*, but a 5 hour avi, since any mpeg encoding would be a lossy process. And I like to keep the original quality. Anyways. All I thought I had to do was to cut 44.5 gig into 10 to fit into 10 DVD discs, at 4.45 a piece on a 4.7 gig disc. No brainer. Just time to burn. Finally all done. Smart of me to have checked before deleting the source files on my hard drive. All 10 discs are corrupted.

I don’t think anyone will be interested in my debugging path. So cut it short, after rebooting the machine, downloading and trying other burner programs, comparing the size of the successful discs, and more, I pulled out the calculator. So when does a 32 bit overflow? 4.295 gig. Maybe I should have known it by heart, but shame on me.

So here is what it tells me. The burner driver must be using a 32 bit unsigned to keep the size of each file on disc, which is why it corrupts my 4.45 gig file, but not my 4.276 gig file (how lucky was I with this one… a less than 20 MB margin made it a good burn without me realizing it). But it must be using a 64 bit to keep track of the total size of all files on disc, which is why it did not have problem with my other disc, with 5 files on it, totaling to 4.64 GB, but each one is smaller than 2^16.

After all, all I had to do was to cut up the file into 20 pieces, instead of a single 4.45 gig file on a 4.7 disc, have 2 files at 2.225 gig each on a disc.

The moral of the story? A 32 bit might not be large enough for DVD discs. With technology going forward, blu-ray or then bigger media coming along… Does it remind you the y2k problem?