How does Elon Musk study?

by Yang Yang on December 13, 2014

Elon Musk
Elon Musk: Tesla, SpaceX, and the Quest for a Fantastic Future

Someone asked this question on Quora. I wrote an answer.

How does Elon Musk study?

People tend to overstate their feelings about somebody. They are usually not as good as we say they are nor as bad as we say they are.

Elon is smart but he’s not so much so unless he has a world-class team backing him up. And that takes money, which comes from his risk-taking business endeavors rather than his ability to study effectively, albeit it definitely adds up.

But still. It’s not about how fast / effective you study but about knowing exactly what to study against a very specific problem or well defined goal.

Elon has a definitive goal that he wants to achieve. This is what distinguishes him from others. Most study for the sake of knowledge, while he studies to solve problems.

This is the reason why it seems he’s more effectively in studying because he solves more problems than we do with the same amount of study.

80% of knowledge and techniques are cool but useless. Elon only spends time for the other 20% that are actually helpful in achieving his goals.

He does the right study in the right amount just enough at the right time just when the problem arises. Anything more is a waste.

Another reason I think why Elon studies well is he smartly modularizes his ultimate goal in smaller milestones that are easier to achieve one by one. Through consistent positive feedback, he has been able to stay motivated all the way, which is another boost to his study efficiency.

{ Comments on this entry are closed }

How to train myself to sleep less?

by Yang Yang on November 19, 2014

Someone asked a question:

I have been trying to reduce how long I sleep so that I have more waking hours available. I have read this question, and this one but it does not really give an answer.

My question is whether I can train my body to sleep less. I currently have about 6.5 to 7 hours sleep per night. If I reduce that to 6 hours every night for the next two months, and then down to 5.5 hours then onward, will my body get adjusted to the new sleep pattern?

When I was 22 and just graduated from college I had the same idea as you do now. As a workaholic who’s passionate about his work (software development) and very determined about his goal, I would keep working until late night and get up very early. The average sleep I got was about 5 hours per day, EVERYDAY, for 5 years, even on weekends. There’s always so much that I could do to make my projects better thus making more money.

For the first few years it was all good and rewarding because I was young and I had the power and energy to keep it going, even on very stressful times. But eventually I started noticing changes with regards to my body:

  1. I started going to doctors more often than my peers.
  2. My vision started to deteriorate, albeit slightly.
  3. I started losing hair.
  4. I started to forget stuff which shouldn’t be an issue before.
  5. Last but the most important, when you sleep less for very long time, eventually you’ll actually sleep less because it takes longer for you to fall asleep and you easily wake up.

So for a short answer, yes you can train your body to sleep less, but do make sure it’s not very long as to years so you can easily recover. It may not be obvious but sleeping less than you body needs DOES undermine your health. However the amount of sleep everybody needs may vary because we are designed differently in genes.

For a long answer, no, sleeping less wouldn’t let you get more things done in the long term. Everything has a price. It’s actually against productivity rather than for it. When I look back how I went through these years in retrospect, I could have not pushed myself that hard but still accomplish the same results. Productivity is about getting the most out of time rather than getting the most time. Lots of people have got plenty of time in their life, even more than they need, still they blow it. In fact, when I was in college, some of the top performing students actually sleep more than the average.

So sleep as much as you want. Time enjoyed is NOT wasted. Sleep is beautiful. Don’t waste it for some stupid things that you need done!

The Road goes ever on and on
Out from the door where it began.
Now far ahead the Road has gone,
Let others follow it who can!
Let them a journey new begin,
But I at last with weary feet
Will turn towards the lighted inn,
My evening-rest and sleep to meet.

–The Return of the King, Book VI, Chapter 6

{ Comments on this entry are closed }

The Rise of Web Bots

by Yang Yang on November 1, 2014

Just gave a read to this article:

Very intriguing.

