Google Translate

Saturday, May 25, 2013

Installing RVM, Ruby 2, Rails 3, MySQL on OS X 10.8

ALERT! For Ruby on Rails developers only.

FYI this is more for my reference than anything else. Use at your own risk.

My environment:
  • Mac OS X 10.8.3
  • Intel Core i5
  • XCode 4.6.2 with command line tools
As of this blog, after running all commands, you should end up with:
  • RVM 1.20.12
  • Ruby 2.0.0-p195 + default gems
  • Rails 3.2.13 + associated gems
  • MySQL 5.6.11 (64-bit) using mysql2 gem (version 0.3.11)
First, download and install MySQL.
  1. Temporarily allow software installation from anywhere.
    1. Open System Preferences --> Security & Privacy.
    2. Click the lock icon at bottom-left. When prompted, enter your (administrator) password.
    3. Remember your current setting, i.e. "Mac App Store", "Mac App Store and identified developers" or "Anywhere".
    4. If it is not already selected, click the "Anywhere" radio button. Press "Allow From Anywhere" in the popup.
  2. Download MySQL.
    1. In your web browser, go to https://dev.mysql.com/downloads/mysql/
    2. Download the latest version of 64-bit MySQL as a DMG (as of this blog, it is "Mac OS X ver. 10.7 (x86, 64-bit), DMG Archive", the rest of the steps will use names based on this version).
  3. Install MySQL.
    1. Double-click the downloaded disk image, "mysql-5.6.11-osx10.7-x86_64.dmg".
    2. Double-click "mysql-5.6.11-osx10.7-x86_64.pkg". Install without any customization.
    3. Double-click "MySQL.prefPane". Install for all users on your computer.
    4. Double-click "MySQLStartupItem.pkg". Install without any customization.
    5. Eject the "mysql-5.6.11-osx10.7-x86_64" disk image.
  4. Restart MySQL.
    1. Open System Preferences --> MySQL.
    2. Press the "Stop MySQL Server" button. Enter your (administrator) password if prompted.
    3. If MySQL Server Instance is still running, you need to shut it down in Terminal.
      1. Open Terminal.
      2. Run this command:
        $ sudo /usr/local/mysql/bin/mysqladmin shutdown
        Enter your (administrator) password if prompted.
    4. Press "Start MySQL Server" button. Enter your (administrator) password if prompted.
  5. Reset software installation permission.
    1. Open System Preferences --> Security & Privacy.
    2. Click the lock icon at bottom-left, if it is still locked. When prompted, enter your (administrator) password.
    3. Under "Allow applications downloaded from", choose your previous setting, i.e. "Mac App Store", "Mac App Store and identified developers" or "Anywhere" radio button.
    4. Close System Preferences.
