Categories
Fun

Don’t get stuck

Reading Time: < 1 minute

Saw this article from my friend Liu Shuhui’s blog. I think it’s kind of interesting because I thought my green card situation is very much like that. Not to mention the stocks, let’s don’t go there today 🙂

======================

譬如公车平常是十五分钟一班,当你花在等待的时间超过十分钟后,你会开始烦躁不安,但通常你会继续等下去,等到超过十五分钟公车还不来时,你除了咒骂外,也开始感到‘后悔’——你应该在十五分钟前就走路或坐计程车去的。

  但通常你还会继续等下去,因为你已‘投资了那么多的时间’,不甘心现在改坐计程车,结果就越陷越深,无法自拔,直到公车姗姗来迟,你心理的困境才获得解脱。
  但人生有很多‘目标’,并不像公车那样‘必定会来临’,而且投资的也不是你‘个人的时间’而已。如何避免蹈入陷阱在人生道上,如何避兔蹈入这类‘陷阱’,也是一门不小的学问,心理学家鲁宾(J.E.Rubin)的建议是:
  1.确立你投入的极限及预先的约定:譬如投资多少钱或多少时间?
  
  2.极限一经确立,就要坚持到底:譬如邀约异性,自我约定‘一次拒绝就放弃’,不可改为‘五次里面有三次拒绝才放弃。’
   3.自己打定主意,不必看别人:事实证明,两个陌生人在一起等公车,‘脱身’的机会就大为减少,因为‘别人也在等!’
  4.提醒自己继续投入的代价。
==================
Categories
Saint Louis

St. Louis International Film Festival

Reading Time: < 1 minute

I heard about the annual St. Louis International Film Festival every year, made a resolution to go there every year, but never made it. This year’s festival is coming, Nov 9 to 19. Here is the list of movies. There will be three Chinese movies, they are:

Stolen Life starring Zhou Xun (Saint Louis Art Museum Thursday, November 16, 2006 12:00 PM);

