Monday, March 17, 2014

Test results of OurCoders: experiment 001

Some websites need you login to see the content like quora, some websites don't need you login, like Stackoverflow. I think website like quora will get more registration. So base on the method of Lean Startup, I design this experiment, NO. 001.

To all the threads on, if they have more than ten replies, for guest users,  the page will have 50% chance show the origin page, or 50% chance to only show ten replies and show  this information:

It means "This thread have 47 replies, Because you didn't login or register in this website, you can only see ten replies. If you want see all the replies, please register this website or login."

This experiment started at February 16,  and ends at today. This is the statistical data of this experiment.

The data show us, This is 15341 visits in this experiment,  and this two options have same bounce rate, and almost same Page/visit, but option 2 have more registration rate, is the goal of the experiment, so I think this is tell us we can chose option 2 to proceed.

Lucifer effect and China and Culture Revolution

This is a Ted video about the book "The Lucifer Effect". Lucifer is the angel of God, but finally he become Satan. This book is talk about why a good man, a angel can be evil , can become demon, and how.

He designed a experiment, let some people play guards, some other people play prisoners. After a few days, the guards totally accept their character, beat and abuse the prisoners. So why good random  people can easy to become bad guy?

He think it is because power and the system make them bad guy, change them.

I agree him, I think we can't put most people's humanity on a real test, because  humanity is so weak and fragile. We never should put anyone in this kind situation, and cross the fingers.

This remind me about the Culture Revolution. The Culture Revolution is the most ridiculous thing ever happened in China.

In the Culture Revolution, Bo Xilai, the famous former leader in China,  even personal heated his father Bo Yibo.

Song Binbin, daughter of another leader Song Renqiong. She maybe is the cause of death of her high school principal.

Ordinary students and workers use weapon fight each other for just no reason.

Some people was live buried and some people eated by others.

So was the red guards all demon before the Culture Revolution? I don't think so. But why was they become to demon in the Culture Revolution? I think lucifer effect can explain that.

But I am always think there will be another Culture Revolution, because good man turn to bad man is so easy.

Tuesday, December 31, 2013

Yii !!!!!!!

Wednesday, October 09, 2013

Walking all day and losing weight

I am a type II diabetic, and very heavy. From sep 6 2013 to now, I am trying waling all day, and control my food and drink. Almost one month, now this is the result.

I lost weight, my weight lost from 129kg to 120kg.

In the entire September,  I walked 328.42 km, 10 km each day.

Sunday, September 01, 2013

Opensource my mac app : PagerankChecker

Pagerank is a very important indicator of SEO. But many people think on website have only one pagerank, but acturly every page on your website has own pagerank. Some page of your website may have higher pagerank than homepage.

All other pagerank checking tools only can check one page at once, but so many webites have thousands upon thousands webpage. So we want make a tool help website owner to import all pages url to this tool, and let you computer get all page's pagerank.


Sunday, June 02, 2013

How to use shell command analyze website network traffic?

Task: Compare two website network traffic

If you server have mutil website. When network traffic raise, but now very clearly at Google  Analytics which website cost more network traffic, you may want calculate every website network traffic on your server.

First you can find you website log, the first line may look like: - - [01/Jun/2013:13:04:37 +0800] "GET /voice/feed/ HTTP/1.1" 200 8485 "-" "iTunes/11.0.3 (Windows; Microsoft Windows 7 Ultimate Edition Service Pack 1 (Build 7601)) AppleWebKit/536.30.1"  

The number 8485 after  Url and respone code 200 is the network traffic cost of this visit. So If you want know how many network traffic this website cost today, just get all network traffic cost number and sum them will be ok.

So The number 8485 at 10 position if we separate this line with space.

So, we can:

 cat access-2013-06-01.log | cut -d” ” -f10 > traffic.log  

Some line in your website log, may look like: - - [01/Jun/2013:13:04:23 +0800] "GET /favicon.ico HTTP/1.1" 404 - "-" "Mozilla/5.0 (Windows NT 6.1; rv:6.0) Gecko/20110814 Firefox/6.0 Google (+"  

It because this visit is 404 will cause none traffic (theoretically).

Old school admin will use awk to sum traffic.log, but awk is too hard to today people, we will use python.

 import sys  
 lines = sys.stdin.readlines()  
 s = 0  
 for l in lines:  
   except ValueError:  
 print ('%.1fM' % (s/1024.0/1024.0))   

finall, you can run this line to get one website network traffic:

 cat access-2013-06-01.log | cut -d” ” -f10 | python   

Now you can get all your website network traffic and compare them.