Now, run all of the following commands in OS X's Terminal.
  1. Start a new Terminal session (start a new tab with Cmd-T).
  2. Update permissions.
    $ sudo chmod o-w /usr/local
  3. Install RVM with stable release of Ruby.
    $ \curl -L https://get.rvm.io | bash -s stable --ruby
  4. Start a new Terminal session (start a new tab with Cmd-T).
  5. Update RVM settings.
    $ source /Users//.rvm/scripts/rvm
    $ rvm requirements
  6. Verify RVM.
    $ type rvm | head -n 1
    rvm is a function
  7. Verify Ruby.
    $ rvm current
    ruby-2.0.0-p195
    $ ruby -v
    ruby 2.0.0p195 (2013-05-14 revision 40734) [x86_64-darwin12.3.0]
  8. Verify gem directory.
    $ rvm gemdir
    /Users/<home>/.rvm/gems/ruby-2.0.0-p195
  9. Update Rubygem (to be on the safe side).
    $ gem update --system
  10. Install Rails.
    $ gem install rails
  11. Verify Rails.
    $ rails -v
    Rails 3.2.13
  12. Verify GCC.
    $ gcc -v
    Using built-in specs.
    Target: i686-apple-darwin11
    Configured with: /private/var/tmp/llvmgcc42/llvmgcc42-2336.11~28/src/configure --disable-checking --enable-werror --prefix=/Applications/Xcode.app/Contents/Developer/usr/llvm-gcc-4.2 --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-prefix=llvm- --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin11 --enable-llvm=/private/var/tmp/llvmgcc42/llvmgcc42-2336.11~28/dst-llvmCore/Developer/usr/local --program-prefix=i686-apple-darwin11- --host=x86_64-apple-darwin11 --target=i686-apple-darwin11 --with-gxx-include-dir=/usr/include/c++/4.2.1
    Thread model: posix
    gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)
  13. Verify MySQL.
    $ mysql -V
    mysql  Ver 14.14 Distrib 5.5.20, for osx10.6 (i386) using readline 5.1
  14. Symlink MySQL dynamic library.
    $ sudo ln -s /usr/local/mysql/lib/libmysqlclient.18.dylib /usr/lib/libmysqlclient.18.dylib
  15. Update mysql_config. (I use vim as my text editor.)
    $ sudo vim /usr/local/mysql/bin/mysql_config
    1. Go to line 119.
    2. Copy-and-paste lines 119 and 120.
    3. Comment lines 119 and 120.
    4. Line 121: remove -Wno-null-conversion -Wno-unused-private-field
    5. Line 122: remove -Wno-null-conversion -Wno-unused-private-field
    6. So lines 119-122 should now be:
      #cflags="-I$pkgincludedir  -Wall -Wno-null-conversion -Wno-unused-private-field -Os -g -fno-strict-aliasing -DDBUG_OFF -arch x86_64 " #note: end space!
      #cxxflags="-I$pkgincludedir  -Wall -Wno-null-conversion -Wno-unused-private-field -Os -g -fno-strict-aliasing -DDBUG_OFF -arch x86_64 " #note: end space!
      cflags="-I$pkgincludedir  -Wall -Os -g -fno-strict-aliasing -DDBUG_OFF -arch x86_64 " #note: end space!
      cxxflags="-I$pkgincludedir  -Wall -Os -g -fno-strict-aliasing -DDBUG_OFF -arch x86_64 " #note: end space!
    7. Save and exit.
  16. Install mysql2 gem.
    $ sudo env ARCHFLAGS="-arch x86_64" gem install mysql2 -- --with-mysql-dir=/usr/local/mysql --with-mysql-lib=/usr/local/mysql/lib --with-mysql-include=/usr/local/mysql/include
    If mysql2 gem still fails to install:
    1. Uninstall mysql2 gem.
      $ gem uninstall mysql2 -a
    2. Delete MySQL's files and folders.
      $ sudo rm /usr/local/mysql
      $ sudo rm -rf /usr/local/mysql*
      $ sudo rm -rf /Library/StartupItems/MySQLCOM
      $ sudo rm -rf /Library/PreferencePanes/My*
      $ sudo vim /etc/hostconfig
      $ sudo rm -rf /Library/Receipts/mysql*
      $ sudo rm -rf /Library/Receipts/MySQL*
    3. Re-download and re-install MySQL.
    4. Go back to step 14 and continue from there.
Hope that works for you too!

Saturday, October 02, 2010

My farewell email at XM

September 30, 2010 marked my last day at XM Asia Pacific Pte Ltd. As is a sort-of tradition there, I sent this farewell email. Some names have been changed to protect the innocent. Also, some parts have been censored due to company confidentiality issues.

Subject: [HR] Yu Hui will be out of office... forever!

It's 10pm as I write this email. T's lurking somewhere, but otherwise, I'm spending my last day at XM alone.

Usually, when one resigns, you get less and less work towards your final day. But I've had more and more! Such that I thought I wouldn't have time to compose a meaningful final email. So I've written this over the last few days. It sums up my thoughts and feelings of my experience at XM.

Please pardon its length.

---

I've been at XM for 4 1/2 years. 1/2 more year, and I would've got a 5-year award. As M said, "So sad!"

I only felt sad when people whom I thought would be at XM forever left for other pastures. It's true what they say: the people make XM the place to work at.

I've had 5 bosses, 8 department colleagues, 6 different desks (+1 roaming when the new desk hadn't arrived), working in a department that is at its biggest now with 5 people, but soon shrinking to 3. Some may consider it the passing of an era at XM. I prefer to think more realistically in that demand (for analysts) outstrips supply.

When people ask me what account I work on, I say, "All of them!" <censored list of clients> If any of those sound alien to you, don't worry, you'll collect some of your own if you stay as long too. M and V and S have probably collected many many more.

