Monthly Archives: August 2012

Language Matters

For some reason, I enjoy learning languages, no matter it is the language of daily life sense, or computer sense.

I can read and write in:

  1. Chinese
  2. English
  3. C/C++
  4. Java (a little bit)
  5. JavaScript (Not to compare it with Hax)
  6. PHP
  7. ASP/VB/VBScript
  8. C#
  9. Propositional Logic
  10. Mathematics

I am looking forward to learn more. Some language I started a little bit (but I put some serious effort behind) are:

  1. Italian
  2. German
  3. Python
  4. Perl
  5. Lisp
  6. Objective C
  7. Japanese

I found how hard it is to maintain two blogs at the same time, one in English, and the other in Chinese. I found I tend to write in Chinese for long enough before switching to English, and vice versa. It is the same in programing languages. To switch from PHP to Python really took me some time these days.

Language is an expression of thoughts. But it cannot be separated from thoughts. I realized when I think of issues in startup, and technology world, I tend to use English in my mind, and when I think of feelings, mathematics, and local matters, of cause my preferred language is Chinese. When I write anything related with web, PHP is still by far the most natural choice for me, but for algorithm, I still prefer C (not even C++). I never liked Java. Never.

Because I swing between languages in daily life, I started to observe the impact of language on my thoughts. Some very long sentences can be easily constructed in English, but not in Chinese. But the spirit of many things can be so concise and precious in Chinese. I just like to use them interchangeably. I also use many English word in my Chinese, just like HTML inside PHP. Because there are many definition and history origins for certain word. For example, Hacker is a well defined world in startup world in English (I mean startup world, and the word hacker sounds scary for normal people who speaks English), but the 黑客 does not translate. I have to stick to that word, even in Chinese.

I hope I can continue to learn more language (Did I mention that I got 900 in the entrance exam for universities in 1995? The score range from 100 to 900). I learn

