Japan, Day 4

* Visited Harajuku and the Meiji Shrine (jingu)
* Visited the Sony Building in Nagiza (which was hellish boring compared to what I was hoping
* Visited Asakusa and the Shinto Shrine there
* Returned back for some sleep and then went out with strangers some I just met in the hostel, went out and eat Nabe and went to a hostess bar

Japan Trip

Day 1, 5am England

Started the day by 5am to catch my first plane at Southampton. Luckily, I had no problems finding the long stay car park and had plenty of time to sit and have a coffee. The airport is very small, so it wasn’t busy.

Smooth flight from Southampton to Paris – Orly. Found my bags and hopped on the shuttle bus to Paris – Charles de Gualle. I was feeling very pleased with myself as I had imagined it was going to be much harder than it really was. I had imagined travelling on my own would be difficult but so far, it had been a breeze.
I took this chance to write some messages to friends while I was still in Europe. When I arrived at CDG, I rang my Mother to let her know I made it safely and on time for my flight to Japan.

Quickly grabbed lunch and then waited in the lobby for my flight. I clearly saw lots of Japanese people waiting for the same flight as me, which I knew was a good sign I wasn’t lost.

11 hours it was going to take, but by this point, I was so relieved that I had made, that I was starting to get excited about my trip!

The time flew by. It was my first long flight, so I was surprised how comfortable everything was.
We had little touch screens on the back of the seats. The was an option to check the progress of our journey, so I was often looking at that. We had gone as high as 39,000 feet.
Of course the were movies too. No flight would complete without watching the first Die Hard.

Day 1, 8:15am Japan
I had a few hours sleep on the plane. At this point, I had been travelling form almost 19 hours but the day was only getting started.

From Narita Airport, Japan. I breezed through customs, hired a mobile phone and hopped onto the train heading for Tokyo.

I was just awe struck as I stares at the scenery outside of the train windows. Everything was so different. The roads, cars, buildings, trees, fields… All seemed completely strange compared to home – but the again, everything I saw was so realistically close to things I had seen in anime.

Tokyo. The big city. I had pulled into Shinjuku. One of the biggest train stations. Thankfully most signs have both Japanese and English written on them. So I easily found my way out.
Now, I was stuck. I had forgotten to print a map to the accommodation and my iPhone was now useless… So I gathered some courage to ask where to get a Taxi.
The Taxi dropped me outside the door. Nice and simple.
I checked in and was given useful advice at the reception.
Now I just to brave the subway/train system to meet my friend at Kichijoji…
I’m lost. Did not take me long. Was so confused… Blankly staring at a map figuring how to get to the next station.
Finally I manage to change at Shinjuku after asking at the help desk.
It’s almost 2pm and Mark and his wife Kyoko gladly meet me at Kichijoji for lunch. They decide to take me to one of their favourite noodle bars :)
I was so happy! Everything looked just the way it should and the staff cheerfully greeted you as you entered, shouting ‘Saimasen!’ (meaning ‘Welcome’).

After filling our bellys with very tasty noodles. Kyoko headed back for work but Mark showed me around town and told me about the Japan lifestyle.
We went to shops, walked down high streets and pointed out landmarks. We took the path down to the park.
A massive park that existed in the middle of the city that was quiet and had a big pond in the middle of it.
We decided to cut through to the other side by walking through the local Zoo.
After walking around there for a bit, we visited a karaoke bar to get the Japanese experience.
After an hour of some manly singing. We walked the streets once more before Mark kindly showed me back to the station.

7.05pm I had arrived back at my hostel. Totally exhausted from the days excitement but I hadn’t called it quits yet.
Quick shower and I was back out again. This time, I was going to Shibuya.
Shibuya is living centre for young modern people. Full of big names and well dressed people – and also famous for the the enormous zebra crossing that is often featured on tv. Hundreds of people that cross when the man turns green.
I stared at the buildings and electronic signs before wondering back to station for the end of the night.

Facebook change their Applications Policy & Kill FBML

FBML is DEAD, LONG LIVE FBML…

Not surprising news but Facebook has finally retired FBML on 11th March 2011.

What does that mean? Basically it means that you no longer have to use the “Static FBML page” application to create new pages, instead you are now allowed to use iFrames!

*Party poppers and loud cheers!*

Unfortunately, this exciting news turns sour pretty quickly…

With this new ability there are some major roadblocks, mainly for non-tech savy users.

  1. iFrames must be able to serve your own web pages from a web host.
  2. Any pages that you cannot serve with SSL will bring up a user message which will potentially put off visitors, as explained in their blog post about users running Facebook over HTTPS.
  3. Applications. You can only create these iFrame pages with Facebook Applications. For some this will be a real challenge, even as a Web Developer, I still find them difficult.

Making your pages with Facebook Applications

Going back to my previous point. Admins on Facebook will now have to create their own Applications so they can display new pages on their Fan Pages.

There are several difficult hurdles to deal with:

  1. Applications are usually created by Facebook Developers, see http://www.facebook.com/developers
  2. Facebook have changed their Applications policy. You must now register a valid Credit Card or Mobile Number. Paranoid? I am.
  3. Non-tech savy users who innocently created their fan pages will have no idea how to manage their Applications.
  4. Documentation and examples are scarce for developing these new iFrame pages. FBML used to allow you to tap into Facebook services pretty easily but now you have to familiarise yourself with a combination of Signed Requests in PHP and the JavaScript SDK aka the Facebook API.

Basically if you can conquer those requirements, you will be allowed to continue using Facebook pages. In summary, your shopping list should include:

  1. Web Hosting
  2. SSL Hosting to serve your web pages on HTTPS (expensive)
  3. A valid Credit Card or Mobile Number (sorry script kiddies)
  4. A fearless attitude to creating, managing your own Applications and wading through poorly documented examples for endless hours, have fun.
  5. A knowledge of PHP and JavaScript. You prefer a different web language? Tough. Facebook is biased and wants you to use PHP SDK for now.