I was pretty much the only reporting monkey for about 2 to 2.5 years. And when I was forced to deliver on my own without any real guidance, it made me grow up professionally very quickly. When everyone depends on you for answers, "I don't know" quickly becomes interpreted as "This person is an idiot".

Every report became an experiment in new reporting techniques, new format/structure, new metrics, new ideas.

Which probably explains why when someone asked me for a reporting template, I was at a loss to produce one!

---

Save your files to the network. Attachments kill email and version control.

On the other hand, remember not to <censored>. True story from <censored>.

---

I still think of the days back at Shaw Towers with fondness.

When we were spoiled for choice for lunch.

When there were little boys and "Hello" ghosts.

When thunderstorms appeared as beautiful curtains of rain.

When I could hear the horns of delivery vehicles from Suntec City about every 3 months (IT fair!).

When the Xbox was fully utilized during lunch and after work. When I brought my Wii and we played late into the night.

When K was tied to her chair, wheeled into the lift, and sent to the first floor. (XM was on the 26th floor.)

When we walked down 52 flights of stairs in one day. (26 floors x 2 earthquake tremors = tired legs)

When we only had client A and client B. Heck, when client B meant the business unit 1 and the business unit 2, not this business unit 3 that I keep hearing about.

Good times.

---

<censored>

---

Client C is scary to work with, but in a good way.

---

I believe in mobile. Throw away your iPhones and Androids and buy lower-end 3G phones. Then surf the web with the built-in browsers or Opera Mini. It'll blow your mind away.

---

I hate site revamps.

<censored>

---

Sleeping at your desk doesn't mean you're lazy. It means you're overworked and over-tired.

And if you're further sleep-deprived, you can't function at your best. And then XM suffers. And clients scream. And take their money away. And XM goes bankrupt. And then you don't get your bonus. And then you're laid off. And then your house mortgage is due.

So you have to sleep in the streets.

When all you needed was an afternoon nap at your desk.

---

<censored>

---

Contrary to popular opinion… having a blog (and one that is rarely updated!) does not make me a social media guru.

---

To those whom I've frustrated over the years... comfort yourself with knowing that you have one less idiot to work with.

---

XM should just merge with Agency A and be done with it. This competition, this "I'm better than you" thing that's going on is ridiculous. Less patting self on the back, more using of limited resources efficiently.

---

There are times when I think XM should do <censored> because they make sense.

Like when I <censored> in a campaign site. Though that turned out to be a flop because <censored>.

---

Now that I'm gone, someone else will need to take over the responsibility of switching off the meeting room and bathroom lights when they're not in use. Though 50 Scotts Road is a "green" building, you can save more energy by switching off.

Please don't leave your computer and monitor on throughout the night or weekend.

---

It's the 21st century. Time for Flash to die.

I had wanted to do a HTML5 version of a Flash animation. Alas, my canvas and SVG skillz were not up to par.

---

Some personal words of wisdom that I had compiled in December 2009:
  • Eight hours a day is the maximum, not minimum.
  • Self-improvement is always at your own time and effort.
  • Bring your children to work. If nothing else, they will lighten the mood in the office.
  • Bring your parents to work. If nothing else, they will scold the person who keeps you working late in the office.
  • Take full advantage of available discounts provided by XM and WPP.
  • Taxi fare claims, meal expenses, lucky draw prizes and performance bonuses are not overtime pay.
---

I don't know what the procedure is for changing desks here at XM. But if anyone wants a dusty table, a chair that has some flecks of dandruff, with a tin of tea from when I joined in 2006 and a cake from 30 Nov 2009, surrounded by Creatives at one end and Suits at the other... please, make yourself at home.

Stay in touch! My email address is on the Internet.

For the last time,

Regards,
Yu Hui
[standard XM official signature]

Friday, August 13, 2010

Universal Studios Singapore -- fun, imaginative... too American

"Hollywood" sign at entrance
About half a year after it opened, I finally had the chance to step through the gates of Universal Studios Singapore and experience this internationally acclaimed theme park first hand. My expectations were set both by the hype around this local version of the Universal theme park franchise, and also my previous experience at the Los Angeles one.