(sort (1, 4, 2, 3) #'<)

in LISP, and I feel I am a better CEO today when I talk with Joanna. I said:

A company is a sort function, and you have to decide what the second parameter is.

Maybe only LISP programmers can understand what I am talking about.

Aircraft Spotting at Hongqiao Airport

I am not a professional aircraft spotter, but I am also amazed by the scene of an aircraft roars and lands at airports.

The best place to do it I know is at G318 (at K16+). It is easy to find if you follow the 沪青平 highway and you will be guided by the big noise of the aircrafts.

There are lines of this, and flushing one after another, creating a guiding line toward the runway.

Below are some of the photos I took today. Enjoy the big flying machine!

 

Reading Good Code

I read some code by FriendFeed guys. They are great. The Tornado code is neat. You can take a look here:

https://github.com/facebook/tornado

One of the test I ask my developer is, do you feel comfortable to open source your code. If they do, they are pretty in good shape.

ISO 8601

I am genuinely interested in numbers, and specs. I must be the strange person in other people’s mind, but I am just so excited to see things like numbers. For example:

1. CVC 22651

When travelling in California, I really love the CVC 22651 printed on the TOW AWAY plate, and traced to the following document: http://www.dmv.ca.gov/pubs/vctop/d11/vc22651.htm

2. ISO 8601

The smart guys want to solve a problem of how to represent date across the world (both west and east and both computer or human). So they invented something like:

2012-08-20T13:09:16+08:00

and they call it ISO 8601 format.

3. RFC 2616

Maybe one of the most important RFC. It uses just 4 digits to express that. If you are curious, it is:

Hypertext Transfer Protocol — HTTP/1.1

http://www.ietf.org/rfc/rfc2616.txt

The RFC has been there for 30 years, so I was pretty shocked to know there did exist an RFC 1: http://www.ietf.org/rfc/rfc0001

4. 200030

This is pretty simple: the post code of the area I am moving around. I love the idea of postal code, but the way it is presented in China is not so up-to-date. The postal code of US seems more interesting, for example, 94301, or Singapore, where they assign a post code for every building.

5. Other random numbers

The more universal numbers are most interesting for me. For example, the ISBN numbers (isbn:0375420827 for the Art of travel), the mobile phone numbers (13916146826 for me), or even PNR.

Why I am so interested in these numbers? I am still puzzled and don’t have an answer. Maybe that is the inborn instinct of an engineer?

Notes of Hiring is Obsolete

Here goes my notes on Hiring is Obsolete.

Wisdom comes from facts. Everything is getting cheaper. (Computer of the same power? Automated services?) Cost of startup should only be people.

(Nerds have better things to do) => (Nerds are unpopular)

 

if( (Undergraduates are Undervalued) == true)

invest(undergradutes());

 

if((Smart people speaks stupid things) == true)

dont_ignore_people_do_stupid_things();

 

value = people_to_user();

compensation = company_estimate();

compensation = average(values);

 

assert(difficulty(valuing work) > 80%);

 

class bigcompany :

def __init__():

protect_mode = on;

 

def product_development() :

while(1):

improve();

release();

 

We really want to spend the money outside the company on marketing (throw the dollars to a anonymous guy you know will do bad seems wiser to give it to the best people in the company. Why?

Founders run engineering directly, and the rest …

The cage is open. There is no limitation. Blogging is possible in 1995, but people don’t write too much until 2001. It just took 6 years for people to realize the cage is open.

The older you are, the most risk you can take.

 

Elastic Search Solved a Problem

{
  "ok" : true,
  "status" : 200,
  "name" : "Gardener",
  "version" : {
    "number" : "0.19.8",
    "snapshot_build" : false
  },
  "tagline" : "You Know, for Search"
}

These lines of response from Elastic Search at http://localhost:9200 seems so nice. I smiled when I saw this response, and I said to my self: “Hack! Those guys at elastic search really solved a problem.

They defined a problem in their statements, and they solved the problem. Doing a lot of things should be easier and easier  – that is the thoughts of typical hacker. Why should I even need to download something to my server to run search? I may further ask the question. I believe some hacker out there will solve this problem.

You know, for Search

So, we build a web site or an application and want to add search to it, and then it hits us: getting search working is hard. We want our search solution to be fast, we want a painless setup and a completely free search schema, we want to be able to index data simply using JSON over HTTP, we want our search server to be always available, we want to be able to start with one machine and scale to hundreds, we want real-time search, we want simple multi-tenancy, and we want a solution that isbuilt for the cloud.

“This should be easier”, we declared, “and cool, bonsai cool”.

elasticsearch aims to solve all these problems and more. It is an Open Source (Apache 2), Distributed, RESTful, Search Engine built on top of Apache Lucene.

Company

Any company started with an observed problem in this world, and people in the company get excited about solving that problem. If they solve that problem, they created something people want, just like those guys created elastic search, which is what I and Xiaopai wanted.

If you create something people want, you are likely to be fine. People will take care of the monetization problems and others easier than creating something people want. I saw a good model in Elastic Search.

Value of Technology

New ways of doing things, like elastic search takes JSON as input and output, and adapted schema free, and NOSQL type of approach is new way to do search, and that works very well for me.

It is the technology that makes this world better (well, among many other great things), and I am happy to be still back to the technology world.

 

Bad Programmer Destroys Wealth

After code review, I understood why people say bad programmers destroy wealth. Their productivity is less than 0, which means they are creating bugs and drag the team to fix it. I consistently saw really bad and buggy code here and there, by one programmer who is not at our company. But the code there is guaranteed to be bad, and buggy. Interestingly, bad programmers are very productive if you measure by lines of code they created. So identify them! Early!

Typhoon is Over

This year’s Typoon is over in Shanghai. Actually some nice changes happens this time.

Typhoon hits Shanghai almost every year. Although not seriously, it does impact the lives.

This year, the biggest difference is not the typhoon itself. Yes. It is stronger this year, but the biggest difference is the government.

The Beijing’s heavy rain claimed lives of nearly 100, and Shanghai government acted very proactively. They started to use the post-SARS type of effort to inform residents about what is coming. They also shutdown parks and some public events. At least, this time, due to the recent pressure of the press, and Internet, they are doing reasonably well.

For sure there are many concerns about what they did – they claimed that being late should not be regarded as being late for businesses, and many other measures. I think they may over used their power, and no one granted that type of power to government. (Well, if we have a congress or local city council, I may vote to grant that power, but so far, there is no documents saying so). Having said that, I still applaud for what the Shanghai did, because it is the first step to “doing something” instead of wait passively about what is happening. By “doing something”, it may cross the line, but a very good starting point.

Yesterday was obviously the heaviest rain in recent years, but it was not that bad based on my personal experience. STRONG DISCLAIMER: I didn’t see flooding does not mean there is no flood, but equally important is, I cannot claim flood if I don’t see it personally. That is just the difference of perspective, and we need to put the information together. I am bringing my piece here.

There are several leaks in my house, and I have to swipe the floor from time to time. But compared to what happened in Zhejiang, it is just nothing.

 

Learning Git

I am learning GIT.

A new frontier for me to learn. GIT.

Technology is actually driven by tool makers. Think of the few generation of advancement: Weaving machines in Florence, Herring cutter and commercial boats in Holland, stream engine in English, electronic and information technology in US – all of them are tools. The advancement of tools help human develop and advance.

GIT is such a tool. I started to use version control with SD (SourceDepot). That was a very good tool developed back in 198x, before git appears in the horizon.

If you want to predict which technical company will win, check what tool they use! If a company start to lose in the tool front, it is losing in many front.

 

Nanjing, the Capital of a Republic

A danger of travel is that we see things at wrong time, before you have the opportunity to build up the necessary receptivity so that new information is as useless and fugitive as necklace beads without a connecting chains. – Alan de Botton

This time, I visited Nanjing during the weekend, and I had some preparation to get the receptivity, and tried to use a connecting chain to guide what to see. The topic will be the government of Republic of China, a historical term in mainland China, and a current term in Taiwan.

I went to the following places:

  • The presidential palace
  • The Executive Yuan
  • The Legislative Yuan
  • The Judicial Yuan
  • The Control Yuan
  • The Exam Yuan

They are scattered into different places across the city, but to follow a path to visit every single one of them makes a great day.

Nanjing is a city with great histories. Many of the memories were painful, just like the feeling of Berlin. It is also moving very fast. I didn’t expect to see a building 450 meters high (due to my ignorance, I didn’t know that). Many years ago, I would say Hangzhou is a much better travel destination than Nanjing, and now I rediscovered the city and claim it to be better to spend a weekend than Hangzhou. Here is why.

  • Nanjing is only 1:40 hour away from Shanghai. Hangzhou is less than 1 hour but the difference is not big.
  • There are 70 G-trains between the two cities everyday, making it more convineint to get there. The fastest train is only 1 hour and 15 minutes.
  • Nanjing was capital of 6 dynasties, and the recent Republic of China. There are a lot architect and stories there. Hangzhou is a little bit less “historical”
  • Nanjing’s transportation is amazingly good. The two metro lines (one connects at the Railway station!) completely beats Hangzhou. It was nightmare to wait for taxi at Hangzhou railway station.
  • In the recent years, Nanjing suddenly became more modern than Hangzhou, with some very nice shopping malls like Deji Plaza at Xinjiekou.
  • The mountains of Nanjing is more approachable.
  • For many people in Shanghai, Nanjing is obviously a less visited city than Hangzhou, so worth the time.

I will visit Nanjing soon during weekend. A weekend escape in Nanjing is just a very good experience for me – high-speed train, Hanting Hotel, plus Metro tickets are good package for me.

Drawings of Interiors

Let me continue to post my drawings in Italy. This time, the topic will be interiors of buildings. I drew something of what is inside of a building.

Below: The terrance of the hotel (MMV Resort) in Cannes.

Below: Tino steak house in Firenze. Drunk some wine, and was not really conscious at that time. You can tell from the messy strokes.

This one was even worse. I was almost completely drunk, and I am impressed that I could still draw something in that mood.

The Terminal 3 of Dubai Airport.

Like it?

Confessions of a Failed Programmer

I love to write code. That is not a good news for a CEO who has a business to run, but I just cannot stop loving writing code!

Why?

The story started in 1986, when I was in grade three in primary school. There was a small computer calendar booklet in my home, among tones of others on electronic engineering.

I read it and was amazed by the idea that computers were so smart that they can calculate 1000 times faster than human brain, but at the same time, they were so stupid that they could only do very limited plus calculation at the bottom. That was the early years of my exposure to computer. The lesson learnt is, if you want your kid to grow into some type of people, just buy some books on the topic and put it within the reach of the kids. See what happens!

I first seriously learnt BASIC when I was 12 years old, taught by my older brother Jianzhao in winter of 1989. BASIC was not that hard to learn for a kid, although the concept

i = i + 1

was actually a valid expression puzzled me and almost failed my math test. I went to my parent’s office to use the IBM terminal to run BASIC programs during the summer holiday. The green characters on black screens were just amazing. When I understood that the terminals were all hooked into a central computer 10 floors down the building, and the CPU time was allocated to each terminal in very fast circles, I just feel like, in Matrix!

Although my chance to use computers ended from that winter, I just kept writing code on papers days and nights for the coming summer. I still have a big box of paper with all the BASIC codes on it – pages after pages. Those codes were never run on real computer, but I read it and run them on my brain again and again, just like people reading novels today. Among them, the most complicated one was a computer game “Policeman vs Thief”. The game was re-written in C 10 years later on a rented PC in my dorm, which Wendy praised: “Cute!”.

The passion for programming was pressed in middle school when getting into university was the only goal. I lost 6 years of golden time that may be valuable to become a great hacker. Lesson learnt: Why there is no Linus, or Jobs, or Gates in China? The most creative and passionate time one can have for one thing, say, piano, drawing, writing, or in my case, programming, was wasted to compete with each other to get the keys to secure a job!

The renaissance of programming came when I got to university. I spent hours in computer labs, skipping a lot of classes, programming in C and IPX/SPX protocol. In my graduation essay, I choose to write a workable SQL database starting from SQL parsing, to storage, and a little bit indexing and serving. The professors never got really interested in what the hack the 300 pages of paper were. I am equally not interested about they said. I did just for fun.

But, I have to say, university was just too late for anyone to grow to be really good hacker. I went to work for Microsoft for few years, where I think the best programmers in the world gather at that time (1998), but that was not the case. Till now, I would say, I am still an OK programmer at most, despite of the passion. The lesson is, programming is also like piano. It must start early, and to spend enough time before university. Now, I am still very attracted by python, and similar code, but it is more like my own way of enjoy life. Drawing and coding are my equivalent of movie, massage, watching TV or reading novel.

That is my brief story of coding – a failed case of someone who loves code but switched path along the way, and failed to be a great hacker. Here is the lesson I learnt and I hope it can be helpful to build a great hacker.

  • Give kids the opportunity to expose to as many things as possible
  • Do it in small ways, like throwing a book on the floor. A rat will bite the cake, and a cat will be attracted to fish. You don’t know what your kid is.
  • Release the pressure for near future, so the kids have time to work on life long goals.
  • If you have something you love to do, stick to it, and be confident that you are right. Others are just not you.

 

Drawing of Nature Series

After drawings of churches, interiors, streets, this series is about nature – the trees, sea, and mountains.

This is at Milano, the big part near the fort.

A sketch of the Mediterranean at 5 Terra, Italy.

This is the view from top of the mountain, where our B&B hotel is.

 

Subtle Impact of a Scheduled Meeting

I am trying to do a full day black out on Wednesdays. It turned out, because of previous appointment, there is one meeting slip to the calendar, so I have take the meeting at 2:00 PM.

Having been super effective this morning, and facing an approaching meeting, I am aware of the psychology change. I started to loose productivity about 10 minutes before …

(Bing! Here they come and interrupted my posting and now the meeting is over)

See? When I switch back to the writing mode, it is completely different. The flow of thought was gone, and I don’t have ways to get them back. It takes at least half an hour for me to get back to the interruption point. So, just be very aware of the cost, and in the future, don’t schedule 2:00 PM meetings, and don’t schedule any meetings on Wed.

Reading Note on Richard Hamming’s

Below is a reading note on Richard Hamming’s lecture: You and Your Research.

Age: Why most productive things were done young? One of Richard’s explanation was: “If you do some good work, you will find yourself in all kinds of committees and unable to do any more work”. That is the first problem. The second problem is, when you are famous for doing some good work, you can only work on great problems, not small. I was so shocked to know how small the idea Pierre Omidyar, eBay’s founder, had for his next startup. Very few people would understand the once-famous-founders’ second startups at the very beginning.

He mentioned about working condition – the best working conditions are not the way everyone want, just like the shacks in Cambridge is the birthplace for a lot of great physics.

Besides age, and working condition, there is drive. The really ambitious people drive themselves very hard. This relates to my standard of people around me. They can be inexperienced, but they have to be ambitious. There is a saying: Why bother? This is just a blah.blah.blah position. It does matter.

Ambiguity is an interesting one. The right balance between believe, and not believe. You believe it enough to go ahead and practices it, but not believe it enough to be able to adjust and change.

Subconscious. You need work enough, think enough, and starve the subconscious enough, and avoid any dilution of any noise of other kind to really get great result from the work of the subconscious. It is called creativity, or inspiration, or whatever. It is an extension of your hard and intensive work of conscious.

“What are the important problem in my field?” That is the starting point of everything. Again, as Paul Graham mentioned in early articles, beautiful thing is simple. I think this question is simple, shorter, and sweeter, and it is much more inspiring than the complicated 7 habits, or other bestseller books. I agree that the best minds are not always found in best sellers.

Really important problems are daring. Look at the three problems Hamming mentioned in his field: physics – 1) Time travel 2) Teleportation 3) Antigravity. My God!

