Monday, July 30, 2012

How bandwidth availability is making obscure data easily available

I'm not much of a downloader/ content pirate. Not because of my unwavering respect for intellectual property, but because I'm mostly impartial to movies, TV series and exploring music. Consequently, my collection of illicit music is abysmally outdated.



***

In 1997 - 15 years ago! - Pro Pinball: Timeshock! was released to great reviews. It had great depth in playability, very believable simulation physics, good visuals, engaging music and even a storyline. Till today, it firmly remains one of the best pinball games ever coded.

I bought a copy, and spent many many hours flipping balls around a simulated table. On and off, this game lasted me till 2005 or so when my ailing Compaq's CD drive failed to read the Timeshock CD. Torrent files for the CD image were rare, and to find a functioning torrent was a challenge. Finally managing to get hold of one with some activity, the downloading process took several weeks.

Timeshock was back, faster1 and more robust. This lasted me for several years more, surviving several computer formatting and migrations. Until I lost the damn CD image. It's somewhere, I just don't know which hard disc it's backed up in.

Trying my luck with the torrents again, I was very surprised to be able to find one so easily; the download took an hour to complete. I did not expect this. Perhaps data storage and bandwidth has become so cheap that previously low-demand files are being made available again. I tried the other lesser known Pro Pinball titles, and they were just as easily available. This is amazing!

Notes:
1. Reading a CD image stored on a hard disc is much faster than scanning soundtracks on the actual CD.

Labels: ,

Wednesday, April 13, 2011

Yesterday I saw a magnificently disgusting event at the toilet.

Most Muslim men will use a bit of water to wash their penis after peeing. In some nice urinals, the flush has a spout that has water coming out so that they can use their hands to scoop the water to wash their snake. However, many urinals don’t have that spout so people have to make do.

In this factory, the urinal is not a nice ceramic one. It’s like the ones in schools and government offices- a stainless steel common wall, drain at the bottom and some nozzles at the top. These nozzles spray water directly on the wall to form a thin film of running water for flushing the wall. Usually, the factory workers will use their hand to collect some water at the nozzle outlet and wipe their snakes with their wet fingers.

Yesterday was different.

While I was doing my business with my snake at one end of the urinal, a construction worker did his thing with his own snake at the other end. When he was done he pulled the flush, leaned forward, and instead of reaching his hand out for the water nozzle, he used his arm to brace himself against the cement wall above the urinal, and leaned forward towards the stainless steel wall of the urinal. With his hips thrust towards the urinal, he used his hands to help rub the tip of his presumably circumcised snake against the stainless steel wall several times to get it rinsed with water. The stainless steel wall of a urinal, at a height which many people will urinate directly on to*.

Oh golly, that was nasty.


*If one did a bacteria count of water from a urinal nozzle that was collected on a hand, and compared the result with a swab taken from a urinal wall, the difference would probably be negligible. However, the ick-factor would be greatly different.

Labels:

Friday, July 10, 2009

China is the best!

Of late, I’ve been stationed at one of the many factories of one of the East-Asian electronics conglomerates.

This afternoon, I returned to our company’s little regional office to do some online work (made 2 comments on Facebook status updates, surfed through BBC news, and updated some drawings and sent a few email) as the client would not allow outsiders to plug into their computer network.

The accountant’s husband strolled into the office late in the afternoon to wait for his wife to finish work. In general, he is a friendly man, but he suffers from a severe case of the widely-prevalent disorder: the China-is-best mentality. Below are excerpts of our conversation:

[typing a text message on the phone to the gf]
[walks by behind]
It seems quite tedious to type using English isn’t it?
It’s ok, I’m used to it.
Yeah but it’s not as efficient as Chinese. You get half as many characters for each message, but each word only requires one character 2.
True.
I think… that English is not as sophisticated as Chinese. Have you studied classical Chinese? Each word conveys so much information, that a short sentence is able to convey a very deep meaning.
Mmm...
And English is more of a mechanistic languages. There are only 26 letters, and words are formed by combining different letters1. For sure, it’s well suited for the purposes of computing, but for communication between persons, Chinese is still the better language.

[truncated]

Well, you can’t really tell if you don’t study it in detail. For example, if you use only conversational-grade English, it is impossible to judge the level of refinement in the language.

[...]

There must be a significant difference in the level of civilisation between the Chinese culture and the Malay culture right?
Well of course it’s different. The Chinese culture is from China and the Malay culture is from the Malaysia-Indonesia region.
So how old is the history of the Malay culture? (here it comes, a set up move for the all conquering 5000-years-of-civilisation trump card.)
[I somehow answered that question in a sideways manner and we got distracted by the details about how old other civilisations are, including European and North American. So no mention of 5000 years.]


At end of the business day he offered to drop me off at the train station, thus saving me an hour-long ride in a bus with no air conditioning (temperatures in mid afternoon is 30 to 36 celcius these days).

Thus, I shall not further vilify him here, tempting as it may be.


Footnotes:

2. I am convinced all well developed languages contain a measure of combinatorics. For example, the expression “I need to have sex with a BMW” is conveyed by picking several words and grouping them into a sentence. The words, in turn, consist of a group of smaller objects lumped together.

In English, words consist of a series of letters arranged in one dimension. In Chinese, words consist of sub-words arranged in 2 dimensions. These sub-words consist of a certain grouping of strokes, also arranged in 2 dimensions.

The fact that English words are constructed in 1 dimension makes it easy to spell words by arranging the letters along the time dimension.


1. which brings me to the second point, how one can squeeze so much more information into a 70-word message compared to a 140-character English message.

Mobile phones contain a standard dictionary of common Chinese words (which is probably not a huge amount). Assuming that there are 16,000 common Chinese words, this requires 14 bits of information to correctly assign each word to a unique number.

