Wednesday, November 5, 2008

Election Results

My respect towards America increased today. Whether Barack Obama has all the potential to lead country or not, people are able to think out of the box and ignore the race and other prejudices to elect him. Great!

Tuesday, September 16, 2008

Hurricane names

Having seen hurricanes Gustav, Henna and Ike on news recently, I googled to see who names them and what the selection criteria is.

U.S. National Hurricane center keeps six lists of names, with one list used each year. Each list has one name for each alphabet. When they ran out the list, they will use greek letters like alpha, beta etc. Lists are recycled every year and deadly storms will be replaced with different name from list.  That is good rationale. I once watched a scary documentary on camile hurricane. Yes, people definitely do not want to hear about it again.


Sources:

Saturday, August 30, 2008

Video broadcast formats

It is hard to remember and keep track of various media/formats for video. Now a friend of mine gave this link, I see apple's nice page for broadcast formats. As more and more video formats are introduced every year, it is one year old but useful.

Thursday, August 28, 2008

Insight in Usian Bolt sprint

I watched spectacular 100m run in 9.69 sec by sprinter Usian Bolt. I became curious in sprint techniques and training. I got several doubts like, what is humanly achievable target (As Green did 12m/s for a 10m split, so can it be done in 8s for all 100m), why are women always behind men in sprint, why do they say hight is negative point in sprint, why is that all short distance runners are strong built, but all long distance runners are lean people, and why can not runners can get all medals on track compared to swimmers winning six to eight gold medals etc.

Stride rate vs. Stride length: Speed is stride rate multiplied by stride length. Improving either one of them makes a runner faster. Usian bolt is taller and is able to finish the 100m in 41 strides (41 right leg steps and 40 left leg steps). That is around 2.5m per stride and 4.2 strides per seconds. Silver medal winner took 45 strides and completed in 9.89 seconds. His stride frequency is 4.5 strides per second. His frequency is faster, but could not match the Usian Bolt because his stride length compensated him much more.

Impluse and strength: Runner has to hit the ground harder and to rebound and run faster. However that strength also reates backward friction on the ground and reduces the speed. Trick is to use more force, but less impulse. Impulse is calculated physically as force multiplied by time the force is applied. So the player has to hit the ground for shorter duration and contact time.

Disadvantages of tall person in sprint: Starting position will be uncomfortable. Pickup from stand still and balancing takes some time. Taller person tends to have more weight and so ground and air resistance will be more. So Usian bolt had to use more power to succeed.

Advantages of strength in sprint: Extensors in hip, knee and ankle are helpful to get long stride. The more force the sprinter can hit the ground with, the more faster he can move. The more faster the muscles can recover, the less fatigue sprinter faces. It is difficult to keep the speed achieved without strength.

Sprinter needs the following and training improves each of them.
- good posture and fast pickup
- able to accelerate till the maximum speed is achieved.
- fast leg speed
- large stride like raising knees higher
- fast and equal in flight and ground contact time.
- speed endurance for the last 30m.
- less energy consumption like keeping torso straight, reducing ground contact time.

Phases of sprinting: Startup speed for fast sprinter is around 3mps. It reaches around 5mps after 10m split, 8mps after second split, and reaches 11mps after 50m. Some sprinters are able to increase speed up to 70m, and some could not. Most sprinters after this de-accelerate, but only few can manage with the same speed. The last portion needs speed endurance.

Short distance runners for 100m or 200m need quicker speed acceleration capacity, and long distance runners for 400m, 800m or more need more speed endurance.
Long distance runner needs
- Larger oxygen intake - VO2
- Larger lactate threshold - 80% of VO2
- Exercise economy - less amount of oxygen need for same speed.
A taller or huge runner has hard time to achieve all of these qualities needed for endurance.

More details later.

Reference books:
* Physiology of sports
* Physiological aspects of sport

Tuesday, August 26, 2008

Flash internals, security and inside look

SWF (Shockwave video files) and FLA (flash video files) are every where now. Adobe/Macromedia provides good software, but was also smart to get their plugins on all most all computers by default now. Most websites are designed in flash format. See flash file internals for the file format and details.

However if I want to do any thing sophisticated like dynamic changes to images or movies, I have no control. The reason claimed is security and sandbox. Well, it is secure (not completely though, see flash problems) from browsing point of view assuming that providers are really careful and not harmful to users. It is very difficult to create secure movies (with no breaches on user computer). Coming to why I looked at flash internals, it is equally difficult for creating private(with ownership and secrecy) flash videos. Solution is not going to some other apple or microsoft technologies, but to have open and secure protocol so that others can extend. It is proprietary and there is no way other than waiting for Adobe to come up with secure extensions.