The two problems a classifieds site have are: 1) fraud listing 2) way to attract enough personal listers. It is such a hard problem that we need to solve. The rest are relatively easy.

For the most important ideas, when there is a chance to fix it, the greatest scientist drop everything else, and pursue it.

That leads to the discussion about whether closed door working style, or open door working style is better. Obviously I know most modern companies, especially Internet companies, favor toward open door, or even open office with no cubicles. I was nervous when I started to read Hamming, and I thought he was arguing in favor of closed door – get more things done in today and tomorrow, and that is against what I long believed, and I felt relief when Hamming finally concluded that open door is a better option. Productivity in short term does not compensate on the error of direction.

Great thinkers get desperate when they see their life as a long sequence of problem one after another after another after another… all small problems If one can solve so many problems, it must be very small problems.

We should really do our work in a way that others can stand on top of ours. The science and technology world is cumulative. The beauty of the whole computer, or Internet world is, it can be split to layers, and our work can benefit others. One on top of another. For mathematics, the effort to generalization means the solution is simpler. It is exactly the same for almost every field. For Internet, and computer system, it is so. We should work on generalization.

On “Great Thoughts Only”. Spend about 10% of the time, in Hamming’s case, a Friday afternoon in every week, to allow only Great Thoughts. Great thoughts means “How computer changes science?” For our business, an example of great thoughts should be something close to: “Why people sell on Baixing?” or “How we can be 10 times more efficient as a company?” These great thoughts help to keep people on track in long term, and push them to the limit, or at least open the eyes of the person who tapped into it. Great thoughts by definition is not a solution. It is a problem. It is why part, not the how or what. We need to correct our path about whether we are attacking the right setup of problems. Another is permission. If you want a No, just go to the boss and you will get a No. Maybe that is deep in many people’s mind – No means you don’t need to work on it. The real doers just go ahead and then present the accomplished fact. Most people would say YES when something is already done. (A note: I just found out the first big gap between entrepreneur and a scientist who has a boss)