Assuming that each character for the mobile phone carries 7 bits of data, this is enough for 128 unique symbols (26 lower case letters, 26 upper case letters, 10 numerals, and about 30 symbols). 6 bits can only give 64 unique characters, which is definitely not enough.

As above, assuming that each Chinese word requires 14 bits to encode, it will need 2 character’s worth of information to be transmitted.

This is advantageous compared to the regular way English is transmitted: 2 characters is enough to encode a word, while English requires up about 5 characters to encode a word (sometimes up to 22 characters, such as counterrevolutionaries)

Can this method be used to give a higer information density to alpha-numeric based text messages?

A proposed mechanism is described as below.

[ok I’m getting ahead of myself, this is supposed to be a footnote, not an essay. Next entry, perhaps]

Labels: ,

Thursday, July 09, 2009

Young man, do you want to have some fun?

When I went hunting for photo opportunities over the weekend, I arrived at a little area I had seen many times while cruising in the elevated light rail.

Access was through many little lanes connected to the main road. Each of these lanes fork out several times, but the paths inside do not connect.

The first lane I entered was pretty normal looking, because a police station was located inside the area.

The second lane was located just across the road from the long distance bus terminal, and most of the buildings were converted into motels and hostels.

The third lane looked rather normal, except for a woman loitering about at the entry of the lane. When she saw me approach, she asked, “young man, do you want to have some fun?”

Naturally, I ignored her. My idea of fun involves listening to instrumental music and sipping coffee while stroking a purring kitten in a BMW 7 series, so I walked ahead without acknowledging her presence.

Most touts would give up on you and find another target if you ignore them and gave them no hope of having any business out of you. Not so for this woman. She followed a few steps behind me, continuously asking if I wanted to rest, if I wanted to play, if I wanted to have a look at the girls first etc.

I stormed ahead without acknowledging the parasol-carrying woman. I wanted to take photographs, not have sex with strangers.

Further into the area, I noticed something different- there were women loitering around the streets. These were not the housewife-kinds that sit on little stools outside their kitchens plucking vegetables or watching their grandchildren play. These women were standing in the lanes with a bored look waiting for something to happen.

Shit, I seem to have stumbled into a vice den of sorts.

I turned to leave, and faced the woman who had been muttering her offers to set me a play date. I pretended to see her the first time, listened to her ask if I wanted to have fun, acted dumb and watch her rephrase her question into an invitation of “lets go and see the girls.”

I gave her a puzzled expression and asked her in exasperation, what are you asking? She skipped around embarrassing question and suggested I go take a rest, cocking her head in the direction of her brothel (presumably).

With a look of mock horror, declined her gracious offer and left, leaving the sex with strangers to other desperate souls.

Me, I just want architectural photographs and sex with a BMW.

Labels: ,

Monday, July 06, 2009

News in 120 seconds

Fuck this shit.

Yet another engineer has resigned. Guess who will be doing all the work now.


***


Moving on to a less miserable topic...

Chocolates!



Click here for large size image





Click here for large size image





Click here for large size image



At 28 RMB for a box of 8 pieces, it is not a trivial matter. That it consists of a smallish biscuit entombed in a chunk of milk chocolate is a redeeming factor.

The beautiful Super-Takumar 50mm/1.4 is there as a reference for scale, seeing that it is a familiar object and most people would have an intuitive grasp of its size.


***


And now, some updates from the fashion capital of China, Shanghai.

Three-quarter length stockings have become quite popular here, the owners proudly assaulting the eyesight of the general public with their frightful aesthetics.





Designs vary, ranging from plain translucent material throughout, to more complex patterns such as opaque nylon above the knee, translucent nylon below the knee, and finished with a bold lace trim at mid-calf height.

Now to wait for the rest of the world’s sense of fashion to catch up, and we’ll see an explosion of these things from Milan to New York. Delightful.

Labels: , ,

Sunday, June 28, 2009

When the visual cortex stops working

Today, I watched my brain turn itself inside-out. A thoroughly frightful experience, but very “interesting” (but only in the way a scientist would use the expression).



I had just disembarked from the overnight sleeper train from Tianjin, and was making my way out of the Shanghai train station towards the metro station. All of a sudden, I felt faint. After I climbed a flight of stairs up to ground level, it felt much worse. I was wobbly, and had to stop walking to hold on to a wall to prevent myself from falling over. My vision blacked out completely- I could see nothing. This lasted for about 10 seconds.

My sense of balance was failing rapidly, and even the wall was not helping me keep upright. I had to squat down and brace my head in by hands. All this while, I was worried my condition would deteriorate further causing me to keel over and pass out on the wet pavement in the rain (and lose my computer, passport and phones). This lasted for approximately 10 seconds until my sense of balance and vision returned, just barely.

I became aware of a motorcycle-taxi behind me asking if I needed a ride. I told him my address, he quoted me 15 yuan. It was a slaughter (a normal taxi would have cost 11 yuan), but I was in no shape to haggle.

I was able to get on the bike and keep myself in balance without problem, but my vision was still bedlam. In hind sight, this is not very surprising as the visual cortex is of substantial size, and visual processing is a very resource intensive task.

Below is a Photoshop recreation of my rather useless sense of vision at that time.



Normal view

Click here for large size image




WTF view

Click here for large size image


Allow me to attempt to describe what little I could see.

It was an overcast day with light drizzle, so the sky was entirely white. My field of vision had returned to normal, however, everything was in very very low resolution. In the middle of my field of vision, I could ‘see’ some detail, but everything else was a blur of white and splotches of dull colours.

