Things that happen in China

May 13th, 2013, 7:53 am PDT by Greg

On Mondays, I teach from 8:00–9:30 and 18:30–20:00. That makes for a weird day. After lecture, I decided to go to the western restaurant around the corner. I had calories left for a light dinner and a gin and tonic. The following was written as I was sitting there…

Things I can see from here: two groups of young hip Chinese having foreign food, and a group of mixed western guys.

I think that group is two French, one American, and one other (who isn’t talking so I can’t tell). They’re speaking mostly English. One of them just said “it’s like licking your own balls, man.” Sadly, I didn’t hear the setup: it was one of those moment where the brain takes so long to process what just happened, that it’s no longer possible to react appropriately.

They’re watching videos of guys falling off skateboards.

One of the tiny Chinese girls has a comically large mug of beer. It’s actually a regular pint, but it looks comical when she holds it. She has been nursing it for an hour, but I appreciate the effort.

Somehow, all of this makes me very happy. That might be the gin.

The Chinese Web Market

April 30th, 2013, 9:19 am PDT by Greg

Since I have been in China, I have been thinking a lot about the web in China (and of course, living with a Chinese Internet connection). I know my share of web entrepreneurs, so one of the things that has been sitting in the back of my head is the question “how can foreign web companies expand into the Chinese market?” I know some excellent people thinking about doing just that.

After a few months, my honest advice to any web company thinking about China is: Don’t. It’s not worth the risk.

The unavoidable danger is being blocked by the firewall and completely losing any investment in China. The other is being cloned by a Chinese developer: shanzhai or copy-to-China. I propose to convince you here that these aren’t two independent risks, but are highly correlated.

Let’s look at the history of some prominent shanzhai sites and their foreign inspiration:

The pattern is clear here: a foreign company does something innovative, a Chinese company clones them and grows to be a viable competitor in the Chinese market. The foreign site becomes immoral and is blocked.

In each of these cases, the Chinese market moved quickly to the shanzhai site. I hear a little grumbling about the degraded Google service, and see the occasional Chinese kid on Facebook, but mostly the users moved smoothly to the Chinese-owned clone.

The reasons given for Internet censorship in China are generally prohibition of illegal material and promotion of national unity. There seems to be a clear side benefit: to neutralize foreign competitors when they become inconvenient to a local company.

I don’t think there is any quid pro quo there. I don’t think the Baidu founders went to the government and asked if they wouldn’t mind eliminating his competition, but the outcome seems identical to if they did.

So my advice on China is that there is too much danger of your entire investment being lost to the throw of an administrative switch on the firewall. Too much danger of a local clone. Too much danger of them both happening simultaneously.

Edit 03-2014: There has been some quid pro quo, at least on the scale of posts.

Network Sanitization

April 23rd, 2013, 11:48 pm PDT by Greg

I have been spending a fair amount of time working in coffee shops in Hangzhou. The culture seems to be that buying a coffee also buys me several hours sitting in a table doing whatever I damned well please. It’s a nice change of scenery from my apartment. They usually have wi-fi, but it would be pragmatic to assume that whatever traffic goes over that connection is beamed directly to a billboard outside. I generally feel the same way about hotel internet, free airport wi-fi, and other dodgy connections: I just don’t trust that they have any interest in protecting my privacy.

I really want to encrypt all of my traffic over those links. I always encrypted my mail client connections anyway, and SSH is inherently encrypted. That really leaves my browser as the weak link in my average-day networking.

After considering some options, I ended up with just about the simplest solution, although it does take touch of technical know-how to get going. The basic idea is that SSH can provide an encrypted SOCKS server. Using it basically involves setting my browser to use the SOCKS tunnel for everything, and starting up the SOCKS tunnel with a command like this:

ssh -C -D 1080

It’s also possible to do this on Windows with PuTTY and on a Mac from the Terminal.

In theory, this can speed up a slow connection a little. It removes the TCP handshake from their network, and the compression (-C) might help for the right kind of traffic.