On ego assertion. I talked about the conflict in a world with different rules. I claimed that the one who follow the rule of the other side gets the best interest. This is pretty pragmatic approach, just as Hamming changed its cloth to be more formal to get the right service, instead of being who he is. If the dressing has get into the way to something you care, you should change the dress! That’s it. Does it really means you don’t have principle? Well, I would say, when there is a universal principle, stick to it, but there are some local principles, and we should should respect. Sticking to our own ways actually pays small price here and small price there. It is pretty steady cost along the way of one’s life, and the total value is enormous. So try to work with the system instead of fight against.

Hamming does brought out a controversial question: Whether we should fight to change the system. His judgement is, you cannot do the two things together: change the system or be a first-class scientist. Then you should choose. The worst thing is to do it just because of amusement – if that is the case, it is type-B procrastination – Doing less important work.

There are many mind-provoking statement Hamming made in his 50 minutes speech, and it took me about 3 hours to finish reading it while keeping this note. It worth the time, and it is also the first result of my dedicated long chunk of time to some really important work, without interruption.

Why? Visa from Guangzhou

I renewed my visa to the USA. When I got my visa, it prints:

Issuing Post Name: Guangzhou

That comes with a small incident during the submission. When I filled my DS-160 form, I naturally put Shanghai as the application city, but the form was rejected after we sent the passport along with the application. I was instructed to change the port from Shanghai to Guangzhou. No reason was given.

