Categories
Software development

Chasing the bug round 2

Reading Time: < 1 minute

I was pretty stressed out debugging a problem last two weeks. Luckily I saw the light at the end of the tunnel yesterday. I found out the cause: the tolerance of transform matrix. This is a tough problem because it appears to me the problem occurred without any pattern. But later on I realized out of all the randomness, there is something in common: the misplaced components all end up in the same place. I implemented the fix this morning and it worked like a champ.

Tolerance played an important role in my world. I guess it’s just a way of life. The problem is the computer can not represent a number accurately. Say an inch is 25.4 mm, but in computer it is really 25.399999…If you convert the inch to mm and then convert it back, it maybe something like 25.398888. Now if you do a comparason of this number with 25.4, it won’t be equal any more. Similar things can happen for vectors, matrix, geometries, etc.

There are called rounded errors in numerical computation. I took a course on numerical computation in graduate school in Rolla. The theory was a bit abstract. But now I got the fun to play with the real stuff. It’s not as complicated as one might think.

Categories
Business Stocks

Plastic society

Reading Time: 2 minutes

Just watched Frontline on PBS. The topic is “Secret history of the credit card”. I thought it provides some very useful information. We all know the US economy is very much depependent on consumer spending. And the credit cards are used more and more by consumers. I remember a story my “American mom” told me. When her own kids were little and they asked their mom for something, they thought everything can be bought with that “magic plastic card”. Personally I applied and received my first credit card shortly after I attended the graduate school in Rolla. I had been through “low interest” balance transfers and paid interest on those loans from time to time. Other than that I do pay off my monthly balance regularly. But I did notice I tend to spend more freely with the credit cards, e.g., recently I spent quite a bit on the espresso at Borders, Panera Bread and Star Bucks. Another reason I use credit card is some of them offer cash bonus for purchase on gas, geocery, etc. I don’t consider myself a “very profitable customer” for the credit card companies.

Until today I have not connectted the dot of two things: consumer spending and credit card usage. It worries me more is China is catching up with the consumerism rather quickly. Last summer I went back to Shanghai and saw increasing acceptance of credit cards. I even used my US credit card to book vacation on Ctrip. It’s convenient but later on I saw there is a 1% charge for using outside the US. A friend from Shanghai used credit card for his US trip too. I can see the convenience here because he is on business trip.

Just for the fun: I found out if I pay the minimum monthly payment on my “low interest” balance on my credit card, it will take 54 months (4 and a half years) to pay off. Now I have more desire to pay off that loan more aggressively.

Categories
Business Saint Louis Technology

Make used books more useful

Reading Time: < 1 minute

A good friend of my brother recently visited St. Louis. He is an avid reader and used book collector. Although I like to read too but I have to admit I am not at his level in terms of reading breadth and expertise. Neverthless, we spent quite some time in two of the used book stores in St. Louis. The first one is The Book House at Manchester Road. It’s a family owned operation, a two story building full of all kinds of used books. We spent about an hour and half there and my friend picked up 6 books. I think the cashier was quite happy with his big spending. It seems to me not many people here will buy that many at one time. After that we went to the Left Bank Books at the Central West End. Left Bank is a larger (but independent) book store and it has both new and used books. I remember I saw the late Chinese American writer Iris Chang at the store a few years ago. We also picked a few books there.

Besides the brick-and-mortar stores. We can also look for books online. These are nothing new: one can search on ebay and Amazon for those used books. What interested me is I found some new ideas about the exchanging used books. Two web sites, bookins, paperbackswap, are helping people exchange used books online. It seems the former is more business oriented (creating profit), the latter is more service oriented. But I like the idea very much. Unlike my friend, I am not a book collector. And I want to read more books without owning them. Library is a good source. But this online exchange thing is also interesting. I may try this in this holiday.

Categories
Business China

Chatea in China

Reading Time: 2 minutes

I saw this from “Sage Brennan’s this week in China” at MarketWatch. I have been to Chatea (Yi Cha Yi Zuo 一茶一坐) at Huangzhou in 2004 and was very impressed by the settings and the service. Also walked outside a store in Xu Jia Hui (Shanghai) during dinner time and the waiting line was just too long. After reading the article I am even more impressed by the investors and management of the company.

Here is the excerpt:

Chatea raises unconventional funding

Much has been made of recent increases in high-yield lending to take up the slack that resulted when domestic banks began to tighten credit. But China’s booming private sector is looking to a variety of mechanisms to finance growth. As an example of the increasingly creative deals that China’s private equity sector is likely to see in the coming year, I offer up the unique funding of Shanghai-based restaurant chain Chatea (Yi Cha Yi Zuo) by several investors known for deals in completely unassociated industries.