When I look at buildings, I see it as if it was a pencil sketch on white paper. I could perceive some of the edges of buildings- these edges were rendered in a plain purplish colour. The rest was mostly white in colour. It appears that the perceived edges were moving with respect to my field of vision. This is consistent with findings that moving objects are easier to detect compared to stationary ones 1. Conceivably, the perception of moving objects is given a higher priority in the visual processing part of the brain.

Over the course of 5 minutes, I regained my sense of vision. I could walk and keep balance as if nothing had happened.


Footnotes:
1 – This is important for the survival of many species. A moving object could well be a predator, and being able to detect a predator early would increase the creature’s chances of not being eaten.

Labels: , ,

Saturday, May 23, 2009

Old Shanghai

Hidden among Shanghai’s endless blocks of high-rise buildings and badly designed metro stations are quaint little pockets of antiquity.

These decades old clusters of houses resemble the disorganised clutter of squatter houses: narrow crooked lanes that will not fit vehicles with more than 2 wheels, tiny houses built side-by-side with common walls on 3 sides, abrupt forks and branches in lanes that lead to more branches or sudden cul-de-sacs.

Fortunately, the abject misery of squatter housing is not present here. Houses are built of brick and mortar (I suppose so- anyone living in a corrugated sheet metal shanty will freeze to death in winter), there is running water, the lanes are paved with cement and provided with adequate drainage and there’s a marked absence of reeking piles of rubbish.

My walk through the area was surprisingly calming. The narrow crooked lanes do not let in any sounds from the busy streets outside, and the pace of life inside seemed considerably less hectic.




Click here for large size image



Not all houses are created equal. The buildings on the left side have carefully laid brickwork and beautiful door and window frames, as the next image will show.




Quaint, Almost
Except that the light bulb has been replaced with an energy saving tube






Hey, where did the boy go?
Click here for large size image









Quaint, Almost
Except that the bicycles have been replaced with electric scooters



It was said that there were 9,000,000 bicycles in Beijing1, but that number is likely to continue decreasing over coming years. Electric bicycles, mopeds and scooters are replacing bicycles as the affordable means of personal transport.

Electric bicycles are powered by a lead acid battery, usually tall and narrow in shape unlike those found in cars. Typically, the rather heavy battery is recharged by hauling it indoors to be plugged into a charger. Also, some people make it a point to take the battery indoors as its high price and good resale/salvage value makes it a target of thieves.




Click here for large size image






Footnotes:
1. "Nine Million Bicycles", Melua, 2005.

Labels: , ,

Wednesday, May 20, 2009

Adventure at a post office

Let me tell you a story.

I went to the post office with my envelope.
The envelope is from FedEx, made of manila card with a clear plastic pocket for the air waybill.
I used a sheet of A4 to tape over the orange and purple logo on the front and wrote the destination address there nicely. And slipped another piece of paper into the air waybill pocket to show the return address.

The girl at the counter asks, “Is this a letter?”
“Yes.”
“Erm, this is not an envelope.’
“It is.”

She then goes to ask someone else if it is an envelope.
She returns, “No that’s not an envelope.”
“It is a courier service envelope.”

She leaves her position to consult with another colleague.
On her return, she tells me with an air of finality, “You cannot use this envelope.”
“Fine, sell me your envelope.”

For 60 cents, she gives me a normal brown paper envelope. I write the delivery address and tear open the beautiful FedEx package to repackage my goods. She eyes the contents suspiciously.
“What is that, you cannot send that as a letter.”
“What?”
“Only documents can be sent as letters.”
“So how do I send it?”
“You need to send it as a small package.”

In the end, I decided not to mail it. I’ll repackage it properly as a ‘letter’ and mail it another day.



Online, wiser expatriates have advised exasperated newcomers to lower their expectations when in China. Expect everything to go wrong, and you’d be fine.

Sigh.

Labels: , ,

Tuesday, March 03, 2009

Happy First Tuesday of March

In an effort to slash operating overheads1, my office has moved from the overly large 3-unit space in a commercial building to a cozy2 apartment in a mixed-occupancy development near the railway station.

Over the weekend, a burst pipe at our block managed to put 3 of 4 lifts out of service, leaving a long queue for the lone lift up the 39-storey building. This added to the already severe problems of the building being over crowded- designed as residential units, the services are probably enough for 3 to 4 occupants per unit. But with many of these units used as offices, there was a problem of overpopulation (just like the whole of China, really).

The complex consists of a retail areas on 4 podium levels, and two separate towers of about 40 floors rising up from the podium. To circumvent the horrendous crowds at the lift lobby, we took the other tower's lift up to the 5th floor and snaked through emergency exit tunnels to appear on the roof level of the podium. Here was a roof-top garden and tennis courts for people who pay more rent, which also functions as a safe area in an emergency.

Walk along the roof-top garden to the other tower's emergency exit door, and go up to the 6th floor and tadaa!, crowd avoided.

Today, i followed the same route. Up the lift to level 5, entered the emergency exit door (which required pressing a door release button to open), travelled through a winding concrete tunnel to the other door leading outside and only to find that it was securely shut. A numeric keypad provided authorised access, and a sign said "door opens automatically in a fire". Great, looks like I'll have to use the lifts at my own building anyway.

I returned to the first door, only to find the same thing: a numeric keypad and no means to unlock it from the 'safe' side. Uh-oh. I looked at other doors and found them not to contain much promise: electrical risers and HVAC equipment rooms, probably. No good getting stuck in those. I paced back and forth along the tunnel, looking alternately at both of these very secure doors (probably rated to 1.5 hours, these doors can very well resist the spread of smoke and heat from a raging fire for at least 90 minutes).

I then found a plastic box with a hinged cover embedded into the concrete. Inside was a red phone with no number pad - if this was hard-wired to the fire department, I could stir up a mess. Hoping it was merely connected to the building control room, I picked it up and heard it ring. Fortunately, it was not the fire department.

