No public Twitter messages.

Archive for the ‘I’m learning’ Category

Coding standards

Monday, April 13th, 2009

For a beginner of programing, it's a good habit of writing codes in standard format. There are different rules in different companies/teams. Better than form your own, follow a standard of a popular application could be easier and more acceptable by people. For example, the WordPress Coding Standards and Inline Documentation.
Some good approach I just learned from it:

  • When doing logical comparisons always put the variable on the right side.
    I saw this in some codes, now I know why: If you forget an equal sign it'll throw a parse error instead of just evaluating true and executing the statement. It really takes no extra time to do, so if this saves one bug it's worth it.
  • Use real tabs and not spaces, as this allows the most flexibility across clients.
    In some courses, it's suggested that using spaces instead of tabs. Either of they has their reasons. As mentioned above, using the standards of popular applications could be better. And I have already had the habit of using tabs, so I just follow WordPress here.
  • Tabs should be used at the beginning of the line and spaces should be used mid-line.
    Exception for previous point: if you have a block of code that would be more readable if things aligned, use spaces.
  • Ternary operators are fine, but always have them test if the statement is true, not false. Otherwise it just gets confusing.
    1. // GOOD example:
    2. // (if statement is true) ? (do this) : (if false, do this);
    3. $musictype = ( 'jazz' == $music ) ? 'cool' : 'blah';

Unwanted ADs, get out of my place!

Monday, March 9th, 2009

Have used Google Adsense for a few weeks. It was looking good in the beginning. Like what I said, sometimes you can find useful information in the ads. But recently, after adding Chinese version in the posts, more and more unwanted ads come out, including the no sense hospitals and so on, which are not related to my topics at all. Maybe Google is still not so good in Chinese. Though Google provided an AdSense Preview Tool, there are god knows how many unwanted ads waiting to be published. Picking them out one by one is a waste of time. I have no choice but updating the Chinese version in another place.

Getting started with google adsense

Thursday, February 12th, 2009

Previously, I thought only internet rookies would click the ad in web pages. And I was even proud of identifying the ads from the real content. But one day when I was searching some information on web, I really found something useful in the ad provided by adsense. I could not help to click and bang, I got what I wanted. I finally accepted it and started to apply it in my blog. I know there will be much more to do to optimize the ad. To let the ad more helpful to the visitors like what it did to me. I will look into it step by step. This is a start.

37.2℃, the temperature of love

Saturday, May 10th, 2008

37.2℃, the temperature of love

37.2℃, the temperature of love. The campaign was launched from early April. Michael of iriverfans.com,AKA MZ, is the key man of it.

The first event is E100 review, which has been successfully finished. User review is a good tradition of iriver since 2003. It's based on good-quality product. By stimulate the loyal fans' interests of new design, function and so on, it's the best way to make the product well known. It's the viral marketing. Not all members of the website have the change to review the product. Thinking of a slogan for 37.2℃ campaign is the entrance of it. Where there is a competition, there are more people would like to join.
Grape is one of the fans, who wrote a long review of E100, also took nice photos.
E100, taken by Grape

Besides him, there are 4 more

The ongoing event is T-Shirt design competition. Not only the members of iriver.com.cn, iriverfans.com will join in, but also readers of 1626 magazine, members of the most famous online community in China - Tianya, and many students in campus too.

T-Shirt Design event

Powerful UCenter, UChome

Wednesday, April 23rd, 2008

UCHome

Face book made a great success, which shows the attraction of SNS. More and more people would like to run a SNS like that. But Comsenz thinks more. They provided a platform for that. UCenter is such kind of product. Everyone could setup a personalized SNS with it. This world is large society, it's contains uncountable small society, that's where the market of this product growing.

It recalls me the memory of the community we build with a opensource program named JiangHu in university. There's hospital, bank, even jail in it. At one time, it was so popular. Later on, the graphic online game replaced it. With the success of douban, facebook, a new generation of the online community/society has come. It's suitable for corp which would like to get the customers around, attract more and more people with such kind of tool. I'm just start trying it. Really fun. In another hand, running a SNS is not just a tech issue.

Be SMART

Wednesday, April 16th, 2008

S.M.A.R.T. is...

Set Specific Goals

Set Measurable Goals

Set Adjustable Goals/Set Action-Oriented Goals

Set Realistic Goals

Set Time-based Goals