Having arrived after the rest of the group, I met up with the others at the "Shrek 4D" attraction. This was where we would join Shrek and Donkey in rescuing Fiona. We donned our glasses to watch the 3D effects and got sprayed with water and bounced around in the seats to get the "4D" effect. (Technically, the fourth dimension is time, but who am I to argue with creative licensing in the name of fun?) Like any motion simulator ride, the "4D" effects were simple and predictable, especially the water spray... though it did feel rather gross to get wet when Shrek sneezed on screen!

Outside the "Revenge of the Mummy" ride
We wanted to go for the Jurassic Park water ride, but there was a one-hour wait for it, so we went to the "Revenge of the Mummy" ride instead. It had a reportedly shorter wait of 45 minutes, but we were in-and-out within half an hour! This was an indoor roller-coaster where we were supposed to find the Book of... something. Anyway, the story wasn't important, we were there to scream! And as luck would have it, I got into the first row.

We got a slow build-up for about a minute and then it was a full-on roller coaster ride! Unfortunately, the whole thing ended in a few minutes. We expected some kind of big climactic final drop, so we were disappointed when we found ourselves heading for the alighting point.

This indoor roller-coaster ride felt... safe.

Outside the "Battlestar Galactica" ride
We walked a bit further and found ourselves in the "Sci-fi" section. The highlight was the "Battlestar Galactica" twin roller-coaster. This was, of course, closed, and has been closed almost since the park opened. A few of us went to the "Accelerator", which is really like Disneyworld's Mad Hatter's tea cup ride, except that we're supposed to imagine that we're in some kind of high-tech spinning accelerator. It didn't help that the in-car wheel was so stiff to turn! Actually, the speed of our spinning felt to be controlled more by the external system rather than our own turning efforts.

"New York""New York"
We walked through the "New York" section and had a break at "Mel's Diner". I had a chocolate milkshake while some of the others bought burger meals. While sitting and chatting, we saw a performance going on outdoors. It was supposed to be for the filming of a beach song-and-dance for a 1960s/1970s movie.

Personally, I thought the story was lost on the Singaporean/Asian spectators. And that performance summed up my thoughts about Universal Studios Singapore. What the planners seemed to have done was to transfer the American model into Singapore, lock, stock and barrel. There was very little "localization" done. That meant American food, American performances, American attractions. Granted, there's little localization that could be done for the attractions, but songs and dances could have been better adapted for the local taste. Perhaps Universal needs to partner with a few Asian filmmakers to inject that local flavour into its Singapore theme park.

After our break, we went to watch a Steven Spielberg-hosted attraction about special effects. We were to imagine that we were in old New York City and a hurricane was coming down on us. Again, it felt... safe. We were supposed to feel a hurricane, but I thought our own local monsoon thunderstorms were more dreadful. When a metal beam fell from the roof, it dropped mechanically. When a boat burst into the dock that we spectators were supposed to be in, it just floated in undramatically.

Our final attraction was "Monster Rock". I thought it would be something like the "Rocky Horror" show. Instead, it was about a song-and-dance show featuring non-scary monsters. And -- again -- it was very Western. I could understand the "scientist's" fast-spoken opening monologue. The monsters project on-screen were their classic horror versions, but the performers who came out were instead prim and proper and, for the females, sexy.