I explained my situation, and the person said he'll send someone up to look for me. To my surprise, he didn't try to give me a talking-to for using the emergency exits (some buildings managers treat these exits as additional things they have to guard - some are even locked up at night with chains and padlocks). After several minutes (the wait was made easier playing Snake II on the phone), someone opened the door leading back to the lift lobby.

Yay I can finally go to work!



1. This, in addition to giving everyone a delightful retrenchment/paycut surprise. You know hor, my salary got reduced by 20%. [ -censored- ], good thing i don't have to worry about home loan payments and the like now.
2. Smallish

Labels: , ,

Friday, February 27, 2009

Why I carry three mobile phones

Either China is one hell of a weird place, or I am not very receptive to alternative ways of doing things (like quietly walking down the street as opposed to having to hack up and spit globules of imaginary phlegm every 5 steps). Late June last year, when Jean and I were stuck in the Guilin airport, I was most unfortunate to touch someone else’s spit.

After boarding the plane, we waited for the plane to receive clearance for take off, but that never came. Apparently the weather at the destination was nasty and incoming flights were delayed. After sitting like 150 idiots in an idling aircraft, we were finally herded out and given something to stuff our mouths (a can of Sprite, a tub of instant noodles1 and a large pack of sa kei ma – some sort of sweet confection with a description that defies my limited vocabulary). Nothing like food to placate a herd of agitated travellers.

We milled around the departure lounge eating the rather tasty noodles in MSG water, stretching our legs and generally enjoying the relative spaciousness outside the confines of the cabin. Shortly after, the boarding call was announced. Of course I took my time – I always take my time when it comes to such queues. No point rushing to queue in line when I can sit around and just stroll up to the gate when the queue has shortened considerably.

When almost everyone was done entering the gate, we went towards the gate. Along the way I chucked the empty noodle tub into a rubbish bin. Somehow, my hand nudged the top edge of the bin, and felt something gooey. Instinctively I pulled back and turned the hand around to see what I have touched. One of the fingers was coated with slightly murky and very thick mucus. I made a disgusted face, accidentally let out a rather audible “eeyer” and rushed to the washroom while Jean waited.

When I came out after a thorough wash, everyone else had boarded and the ground crew were glaring at us to hurry the fuck up.


***


Right, three phones as suggested by the title.

One of the oddities in the way the Chinese telco operates is in application of roaming charges. When the user takes the phone out of the province from which the phone line originated, all calls received will be levied a roaming charge.

Of course, this is very inconvenient if one travels and is uses the phone a lot. The first week, I managed to burn 75 RMB in 4 days. By then, by credit balance was almost depleted. On the way to dinner, I saw a China Mobile dealer and went in to get my phone topped up. After giving my phone number to the counter attendant, he asked if it was a Shanghai number. ‘Yes,” I told him. “I’m sorry, we can only service Jiangsu numbers. You may go to our office at [some building].”

That was a curve ball.

“Then I’ll buy a new prepaid line.”
“Ok. We’ll need your identification document(s).”

Shit, I left my passport in Shanghai.


On my next trip to Suzhou, I brought along my passport to register for a prepaid line. This is in addition to the Shanghai line and the Malaysian line I carry with me.

Whenever one of the phones beep, I need to fish in my pocket for it. If it’s not the right one I dig again for the other, and the other.



That large ugly one in the middle is the spare phone. I have a spare phone because the two 6510 phones are rather old and may expire any moment.

In fact, they did expire at a most inopportune time. May’s phone died first: the microphone stopped working and it was only good for texts. Which was not a problem, the Malaysian line was only used to receive texts anyway. Then when I arrived at KLIA, Hou called me to arrange where to pick me up etc. I was not yet pass customs, so I asked him to call back later. And when he called the microphone was dead - I became mute.

And I couldn’t text him because I had no credit at all. Cleverly, he got a top up card and sent me the number, after which I could send messages.

Ok enough rambling for tonight. The phones have been repaired.



1. Instant noodles are available in a large paper tub package. Very similar to cup noodles we have at home, except that the size is actually good for one reasonably filling meal.

Labels: , ,

Sunday, February 22, 2009

Doom and gloom: my first economic downturn1

For the past two working weeks, I had been in Shenzhen2 for some work-related affairs, returning to Shanghai for the weekends and Mondays. Both the workplace and accommodation had no internet access, thus cutting me off from the universe at large.

While at Shenzhen, I witnessed a company in the midst of downsizing. It was unpleasant yet morbidly fascinating, like how motor accident would draw curious onlookers.

The company retrenched approximately 2/3 of its staff and moved out of its rented office to operate from a flat. With the severe downsizing of staff, much of the company’s assets became redundant, including the company car, several computers, a handful of air conditioners and furniture.

Departing staff made cash offers for these items, knowing full well the management will not have the time or connections to sell them. Eventually they were sold at prices well below the items’ book values, with computers being sold for a meagre 500 RMB apiece and the split unit air conditioners, 300 RMB.

One of the more street smart employees told the general manager that his friends wanted to buy the computers too – obviously he was aware that of the arbitrage opportunity at hand. The general manager was quick enough to say the original price of 500 was for the staff member; other buyers would have to pay the ‘full price’ of 800. This was still agreeable to the arbitrageur, and he went away with 4 workstations and the company car for an undisclosed sum.

On the last 2, 3 working days for the retrenched staff, the motivation for (pretending to) work had clearly evaporated. They grouped together chit-chatting, watching videos, reading comics and surfing the net.

Even with the substantially reduced rental and salary costs, all is not rosy. The company is already committed to investments that require further capital before turning a profit, yet the company is barely making it for the month’s salary and retrenchment remuneration3.


----

