Archive for March, 2009

No youtube

March 26th, 2009 | Category: China

As you may likely know, youtube has been banned again here in China.  Check it out, I even have the “banned” screenshot to prove it.  The banned sites always either result in “Network Timeout” or “Connection Interrupted”.  At least we’ve had Wikipedia for a while.  I am also looking into network tunneling and other fun nerdy concepts to bypass all this silliness.  I have friends here who have successfully implemented it and have even reported faster surfing in addition to more internet freedom.

1 comment

Guangzhou

March 24th, 2009 | Category: China

I visited Guangzhou, or “Canton” as the Brits used to call it, last week.  I can’t say I’m the biggest fan of the place, but I was glad to see it.  Though it’s only an hour by fast train from Shenzhen, it’s quite different.  Of course, Guangzhou is a much older city than Shenzhen.  It’s not much of a contest; Shenzhen is a mere 30-years old.  Guangzhou, sitting on the Pearl River Delta has been an important trading city for hundreds of years.  I found it to be a much dirtier, less-organized city than Shenzhen.  It is home to many markets, each of which is quite different as well.  The market across from ShaMian island was probably the most pungent I’ve ever been too.  It’s mostly a food market, but specializes in seafood, and much of it is dried bizarre-looking things.  I can’t believe there’s that much demand for shark fins.  Judging by the quantity I saw, sharks are either plentiful, or now near extinction, or both.  In the end, I prefer living in Shenzhen.  Enjoy the pictures!

1 comment

Tasty Cane

March 16th, 2009 | Category: China

A common and popular street snack in China is a type of sugar that has had it’s skin stripped off. In Chinese, the cane is called “Gan1 Zhe”, or ?? if you can read Chinese characters on your computer). There are basically two ways to enjoy it:

  1. Have the vendor strip off the skin and gnaw gently into the meat.  Suck the juice out and then spit the dried pulp onto the street.  Be careful when you arrive at the joint of the cane.  You can really hurt your teeth if your not careful.  Chew at an angle to bite off the joint so you can continue to enjoy the next section.
  2. Have the vendor put the can through a juice extractor and just drink the juice.  It’s funny; I just saw a bunch of vendors selling this juice to people through the fence bordering a popular park.  They’d set up their mobile juice extracting units on their bikes just on the other side of the fences and people would make paths through the bushes to buy the juice from them.  I guess they saved on park vendor fees or something.

I tired it not long ago and it’s not bad, though I can’t really see myself going for the perpetual spitting required.  You’ll enjoy it if you have a sweet tooth; it’s got to be the sweetest natural drink I’ve ever had.  I’m surprised that Chinese people like it so much.  Vendors typically sell a 1.5′ section of cane for 1 RMB, about 14 cents.

Some pics for you:

No comments

Personal Code Review

March 11th, 2009 | Category: Entrepreneur, Software

In my “The First Three Weeks” post, I mentioned how one of my first projects is to re-release my shareware.  I have two closely related shareware applications.  Both are “Download Managers”, which make archiving websites, and downloading in mass easy.  My applications are written in MFC and ATL, ancient technologies by today’s standards.  This project has been occupying most of my working time; my other projects are mostly being outsourced right now.  For example, logo work and graphic design is something that must be done but I personally have no talent to do it myself.  Witness the lousy graphics that I created myself or borrowed from freeware in my last shareware release.  So, even though collecting bids and reviewing work can be time-consuming, that option sure is better than pretending I can do it myself and wasting time and effort.

But, how easy it is to digress.  So, back to the main point.  This is the first time I’ve been back in my shareware code in nearly six years.  Also, this code was written about nine years ago.  My how the time does fly.  It’s interesting to see how my coding style has transformed over the years.  So what have I noticed?  Well, why not give myself a code review for everyone interested to see?  Here it goes:

Strengths:

  • Organization – The code and projects are organized well.  It’s easy to find things and there is very little duplicated code.  The code is organized well for reuse.
  • Loosely-Coupled Code – Code is easy to move around or remove entirely without too many side effects.
  • Well-commented – The code is easy to read and commented well.  There are some fairly obscure sections that would have taken me a long time to figure out, but the comments gave me a great starting point.
  • Easy to localize – Dialog and string resources are managed well and it’s a piece of cake to localize the applications into multiple languages.