IDG Technology Venture Investment, one of China’s best-known backers of successful early-stage technology companies like Baidu, Sohu.com Inc, eBay’s Eachnet and Ctrip, as well as a large number of promising startups, was a surprising participant in the financing of Chatea’s privatization, joining Susquehanna International Group.

The $7 million round, closed in early December, privatized the 70% share of the company that had been owned by the Shanghai government, which reportedly made a 30% return in the roughly one year that it owned its share of Chatea.

Is this an example of the influence of the Shanghai government in private enterprise? Sure, but it also is a recognition that a solid business concept deserves attention – even from unexpected quarters. Investors known for whiz-bang technology investments out on the Long Tail were willing to bet on a decidedly old-economy business model and management team, which hails from the China divisions of McDonald’s Corporation, Yum Brands Inc.’s KFC and the original Taiwanese founders.

So why is this a venture capital deal? Chatea emphasizes a commitment to providing a high-quality customer experience, which diners in the West, for the most part, take for granted. In China, restaurant customers are treated unevenly, at best. So an operation that keeps customer service as a mantra and provides a stylish atmosphere has a real chance to grow quickly if it is adequately capitalized, much as Starbucks has in China. In this concept, the investors apparently see the potential for VC-like returns.

One of the most interesting aspects of Chatea is that with 17 restaurants, several of which are located in cities as far as Beijing, the company has developed a scalable model to produce food of consistent quality from a single kitchen in Shanghai, similar to the McDonald’s model, but with a stylish twist. Chatea claims that the kitchen can support up to 60 restaurants. Customers, in general, have no idea that the gleaming kitchens featured in every location do not actually produce any of the dishes that are served. They also have only a vague notion of the massive margins that Chatea makes on the gourmet teas it sells.

Will we see more deals like this one? Probably not exactly, but compelling deals that can clearly be pulled off with a bit of creativity abound in China.

Categories
Site Info

Side bar enhancements

Reading Time: < 1 minute

Added a few more links: notablly, the google maps mania talks about the fun “mash ups” around google map; and HUST blog, HUST stands for Huazhong University and Science and Technology (my undergraduate school). Interestingly enough, I saw some of the bloggers on HUST blog also worked for my current employer (UGS).

“Add to My Yahoo” button: I personally found it to be useful tool so I don’t need to type in individual blog sites to see if there is anything new. My Yahoo page will just do that for me (not perfect yet). I found another trick customize the “recent news” section of “My portfolio”, you can “edit” which news source you want to pick. Yahoo seems doing a good job on the User Interface.

I also changed the links to static. They are sorted in ascending order by name.

Categories
Saint Louis

St. Louis 2006

Reading Time: < 1 minute

Although it won’t be as big as Beijing 2008, St. Louis 2006 US Figure Skating Championship will be a treat for the local skating fans. Last Thursday I got to know we will have this event from Jan 7 to 15. So I started looking for a ticket for the Ladies Free Skate. I watched Michelle Kuan and Sasha Cohen on the TV many times. I believe there will not be many oppertunities to see them compete at the same stage because of Michelle’s age. Although being a Chinese I should wish Michelle to win out but I liked Sasha’s technical skills too. Those two super stars do not get along very well. Also I heard from NPR yesterday Emily Hughes, who is Sara Hughes’ younger sister, will also participate. Sara beated Michelle and won the gold medal at last Olympic Game. A Seattle newspaper put title “American beat Michelle” for that event. Because Michelle is Chinese American, you know how the article angered the Chinese American community at that time. Later the newspaper apologized for its mistake.

I finally bought the ticket on ticketmaster (online) after done some research. I looked at Craigslist and eBay and there are not many. Maybe you can save a small handling fee buying at the Local Schnucks (ticketmaster) counter. I am not sure.

Update: just read from news that Michelle is hurt and may not be able to make the appearance at St. Louis. Let’s hope she will have a quick recovery. Otherwise I will still be happy to see Sasha Cohen — I think she is the best female skater technically.

Categories
Business Saint Louis Technology

Microsoft Xbox 360 strategy

Reading Time: 2 minutes

This morning I went to 3 local Best Buy stores. I knew my chance of getting a Xbox 360 would be as same as winning a lottery. But I went anyway because I was already awake at 7:15 AM. There was a little flurry but I made it to the Best Buy Bridgeton location at 7:58 AM. There was already a line there. And I noticed the chairs (people camped outside the store overnight) were already empty — later on I saw those people waited in the check out lanes with their new Xbox inside the store. Interestingly enough, the Best Buy greeting guys in the front door handed out 15% off coupons for those missed the Xbox. Smart sales pitch.

I spent a minute or two before heading off to the Chestfield Best Buy store. At Bridgeton I saw a girl (or lady) asked the customer rep if there is any more shipments before X’mas. Obviously she needed this as a gift.