I see announcements about their new protocol RTMP recently. Common sense says it is no more secure than obscure. It just seems business strategy to keep people locked for some more time and also to buy their new servers. We either need alternatives like open source or corporates with open standard protocols like HTTP and RTSP.

Monday, August 25, 2008

Same origin policy

After reading all those cross domain attacks, I was wondering how the browsers are protecting naive user from the cross domain manipulated page displays from scripts. The reason it works is because all browsers follow same origin policy. The same origin policy prevents document or script loaded from one origin from getting or setting properties of a document from a different origin.

More details on single origin policy on google help pages.

Wednesday, August 13, 2008

Flash cookies - good and bad

I delete my cookies once a month or so. I do not care my session experience for more than month, and also my tastes change over the time. I am watching Olympics and visit sports website frequently now a days, but I do not want to see any ads and popup ads for fitness in coming weeks or after month. I deleted cookies, and visited some other website. I got similar ads after deleting cookies.

It is sure that both the websites are using same advertising company. However there can only be two reasons why I got the same ad. That advertiser has nothing else to show, or he tracked my behavior even after my cookies are cleared. So I did little research and found that there are some other cookies allowed by flash which comes installed in all browsers as part of Adobe's business partnership with HP and Dell computers.

Those cookies may be giving me better user experience in filling forms or giving contextual user experience, but why did it allow the tracking websites without telling me? That is also 100KB per website compared to 4KB browser cookies. Some bloggers were even saying that some websites are using flash cookies and restoring regular cookies from them, since most users are deleting regular cookies. I am not sure how much truth is in those fears, but I deleted all my old websites and allowed only few trusted sites like youtube, amazon and google. I googled around and found that I can change my settings.

Visit the control panel for flash related global storage settings and set the limits or disable all websites to save some information.
Visit the page 
Controlling storage for visited websites
 and see the websites that have already have saved information, delete the ones you do not want or delete all.

Sources:
Flash cookies explained
Local Shared Objects
Local Shared Objects(LSOs) details from wikipedia
Webserver cookies threaten privacy

Friday, August 8, 2008

netcat useful examples

a. Transferring file between machines using client and server mode
server machine:
$ cat myfile | nc -l 9898

$client machine:
nc serverip 9898 > myfile

b. Port scanning
$ nc -z 192.168.0.1 80-90

c. Connecting a webserver
$ echo -e "GET http://www.google.com HTTP/1.0\n\n" | nc www.google.com 80

d. TCP proxy logging everything between server and client

$ mknod backpipe p
$ nc -l -p 80 0<backpipe | tee -a inflow | nc localhost 81 | tee -a outflow 1>backpipe

e. remote shell
$ nc -l -p 9898 -e /bin/bash

f. Chat application
my machine
$ netcat -l -p 9898

your machine
$ nc mymachine 9898

References:
http://www.stearns.org/doc/nc-intro.current.html
http://www.g-loaded.eu/2006/11/06/netcat-a-couple-of-useful-examples/

Saturday, August 2, 2008

World and India rice production

World produced 425 million tonnes of rice and consumed 424 million tonnes in 2008. Total world exports are around 27 million tonnes. India produced 92 million tonnes in crop year 2007 and 96 million tonnes in 2008. It consumed 85 million tonnes in 2005, 88 million tonnes in 2007 and 90 million tonnes in 2008. India exported 4.5 million tonnes in 2006, 5 million tonnes in 20007 and only 3 million tonnes in 2008.

China produced 129 million tonnes, consumed 128 million tonnes in 2007. It consumed 135 million tonnes in 2006, and the reason for decrease in consumption is because people started eating other food.

It is expected that India needs 128 million tonnes for domestic consumption by 2012. Indians consume 80 kg per year per person. In china, consumption is 90 kg per person per year.

In addition to India and china, U.S. exports 3.5 million tonnes, Thailand, the largest exporter exports 9 million tonnes of its 18 million tonnes production and Pakistan exports 2.9 million tonnes of its 5.5 million tonnes. India and China will not be able to export as their population is growing and their production is not increasing rapidly. India and china maintained carryover stock of 50 million tonnes for future use and the total world stock of rice is around 90 million tonnes.

India uses 5.6 million hectares or 13.8 acres of land for rice production, where as U.S. uses 2.6 million acres of land.