Hopefully I summed up everything nicely for you. Good luck.

UPDATE: 2nd June 2011
As always, Facebook has quietly made some changes (without really telling anyone).

  • You can use your mobile number to verify yourself as a Facebook Developer, allowing you to add new Applications.
  • Released SDK v3.0.0 which is an upgrade to the last version of SDK v2.2.x
  • Introduce “Facebook Credits” available to all Applications (mostly for games). Virtual currency that Facebook wants you to use. Can use Paypal or Credit Cards to make transactions.

Create your first Twitter App with Zend Framework

I finally got round to writing my first Twitter App using Zend OAuth.

Here are my tips and explanation to getting your Twitter App up and running.

Getting Started

Register at http://dev.twitter.com/ and create your first App. You can change all the settings at any time, so don’t worry about getting them wrong.

Setting Up the Twitter App

Authorise a Domain URL, you can even use localhost for testing purposes.

It is important you set the Callback URL otherwise you can’t use the Browser App option and your OAuth will fail.

Quickly access your App’s details at http://twitter.com/oauth.

When coding with Zend OAuth, read the documentation carefully!
It has everything you need.

My Mistake

I did not understand how to grab the Access Token. Reason? It’s a two part process. Requesting, then Receiving.

The Code

Here is a working example of a Request Token with Zend OAuth and your Twitter App’s Consumer Key and Consumer Secret.

(Note the keys used are the ones from Zend’s Article)

$config = array(
'callbackUrl' => 'http://example.com/callback.php',
'siteUrl' => 'http://twitter.com/oauth',
'consumerKey' => 'gg3DsFTW9OU9eWPnbuPzQ',
'consumerSecret' => 'tFB0fyWLSMf74lkEu9FTyoHXcazOWpbrAjTCCK48A'
);
$consumer = new Zend_Oauth_Consumer($config);

// fetch a request token
$token = $consumer->getRequestToken();

// persist the token to storage
$_SESSION['TWITTER_REQUEST_TOKEN'] = serialize($token);

// redirect the user
$consumer->redirect();

Steps you must do:

  1. Use the Callback URL to receive the Access Token
  2. Store the Request Token in a $_SESSION
  3. Follow the getAccessToken() example and store this in a $_SESSION or Database (recommended)

Why store the Access Token in a Database?

The best thing about the Access Token is that once you’ve successfully requested one, it never expires!

So save the hassle of requesting a new token and use it throughout your website. Great thing is, it can’t be compromised!

Without the the Consumer Key and Consumer Secret, you can’t hijack the users account for malicious purposes.

Please leave a comment if you want me to write another article about how to implement the example into your scripts or maybe I’ll update this one.

Configuring a new VPS.. can be a real pain.

Great, so I’ve managed to get Nginx with PHP running… Still haven’t solved the mystery of vhosts and alias directories *sigh*

Finished configuring the email server so that it now WORKS. Always a pain in the ass doing those. Thankfully there is a comprehensive guide to setting Postfix + Dovecot online.

Now to continue installing all my programs on my new Windows 7 and getting my working environment up to scratch.

Oh, and I broke my laptop last night. Was attempting to replace the GFX chip on but it ended up breaking as the processor had been gelled to the PCB. Shall keep my eyes on Ebay over the next few weeks for a replacement.

Weekly Round Up: Issue 2

WordPress introduces custom post types in version 3.0
http://kovshenin.com/archives/custom-post-types-in-wordpress-3-0/

Twitters keywords on the homepage got besieged by porn spam this morning
http://www.twitter.com/

phpBB3′s default ‘prosilver’ theme is dog slow… Please make it lighter + easier to skin like classic ‘subsilver’ for future releases!
http://www.phpbb.com/

How fast is your localhost?
(Work machine, ‘Request per second: 2.36 #/sec’ – man that’s slow, VPS Web server ‘RPS: 8000+’, that’s more like it! proof)
#ab -n 500 -c 10 http://localhost/

The HTC Desire/Legend might be the first Android phone I actually want?
http://gizmodo.com/5504266/htc-desire-review-an-even-more-desirable-nexus-one

http://gizmodo.com/5504266/htc-desire-review-an-even-more-desirable-nexus-one

Weekly Round Up: Issue 1

I often hunt around on the internet for the latest information to do with Web Development. Most of the time it goes to my Twitter but I thought it would be great if I could start logging a collection of the best ones I read.

So if you enjoy keeping up with the latest trends, I hope you enjoy my information bites!

HTML5 won’t save the web
http://gizmodo.com/5461711/giz-explains-why-html5-isnt-going-to-save-the-internet

Facebook develop faster PHP
http://www.neowin.net/news/facebook-unveils-hiphop-for-php-039source-code-transformer039

IE8 now “most popular” version of IE
http://www.neowin.net/news/ie8-is-now-the-world039s-most-used-browser

Zend Framework 1.10 Released (and now with versioned documentation!)
http://devzone.zend.com/article/11727-Zend-Framework-1.10.0-STABLE-Released

PHP hates integers (64 bit)
http://www.mysqlperformanceblog.com/2007/03/27/integers-in-php-running-with-scissors-and-portability/

Relaunching my website

Just to let people know, I will be changing my website soon and will be removing most of my older (useless) posts.

I wish to post quality article about web development on my blog to help others and to show my wide, diverse knowledge.

I’m afraid I have a lot of work to do with changing my webhosts and sorting out my domain host for this year but as soon as it’s sorted I am going to relaunch this site.

I hope you look forward to it ^_^