1. I was too young in 1987 and 1998 to notice with much clarity
2. location name changed
3. Chinese labour law requires that employers pay retrenched employees one month’s pay for each full year employed.

Labels: ,

Saturday, September 13, 2008

He what on the restaurant’s floor?!

I usually do not mind eating at less classy restaurants as it usually means I can get more nutrition for the same price.
Consider the difference between KFC and the cheap, dingy little joint where I had dinner today:
A burger set at KFC costs approximately 20 RMB, and consists of a burger (bread, piece of fried chicken patty, lettuce fragments, dressing), deep fried potato sticks and carbonated syrup.
At the dingy joint, a bowl of rice and a massive dish costs approximately 12 RMB. The dish would be a stir fried mix of vegetables and meat slivers.

For both instances, the bulk of the nutrition comes from:
Chicken patty and lettuce fragments in the burger
Massive dish of vegetables and meat slivers
The rest (burger bun, deep fried potato sticks, carbonated syrup, rice) is merely filler.
The result is clear: I can get more useful stuff for a lower price at the dingy little restaurant.

Of course, there is no such thing as a free lunch. The downside to dining at a dingy little joint is that you share the dining hall with less classy people (now isn’t that pretentious). Today’s incident is the most memorable to date.


***


Among the diners at the table next to mine was a couple with their spawn, probably 2 to 3 years old. He was a pesky little brat, the kind prone to emitting screechy little whines when he wanted to be carried, when he wanted to be let down, when he wanted to eat, when he wanted a drink…

So everything was progressing along smoothly – him sitting in his mother’s lap, the mother feeding him dinner – when all of a sudden he went into a minor coughing and whining fit.

Must have choked on something, so the mother swings him a little to lean out of the chair’s footprint and pats his back. The child successfully clears the offending piece of food from his mouth, and spits it on the floor. She continues patting to ensure that nothing remains, and he ejected more semi-masticated food onto the floor.

Not more than five minutes later, I heard something splattering and I turned around. The child was still sitting on his mother’s lap, but this time he was turned to one side. The mother was holding the slit of his pants* open, his young penis bathing in the soft glow of the overhead fluorescent tubes.

And from this penis, a stream of yellowish liquid flowed out and splattered onto the restaurant’s floor. Not more than 1.5 m from where I sat.


***


When met with strange circumstances (circumcised or otherwise), the best thing to do would be to tell everyone about it.

I sent a text message to several people:
At a restaurant now. The toddler at the next table just peed on the floor. The mother pulled out his penis and there he goes! Uncultured brutes… die!

D replied, asking if it was big.

I replied:
Haha, no. It was so tiny I initially thought the parents had cross-dressed a girl into a boy. Upon closer inspection, I found the unruly little squirting penguin.


* pants with slits are very common for young children in China. It’s like a normal pair of pants but with the crotch not sewn up, leaving a slit running from the front to the rear. It makes waste discharge a simpler affair, but looks extremely crass.

Labels: , ,

Thursday, September 11, 2008

Traffic modelling hack - how to modify your traffic modelling software to simulate traffic conditions in Tianjin

If there is a need to model traffic in Tianjin using agent-based modelling, the following characteristics are recommended for the agents:
  1. No long term foresight
  2. No adherence to lane rules
  3. No adherence to right-of-way rules

Below are several verifying tests you can perform to check that your model has captured the essence of Tianjin traffic:


Railway level-crossing

Create a single carriageway with two lanes – one north bound and the other south bound. Ensure that there is no physical divider between the lanes, and that double continuous lines separate the lanes, indicating that drivers may neither overtake nor encroach into the opposing lane.

Set the traffic density to a moderate level. To create the level-crossing, create a temporary obstruction across the road, to model the crossing being closed for the passage of a train.

Upon creation of this barrier, cars should start to accumulate and form a queue behind the obstruction (see figure 1a). When the queue length reaches approximately 5 cars, some cars will attempt to jump the queue by lining up on the opposite lane. Shortly after, you will observe that approximately 3 indistinctive queues have formed across the entire road. This happens on both sides (see figure 1b).


Figure 1.


When the obstruction is removed (when the train has passed without incident), the resulting blockage will take a significant time to clear (see figure 1c). This typically ranges from 2 to 5 minutes.

If your model recreates this scenario, it suggests you have successfully incorporated “no long term foresight” and “no adherence to lane rules” into your model. The first is demonstrated when agents insist on piling up on the wrong lane just to be ahead by several metres, but resulting in massive delays. The second is also demonstrated when agents pile up on the wrong lane.


T-junction

Create a T junction be connecting the end of a single carriageway to the middle of another single carriageway.

Create an agent (red) travelling along the tributary road to the main road, such that the agent’s destination is to turn left. Populate the main road with other agents (green), and set their destinations to be straight ahead (see figure 2a).
The red agent will approach the junction and proceed without stopping. On seeing the red vehicle entering their lane, the green agents will slow down (or stop) to avoid colliding into the red agent (see figure 2b).


Figure 2.


If your model recreates this scenario, it suggests you have successfully incorporated “no adherence to right-of-way rules” into your model. This is demonstrated when the red agent obnoxiously enters the main road without giving way or stopping, and relying on others to see it and react accordingly.


Multi-lane expressway

Create an expressway with 2 or 3 lanes going in each direction. Populate the expressway with a variety of vehicles, such as heavy good vehicles, trucks and passenger vehicles with a variety preferred travelling speeds.

Observe that vehicles will travel on arbitrary lanes, irrespective of speed. Also observe a proportion of vehicles will drift between two lanes. If your model recreates this scenario, it suggests you have successfully incorporated “no adherence to lane rules” into your model.