Well. Fine. As along as I can get my visa done, I don’t really care about it, although I feel that US Embassy may owe me an explanation of why. In a sense of justice, actually they don’t owe me anything, but as a customer, or “whomever concerned”, I am curious enough to feel certain that they owe it.

A Company’s Service

I am trying to understand the rules and service Baixing provides to our customers. There are so many things like this strange port stuff here. There are many rules that the end users don’t understand at all, but we don’t offer an explanation. Users may be very frustrated because of that. Yes. They have what they want done, but they are not satisfied, maybe just because curiosity, not to mention many who cannot have their things done.

We should not only do our business, but to face the “why”s in people’s mind and help to answer it. We owe it.

Peace State of Mind

Paul Graham is so sensitive to capture the small but important stuff in life – I call it Fengshui, but just my way. Maker’s Schedule, Manager’s Schedule.

Productivity

In the article, I started to understand why I am sometimes much more productive than other. By “some times”, I mean at least a quarter, some times a year. In blogging, for example, pre-2009 years are much more productive than 2010, and 2011. Why is that?

Paul’s maker’s schedule answered the question. For programmers, writers, strategist, and basically everything that needs some hard work, people need a block of uninterrupted time. It is especially so for programmers, and writers that requires a lot of inspiration, and rely on the flow of mind more than other type of work.

To allocate enough uninterrupted time is the key to serious thinking, writing and programming. Knowing that there are at least few hours, or ideally 4 hours uninterrupted ahead, or for some bigger project, few days uninterrupted greatly help to improve the productivity.

Peace of Mind

I tried in the last few days, and found it great. There is a status I call “Peace State of Mind”. It is just like the status of meditation, but mediating in a world of problem solving, not (well, this is just for me) a fore-play of sleeping.

When I get into the peace of mind status, my world is quiet, and I can start to capture the most sensitive difference in either coding or writing, or thinking. When I go to use the bath room, I say hi to people, but not actively seeking for recognizing their faces (a little bit impolite but it is my state of mind). A SMS arrives, and I just peaceful ignore it, and checking email is not attractive, not to mention Weibo. That is a beautiful state, and that is very productive state.

How to Get There

To get there, you need few things:

  1. Allocate enough uninterrupted time. Set aside meetings, and set expectation of the people around you. Ideally, morning or late night. (I prefer morning).
  2. Find a peaceful place.  Refer to some Fengshui book to see where is best – facing entrance with nothing at the back. Ideally a wall or pole.
  3. Headset to keep noise away.
  4. A clearly defined task to start with.
  5. Relax and focus.

Hope this is helpful to you too.