Summer Place (Plaza Frontenac #1 Tuesday, November 14, 2006 9:15 PM); 

Three Times (Plaza Frontenac #1 Tuesday, November 14, 2006 6:30 PM).

stolen life

Categories
Fun Software development

Write Software not Novel

Reading Time: 2 minutes

When I was taking my first C++ class at graduate school, the professor has a favorite word “you guys should write a program that works, because if it does not work, you are writing a novel not a program”. Although I did wrote “novels” in one of his program assignments, I remembered his words since then, certainly this include my professional life. Writing software that works is not easy, but it’s a goal every developer should strive for.

Assume we are just writing a very simple C++ program (remember the “hello world”), bacially there are two kinds of obstacles or errors we will face. The first is the compile error. Today I fought all day for this kind of error. Most of times compile errors are easy to solve, because the compiler will give you some hints: such as forgetting the semicolumn; variable name does not match (typos); other simple things etc. But sometimes things can get really tricky. I remember one day my coworker came over for help. I went to his cube and we tried to figure out why things do not compile. I looked at the error message from compiler, which is pretty much useless.  So we had to guess and tried different approaches without success. About one hour later, I suddenly found out there is an extra “^H” at the beginning of a header file. Binggo. That solved the problem.

This afternoon I had similar problem, I had to compile some code written by my coworker, which has not been compiled before. This is kind of thing we programmers don’t like to do: deal with other people’s devil. I was puzzled by the compile error for about 3 hours: it was  complaining the std::vector not defined properly. Finally I found out my coworker put some header file inside the class (and another namespace), which is a bit unusal and it caused the conflict of vector. I will talk about the other type of error later on. Hint: compile error is relatively straightforward compared to the other error 🙁

Categories
Site Info

Links (updated 042208)

Reading Time: < 1 minute

I organized the links at the right side a little. Now I have the following categories. The link ends with * means you can not get access to it inside China, thanks to the GFW.

BLOG: the blogs I read often, most of them are written by my friends.

gseeker: I like this Chinese blog about google very much. The author spend lots of effort tracking what’s going on at Google: from people from google jump ship to facebook, to Google Finance stockscreener.

CHINA: China in Chinese and English, from business, economy, jobs to travel.

FINANCE: financial blogs and magazines.

MoneyCourier: it’s a Chinese blog talking about the mutual funds in China A share. Most Chinese stock or Finance blog are full of crap (talking about making fast money), this one is exception.

LINKS: I put anything else into “links” category. The topic ranges from business to life to technology.

MAJOR: my own stuff.

PRO: blogs written by professionals, i.e., money mangers, mutual fund manager, venture capitalist (VC) etc.

Zhuping: I recommend this one to you. Mr. Zhu is the VP, CIO of a major mutual fund company in China, more importantly, he talked about value investing.

Danbin: a hedging fund manager in China. He is a rare commodity in China hedging funds because he is also a value investor (at least he is talking about that all the time).

SHANGHAI: stuff about shanghai.

ST. LOUIS: stuff about Saint Louis, my current home

I will continue to refine this as times goes. Note I will remove links to “blogs” which is not active (say, not updated in last 2 months).

Categories
Fun

More about RedHat

Reading Time: < 1 minute

Thought this is funny. The RedHat webmaster must be busy. After Oracle announced the RedHat linux support, now Microsoft joined the party – it announced the partnership with RedHat’s rival, Novell’s SUSE linux. So this is what I saw from RedHat’s web page:

“First they ignore you. Then they laugh at you. Then they fight you. Then you win.”

 — Mohandas Gandhi

For those not from IT industry, “they” refers to Microsoft. Microsoft did all these “ignore” and “laugh” thing. Now “they” are at “fight” stage.  

Categories
China Stocks

Basics for Investment

Reading Time: < 1 minute

I happened to see this “Investment 101” from forun web site, a very small (boutique) research firm. Wish I had read it before jump into market 3 years ago. Oh well, I know even if I read it, I would forget it and make the same mistakes. A lot times we have to learn the lesson the hard way.

It’s an interesting story to find this research firm. So I was listening to the conference call of Ninetowns, the stock I bought at its IPO and bought it again today. An analyst from forun called in and talked in English with a heavy Chinese accent. Sometimes when he got stuck, he used Mandarin with strong Hunan accent . The CEO of Ninetowns can not speak English. So they talked in Mandarin. Another SVP of Ninetowns did the translation. There are only two analysts called in for the questions. The other guy Dick Wei from JP Morgan, is also ethnic Chinese. Note JP Morgan was the underwriter of its IPO in Dec 2004.   

Categories
Stocks

Trade of the Day

Reading Time: 2 minutes

I sold the remaing Symantec (SYMC) stocks today and I bought an old stock for me: the Ninetown Digital (NINE, recently changed name to Ninetown Internet). Here are my reasoning.

Symantec moved up quite a bit in past serveral months. It reported good earning in Q2, but missed a penny in Q3 due to some weakness in Europe. I think it’s a solid company and may do well in Q4. Note enterprise software companies usually do more sales in Q4 because of end-of-year spending (so is the Wall Street expectation, so don’t expect a big pop). Another reason is Symantec is just too big for me to understand, its main business is from enterprise (storage, security, compliance etc), not just the Norton Anti Virus or Internet Security for individual customers. By the same token, as the world No. 5 software company (by market capital, behind Microsoft, Oracle, SAP and Adobe), its stock just does not move too much compared to smaller software companies. I think it’s good for mutual funds or people who just want to get average return without doing much homework.

Categories
Fun

Programmer’s humor

Reading Time: < 1 minute

This is a good one. I got this from a programmer friend. Open a new document from Microsoft Word, type in the following:

=rand(100,2)

then hit “enter” or “return”. What did you got?

There are many similar interesting hacks in the software we use daily. I think it’s just a way for programmer to express themselves during their daily boring work 🙂

Categories
Software development

Dumb C++ Mistakes

Reading Time: < 1 minute

It seems like I don’t have anything to do with C++ because I have not touched C++ much in this blog. I am a software engineer by trade; programming and debugging is a large part of what I do during the day. I was a little frustrated last two days by a memory problem shown only on UNIX. The program ran fine on Windows, except one or two instances slightly weird results which I tend to ignore. But I could not pass the UNIX test and obviously something is wrong. By looking at the trace back I can tell it’s a memory problem. Memory problem is kind of problem everyone hates. Because it’s usually hard to find the root cause. Dev Partner made the process a little easier because it will show all potential memory overrun and leaks. To my surprise, I made a mistake like the following (very basic C++ mistakes):

char *temp_str = new char[length]; 

for(int ii = 0; ii < length*2; ii++){     // do something with temp_str[ii] } It is a typical memory overrun problem because I only allocate "length" number of char, but I was trying to use "length*2" number of char. It's like use twice the credit limit? But I am still very puzzlled that my program ran on Windows (without Dev Parter) before the fix. No wonder we see "Windows crash" from time to time :-) Seriously, in software development we want the problems being uncovered the earlier, the better. Because we don't want our customer run our program and crash.

Categories
Stocks

Words of Wisdom

Reading Time: 2 minutes

Words from Warren Buffett’s interview, mostly regarding his opinion on the markets, the full article is here.

…Common stocks are part of a business. Markets are there to serve you, not to instruct you. You can often find a couple of companies that are out of line. Find one; get rich. Most people think that what the stock does from day to day contains information, but it doesn’t. It isn’t just something that wiggles around. The stock market is the best game in the world. You can take advantage of people who have no morals. High prices inside of a year will typically be 100% of the low price. Businesses don’t change in value that much. That is simply crazy. There are extreme degrees of fluctuation, and Mr. Market will call out the prices. Wait until he is nutty in one direction or the other. Put in a margin of safety. Don’t find a bridge that says no more than 10,000 pounds when you have a 9800 pound vehicle. It isn’t a function of IQ, but receptivity of the mind.

When investing you don’t have to invest in all 10,000 companies available, you just have to find the one that is out of line. Mr. Market is your servant. Mr. Market is your partner and wants to sell the business to you everyday. Some days he is very optimistic and wants a high price, others he is pessimistic and will sell at a low price. You have to use this to your advantage. The market is the greatest game in the world. There is nothing else that can, at times, get this far out of line with reality. For example, land usually only fluctuates within a 15% band. Negotiated transactions are less volatile. Some get this; others don’t. Just keep your wits about you and you can make a lot of money in the market… 

BTW, words from Fortune cookie today, “A new hat will brighten your day give you an updated look”.