A corollary of this is that vehicles with a faster preferred speed will need to weave between lanes to overtake slow vehicles that occupy various lanes. Also, when traffic density increases slightly, the expressway quickly becomes congested as clusters of slow-moving vehicles prevent other vehicles from travelling at their desired speed.



If your model is able to predict all three phenomenon, congratulations, you have set up your traffic modelling package to simulate Tianjin traffic behaviours.

Labels: , ,

Sunday, August 03, 2008

On the absurdities of the Olympic torch relay

This bit was written in a strongly worded email on Thursday, 31st of July:

The authoritarian, iron-fisted state called the People's Republic of China

The Olympics are coming round, and the torch relay has been going on for a while already. Tomorrow, it will pass through Tianjin. The route will come along a highway just adjacent to our office, wind around the Technology and Economic Development Area and head off elsewhere.

Interestingly, there are no published route maps. This whole business is shrouded in secrecy, so no one really know in advance when they are coming etc, although the barriers erected along the route will give clues to the areas affected.

And then, there's this thing which will come as a shock to people who have been pampered by living in a non-authoritarian state. There will be a curfew when the torch comes around.

Yes, a [expletive] curfew. Starts at 4am, no idea what time it ends.

So the masses will have no chance to actually watch the flaming phallus of shame. Poor flaming phallus of shame, it's be going through empty streets. No wonder the official photographs from the torch relay site are all close-up shots of the torch bearers; the surroundings are so miserably sparse and barren that it would be a shame to show the context of the fiasco.

One really wonders, what are these people in the central government thinking? Or do they even think?


***


I was quite pissed off when I found out about the curfew as it messed up some of my plans.

For the area near our office, the curfew started at 4am, and ended at noon. Effectively, this gave us a half-day break. Others were less fortunate- their employers demanded that they work anyway, thus requiring them to get to work before 4am.

Labels: ,

Thursday, July 10, 2008

Bureaucratic misadventures when obtaining a work permit in Tianjin, China

Assume that:
  • you are in China on a tourist visa, and
  • you have a 30-day tourist visa, and
  • you have received an employment offer from a Tianjin firm.


After fumbling about, you find out the general structure of the application process:
  • Apply for a license for a working visa
  • Apply for an notification letter to allow a working visa
  • Return to Kuala Lumpur, and apply for a 30-day working visa using the aforementioned license and approval document
  • Upon entry to China, apply for a work permit
  • Using the work permit, apply for a residence permit so that you can stay for more than 30 days


License for application of working visa

To obtain this license, you need to get a medical examination from the immigration department's hospital.
Hence you go to the immigration department's hospital. They tell you that you need a license for application of working visa before they can give you a medical examination. WTF.

Oh shit, a paradox. A snake eating its own tail. A perpetual motion machine.

You whine rant to your manager. The manager talks to a few people, and the immigration's hospital agrees to allow you to be given a medical examination despite not having a license of application of working visa.

You do your medical examination, and complete the paperwork.

5 working days after the submission, you get the coveted license for application of working visa. You have now levelled up- you are allowed to apply for a working visa, yay!



Notification letter to allow a working visa

Of course, the embassy will not flippantly approve working visa applications lest China suffers an influx of talented professionals.

So the embassy will require a formal notice from the province government before they will approve a visa application.

To apply for this notification letter, you will need to go to the Labour and Public Security Bureau with some forms you printed from the department's website. There, a surly looking woman will tell you that you need to get approval from the city/town government office before coming to the province level department.

You need to fill up the form on their website, and submit it. Wait for one working day while someone at the other end of the line proofreads your submission. Upon approval, download the completed form and print it out. Bring the form and supporting documents to the city/town labour department for their approval.

They will slyly tell you that you actually need photocopies of documents that were not specified, thus requiring you to make another trip.

After the stamp is obtained, you can now apply for a notification letter to allow a working visa.

You bring the stamped form back to the provincial-level Labour and Public Security Bureau, where the surly looking woman has changed to a slightly pleasant lady. She will tell you the network is down, so please come back tomorrow. Tell her you'd wait a while in hopes the network is restored.

The network gets restored, and you apply for your notification letter. She prints out a formal looking document for you.

Congratulations, your future application for a Working Visa will have a higher chance of getting approved!



Visa applications

You return to Kuala Lumpur to apply for a working visa. One of the important considerations is that you have sufficient assets to show that you will not starve. The minimum balance in your bank account is to be RM 3000.

You ought to be pissed off now. So, the best thing you can do is to find the account with the biggest balance. Your Public Mutual investments have RM [omitted] in them, but you cannot get the balance sheet in the blink of an eye. So look for your BT Investments' online balance sheet, and show them the AU$ [omitted] you have in there.

You hand over the required documents to the embassy 2 weeks in advance. Curiously, they ask you when you will be flying into China. You tell them the 14th of June.

The embassy bounces the application back at you.

“Too early,” they say, “come back in 4 days time.”

Curse at them, but do not neglect to swear at their grandmothers as well.

When you finally get your working visa, check the validity period. It will be invalid on 15th of June, one day after your estimated entry to China. Hence you cannot change your flight.

This time, swear at their grandfathers.



Entry to China

Upon entry to China, you need to register yourself with the local police. Bring your passport, a photograph, your residential rental agreement, and a photocopy of the landlord's identity card. The police will issue a foreigner residence registration document.



Applying for a work permit

Bring your passport, employment contract, foreigner residence registration document and medical examination results to the Tianjin Human Resource Bureau.

One week after submission, pay the processing fee of 600 Yuan and then collect the work permit.



Applying for a residence permit

The working visa only allows you to stay for 30 days, thus you need to apply for a residence permit to extend the period to 1 year.

Go to the provincial Immigration Department, find the relevant form and fill it up. Queue up at the counters, noting the slow pace of work.