At least this show featured some localization. There was a routine when Dracula serenaded his Bride in a Chinese song. (While I recognize the song, I don't know its title.) The audience loved that! They were screaming and whooping at the start and applauding loudly at the end. If I were a Universal Studios planner, I'd start working on more localization for other acts to make them more enjoyable by a predominantly Asian audience.

"Hollywood" street at dusk
Finally, the day ended with some shopping back at the "Hollywood" street at the entrance. Amazingly, we had completed almost all of the key attractions in half a day. (The only one that I wanted to go to but didn't have the chance was the Jurassic Park water ride.) That showed just how small the theme park is. As a friend remarked, we could have walked the park completely in an hour. Of course, Universal Studios Singapore (also called "USS" in acronym-mad Singapore) is limited by land area, so I think it's quite admirable with what it has achieved with its constraints.

What was most ironic for me was that, of all the attractions that I went to, I had never watched the movies nor television shows that they were based on! But that didn't mar my time, since I was there to have fun, fun, fun!

In spite of its flaws, I'd go back to Universal Studios Singapore again... once the "Battlestar Galactica" ride opens!

Final comment: I was surprised to hear the theme song of "Star Trek 3: The Search for Spock" playing over the intercom. "Star Trek" is a Paramount movie. Then again, so are the Dreamworks-produced "Shrek" and "Madagascar". Maybe this is a Universal-Paramount partnership.

--

Sunday, June 27, 2010

Overflowing with durians

The recent spell of hot-and-cold weather had made me feel rather unsettled. To comfort myself (or was it to pamper myself? ha), I decided to treat myself to some durians. So I made my way to my favourite durian seller to buy some durians.

Was I astonished to see his stall! There were baskets and baskets of durians everywhere! They were in his shop, on his tables, along the corridor, outside his stall. There were baskets of durians stacked upon other baskets of the fruit. In fact, the whole market was flooded with the thorny fruit -- to the point where even his neighbours' stalls were filled with durians!

As to be expected, the odour from the King of Fruits was quite unpleasant and it raised a stink in the neighbourhood. Fortunately, years of consuming the fleshy yellow fruit had made me quite immune to it, so I carefully wade through the baskets of fruit to get to the durian stall.

Inside, I could see my durian seller guiding his assistants impatiently. His arms flailed and his voice boomed as he directed them to move the durians here and there. Some of his assistants were already outside, recovering the durians as quickly as they could. Others were inside the stall, where they transferred the baskets of fruit out of sight as quickly as their tired arms could.

Just then, my durian seller saw me approach him. He barked another order to a hapless assistant, then walked towards me. He was clearly exasperated and I didn't know what to say to calm him, or if I should even say anything.

"Look at this mess!" he exclaimed. "How to work like that?"

"What happened?" I asked gingerly.

"Over there, lah!" he said, pointing into the distance. "Got traffic jam, so the lorries all cannot carry their durians out. In the end, the durians all kena dump here."

I looked into the distance but could not see the lorries that he spoke of nor whatever was blocking the roads. "I've never known the roads to be this badly jammed," I remarked.

"You don't know," he drawled. "This place always got jams. But my assistants always help to direct vehicles away. My assistants are very good. Tell them to check every six months, they check and clear the jams. That's why always no problem."

"I didn't know your assistants have to check the roads for jams."

"I am the landlord here, so it's my responsibility. Some more, this is premiere shopping area. If nobody check, and the roads kena jammed, then customers disappear, then we all lose big money. So of course I get my assistants to check. Then confirm got durian to sell and got customers to buy. And everyone is happy."

I nodded in understanding. "But that doesn't explain this situation. How does a traffic jam cause this overflow of durians?"

"You never read the durian forecast in the newspapers? Got flash bumper crop! As if all the durians trees start dropping their durians! This only happen once every 50 years!"

"A bumper crop should be good for your business," I noted. "You can sell more durians and satisfy your customers' thirst for it."

"You say lucky, I say sueh! The durian farmers must move the durians before they all get rotten, right? Their drivers all drive very fast, move the durians quickly, they also very good workers. And then what happened?" He gestured at the distance again.

"A traffic jam," I replied.

"The drivers got no choice, dump their durians here, then go back to collect some more." He stared at his shop, and I noticed that he was giving his workers his classic evil eye. "They all, lah! Never check the roads for jams. Now I must make sure they work double hard! Check six months, not enough. Check three months also not enough. I tell them: check the roads every month!"

He mellowed for a moment and shook his head in despair. "The impact and disruption to customers and business -- all not acceptable one."

Then, just as quickly, his rage returned. He stormed back into his stall. "Next time better not have any more traffic jams! Otherwise you all know what it means to die!" His assistants all cowered in fear and moved even quicker.

My durian seller was clearly not in a selling mood today, so I left the market quietly. While leaving, I surveyed the damage. At one of the nearby stalls that was filled with durians, I saw an old uncle drinking his kopi while avoiding getting swamped by the thorny husks of the durians.

This was truly a disaster.

--

Monday, May 24, 2010

I'm single in Singapore but not by choice

Hello. My name is Yuhui and I've never been kissed.

It's not that I'm averse to kissing nor am I shy about it (as far as I know, given my lack of any real experience). Also, kissing my mother doesn't count.

No, it's about the lack of partners to kiss with. Actually, at this point in my life, I'd settle for a partner - singular.

In Saturday's Straits Times newspaper (reproduced at SGClub.com), there was a full-page article, "Never been kissed". It described the issues around the growing number of singles, a.k.a "singletons", in Singapore. And yes, this being Singapore, those issues include marrying late and having babies even later or not at all.

As I read through the stories, I found that mine did not match any of those. So I thought I'd share my side of Singaporean singlehood. In doing so, I hope that I can show that my experience isn't a quirk or "the exception that proves the rule".

I didn't attempt to start dating seriously till I was in university. Before then, the closest I'd got was with a girl from junior college -- who brought a friend along. During my National Service days, I watched my buddies hook up while I was left hanging.

But you have to understand. I was young then and believed that I had all the time in the world to find a partner. That was about 15 years ago. Time is no longer a luxury I have. And in the intervening years, I've tried to make up for lost dates.

Yet, I found myself continuing to attract only two kinds of girls:
  1. those who already had boyfriends (or *gasp* were on the verge of getting married) or
  2. for one reason or another, didn't want to be in a relationship now and "can we just remain as friends?"
(As time dragged on, friends suggested that I let go of my principles and pursue those in the first group, i.e. those already attached. After all, these days, even a marriage isn't forever. However, I'm glad to say that I haven't stooped that low.)

The ironic thing is that some of those girls in the second group getting married!

To find Ms Right, I even joined a dating agency. Yes, I forked over good money for a number of dates (20, I think). I went on two repeat dates (supposedly the measure of success for a dating agency), though things fizzled out after that. And by that, I mean I received no replies when contacting them subsequently.

But almost all of the girls were just looking to widen their social circles -- and I somehow never ended up being a part of anyway. This is where marketing met reality. The "dating agency" promised partnership, but its database consisted of people looking for friends. It was a big "what the f--k" realisation -- not to mention seeing good money go down the drain.

Some dating articles suggested that I look nearer, like in the workplace. (Though a friend advised: "why eat and shit at the same place?") One day, I plucked up the courage to ask a colleague out (you know who you are!). She gave the "I don't date colleagues" response, which I guess was acceptable. But even now that we're not colleagues, she can't bring herself to date me.

Other colleagues are -- you guessed it -- already attached or "not looking for a relationship right now".

It was then that I pretty much gave up. After that, if anyone wanted to introduce me to someone, I gave my contact details freely. It's truly a "what's the worst that can happen?" decision. People who know me would probably pair me with someone compatible, right?

If so, I wouldn't be writing this now.

So that's my story, and I hope I'm not the only Singaporean single male who's "suffering" through this.

Oh yes, I'm still open to being matchmade. (Or if you're my previous/current colleague, you could try to "psycho" that ex-colleague to give me a chance or point my in another direction.) After all, "what's the worst that can happen?"

On a sidenote: I read an article (from a man's magazine, naturally) that it was cheaper to hook up with prostitutes than it is to date. With the former, there's also guaranteed sex for the fee, whereas with the latter, you hope that your "investment" in dates culminates in a marriage and therefore sex (going by the traditional means of having sex). This suggestion is really not an ideal option for me.

--

Sunday, April 25, 2010

Omniture plug-in: “setCampaignVars” for efficient campaign tracking

WARNING: this is a very technical entry that details some web programming/development for a specific web analytics tool.

(This entry was originally published on the XM Asia Pacific blog. I'm reproducing it here as my publishing and reproduction right as the plug-in's sole developer.)

Tuesday, March 16, 2010

Japan trip - day seven - Tokyo

Woke up at 8:30am to have breakfast at 9am. Then remembered that the hotel served breakfast till 11am, and check-out was at 10am, so decided to sleep in till 9:30am. After checking out, walked opposite to the hotel's annex for breakfast.

It was a "continental" breakfast consisting of toast, Japanese soup and coffee or tea, 320 yen with unlimited refills of any item. Surprisingly, waitress spoke English fluently and without a Japanese accent. (Later, I asked her if she was Japanese, to which she said yes, and she chuckled when I complimented her English.)
Toast and tea

Just when finishing breakfast, saw that a group of office workers were gathering outside the adjacent building. Apparently, there was a fire drill. An old man from the fire department led the drill, issuing instructions and other pointers. Some of the office workers even had a chance to try their hand at using a fire extinguisher, something we certainly don't practise in Singapore. Later, another fire department official led another session, though I couldn't tell what it was.
Fire drill at building next to Sakura Hotel Ikebukuro in Tokyo

Stayed till 11:30am, then took the train to Shinjuku. Still had about two hours to kill before taking the Narita Express to the airport. So walked around the shops outside to see if anything caught my eye for last minute gifts. Also took the opportunity to take some photos of Shinjuku in the daytime.

First, deposited my luggage and some items from my backpack in a locker at the train station, then went out. Weather was warm enough to be without a jacket, but I brought it along just in case. Sky also looked cloudy, but guess I'll be out of Tokyo before it rains.
Shinjuku at daytime in TokyoShinjuku bus terminal in Tokyo

Happened to walk past a Bic Camera and an ad caught my eye: a Sony Ericsson "Bravia" phone. Never having heard of one before, I went in to see what it was. Apparently, it's a phone that lets you watch TV as well, but since the menus are all in Japanese, I couldn't try this out. It also had a five-megapixel camera, but picture quality was soft even under bright light, so that was a disappointment. Also saw a Sharp solar phone, which could be useful for me in Singapore if I weren't indoors almost all the time and since work forces me to hardly see the sun.

Then, since I still had some free time, I went to Uniqlo to see if there was anything suitable, but looking at the prices, I think I can get the same items in Singapore for about the same price.

Returned to the JR Shinjuku train station at 1:50pm. Collected my luggage, repacked some items, then went to board the Narita Express. Slept on the two-hour ride.

Then, at Narita station, I did a stupid thing by tossing my train ticket into the recycling bin before exiting. Luckily, I could reach in and retrieve it!

The counter for United Airlines featured its Easy Check-In system. I've often wondered why Changi Airport doesn't have this, and after today, I'm glad it doesn't. Easy Check-In, the automated kiosk system that allows passengers to check-in themselves rather than through the counter assistant, was basically useless. It frustrated passengers who weren't used to dealing with it. And since passengers on international flights almost always luggage to check-in, you still need to have a counter assistance check it in for you. In the end, Easy Check-In wasn't so easy and took as much time to check-in, if not longer.

I thought of browsing the airport mall for a while, but it was already about 4:15pm and boarding time was at 5pm. So I went into the immigration area. And then, this moment reminded me of what George Clooney's character had said in the movie, "Up In The Air".

First, I waited for a while behind a young American guy (probably his first time flying international) who struggled to get his passport and boarding pass out, before I just passed him by. Then, when going through the X-rays, I stayed away from groups and old people and made a beeline for the shortest queue with -- you guessed it -- Asians. It helped my ease of passage too that I had already put my wallet, handphone and key in my jacket, so I wasn't held up at the X-ray unnecessarily.

Then it was time for a snack. I hadn't eaten anything since breakfast, which I finished at 11am, and dinner would probably be served two hours into the flight. I bought a sushi handroll and chocolate milk, the latter which, at airport prices, cost an outrageous 400 yen for something poured from a packet. But what to do? I hadn't bothered to buy food from outside the airport.

So then it was 5pm, time to say farewell to Japan. Tried to sleep on the plane when I could, but found myself not able to enter into deep sleep, somehow just couldn't find the right position (woke up with a cramped neck) nor that quiet moment. Anyway, also watched "The Men Who Stare at Goats" and the ending of "When Harry Met Sally".

There was a medical emergency on the plane. A young Japanese woman apparently had complained of shortness of breath. Flight attendants gave her one oxygen tank, then moved her to an empty aisle (after asking the other passengers there to change seats). Later, I saw her being given another oxygen tank, while attendants asked for doctors or nurses to assist. I saw a Caucasian woman helping, assumed she's a doctor, based on her "take charge" manner. Later, I also heard a Singaporean couple who offered their asthmatic medication say that this woman had advised against giving any drugs in case of further complications. Anyway, when disembarking, I saw the woman sitting upright without any oxygen tank. Guess she was feeling better, otherwise a medical crew would've helped her off the plane before the rest of us could leave.

Bought a bottle of Bailey's from the duty free store, then had a cup of tea (which came out bitter even though I asked for it to be sweeter) at Killiney Kopitiam while updating this blog entry. Figured I might as well make use of Changi Airport's free wireless service while I could, hehe.

--