India banned export of rice since March' 2008 to mitigate effect of global food crisis on it. However this can contribute little more to global food crisis and price rises in rest of the countries.

Sources:
Bangladesh rice prices effected by India
Good forecast and rice export ban
India may lift ban on rice export in four to five months
India rice productivity analysis
Rice production by state wise in India
Rice production by country.
The truth of trade about rice

Sunday, June 29, 2008

TV Ratings

TV Ratings are determined from the data collected from sample viewers.

Ratings: TRP(TV Rating point) is percentage of TV users watching a show out of total TV users at one point of time. TRP is reported as rating points/share. Share is the percentage of viewers of one show among the people viewing any channel at the same point of time.

TRP 9.0/15 for a show means 9 out of 100 TV owners are watching the show, and 15 out of 100 TV viewers at that time are watching the show. In a sample of 100 TV owners, 9 people are watching the show and 51 people are watching other shows and 49 people are not watching any show. See the ratio  9/(51+9) = 15.

GRP(Gross rating points) is averaged sum of all TRP numbers across all channels for some advertisement. Reaching 100 GRP is target of an advertising campaign.

Sample selection: Agency selects random people as part of sample based on some criteria. National readership survey document that lists user geography, access patterns and income groups is used in India. Selected people have choice to opt out and sometimes they will be given small monitory gifts for participating.

Methods to collect: Dairies, people's meters, picture collectors, SMS messages, cable and tivo software.

Methods to report: Hand tally, automated by software or mixture of techniques.

Dairies: Agency sends dairies to people log the channels and viewers on daily basis. Agency represenatatives collect dairies on weekly or monthly basis from people and manually prepare survey results.

People Meters: People's meters will be installed near the TVs at selected homes. They monitor the channel frequency and stores the information. Collection is done periodically by humans or by remote server on dailup connection. Some cable operators may change frequencies of individual channels and so it may cause discrepencies.

Picture Meter: Meters also record signals of picture for small durations so that they can be matched with channels later by humans.

Indian TV rating agencies: TAM (Television audience measurement,), also called as INTAM, a joint venture of Neilson's Media and Kanter Media provides weekly results based on some six thousand people meters. DART(Doordharshan audience ratings) is dairy based system used by Doordharshan to measure audience. Daily reports are provided by aMap(Auidence measurement and Analytics Private Limited) using daily automated collection of results from people's meters.

Foreign agencies: Neilson's Media and Arbitron in USA and BARB (British Audience Research Board) in United Kingdom are few to list.

Statistics: Number of channels in India is around 300. Indian ad market is $2B worth and advertising market in USA is $150B, and growing at the annual rate of 15%. Number of household TVs are 100 million is USA and 70 million in India.

Reference Links:
TRP contentious rating and history.
* aMap offers real time data.
* Ratings in USA: Nielson's Media TV Ratings.
* Ratings in UK: British Audience Research Board.

Saturday, June 28, 2008

Gas price per day is more expensive than car rent

I spent 30$ for rental car, but paid 34$ for refilling gas for a small trip to city. I did little search/research on Google.

Possible reasons for increase:
* Production is sligtly lesser than consumption. Production in venuzula and Iraq reduced world production by a slight margin. Consumption in Asia and Africa slightly increased.
* Weak economy and dollar got devalued.
* Speculation and arbitration compounding with war and political instabilities.

Present price decomposition:
Gas price per gallon: 4 dollors.
Crude oil: 3 dollars.
State and federal taxes: 27 cents.
Refining costs: 40 cents.
Transportation, distribution and marketing costs: 24 cents.
Station Markup: 10 cents.

Consumption: US consumes 20 million barrels of total oil per day, that is 420 million gallons of oil, and uses around 200 million gallons of that total for motor gasoline. Assuming average vehicle mileage is 20 mpg, it is used to drive 4 billion miles per day. There are around 200 million total vehicles in use. So each car drives 20 miles a day, which is reasonable. World consumes 85 million barrels per day, and china, Japan, India and Brazil consume 20 million barrels per day. These countries are growth rate per year is 8 percent and is expected to grow.

Supply: US produces around 8 million barrles per day of its need. It imports around 4 million barrels from Arab counties, around 4 million barrles from Canada and approximately 4 million barrels from Mexico. Arab countries produces around 9 million barrles per day and all countries together produce around 82 million barrles per day. Supply is lesser than the demand, but oil reserves compensate it. There is no shortage of oil for half decade or so, and infact countries started investing in producing more oil.

Refinaries: Important factors adding to cost are operating cost, distance to refinaries, fedaral and state laws for minimal quality of oil and cleaner burning standards add to cost.