When you see an officer, she will tell you that you need to get photographs taken at their photograph booth because they need the electronic copy, and then go for an interview with an officer, then come back to submit your application.

This is another good time to be pissed off.

Queue up to pay for the photograph's fee of 50 Yuan, noting the counter attendant's bored and can't-be-fucked look. (aside: he literally cannot be fucked- anyone trying to get boned by him will be immediately turned off and lose all sex drive) Get your mugshot taken, collect the prints and then queue up outside Room 103. The area outside Room 103 is an unmistakably dingy corner located next to the toilets.

The officer in Room 103 will have a quick discussion with you. Satisfied that you are not a terrorist and you have valid reasons for entry, he sign an approval form for you.

Take this document (and the photographs) to the application counter and queue up. When it's your turn, remember to submit the documents.

Return to the Immigration Department in one week, pay 800 Yuan and you have completed your quest to work in Tianjin.

Now you will ask yourself, “why am I working in China?”

Labels: ,

Saturday, April 12, 2008

On the toilet habits of Mainland Chinese

In almost all public toilets I’ve seen (including the ones at the office), a waste bin is provided in each cubicle. At first, they seemed like innocent rubbish bins. However, I later realised they were much more sinister than rubbish bins- people throw used toilet paper into those bins.

Yes, the people over here do not drop soiled toilet paper into the toilet bowl; they throw them into a bin on the side. As expected, not all the paper in the bin are the colour of fresh snow- some have visible traces of… colour.


***


A Ferrari approached, young lady at the wheel. The V8 engine’s flat-plane crankshaft layout and the under-muffled exhaust system combined to produce an awe-inspiring and annoyingly loud wail.

It was bright red, the standard colour that Ferrari uses for marketing - a colour named Rossa Corsa (racing red in Italian).

As the car streaked past at a sedate 60 km/h, people turned to look at it. Its low profile, the threatening wail, and above all, the eye-catching red, drew attention to car like matter to a black hole.


***


A few days ago at the office washroom, a flash of red drew my attention. Using pure undiluted logic, I deduced that the red was not a Ferrari- the washroom was too small to hold a Ferrari.

Instead, the red came from a blood-soaked piece of toilet paper in the bin.

Despite menstrual discharge being a perfectly normal thing, it was quite a shock to see that stuff in a rubbish bin. Most of the time, they are immediately flushed out of sight and out of mind (for the males anyway).

Labels: ,

Sunday, April 06, 2008

What does this mean?

Note: all conversations were in mandarin


Sometime in the distant past, probably two years ago, I was reading a Chinese periodical on a tram somewhere in Melbourne when a fellow commuter remarked, “oh, is that the so-and-so journal?”

This so-and-so journal was The Reader, a monthly publication consisting of an assortment of light reading, letters to the editor, casual discussions on socio-economics or current affairs (but never politics) and some touching tales. Content wise, it is a Chinese equivalent of The Reader’s Digest- a large variety of articles presented in a format for light reading, perfect for mass appeal and large circulation numbers.

I told the commuter that it was indeed The Reader, and he mentioned that he likes reading this publication. He had been reading it since he was a young boy back in Guangdong.

“I find it to be very meaningful,” he told me.

I condescendingly thought he was a bit shallow. A haphazard collection of touching but generally pointless stories and surface-scratching articles is ‘meaningful’?


***


A new power generation plant will be coming up in Ghana, and the company will be designing a portion of the system.

I asked the project manager if she would be involved in the project, and she said probably yes. It will not be easy for whoever’s on site managing the thing. The people there are black people, and they would need to speak English (not Chinese). And Ghana is probably not as developed as Tianjin or Shanghai.

“But you wouldn’t be there for the entire duration of the project right?”
“No, of course not. It’ll be several short visits.”
“Then that should be fun, it’ll be something different.”
“Yes, it’ll be very meaningful.”


***


Friday being qing ming (the day when people pay their respects to ancestors and do some housekeeping on the burial plots and tombs), this is a three-day weekend.

Yesterday, as we drove past a road along the periphery of the large park near our office, we noted that it was unusually crowded. Apart from the long weekend, it also helped that the weather was a pleasant 17°C and spring’s eruptions of vivid green is still going on.

Along the walking paths in the park were families (always in groups of threes, due to the one-child policy) and lovers (always in groups of twos, due to the fact that generally accepted human relationships are one-to-one).

Someone pointed at a pair cuddling on a bench, “look at them, huddled together for all to see, don’t they have shame?”
Someone else replied, “and they are both males aren’t they?”
“No, one’s a female,” she suddenly got distracted by something else and shifted her attention (and finger) in another direction.

“Look, they are camping!” Someone had set up a tent among some peach trees. “How meaningful!”

WTF.


***


It was at this moment when I realised my interpretation of the phrase ‘very meaningful’ had been erroneous.

My model of the phrase ‘very meaningful’ needs to be modified. There are two options:
- The Chinese application of ‘meaningful’ is less intense than in English – it can be used even in the most flippant of situations
- There is an alternate (perhaps informal) meaning of ‘meaningful’, perhaps similar in meaning to ‘interesting’ or ‘fascinating’

Labels: ,

Friday, August 03, 2007

An antithesis of the previous religion-oriented post

here


I ask for 250 grams of Royal Superior Dark coffee beans, and one of the ladies measured out the quantity on an electronic balance.

“Do you want them ground?” she asks.
“Yes please, for a plunger.”

She pours the beans into a grinder - presumably one with to a pair concentric grinding cones – puts the grade selector lever to 7 and starts it. While the machine minces the little pile of beans in the inlet tray into a little pile of grounds in a paper bag below the outlet chute, the lady turns to me and asks, “Do you like Rod Steward?”

A pause.

“Yes, I used to like him, but the later albums have changed a bit,” I reply.
“I just bought his Greatest Hits album, and I’ve been trying to convert everyone ever since.”