Weaknesses:

  • Error Handling – The error handling is generally good, but sometimes very lax.  There are a few egregious violations like a string buffer being passed to a function with no indication of length.  The function assumes the buffer is at least 64 bytes.  Yes, I have fixed that.  Microsoft educated me well on defensive programming.
  • Unicode support – In most places, you could tell that I was paying attention to Unicode, but I had to spend at least a full day updating the rest of the code to be cleanly build both Unicode and MBCS builds.  However, I discovered one big problem:  I realized my home-grown HTML parser simply did not work in Unicode.  And, it’s not a simple matter of using TCHARs or something like that…
  • HTML Parser – For the sake of speed, my parser assembles DWORD tags from HTML and matches them to predefined HTML DWORD tabs like “<ahr”, “<ima”, “<bas”, etc.  When I started writing this app, the web was still quite young and HTML parsers weren’t so common.  The MS DOM probably existed, but since it’s shipped with IE, I, like most normal people, probably assumed that IE could easily be uninstalled in favor of another browser.  Regardless of how engrained IE is into Windows or Anti-Trust rulings, I didn’t want to rely too much on third party libraries.

    I do have my full Unicode builds working now, but my parser doesn’t work.  It’s quite the understatement to say that’s a big problem.  The jury is still deliberating about what to do.  The easy answer is to just stick with a multi-byte character set build, which still works great.  I may do that for the first re-release and then upgrade the parser to use the DOM for the next release.

    The parser really does need an upgrade because it’s also quite complex.  There is a lot of code in this “pointer” style (and this is one of the easier sections):

    TCHAR* pBM = buffer;
    while ( _T('#') != *pBM && *pBM )
         pBM++;
    ...
    if ( _T('#') == *pBM )
    {
        *pBM = NULL;
         token = ST_HTML_FILE; 
    }

    So, with a lot of code like this, maintenance is a bit of a problem.  Time for something more reliable and easier to manage.  My IE plug-in application uses the DOM for parsing and it’s much simpler, however, that application does not need to update the links in the HTML to match the users hard drive.

  • Feature happy – Well, this one isn’t so serious because my applications already aren’t very feature heavy, but I do have a few silly features and additions that don’t provide any value.  I gained a new appreciate of this problem at Microsoft.  It was something that I fought against constantly.  Maybe I’ll write more on this later, but I was shocked at how much effort and time we put into useless features.  But, hey we did, and I sometimes felt like an outsider for opposing them.  Anyway, because of my appreciation for a feature done well vs. a mad mass of confusing features, I’ve cut my non-essential features and frills.
  • Graphics – That’s why I’m outsourcing this next release.

In summary, I’m happy with the code.  Though I’ve expanded more on the negatives here, I’d rather have this strength/weakness profile than have it flipped!  That would be a much tougher problem to deal with.  That would basically mean rewrite.  That would tempt me to abandon.

No comments

New system

March 09th, 2009 | Category: Entrepreneur

For the longest time, I managed my things-to-do with a sticky-pad piece of paper that I kept in my wallet.  On this paper, I’d write in tiny script all the things that I needed to take care of or remember.  As I finished items, I’d just scratch them off.  At the office, I’d use Outlook, of course, and got fairly proficient at using the “Task” feature fairly effectively.  However, both of these systems suffered from a lack of flexibility and mobility.  For the longest time, I realized I needed something better to manage tasks and ideas.  Basically, I needed a way to capture ideas easily and quickly at any location.  For the longest time, I considered getting an iPhone.  Finally, with the help of a friend in Hong Kong, a colleague and I decided to bit the bullet and do it.  I wanted to buy in Hong Kong because there you can buy the unlocked iPhone and therefore don’t have to sign the nonsense two-year agreement.  So, whenever I arrive in the US, I can just pop in my T-Mobile card and I have instant access.  The same also goes for any country in Asia.

The iPhone is not the be-all-end-all device that constitutes my “new system”, but I credit it for really opening my eyes to the power of “mobile computing”.  I’ve had my iPhone for about four months now and I’ll never go back to a bulky system like Outlook and Office.  No way.  I can still remember coming back to the office after Christmas and Chinese New Year and thinking that Outlook felt like a large anchor around my neck.  This is one reason why I worry a bit about Microsoft’s future.  Much of the company’s revenue comes from cash cows like Windows and Office.  But, both of these businesses face huge dangerous flaming arrows from the likes of Apple, Linux, and a myriad of cloud computing companies that I’ve embraced because their product is simply better.