The Internet is developing just like how the other industries are. Traditional industries try to make products out of the raw materials provided by nature, while Internet is trying to reach targeted information / answers by organizing raw data everywhere. That’s exactly what Google and their bots are doing. People prefer data / information that’s more consumable (quick and easily understood) than raw ones. In this sense, companies who organize and present data / information better than the others would have the consumers’ favor; on the other hand, companies that provide only raw data will be hit more by bots (middle men in the supply chain) and less and less by humans (end consumers).

  • Raw data => structured data => raw information => targeted information
  • Iron ore => refined steel => vehicle framework => Tesla Model S

The more usable, the higher in the supply chain, the more end consumers they get.

This is probably a good starting point for business endeavors. While we can’t beat Google but there are many specific niches that we can probably do better than them. On the Internet, money is about organizing and refining data / information.

Go ahead and organize data so you get something new and easier to understand, and you will make money.

{ Comments on this entry are closed }

In addition to necessary indexes and proper SELECT queries (only select needed columns), for wide tables, 2 basic tips apply well:

  1. Define your column as small as possible.
  2. Avoid using dynamic columns such as VARCHAR or TEXT as much as possible when you have large number of columns per table. Try using fixed length columns such as CHAR. This is to trade off disk storage for performance.

For instance, for columns ‘name’, ‘gender’, ‘age’, ‘bio’ in ‘person’ table with as many as 100 or even more columns, to maximize performance, they are best to be defined as:

  1. name – CHAR(70)
  2. gender – TINYINT(1)
  3. age – TINYINT(2)
  4. bio – TEXT

The idea is to define columns as small as possible and in fixed length where reasonably possible. Dynamic columns should be to the end of the table structure so fixed length columns ALL come before them. MySQL would then have a better time predicting the position of a column to perform select or update, otherwise it would have to read through the entire row byte by byte to find it.

It goes without saying this would introduce tremendous disk storage wasted with large amount of rows, but as you want performance I guess that would be the cost.

Another tip is as you go along you would find columns that are much more frequently used (selected or updated) than the others, you should separate them into another table to form a one to one relationship to the other table that contains infrequent used columns and perform queries with less columns involved.

{ Comments on this entry are closed }

Now that Google Apps closed sign-up for free plans, lots of people are looking for alternatives to Gmail for their own domains. Actually they don’t need to.

You can simply add other domains to your existing Google Apps account as separate domains to set up emails such as The separate domain emails perform exactly like those of the primary domain, with all the good stuff of Gmail, except you can’t do these things with a separate domain.

To add a separate domain to your existing Google Apps account, just login in the admin console and click “Domains” (click “More controls” if not visible) => click “Add a domain or a domain alias” => select “Add another domain” => enter the domain name => “Continue and verify domain ownership”.

After the routines of verifying ownership and setting up MX records, you can go ahead and add users / emails to the separate domain.

In most cases, you don’t need to find a Google Apps alternative this way, unless you hit the maximum number of users per account.

{ Comments on this entry are closed }

PayPal IPN payment_status

by Yang Yang on September 11, 2013

We use the payment_status value in PayPal IPN to determine the outcome of a transaction. There are 6 possible values according to the transaction logs of one of my websites, out of a total of 1132 occurences:

  • Completed – 884
  • Reversed – 100
  • Refunded – 67
  • Canceled_Reversal – 66
  • Pending – 13
  • Denied – 2

For those who are new to PayPal IPN:

  • Completed = You got the money and you can ship the goods.
  • Reversed = The payment was reversed by the other party (NOT you) and you lost the money! e.g. A chargeback.
  • Refunded = The money was refunded to the buyer (probably by you).
  • Canceled_Reversal = The money was again returned to you after it was reversed previously.
  • Pending = You haven’t got the money yet but you probably will after fraud review was done by PayPal or after the eCheck clears.
  • Denied = PayPal denies a payment because god knows why and you don’t get the money.

{ Comments on this entry are closed }

{ Comments on this entry are closed }

Taobao, Tmall, KavoirIf you have solid products and wants to sell to China audience, let us know. We have a very capable team currently running 2 big brands on (for small merchants) and (for medium to large merchants), the largest online marketplaces in China thus far, with an annual sales volume over 1,000 billion CNY, or 200 billion USD.