The other shopkeeper puts her index finger to her throat, draws it laterally across her oesophagus and grins.

“But since you already like him, I don’t have to convert you.”
“Yes, you’ll be preaching to the converted…”
“On my wall, I have this photo of Jesus,” she holds her hands in the air indicating a photo frame. “Next to Jesus I have a photo of the Buddha,” she holds her hands up indicating a photo frame next to the first. She takes a step to the side, presumably because her hands cannot reach the position of the third frame. “And I have a photo of Rod Steward,” she shows the position of the third frame. She continues, “So you see, I worship Rod Steward as well.”

“Mm, pity you can’t put up an image of Allah as well, since there are no images of Him.”

An awkward pause. “Are you Muslim?” she asks cautiously.
“No, I’m just saying.”
“So, what god or gods do you worship?”
By this time the bag of ground coffee was already in my hand and money in the shop’s till.
“Well… one of them would be Google,” I reply after some contemplation.

The other shopkeeper fails miserably at suppressing a snigger.

“Google?” the first one asks, an eyebrow raised questioningly.
“Well yes, it can do anything you ever need, and more.”
“Ah… and what about your others gods?”
“Mmm, coffee is another important one.”

A baffled, WTF expression surfaces on the other shopkeeper’s face.

“Ah, I see. So… we’re your goddesses, we deliver your coffee to you. We’re like, Virgin Mary who delivered Jesus.”
“Yes, yes, that’s entirely accurate.”
“You would need to bring us some sacrifice in exchange for your coffee”

And it went on, one senseless statement replied with another nonsense statement…

Labels: ,

Thursday, July 05, 2007

Some weekdays, when I wake up fuzzy-minded and slit-eyed, when I do not have enough sleep and when the weather is cold and miserable, I suffer from a momentary bout of existential crisis.

Do I need to drag myself to work? What am I working for?
What is the purpose of my life?

Obviously my work is paying more than required to fund a single guy’s bare necessities. There’re no car instalments to worry about, no petrol price to bug me, my wife does not exist, my daughter does not need school fees (bless her), my son lives in my imagination, my fetish for optical equipment is generally limited to cheap manual focus lenses and most importantly, I have no social life to speak of.

Perhaps I should stir up some trouble for myself, just to rid myself of this blasted existential crisis. You know, buy a car with absurd fuel consumption, get married (anyone out there? Females only, must be over 18. Email me- early bird gets the worm), adopt a child, start smoking… the usual things.


***


This evening at the gym, I chanced upon transcendence. A man showering with the cubicle door wide open, God knows why. And he was facing out too – again, only The Deities know of his intentions.

The Deities were kind to me. A flash enlightenment came over me, and I realised a truth:
The penis is a remarkably ugly thing. Or less elegantly, penises are fugly.

Nestled in a bed of pubic hair with a pair of bagged orbs for company, the human penis is generally located on the pelvis between two of the human body’s largest bones (the femurs) and posterior of a potentially bloated belly.

Compared to its surrounding anatomical features, the penis is ridiculously small. Now tell me, who hasn’t seen Michelangelo’s sculpture of David and went, “hehehe, what’s that lump between his legs?”

Viewed as an individual entity, the penis lacks the homogeneous elegance of a pair of breasts, the intricate depth seen in eyes, nor the heart-warming joy of a smile. Proportions between various dimensions of the penis do not appear to fit the Golden Ratio.

The design (intelligent or otherwise) of the human penis can thus be said to be utilitarian, with no attention given to aesthetics. The penis is a tool to direct liquids to where they are intended, and is not designed for viewing.

So put that nasty thing behind some pants, the world does not want to catch a glimpse of it.




And a brief reminder to email me, as the early bird gets the worm.

Labels: ,

Thursday, June 07, 2007

A slightly edited chat transcript with a friend (will not identify and link unless permission is granted). Her words in blue; mine are in red.


Come think think of it, I doubt I’m much of a patriotic person. Actions taken have rarely been for the country. Or never.

:(

A tragedy, i suppose

And you say it so lightly.

That’s probably because I do not feel the magnitude of it

Indifference really saddens me.


I suppose it’s a scale of which one looks at the universe. Do I look after myself, my family, my nation or my planet?

I guess the sense of duty vary in different people.

If I am only concerned about my welfare, I do what's best for myself. Or if I’m worried about the state of the universe, really, the earth does not even appear in the picture.

Of course your welfare also includes it's relation to the state because every action that you do is a direct impact from government policies. Unless one is super apathetic. Now that ... is scary.

That's true, but if one's concern is at a vastly different scale, then the connection can be quite small. Sacrifice my family's welfare for adding (my family size)/(state population) influence to the state? It’s a tiny proportion, to the order of 1 in a million. Then, will that be enough to change things sufficiently so my family lives better?

That's how many people think. They:
1. underestimate what the power of a collective can do
2. expect their actions to resonate loudly and create ripples as an individual, which is unreasonable unless one is Hitler
3. expect change overnight when most battles are often fought for many years.

That describes me well enough...

People like me are fighting for people like you, and it take fuckloads of will not to give up. It's rather stressful.

I don't know if you were ever a product of the injustice in the country. I wasn't one entirely because my parents could afford to pay for my education and I never asked for a scholarship.

But those who has been turned down, missed opportunities and having their merits trampled on because of their ethnicity - they need to fight the system. And stop the system from being irreversible.

Cos by then, I would help get people out of Taliban Malaysia instead as staying in Malaysia would be futile. Right now, the fight rages on ... and everybody hopes for change and better lives. Of course not just for us but for future generations. Clichéd as it seems. It's really daunting. but I’m glad to have tried than to have given up already.

Labels: ,