References:
* How gas prices work.
* The future of oil.
* vechicle statistics in US.
* Oil supply and consumption
* Oil production statistics
* Oil reserves in world
* Fundamentals of gas price increase.

Monday, March 17, 2008

Frogs

Frog in well syndrome:
A situation of individual who cannot or refuses to see the big picture because of being sheltered and closed minded. A frog that was born and has been living in well is very happy and satisfied, and does not want to see outside and does not know beauty and comfort of the outside world.

Boiling frog syndrome:
Situation of the people that they will not be aware of gradual change as long as they do not suffer a catastrophic loss. A frog can be boiled alive if the water is heated slowly enough. It is said that if a frog is placed in boiling water, it will jump out, but if it is placed in cold water that is slowly heated, it will never jump out.

Dancing frog syndrome:
A problem that occurs on a computer that will not reappear while anyone else is watching and
something that happens only when you are watching. If you try to show somebody else, it doesn't happen. This is derived from a cartoon in which a man discovers a frog which can sing and dance and thinks he can make fortune by showcasing it but does not perform before others.

Princess and frog syndrome: Condition that everyone has some power inside that is not released until kissed or nurtured by someone. There was a princess who reluctantly befriended a frog and kissed it, which made it magically transforms into a handsome prince.

Sources:
http://en.wikipedia.org/wiki/Boiling_frog
http://dictionary.reference.com/browse/dancing-frog
http://www.cdot.org/history/Folktales/Little_Frog.htm
http://www.silcom.com/~joy2meu/Love5.html

Friday, March 7, 2008

Age of sun and other information

It is not possible to determine the age of single star. It is done by comparing with other stars in the same galaxy. Stages in life of star are Gas cloud, Proto-star, Stable star, Red gaint, Planetary Nebula and Remnant. Sun is 4.5 billion years old, and will last for another 4 billion years in the present form of star.

Sun is 150 million km away from earth, and is as bright as 4 trillion trillion 100 watt light bulbs. Sun is full of gas and rotates in 26 to 30 days depends on the position of gases. Sun is 20 times hotter than earth.

Sources:
Solar Facts
How old is sun now?

Thursday, January 24, 2008

Maisha iko sawa na trust

Funny and effective condom commercial


It conveys so many messages and at least two good things I can think of.
* Comes in handy.
* One size fits all.

The real meaning of that sentence is "Life is fine with trust".

Background lyrics in video:
"It is kind of funny how life can change.
Can flip 180 in a matter of days.
Sometimes love works in mysterious ways.
One day you wake up gone without a trace.

One love for the mother’s pride.
One love for the times we cried.
One love got to stay alive, I will survive.
One love for the city streets.
One love for the hip hop beats.
One love oh I do believe.
One love is all we need.

One love for the mother’s pride.
One love for the times we cried.
One love got to stay alive, I will survive."

See the original youtube One Love Video.

Saturday, January 5, 2008

Salt production in India

Salt is not only a need for human body and tongue, but also is one of the reasons for human advancement. Salt seasoning made us independent of seasonal availability of food. It is used in textile, glass, soap, fertilizers, medicine, leather,  and many food industries. Accidents after snowstorms will be decreased because of the salt.

Saltpetre was only next bigger item to cotton and spices in East India company's business in India. There were times salt played role in politics and wars and even people are payed in salt instead of money. The word for salt comes from Latin word for salary. See salt history page at wikipedia.

India is the fourth largest country in salt production, with China and US contending for the first place and Germany being the second. [ update Jan 10th 2014: China is topper and produces 22% of the world production, US is second and produces 14%, India with 8% crossed Germany's 6%. ]

India produces 16 million tonnes yearly [update jan 10th 2014: India produces 24 million tonnes]. Households consume 8 million tonnes and the Industry consumption is 6 million tonnes and the rest is exported earning 2000 crores. Among the 11 salt making states, only three states, Gujarat, Tamilnadu(mainly because of Tuticorin) and Rajasthan(mainly because of Sambhar Lake) produce surplus salt than they consume. Gujarat produces 11 million tonnes or 71% , Tamilnadu makes 16%, Rajasthan makes 9% and the rest of other states make 4%.

Environmentalists say now that salt production will be in problems again. See video about pollution in Gandidham salt and news about salt going black. Gandhidham, salt capital of India, alone produces 5 million tonnes of salt every year. We do have Salt Institute and I do not know what their reaction is to the situation. I wish they publish annual statistics at least on their website.