The Shanghai Salt Spoon Ferrari 
My salt spoon arrived in the post last week. The Shanghai health department believes the citizens of Shanghai use too much salt in their food and it is time this problem was addressed. I live in Lujia zui in Pudong and my girlfriend and I often see a red Ferrari buzzing down South Pudong road. I always ask her how do people in Shanghai afford such a car and her reply is that it must be a movie star. In fact I have a new theory, I believe it is the boss of the Shanghai Salt Spoon factory.


China's corruption is endemic, it is all pervasive. I recently heard that Google China no longer presents an error 404 on pages the Chinese government doesn't want you to see, rather they present a page stating that the government has blocked this site. The government denies this. So are things really changing, especially after the Olympics?

Well the salt spoon says it all really. Whatever you are told take it with a pinch (small spoon no more then two a day) of salt ;-)

[ add comment ]   |  [ 0 trackbacks ]   |  permalink  |   ( 2.9 / 21 )
Shanghai World Financial Center - Opening Day 
So the tallest building in China, the Shanghai World Financial Center opened and I went up. I had to queue for 2 hours, (the official opening time was 2pm). The cost to get to the Skywalk at the very top (100Floor) was 150Rmb a person. I definitely feel it is worth the price, especially when you look down and see both the Jin Mao and the Pearl tower below you. When visiting Shanghai it is a must see.

There are a few issues though. You are forced to watch a stupid light show before you enter the lift, showing official mascots so that you can buy more merchandise when you reach the shop at the 97 Floor (or maybe 94 I can't remember). More over Shanghai's pollution levels are horrendous. The day the building opened was fortunately one of the clearest days I have seen in a year, yet as the picture shows, that is not saying too much.


Also having been up the Twin Towers in New York and Victoria Peak in Hong Kong, you realise that Shanghai is really nothing to compare to either. Perhaps its the construction work, or the pollution or something. Shanghai still has a very very long way to go to have the same awe inspiring look and feel of New York or Hong Kong.

If I had one day to visit Shanghai I would see the Bund and then go up the Shanghai World Financial Center.

[ add comment ] ( 1 view )   |  [ 0 trackbacks ]   |  permalink  |   ( 2 / 12 )
Wow Shanghainese is just so different to Mandarin 
Living and working in Shanghai, I hoped to pick up some Shanghainese, but without any really good teaching/learning resources this is actually quite hard. Its fine picking up the odd word here and there, but the youtube video below shows just how different the language is to Mandarin.



I love chinesepod.com and its a shame that they don't have any Shanghainese pod casts.

[ add comment ] ( 5 views )   |  [ 0 trackbacks ]   |  permalink  |   ( 2.7 / 30 )
Variable vomit bucket aka in memory database aka visitor pattern aka reference to array of hash reference. 
Maintaining legacy code is painful and boring. Great designs, over years dissolve into blobs of spaghetti. Although this can happen to Java code, there is no doubt that the situation is far worse in Perl.

The product that I am moaning about once started out life as a beautifully object oriented and somewhat designed tool. Over time, bug fixes and enhancements, along with summer interns turned this into a maze of dead code blocks and nastiness. A mixture of ksh and awk scripts appeared. VBS code to supplement windows native functionality that simply could not be done in other ways (networked paths, spaces in file names). XML input files with XSL transformations, suddenly need to be dynamically altered to accommodate a new feature, the DTDs kind of work.

All this however is nothing to how badly the hash of hashes can be abused to render code utterly unmanageable. All you need do is pass this reference to every module in the project and just add your own hash to this reference. Set some data in the parse, dump this data into the reference. Need this data in the XML writer no problem you remember the name you used in the reference. Hell, why not even dump some blessed objects into the reference as well.

But what about if you forgot the name of your variable, what about the idea of namespace, I mean what if someone else adds a file and name and overwrites my value:

$rh_opp->{file}->{$name}

I know I will just give it a more abstract name, that will do the trick.

$rh_opp->{aFileCreatedByAndrew}->{$name}

This I can only describe as a variable vomit bucket and is the quick and dirty solution to any bug or enhancement these days. In code reviews a good explanation is to describe this as the visitor pattern, implemented globally for everyone on your team to use.

I think this blog entry is to criticize Perl, in so far as it is far too flexible a language. I was once told by a colleague that to criticize a language for being too flexible is foolish, I also read:

Perl doesn't have an infatuation with enforced privacy. It would prefer that you stayed out of its living room because you weren't invited, not because it has a shotgun


What is wrong with enforced “Best Practices”? Having to fix and maintain code that has been utterly abused, through deadlines, interns, out- sourcing, in-sourcing, cross platform nuance etc is hell. Java seems to be less brittle. Perl collapses. Where is my shotgun to shoot the next developer to vomit in the variable bucket, then again perhaps I should just go with the flow.

[ add comment ] ( 4 views )   |  [ 0 trackbacks ]   |  permalink  |   ( 2.8 / 39 )
Walmart Olympics 
Shopping in Walmart for weekly groceries can be a dull and soulless affair, even in China. Unless, that is, you go with my friend Edward. Having lived in China for almost 5 years now, I miss all the country specific quirks. Like sign up ones name on a public advertising board, putting forward the fact that you too support the great Olympic Champions. This allows you to have your photograph taken holding a fluffy toy.


Edward, can you explain this choice of alias that you chose? Some sort of solidarity with the ancient Greeks?


For readers of my blog who like continuity, Ed is the guy that got savaged by "the cat in my flat" :-)


[ 2 comments ] ( 15 views )   |  [ 0 trackbacks ]   |  permalink  |   ( 2.7 / 57 )

| 1 | 2 | 3 | 4 | 5 | 6 | Next> Last>>