But, even before purchasing the iPhone, I started playing around with a couple of web applications:  iGoogle and Evernote, both of which I am very impressed with.  Evernote is a free fantastic note-taking application that leverages great search technology instead of organization.  So, I don’t worry about where I should put my notes, I just create them and Evernote indexes them, searching for keywords (even keywords within images!) so that when I later search for a note, it’s easy to find the notes I’m looking for.  The application is great because it’s designed to work on the internet.  There’s a browser plug-in which makes it easy to take notes while surfing the web.  See the video demo on the Evernote homepage for more.  iGoogle is great for pulling together a few simple Google web components into a single page that I can view without even scrolling:

(above) My own iGoogle page (I’ve chosen random themes!). Google Reader is the first Google application that I latched onto. It works great at aggregating the various blogs that I like to read. The Google translator is great for chatting in Chinese. When I don’t understand some of the characters (which is most of the time), I can just plug them in here and get a quick translation.  Of course, now that I don’t have to use Outlook, Google Calendar is a natural choice.  Features are still being added, and sync support for the iPhone was recently added.  I haven’t adopted this yet.

You can see another web app that I like to use:  Remember the Milk.  This a cute little app that is a very good note taking system, much better than my pitiful little wallet sticky note.  With Remember the Milk, I can create notes for on any date and write a note to remind myself.  I can also categorize and prioritize them which makes working on a family of tasks easy.

I’m also experimenting with my own personal Joomla! site, hosted on my personal web space.  Joomla! is a general purpose CMS system.  I’m using it an super note-taker.  Something where I want a little more organization than Evernote.  So, I have various project ideas and progress listed there.  I also use it as a place to organize jobs that I outsource to various people in China, or anyone really when I’m not using Elance.  For example, I had a word-processing job that I outsourced to a contact in China.  I created a video using the great Windows Media 9 encoder of my desktop where I walked through the steps that I wanted done for hundreds and hundreds of pages of material.  I then created an account for the person that was working on this job, then, uploaded the movie and the files needed.  It was easy for her to log on, understand visually what needed to be done.  It worked great.  This site would be perfect for this sort of job, but I really need job level access for each account I create.  Instead, site access is at privilege level, and there are only like three levels!  Not sure how I’ll manage this, but that will eventually be a deal-breaker.

The iPhone is what ties most of this all together.  There are Evernote and Remember the Milk applications for the iPhone, both of which work beautifully.  Unfortunately, Remember the Milk costs $25, but it’s certainly worth that.  The Evernote application adds audio recording support, so if I’m in a big hurry, I can create a quick idea or task note with my voice on the iPhone and it will upload in the background to the web.  That’s the beauty of all of this: it syncs easily with the cloud (the web) and is therefore accessible from any computer.  The concept is so simple!  I can still hear the whines of my MS colleagues, “Man, I can’t get Outlook to sync with my iPhone.”  I tell them, “Your problem:  OUTLOOK!”  Time to modernize!  However, the various Google applications still aren’t represented very well on the iPhone, but they’ve got the cloud-computing idea down and, of course, they work great on the browser.  I have no good Joomla! access on the iPhone, except for the browser, and that’s not good enough yet.

So, this new system is a work-in-progress, but the results so far are promising.

No comments

The first three weeks

March 03rd, 2009 | Category: Entrepreneur

First of all, I have to apologize for the huge delay in an update to my blog. The last one was significant enough to warrant a decent amount of time before the next post, but this was much longer than I was anticipating. There were those who thought I’d be bored in the short time that I’ve been self-employed. Others suggested I might end up working too much on my blog.  I knew that neither of those would happen.  In fact, it seems like I’m busier now, especially with transitioning to the this new lifestyle.

One thing that I have to specifically mention is that what my friend and former colleague Peter, who quit Microsoft back in July and now lives in Shanghai, told me:  “You will feel a euphoria of having the freedom of setting your own schedule and working on the things you care about.”  That is certainly true; I feel it.  Despite feeling some anxiety during the transition period away from Microsoft, I now can’t imagine going back.  I hope I will feel the same way in six months.