Of course, you need a server to SSH to. If I’m working, I use a computer in the department at SFU. I figure that’s kosher. Another option is Amazon: a Amazon Web Services free tier should stay free if you use a micro instance and keep the bandwidth under control. As I recall, I just used their most generic looking Ubuntu image and changed just about nothing.

You privacy is, of course, only as good as your endpoint. Sooner or later, your unencrypted web traffic has to get out there into the big-bad internet. It’s not that I particularly trust Amazon, but I don’t trust any other provider much more.

I have also experimented with sshuttle. It pushes your entire network interface over the SSH connection. That’s technically better, but the SOCKS tunnel usually passes the “good enough” bar for me.

Edit: …and Proxy Selector to flip the SOCKS proxy on when I need it.

The coffee shop

April 18th, 2013, 12:24 am PDT by Greg

Just came to a nearby coffee shop to do some work. I hadn’t noticed this one until recently: it actually has a food menu, which should be explored.

I ordered a hot chocolate. A few minutes later, I got a probably-Carnation hot chocolate. A little weak, but whatever.

When I was half done, the guy comes over with a new drink, says “too sweet” and took my old one away.

I am now drinking brown hot water. Because China.

People ask what I miss from home. I miss having some idea of what is happening around me… ever.

Cultural Sharing

April 15th, 2013, 7:45 am PDT by Greg

Something astonishing just happened.

I was shopping at my usual grocery store and was grabbing some apples. Another guy around the apple stand clearly needed a plastic bag: he was trying to move in the direction of the roll of bags, but was blocked by a cart and general Chinese grocery store detritus.

Without thinking, I grabbed a bag and handed it to him. That was not a very Chinese thing to do. Even noticing that there was someone else in the store with me seems to be unusual. He thanked me and we went on our way.

A minute later, I went to the produce-weighing station. Another guy who I believe saw the plastic bag interaction motioned for me to go ahead of him.

If you haven’t been to China, that might not seem weird. Let me explain. The expected thing to happen in that situation would be for him to step in front of me, go first, and never acknowledge my existence. Another socially acceptable thing would be to wedge his shoulder in front of me if I wasn’t standing close enough to the counter, and put his stuff on the scale a millisecond before mine.

I literally don’t think I have had a “you go first” wave in all the time I have been here. I can only assume that it was a result of my bag-getting courtesy.

I may have started something here, like in Warm Bodies.


April 5th, 2013, 9:55 am PDT by Greg

I decided to go to Shanghai this weekend, for various half-reasons, but mostly because I wanted to see more of it. We previously spent about two days here on a tour. That’s not enough time to experience a city of 23 million.

Random tourist crap I did aside, I’m glad I came. It has really put my China experiences into perspective. Basically, Shanghai is a global city in a way that Hangzhou really isn’t.

Sure, Wikipedia has a very in-depth definition of “global city” but here’s my functional definition. A global city is one in which the ethnicity of the food people are eating is not well correlated with their ethnicity.

As an example, take Starbucks. There are a couple of Starbucks (Starbuckses? Starbucki?) in Hangzhou, but in them I get a vibe of “let’s try the coffee drinks westerners have”. In Shanghai, it feels like people got there by saying “let’s have Starbucks”. Starbucks is part of the culture here.

In the same way, dim sum, sushi, Thai and Indian are part of Vancouver. To my mind, Beijing is less of a “global city” than Vancouver. Manila more than Montreal (I daresay).

So I think what I’m really getting here is something I didn’t know I was missing: time in a global city. I can have a burger if I want because I fit in exactly as well as the Shanghaiese group at the next table. Same at the xiaolongbao place, or an Indian place. Damn… I should find an Indian place.

It also puts Hangzhou into better perspective for me. Despite having a population of 6 million, it really is a small town. That’s not a bad thing, just a thing that’s true. The outside world is still a bit of a novelty, because the world hasn’t all come to visit yet. Some of the difficulties I have had living there boil down to that, and I think I have a better understanding of the place with that in mind.

April Fools

April 1st, 2013, 12:18 am PDT by Greg

Having too much time on my hands here, and realizing that I teach both courses on April 1 this year, I decided I needed to do something about that.

I’m giving my lectures here differently than I always have at home. Here, I’m doing my notes as HTML, in decent point form, as I always have given lectures. I’m posting the notes for the class and basically using them as lecture slides. I just bump the font size up three or four notches, and scroll through them as I talk.

It’s working pretty well: they have something they can review later if they don’t catch the English of it all. It’s causing exactly the problem that kept me from this experiment at home: without having to write, I can say too much in one lecture. It’s very easy to cover material at an unreasonable pace.

I decided that for April Fools, I wanted to have the characters on screen move around, just subtly enough that they initially wouldn’t be sure if they really saw anything or not. After a little Javascripting, I had something I’m pretty happy with. You can see what I ended up with on a demo page. If you’re into Javascript code, I have posted that as well.

What you see in the demo is a character being animated every two seconds. I left it at every five seconds during lecture, so it was more subtle. They had plenty of time to look at it, after all.

I think it worked out pretty well in the discrete math course. I could see the occasional student do a double take. A couple of times, one fired near a part of the screen I was pointing at, and I had to ignore it. I let it run for the first half of the lecture and them told them what was going on: it seemed to be appreciated. There seemed to be a mix of “yeah I saw it” and “I thought I was going crazy at first”, which is about what I wanted.

Now to see how the web development course takes it…

Edit: The web course was probably more split. I think some of them noticed right away, but some never did. It’s also possible they’re just more expressive than the 8am group.


March 21st, 2013, 6:56 am PDT by Greg

I have been trying to get another Chinese visa, so I can leave and re-enter the country. ZJU has a midterm break, and I’m hoping to make the most of it. There is a one week turnover to get the visa. I’m doing some travelling next weekend and the one after. The break is at the end of April and I need the visa before I can make any travel plans.

Long story short, after waiting for the various paperwork, I needed to apply for a visa today so I can get my passport back and leave town next Thursday afternoon.

A staff member from the University was going to go with me. (I don’t really want to name the staff member because it’s nobody’s business: I’ll call her X and if you think you know her, then yes, it’s her.) The department’s driver, Mr. Li was taking us.

After driving 25 minutes across town, we get to the visa office. We wait around for a bit, my number is called, and there is some defeated-sounding discussion between X and the visa person. Apparently, the University never checked me in with the police as living in ZJU residence. That means I have been living vaguely-illegally in China since foreigners have to register their address. It’s not a going-to-jail thing, but it’s clearly a no-visa-for-you thing.

Phone calls are made. Residence checks me in, but we need paperwork to confirm that it has been done. It’s 3:00 at this point, and the office closes at 5:00. Back in the van with Mr. Li: 25 minutes to the University, 25 minutes finding/printing paperwork.

During all of this, I’m doing the calculus of how bad it could be: basically, I’d have to cancel my trip next weekend, possibly eating the train and hotel costs, and annoying some people at SFU. Nobody else seems particularly worried, so I’m trying to assume things are going well, but am pretty sure today is a failure.

Towards the end of the paperwork-printing time, X starts talking to a student that has wandered into the office. Apparently, X has to go home and the student is being dispatched to go back to the visa office with me and make sure I get my visa.

His name is Frank. He had come in to ask something about his upcoming exchange to Singapore and apparently didn’t have anything else to do this afternoon. He seemed very good-natured about spending his afternoon helping me.

Back in the van with Mr. Li and Frank; 25 minutes back to the visa office. For those keeping track, it’s now 4:15 and I’m starting to wonder if it’s a “nobody gets in line after 5:00” or a “at 5:00 we leave and screw you all” closing time.

We take a number, but Frank wanders up to the counter “to see if we can go first”, for… reasons, I guess. It turned out the answer was yes. After more discussion of a nature I didn’t understand, I was given a receipt that said I could pick up my passport next Thursday. They totally promise that it will be ready in the morning.

