Tuesday, June 23, 2009

An interesting debate between an environmentalist and a humanist

This is an interesting debate happened today. While a friend was raising fund to support patients with Multiple Sclerosis, I replied that I actually donate to Wombat Awareness Organisation. Next is the logged message, A is that friend, while B is myself.

A: I walked 9 kms on Sunday 14 Jun to help raise fund to support patients with Multiple Sclerosis.
If you like to sponsor this effort with some spare coins, please let me know. I will go to your desk.

B: Ah I donate to a wombat protection organisation. I seem more interested in protecting nature and wild animals than help human beings, haha

A: Faint ... No comment on your comparison.

B: Human being is so self-centric, this is where all the problem starts, being the supreme intelligent on earth, we should not only care ourselves, but the whole well being. While we are caring about the nature, we are caring ourselves.
You should understand it well from Buddhism philosophy.

I believe in what original Taoism (Lao Tsu and Chuang Tsu) noted, the most crucial relationship people need to deal with is the human relationship with mother nature, not the nasty relationship between human beings. The whole history went through a wrong way.

A: Animals are also self-centric. Wombat never care about human being.
The difference is they still don't have the power to make too much damage.
In a broader sense, saving nature is saving Man.
But it's long term effect; and it can't replace the immediate relief for people who are suffering from any kind of decease.
When you feel sick, you go to see doctor, not Wombat.

B: I would say all living creatures are selfish, they only take care of themselves - that's designed by nature, and it's running well in natural process to keep the balance.

However, there have been no such being as human, who put so many species into extinction - purely for their own well being or benefits. If we don't plan the long term solution, short term relief is meaningless - people soon put themselves into extinction, have you heard some NASA wants to bomb the moon to find water? - a bunch of lunatics.

Womat is sure no much help to human beings, but it's one tiny reflection of the natural protection efforts, we cannot save whales because Japanese keep on hunting no matter what, but we can help wombats if we can raise enough awareness and stop the government from legal mass slaughter - at least things need to done little by little.

Famine, wars, disease are means to balance the world population, and they are inevitable, the small adjustment efforts from within won't help much on the big picture, human world is always changed by lunatics, like Mao Ze Dong.

Wednesday, June 17, 2009

Optimising web page download time - tips and tools

Fast loading pages improve user experiences, it is widely accepted. But along with the proliferation of faster internet connections, web designers/developers put less attention on page file sizes. It presents a serious threat to user experiences and customer satisfaction. Fast page loading time is not only a crucial factor to keep users happy, but also a key factor to elevate your search engine rankings.

Here are a few tips to make your web sites/pages running quickly and smoothly.
  1. Ensure there are no broken path and images on page - they would dramatically increase loading time.
  2. Host files locally.
  3. For images, always specify image dimensions - height and width, most browsers would recognise an image's dimension, leave it to be loaded last if it's heavy, and load the rest of page first.
  4. Make Javascript and CSS external, because they are cached by the browser, but inline JS and CSS get downloaded every time the HTML page is requested.
  5. Combine Javascript files - as a general rule, downloading a batch of JS files is slower than download one big JS file even though the combined file size of the batch equals to the big one or even smaller.
  6. In the same principle, combine multiple images into a single one, the overall size is about the same but reduce the number of HTTP requests.
  7. When designing Flash, rather than designing one big Flash (swf) file, make each flash scene as a separate swf file, and call respective file from the frame swf, depending on user action. In this way, those user uninterested content would not be loaded.
  8. Try use vector graphic as much as possible, and reduce the usage of imported jpg, wmv and other raster graphics. Vector shapes are extremely light weight while raster graphics tend to cluster Flash movies in size.
  9. Preload components. You can take advantage when browser is idle, a simple example, preload an image for a mouse over state. A more advanced usage could be, before you launch a new redesign, users browsers are stuck with caches from your old design. So before the redesign has been launched, some code can be written in your old page, when the browser is idle, the code can request images/scripts which will be used for new page. Otherwise when the new site is launched, all components would be loaded afresh.
  10. Optimise images - use suitable image formats (jpg, png, gif) for different design elements, designers should be crystal clear on this.
There are some really useful tools in optimising page download time. To list a few: