Saturday, February 28, 2009

The roses are two months old

and this blog is four years old.





Click here for large size image





Super-Takumar 50mm f/1.4





Don't Ever Leave Me
I wouldn't.

Super-Takumar 135mm f/3.5



I'm particularly proud of this last image's set up. The dark background is just the view out of my window. A long lens was used to make sure the view of the great outdoors was restricted, allowing me to choose darker bits of the outdoor scene to be my background.

Indoors, a flash was directed upwards and fired at full power, ensuring that the brightness difference between the subject and the outdoors was as large as possible. With the exposure adjusted for the indoor lighting, the outdoor lights were just barely enough to register on the sensor, resulting in a mostly black background.

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: ,

Monday, February 16, 2009

Botched Valentine's Day plans

My St. Valentine’s Day plan was very simple, bordering on tiresomely unadventurous: design a greeting card in advance and email it a few days ahead.

The greeting ‘card’ was a MS Excel spreadsheet, with the general form of the contents as follows:
=if( today() >= B1, “Valentine’s Day greeting message”, “come back later”)

And the contents of cell B1 was the date 14 February 2009.

In plain language - if today is 14th February or later, show “Valentine’s Day greeting message”, otherwise show “come back later”.

The sheet was then protected and locked with a password to prevent the recipient from finding out the intended message ahead of time.


***


All this effort, however, was futile.

She changed her Windows date to 14th February, thus hoodwinking MS Excel and circumventing my carefully constructed mechanisms.

Labels:

Sunday, February 15, 2009

Fun with the MoTeC data interpreter

What I did for Valentine’s Day:
Played GTR 2 for a few hours.

GTR 2 is a fearsomely realistic racing simulator based on the 2003 and 2004 FIA GT Championship series. While there are a huge number of bells and whistles, one of the most fascinating features of the game is the ability to save the car data into a MoTeC log file.

This is the same file format that a MoTeC data logger on an actual race car will produce: a time history of individual wheel speeds, suspension positions, suspension speeds, engine revs, throttle position, brake pedal pressure, steering angle, longitudinal acceleration, lateral acceleration, individual tyre temperatures at the inside, centre and outside areas…

And with the MoTeC data interpreter program, magic is possible.


***


The user can perform various mathematical operations on any combination the generous set of data logged by the MoTeC data logger.

For example, the instantaneous radius of curvature of the vehicle’s path can be calculated by rearranging the following equation:
a = v2/r
r = v2/a

Both the vehicle speed and lateral acceleration are measured, and so the radius can be determined.

Even more interesting, a general relationship between the vehicle’s speed and aerodynamic downforce can be observed after the data is suitably processed.

The principle objective of demanding greater aerodynamic downforce in a racing car is to allow greater acceleration (both in the longitudinal and lateral directions). Consequently, greater downforce will allow the vehicle to have higher accelerate.

From the logged longitudinal and lateral accelerations, the acceleration magnitude of the vehicle can be determined:
|a| = sqrt( along2 + alat2)

When |a| is plotted against vehicle velocity, the following scatter plot appears:



Click here for large size image

x axis: vehicle speed, v (km/h)
y axis: acceleration magnitude, |a| (g)
This plot consists of data recorded over a distance of 6 laps, equivalent to a duration of 13 minutes. Data was recorded at 10 Hz, producing 8130 data points.


Two general trends are visible:
the lower trend, consisting of a straight line that indicates a decreasing acceleration at higher speeds
the upper trend, indicating the maximum achievable acceleration increases when vehicle speed increases

The lower trend line corresponds to data recorded when the vehicle is accelerating on straight sections of the track. Given that the power output of the engine is maintained near the peak output (by adjusting the gearbox ratios to suit the track), the straight line is consistent with the fact that an object accelerated with a constant power will accelerate slower when the object is moving at a faster speed.

The upper trend is not as clear, but is nonetheless visible as an upward sloping trend.
At 60 km/h, |a| is approximately 1.75 g.
At 100 km/h, |a| is approximately 1.85 g.
At 160 km/h, |a| is approximately 2.10 g.
At 260 km/h, |a| is approximately 2.25 g.

Several data samples plot outside the upper trend because dips and bumps in the track will result in a different normal force acting on the wheels, thus allowing momentary increases and decreases in absolute acceleration.

A small cluster of data at 250 km/h show substantial deviation from the upper limit of acceleration. This, too, is caused by changes in track elevation where the main straight slopes upwards.


A similar plot can be produced showing lateral component of acceleration instead of total acceleration. In this case, |alat| was plotted against vehicle speed.

To prevent the chart from being cluttered with data not related to lateral acceleration (on straights, the lateral component of acceleration is close to zero), the plot was gated by plotting only data points that meet certain criteria.

Here, a new expression was defined, where
Steering = if (steering wheel angle > 25%) 1; else 0;

This expression will take the value 1 if there is substantial steering input, and 0 otherwise.

The criteria for gating the data is then set such that only data points with steering = 1 will be plotted, resulting in the scatter plot below:



Click here for large size image

x axis: vehicle speed, v (km/h)
y axis: lateral acceleration magnitude, |alat| (g)
This plot consists of data recorded over a distance of 6 laps, equivalent to a duration of 13 minutes. Data was recorded at 10 Hz, producing 8130 data points. Of these, 3042 data points satisfied the gating criteria and were plotted.


The |alat| plot resembles the |a| plot, except for the absence of the lower trend line. This is expected, because the lower trend line is associated with longitudinal acceleration driven by the vehicle’s engine.

A trend line indicating the upper bound of acceleration magnitude was constructed by approximation, and the following correlation appears:
|a|max = 0.0017 V + 1.56,
The units for |a|max and V are g and km/h respectively.


With the correlation between maximum |a| and vehicle speed approximated, a new variable called theoretical max acceleration was defined
theoretical max acceleration = 0.0017 vehicle speed + 1.56
This variable indicates the maximum acceleration that the vehicle tyres can provide.

When the instantaneous values of the theoretical max acceleration is compared against the actual accelerations, it can show areas where the driver can improve his/her lap time. For example, it can reveal that the driver can apply the brakes slightly later and harder on entry into a particular corner, thus shaving several milliseconds from the lap time; or that the vehicle can move slightly faster at a particular curve without exceeding the traction limits of the tyres.

In the following graph, theoretical max acceleration is plotted together with actual |a| and |alat| in the upper graph. The max theoretical acceleration approximates the shape of the peak accelerations but is not accurate due to the coarse approximation for the speed and downforce correlation.



Click here for large size image

x axis: distance (m)
y axis: theoretical max acceleration, |a| and |alat| (g)
This plot consists of data recorded over a distance of 2.8 km. Data was recorded at 10 Hz, producing 631 data points.

Labels: , , ,

Friday, February 06, 2009



Yay, I got a pay cut!


MCH


Labels:

I was home for 12 days for the Chinese New Year break, which was excellent by Malaysian standards (some companies closed for a week), good by Chinese standards (our company had 10 days off), decent for any break from work and too short by my standards.


***


When a group of friends from the same primary and secondary school sit around nursing their over-fed bellies and drinking plain water, talk sometimes turn to things in the distant past.

There’s gossip from primary school, arguing about little details of our secondary school lives and reliving the exciting moments on the numerous trips to beaches.

There’s a likelihood we’ll still come back to these topics decades later.


***


For the past few days, I have been surviving without the internet connection at home. The apartment broadband connection was terminated some weeks ago, but I have been able to survive due to an unsecured network.

It was so unprotected that even the router control password was not changed. Using the default admin/admin username and password, I could fiddle with the router settings to give my BitTorrent program unrestricted access.

Those good days have since passed. Since my return, the same router’s security has been beefed up and I no longer have any access. In the absence of broadband, I will probably spend my nights reading, writing and…


Shit. Now that my exams have passed I really have no idea what to do with my time. Not that there’s a humongous amount of free time, probably 2 hours a day or so. I’ve pinched an international finance text book from my godmother, but that would not keep me occupied for very long.

Labels:

Thursday, February 05, 2009

The Bund, Shanghai, at low tide



Click here for large size image









Click here for large size image (500 x 3470 pixels)

Labels: , ,

Tuesday, February 03, 2009




The world is stranger that initially assumed.