As we’re driving away, I’m starting to feel optimistic about it all working out. Then Mr. Li turns around for some reason. At this point, I assume I’m screwed. Obviously, something wasn’t done, and the visa won’t happen until August. It turns out they just wanted to make sure I knew how to pick up my passport next Thursday.

Finally, a much slower drive back to campus in rush hour. Nice kid, that Frank. And I’m really starting to feel an affection for Mr. Li.

Will my visa and passport be there next Thursday at noon? At this point I’d give 3:1 odds on yes.

I remember a former DDP student characterizing things this way: “China, the land where anything is possible but nothing is easy.” Those words have been bouncing around my head a lot in the last month. Today they rang loudly all day.

An Idiot with Maibing

March 15th, 2013, 4:31 am PDT by Greg

I haven’t been blogging as much recently for the very good reason that I haven’t had as much to say. I have settled into a routine, so there’s not as much fodder for posts. I have been taking some time to explore the city. As the weather is slowly getting nicer, riding around is more and more inviting.

Today while riding around, I stopped at a street-side food stall (as I often do), decided what they were selling looked good, went up, and in the absence of literacy in the local language, pointed at the first picture on the menuboard and asked for one (as I often do). What I got could only be described as a Chinese pupusa. It was pretty good and new to me, so I saved the bag it came in in the hopes of figuring out what it was.

With the help of Pleco, I figured out that it was maibing. With the help of Google, I figured out… nothing.

Nothing useful for “maibing”. Searching for the Chinese, 麦饼, got some useful stuff that could be translated. They’re tasty: just look at them! They seem to come from Wenzhou and are prepared pretty much like pupusa: dough, dumpling, flatten, fry.

But here’s the thing: nobody seems to have ever written about them in English. There’s this food that I like, and will possibly never be able to find again (after I leave Hangzhou, at least).

I recall that this is something Karl Pilkington whinged about in An Idiot Abroad: what if I try something and like it, but then can’t every get it again. He took this as a reason to never travel.

Here I am agreeing with him: never try anything new. You might like it and then have your heart broken.

[But, I know somebody from Wenzhou. And his mom. Maybe I can bribe my way into a cooking lesson.]

One Week and my Comfort Zone

March 4th, 2013, 6:25 am PDT by Greg

I have now officially completed one week of teaching: the discrete math course last Thursday and Monday morning. Web development Monday night.

The discrete math course is going fine. It’s material that should be near and dear to my heart: my undergrad was math and computer science after all. The problem is that it just isn’t. I have moved on and prefer my CS with computers in it now. Not that this is a serious problem, it’s just hard to get excited about discrete math at 8:00 am.

I’m just back from my first web development course. Having not taught the material for 6 months (or started the course for 10), I had started to forget the feeling. Teaching web stuff (or programming languages: CMPT 470 or 383 in the SFU lingo) feels good. It was like a old sweater (old boots? custom-tailored clothing? What’s the expression?). Finally, something that was right bang in the middle of my comfort zone.

After all the (good) weirdness of the trip, then adjusting to China, then to ZJU, then to discrete math, it was such a contrast. I could have stayed up there and talked about web development until I dropped from exhaustion.

My big worry about this class was their English level. The math course is DDP students, so they have taken extra English courses, but I wasn’t so sure about this group. Judging by my internal engagement meter, they seem just fine. That’s a load off.

At some point during the class, I asked (begged) if someone could get the campus VPN craziness to work under Linux. [I have been working in Windows, which is also not comfortable.] After class, about 10 kids came up and assured me that it was easy. In five minutes, my laptop connected to the VPN under Ubuntu. [To be fair, it was easy: if you already knew how, and were on the cc98 message board, and could read Chinese.] That’s one more big step into my comfort zone.

When I got home, I had a rum and diet coke, using the Tanduay we got in the Manila airport (for $2$4, double the in-town price). It isn’t much to sip straight, but mixed with coke, it’s a damn serviceable rum. More comfort. [Mom and Dad: you’ll be pleased to know that I still often give a thought to Glen when I have a rum and coke.]

So there you go: web development, Linux, and rum. That’s apparently my comfort zone.

« Previous Entries   Next Entries »