When I got to Chestfield, people were picking up their Xbox, tents (I saw at least two tents) and taking off. I gave up my unrealitic hope and went to Mcdonald for breakfast. After that I went to Best Buy at Ellisville and tried out the Xbox demo my first time.

I talked the Xbox shortages problem with my friends who are game lovers (I am not). Originally I thought it was Microsoft’s fluke. But they made me realized it’s a Microsoft’s strategy. I agree. By releasing the Xbox in limited quantity, with all the free media coverage (include my blog), they gained more excitment about the product. And people like me who are not Xbox gamers are also aware of this and may be converted to gamers through all this frenzy, e.e., I tried their demo this morning.

This is a really smart business strategy. But could it back fire especially for those where are real gamers? Unlikely. The thing is there are not too many alternatives. The new PS3 is one year away, and the Xbox 360 has great graphics in my view.

Bill made his day again in this X’mas. Now if he could also make the “blue screen” go away (recently my Windows XP laptop died twice with blue screen, very annoying).

Categories
Software development

Indian food and software developers

Reading Time: 2 minutes

Working in the software development these days also means working with people all over the world. Most notablly, Indian software engineers. I have great respect with my Indian colleagues. I know some of them from my graduate school. But I have to admit I don’t like Indian food. I have been to Indian restaurants in St. Louis several times with my coworkers but I did not really enjoyed it. But this does not means I can stay away from it. Like today.

This week we had food festival at my work place. The idea is everyone bring his/her own favorite dish and share it. I am not a good cooker and I am lazy so I did not participate. During lunch time I felt a strong smell dispersed from a cubicle nearby. Initially I thought it was some American food but later on I realized it’s Indian food (curry, spicy, etc). I had to leave from work early because I just can not stand it. But I think many American coworkers enjoyed it. Now I remember yesterday one of my coworkers asked if I liked Indian food. No wonder he was looking forward to it!

This reminded me of something related. Some of my Chinese friends complained it’s hard to understand Indian English but most American have no problem with it. One time I posed this question to my fellow American graduate student. He told me he would pay more attention when he listened to Indian students but there is no problem in understanding.

Another point I want to make (and I think we Chinese need to learn) is our Indian coworkers know how to market themselves. The food festival is a perfect example. While there are quite some Indian fans among Americans, not everyone likes Indian food (take myself as an example). But they prepared and marketed the food with enthusiasm. That’s what counts. Attitude, not the substance (taste, smell).

Now I wish I would not be at lazy. Maybe next year I will bring some crab rangoon or fried rice.

Categories
Software development

Chasing the bug

Reading Time: 2 minutes

As software developer finding and fixing the bugs (defects in software) is just a way of life. I have been debugging (find the cause) a tough problem lately. During debugging sometimes I wished I would have another job. But when I solved a real problem, the satisfaction can not be easily described by words. I bet a lot of people in software developement have similar experience. I want to share some of the general steps I take during debugging.

  • Reproduce the problem
    A lot people ignore it or treat it too lightly. But this is the first step. Make sure the problem appears consistently under the user-described situations; and the symptom is exactly as the user reported. Otherwise you will try to solve the problem “you see”, not “the user sees”. Maybe you will be lucky enough to “see” the same problem as “the user see”. But more likely you will be will be solving another problem, or a related problem. And the next day (week, month), the user will come back and shout at your boss: how come the problem you claimed “fixed” still exisits? You know how embarassing you will be at that time.
  • Simplify
    After “reproduce the probelm”, the next step is to simply. By “simply” I mean the real problem is ususally complicated, and it will take a lot time to run through debugger. The goal here is to simply the problem as much as possible. For example: delete unrelated parts from the raw data. You should be very careful in doing this too. Because you could eliminate the problem area in doing this, i.e., the problem will be gone if you don’t simplify properly.
  • Find the cause
    Here comes the real run. After all the analysis, time to jump into the code. It’s why we progrmmers are paid for, right? But it is also the most difficult part. I am still puzzled by the problem I mentioned at the beginning. Hopefully by stepping through the code, talk about the algorithm with the guru in your team, even ask a second pair of eyes to take look, we can nail the problem.
  • Fix or ask appropriate party to fix
    Then comes the politics part. I have to admit this is not my specialty. Luckily if the mistake is made by yourself, and you know how to fix. Life is good. But a lot of times the mistake could be made by somebody else, maybe some code written by another team member, or even a piece of software created by 3rd party. In these cases, you need to demonstrate the problem to responsible parties, bugging (asking) the people for a quick fix. Meanwhile your sales team or customer are already screaming.
  • Workaround
    Luckily, sometimes you can find a workaround the customer like. That provide cushion time for you or your team to work out a fix.
  • Categories
    Saint Louis

    St. Louis

    Reading Time: < 1 minute

    St. Louis gmap