With CNY appreciating and a widespread distrust of domestic goods, Chinese consumers are seeking overseas alternatives for a better spend, even more expensive, especially from western countries where products are considered greener and better for human body.

Listed below are some of our successful brands on and we’ve been running. We can do the same to yours and make you successful in China. Contact us.

Pandabobo –

A merchant that we are fully responsible for the branding and marketing on It currently tops over 2,000,000 CNY (approx. $350,000 USD per month) sales per month by selling a variety of fruits, nuts and natural snacks.

Pandabobo has also got a full-fledged standalone web store of at which is completely localized and catered to China audience. We can also help you build one of your own should you want to extend your local presence in China. However the most online sales in China are always made via top eCommerce marketplaces such as or rather than standalone websites because China consumers tend to have more faith in bigger brands / companies thus more likely to spend money there.

Check out one of their best selling products. This single product has had nearly 3,000 sales in the last 30 days.

pandabobo tmall sales

KanS –

KanS sales stats on store of a local cosmetics brand based from Shanghai that is raking in 4,767,423 CNY, or $800,000 USD, per month. We make the major part of their marketing team and are responsible for sales channels development and online marketing.

kans @ tmall

Contact Us

Interested in our expertise and talent to be successful in China? We would love to team with you to bring good products to the Chinese audience. Contact us by the form here:

And make sure to include as much information about your business, brand, and products as possible – stores, website, sales volume, pictures, etc.

Our Team

Li Zhiwei, Chen Shuang, Zhang Xiaofeng, Zhao Yang, Yang Yang, and some more. Pictures are coming! 😉

{ Comments on this entry are closed }

To avoid this annoying behavior of Firefox that redirects http://localhost to when you are developing on the localhost, try one or more of the following tips:

  1. Use other browsers such as IE or Chrome.
  2. Use “” instead of “localhost”.
  3. Make sure http://localhost is correctly configured and responding.
  4. Make sure C:\Windows\System32\drivers\etc\hosts has and only has “    localhost“. Comment out “::1    localhost” which is for IPv6.
  5. Disable Firefox web address automatic alternate fixup: 1) about:config, 2) browser.fixup.alternate.enabled = false
  6. You can also disable IPv6 in Firefox or even disable IPv6 entirely at OS level but it’s not recommended. How? Search for yourself!
  7. Should you be debugging PHP, include these at the top of your code to make sure PHP gives the error for you to erase the underlying problem:
    ini_set('max_execution_time', 180);
    ini_set('memory_limit','1024MB' );

I would prefer 2 and 5.

{ Comments on this entry are closed }

How to write page title for SEO?

by Yang Yang on January 27, 2013

I have several writers who write content for my websites. One of the things they constantly have is that they come up with page titles that are not good enough. Sometimes it’s trivial but sometimes it does pose a siginficant problem with regards to SEO.

For example, in this article:

The title is so long with primary keywords pushed far to the end that they may probably never show up in Google search results.

I then asked him to use very specific keywords at the beginning of the title and mentioned that people would never search for phrases such as “the importance of” or “the comprehensive guide to”, etc.

Here’s my follow-up letter to his doubts regarding why and how:

For example, change

“The Comprehensive Guide to Choosing the Right Short Range Airsoft Gun”


“Find the Right Short Range Airsoft Gun”


“Short Range Airsoft Guns – Which one is right for me?”

I just confirmed with Google adwords keyword tool that the monthly search volume for a broad phrase of “comprehensive guide to” is so low that they are pretty much worthless and more so when combined with other keywords at the end yet you are using it as the first few words in the title of this article.

Check out this ranking factors correlation:

The first few words in the page title plays the largest role / has the most impact for ranking a specific phrase in SE. Therefore, writing a very very specific keywords-first title is crucial in writing for the SE and web visitors. A title that doesn’t correctly stand for the content of the article or one that is vague or pretentious is a disaster. For instance, this article is by no means a Comprehensive Guide, so just stick to smaller words such as “How to”, “My Advice on” etc. and better not too long as they are taking precious space in the title, especially the leading part.

{ Comments on this entry are closed }