Back in the real world, however, there are several pressing transition issues I have to deal with:  tax issues in the US and China, getting all of my outstanding expenses reimbursed, researching and setting up insurance, planning a move to a cheaper place (now that MS isn’t footing the bill), and a few others.  Here is the list of the various projects I’m working on now:

  1. The aforementioned domestic issues, which need to be taken care of as soon as possible for peace of mind.
  2. Setup the appropriate and best structures for being self-employed.  This involves lots of emails to lawyers and CPAs in the US.
  3. Re-releasing my two shareware applications. I am combining the two apps into a single suite, redoing all the graphics and UI, fixing a few bugs, updating the name to something funnier, buying the domain name, doing some marketing and affiliate programs. My goal is to increase downloads by 10 times.  This should increase revenues nicely.  We’ll see; it will be a learning experience regardless and it’s fairly cheap to do all of this.  It’s been six to seven years, but I have been too lazy and comfortable to touch the code.
  4. Re-release my Tchaikovsky Violin Concerto CD.  This has involved redesigning the cover professionally, getting a logo developed, and reworking the orchestral tracks, remixing the CD, and sending the tracks to the US for printing and hosting on CD Baby.  It’s been sold-out for three or more years now and, again, I’ve been too lazy and comfortable to do anything about it.
  5. Release two reuseable CMS (Content Management System) websites for two different purposes, both of which are specific needs of mine.  One of them could turn into another side business, but I’m not focusing on that right now.  The other, maybe a little later as well, or just free software.  I’m hoping to outsource these to two projects different local companies in Shenzhen to see how well we work together.  The best company will win the big website I’m working on, which I’m still designing.

Numbers 1, 2, 3 and 4 should happen within the next three to four weeks.  That should free up time to focus on #5, which will also give me incentive and time to continue working on my other website idea.

So, what has my daily life been like?  Well, I’m trying to keep it as close to normal, structured life as possible.  I still have my weekends available.  It’s not so busy that I need to eat into weekend time.  So, I’ve been keeping a schedule Monday-Friday that begins around 8 am lasts through 5-6pm.  I’m working pretty hard to spend the requisite time outside so that I maintain the right level of social contact, otherwise, I’m afraid I’d get shiftless and lazy.  So, much of my time is spent working remotely.  There are also frequent lunches and usually activities every single evening whether it be Chinese Lessons, Basketball, or simple dinner with a friend.  So far, it’s working very well.

Here are some of the challenges, none of these is terribly serious:

  • The internet is slow in Shenzhen.  It’s quite slow in my apartment at key traffic times.  This causes me to be distracted.  How so?  Well, I start working on a certain a certain problem, using a certain website, and it turns out that website takes a too long to load for my liking, so I multi-task over to another problem, and usually load another website.  Repeat, repeat.  Eventually, I’m bouncing around from task to task.  You’ve probably heard that it takes a lot of time and mental effort to make a switch from one task to another.  It’s true; I can really feel it.  I’m trying to minimize the distractions by:  Batching (like doing all my email only three times per week), and doing as much offline work as possible.
  • Lack of focus caused by not adhering to a schedule.  Remember what I wrote above about my schedule?  Well, I’ve been 100% diligent about it when other people are involved.  However, when it’s just me, I tend to slide a bit.  Just a couple of days ago, I realized that this was causing me to lose focus.  By knowing that I have a hard break for a task, I tend to focus because I want to finish as much as possible before my time is up.  Of course, if I’m on a roll, I’ll reschedule an impending schedule item, but usually this isn’t necessary.  This reminds me of the Parkinson Law.
  • Instant Messaging is hugely distracting.  OK, this one is easy to fix.  I enjoy chatting with a few US friends in my early mornings and I still allow myself to do this briefly, but if I’m on after 9:30AM China time, I’m often inundated with people who want to chat.  I’m often too nice to tell them I have to go; I usually let them chat until they’re done.  Bad habit, but easily managed by turning off Messenger by 9:00-9:30AM.
  • Facebook can be a distraction, though I think it has huge amounts of business potential.  I’ve already made some important business decisions because of Facebook.  But, the other great thing about it though, finding long lost friends, can be distracting too.  I spend a lot of time on Facebook writing long emails with old friends.  I haven’t quite figured out this yet; there seems to be no single solution, but rather just learning to be more brief or only do this sort of activity on the weekend.
1 comment