Pages

Tuesday, 30 April 2013

Too many SIM cards - Prepaid internet while traveling


Getting a mobile internet connection when you're traveling outside your own country is not always easy: it can be a hassle to find prepaid SIM cards. And the free wifi you get in some restaurants is not as convenient and secure as having your own portable always-on connection.

I’m still using a Huawei to share 3G internet between the iPhone/iPad/Macbook. The iPhone has my regular UK SIM, useful to be reached on my normal number.

I managed to find prepaid SIM cards for 3G in almost all countries I visited except Japan. Every time the SIM card I bought was compatible with my unlocked Huawey. Often I had to manually configure the APN to get internet working on the Huawey.

Here are the details, country by country.


  • Singapore, M1 broadband

Bought a SIM card at the airport immediately after arrival from an M1 stand. Unlimited data for a set number of days. When registering you need to show your passport and they keep a record of your passport number.

When the card expires, you need a separate connection to top it up, either with a credit card of with a voucher. You can buy the voucher in 7-11. You need to remember your broadband mobile number, you’ll need it to top-up.

5 days of unlimited data cost SGD18.

To top-up, go here.




  • Taiwan, Chungwa Telecom

Went to the store in the shopping area near Taipei 101, had to bring two photo IDs with me. The Chungwa store was crowded, I had to wait about half an hour. There is a number calling system so once you have your ticket you can walk around the other shops before coming back so it wasn't that bad.

The vendor spoke English, the price of the card was reasonable.

  • Hong Kong, one2free

Went to the one2free shop outside Fortress Hill MTR station. No ID required, no registration, the connection is entirely anonymous unlike in Beijing, Taiwan or Singapore. Unlimited data, you pay for a number of days. When your credit expires, your browser automatically prompts you to recharge. You don’t need a separate internet connection to recharge an expired card which is good.

If the one2free card was a beer...

To top-up
  • get $100 vouchers in 7-11 (it's just a receipt paper with a number on it)
  • top-up your balance online with the voucher number
  • Buy more days (7 days of unlimited data costs HKD78)


  • Beijing, China Unicom

Went to the China Unicom store located right outside the Dongdan subway station. Google map here. The passport is required. Only one employee spoke English in the store, which allowed me to skip the queue. The price for the card was reasonable.

This is not unlimited data, they charge you per KB so it's fine for Twitter/Email/FourSquare but no more. To buy recharges, go to any newsagent kiosk and buy a China Unicom recharge card. Topping up is a bit convoluted: you do it from a mobile phone. You call their phone number and type in the voucher number. You can call from a different SIM than the one you are recharging.

Important: you have to set the APN manually for the SIM to work correctly.

Warning! Not all China Unicom stores sell the SIM card. I also went to the main store in Wangfujing, which is the Beijing equivalent of London's Oxford Street. They sell much more expensive cards that do both voice and data, the price is ridiculous.

Twitter and Facebook are blocked in China (at least they were at the time I was there). US sites are a bit slow, Whatsapp and Wechat work fine. I haven't tried using VPNs there but here is a list of VPNs that are supposed to work in China.


  • USA, T-Mobile

In Los Angeles T-Mobile sells a data-only SIM that works just fine. I went to the Santa Monica store and paid $35.95 for a SIM that kept me running for the remaining 8 days of my US trip.

Warning: don't get the card sold at LAX airport, it's way too expensive.

  • Philippines, Global

I bought a Global data SIM card at a kiosk for PHP600 at MNL airport terminal 1 (Manila). This gives you 7 days of unlimited data. No document required, activation is anonymous. As the nice Filipino lady at the kiosk said "it's more fun in the Philippines".

You have to set up the APN manually.

To top up put the SIM in a mobile phone and dial a number to access a WAP menu. Then you have to:
  • recharge your account using a prepaid card (I bought one for PHP300).
  • create a 'promo' to choose the plan (I chose another 7 days).

  • Japan, no luck
I found nothing in Japan!

My plane landed too late for the airport kiosk. None of the phone shops I visited in Osaka had any prepaid 3G SIM card - they told me the only place to get it was the airport.

I found free wifi in some bars (not so much in coffee shops, tea rooms or restaurants).

Tuesday, 9 April 2013

How to travel and study at the same time


I left London 5 months ago, preparing for a financial exam I'll take in May. The exam requires on average somewhere between 200 and 300 hours of study time. It turns out you don't have to do it in front a white wall.

Equipment

  • Macbookpro 15’’
  • iPad mini
  • iPhone 4S with extra battery
  • Huawey E586 with extra battery.
I don’t always walk around with a Macbook pro of course. Whether I take it with me or not depends on several things including how safe it is to leave it in my hotel room. A 15’’ is not ideal for travel, it's clearly heavy. An Air would be easier on my shoulders but it’s ok. Sometimes hotel safes are big enough to accommodate an MBP, sometimes I take the risk of just leaving it in my locked suitcase. When I can leave the MBP behind, I carry only the iPad mini in a small satchel.
The smallest bag I could find to carry the MBP 15’’ is a Samsonite rucksack. The 15’’ retina fits in just right.




Study material

I read books using a combination of
  • Amazon Kindle
  • Apple iBooks
  • Dropbox (for PDF files)
  • Public libraries: for books that are not accessible in electronic form. The National Library in Singapore has plenty of reference books, is open to non students (as long as you don’t borrow the books) and is laptop-friendly.

Dedicating time to study

The technical bit is not really the problem. The hardest part is to put time aside and dedicate it to study. Traveling is full of distractions. One of them is doing tourism. When I’m in London I’m not stuffing my days with trips to Mme Tussaud or the British Museum so I don’t feel like doing this either while I’m in another country. Local attractions are not a must-do, they will still be there the next time you come back.

The biggest factor of wasted time while traveling is decision making and exploration - by wasted I mean in relation to the objective of studying, of course it's not wasted time if you actually enjoy exploring. Where should I go today? Where are the good places? Rather than doing extensive and time-consuming research or walking around at random, it’s quicker to rely on a few recommendations from friends/locals/hotel receptionists or even suggestions from FourSquare.

Here are the top 3 questions I ask FourSquare:
  • where can I have breakfast now?
  • where is a good coffee place to sit down and open my laptop?
  • where can I eat now?
Based on where you are FourSquare returns a single list of suggestions. This list includes places you stumbled upon at random before, places recommended by friends and places recommended by FourSquare users.


Dealing with travel overhead

Then another factor is the travel overhead: taking a plane, booking trips, booking hotels, checking in, checking out, washing clothes, etc… Now I do most of my bookings with the Expedia iPhone app. It has a very clean flow and allows quick sorting by deals first. When booking a flight or hotel, it doesn't ask you to type in your life story, just the 3 digits at the back of your credit card. Some airline web booking forms are just horrendous: they have too many pages, ask for way too much info sometimes redundant... It happened to me to spend up to an hour to complete a booking process because of slow websites that crash in the middle. None of this with Expedia for iPhone. Another nice thing: the search shows you the total price for stay as opposed to a misleading nightly rate that excludes taxes...


The drawback of Expedia: it shows only the hotels connected to Expedia. That excludes a lot of smaller more obscure hotels that can be perfectly OK and sometimes very cheap.
I wash my clothes in places that wash, dry and fold them for you, not in launderettes. I try and avoid moving around too much: I prefer staying in the same place for 1 or 2 weeks. After two weeks in the same city you’re pretty much a local: you have your favorite hangouts, you know the good places to eat or study, you have your data SIM card sorted out, you know the cheap local wash&fold laundry service, you can get around in the MTR/subway/metro/tube without a map and you can order a latte in the native language.

Although I spent most of my time in big cities (Taipei, Hong Kong, Singapore, Beijing, San Francisco, Los Angeles), I found that for studying sleepy resorts are the best because they remove all distractions. No invites from friends, no dating, no travel, no tourism, no time wasted in transport - it’s a quick walk from the bungalow to the pool. It also removes choice: there is only one restaurant, one cafe, one swimming pool and only 10 items on the menu. I clocked in at least 10 hours daily of intensive study while in Malaysia/Thailand, whereas I struggled to reach 5 hours when I was preparing for the Microsoft exam in Taipei.

See also:
Keep your data safe while traveling
Study plan for a 6-month break



Saturday, 26 January 2013

Keep your data safe while traveling


Photo 27-01-2013 11 02 21
Before leaving London for a 6 month break I sold my desktop and replaced it with a MacBookPro. The MBP has become my main computer and because I'm traveling, I had to review the whole backup routine… The likelihood of having it stolen or lost on the beach is quite high (compared to having my flat broken into for instance).

After trying a few things I came up with this: I sorted out my data into two groups, sensitive data and mobile data.

Sensitive data
Stuff you really don’t want someone to steal from you.
That includes budget spreadsheets, bank statements, receipts, health documents…
  • Store on local drive
  • Encrypt with TrueCrypt (Windows) or Filevault (MacOs). You can forget the Filevault password, the only purpose of encrypting the data on the local drive is to prevent it from being accessed by someone who steals the laptop. 
  • Back-up manually to external HD with hardware encryption (such as My Passport which comes with a built-in backup software WDSmartware).
    This external HD should always stay in the room, or in the hotel safe. If the main laptop gets stolen or crashes, this is the first line of defense. Of course the HD itself could be stolen that’s why data should be encrypted with a password that you remember.
  • Backup off-site automatically with a service that allows local encryption (such as Mozy)
    Local encryption technology exists so there is no point taking the risk of trusting the cloud storage provider to encrypt the really sensitive data for you. Just don’t forget the password.
Mobile data
Stuff you need with you all the time, files used often and on-the-go that are less sensitive: photos, travel itineraries, hotel bookings, flight tickets, travel insurance certificate, passport scans, ebooks.
  • Must be quickly synchronised across devices (iPhone, iPad, PC, MacBook, web). Dropbox is good for that. iCloud not so much...
  • Encrypt the offline cache with OS encryption. Encrypt the Dropbox folder with TrueCrypt/FileVault so that the files stored offline cannot be accessed if the laptop gets stolen.
Notes:

Why use TrueCrypt for sensitive data under Windows and not EFS?
The backup systems I tried (WDSmartware and Windows8 File History) don't know how to save EFS-encrypted files. Mozy knows how to save EFS-encrypted files. But when it restores them, they're still encrypted with EFS. So if you lose your laptop and don't have the EFS keyfiles, you lose your data. I find EFS a bit cumbersome because if you're serious about testing it, you have to do a restore to a totally different system to make sure that you're able to decrypt the EFS files, save the keyfiles to USB drives, blah blah blah. I know I’ll just get it wrong so I prefer using TrueCrypt.

Don't use Mozy to save data stored on the external HD
Mozy is really bad at saving data located on a removable drive (such as an external HD). Mozy starts automatically. If the drive is not connected at the time when Mozy starts, Mozy thinks the files were deleted from the machine and it marks them as deleted from the server, which is a bit rough.

Tuesday, 22 January 2013

HTML5/CSS3/Javascript Resources

 

It is sunny in Langkawi because we’re in the middle of the dry season on that side of Malaysia, unlike Singapore where it’s raining all day at the moment.
This is the perfect setting to gather some resources about HTML5 and in particular to prepare for Microsoft exam 70-480.
  • Exam registration
  • upcoming Microsoft exam book.
  • From Safari Online Books:
    • Head-first HTML5 programming dives directly into the things a client apps dev is actually interested in: how to do asynchronous programming with Javascript to avoid page reloads, how to change the DOM programmatically, how to call Web services, how to execute tasks in parallel, how to use local storage, how to use geolocation and Google maps.
    • Beginning iPhone and iPad web apps
  • Test Papers (exam Q&As)
  • Some study guides:
  • HTML5 Jumpstart (Microsoft Virtual Academy)
    • The videos spend a lot of time on CSS3 (as opposed to Head-First that goes into Javascript immediately).
    • The focus is to build apps for Windows 8 rather than web apps therefore some of the CSS properties and Javascript code is Microsoft-specific.
    • There is a good demo of WinJS’s Promises, which makes asynchronous programming under Javascript look more industrial.
  • HTML5 Spec

Friday, 16 November 2012

How not to go mad with Parallels for Mac

Parallels uses your bootcamp partition to create a Windows virtual machine. It aims at blending windows programs within MacOsX so that eventually you don’t realise you are using a virtual machine. It goes as far as mapping MacOs shortcuts to Windows shortcuts. You can configure very precisely how much integration you want: it’s very impressive and it can get very very confusing as well… It looks like my brain works better with 2 distinct OSs rather than a merged one.

Anyway, here are a few points that bugged for a while before I find the solution:

  • How do you log out from Windows 8 or switch user without restarting???

Type <fn><ctrl><alt><Del>

  • How do you display the Windows 8 toolbox?

Screen Shot 2012-11-21 at 01.00.01

If <cmd>X does not work, go to Parallels Desktop > Preferences > Shortcuts >Virtual Machines > Profile. Set it from Windows to Generic.

  • How to use the F1, F2 keys directly under Windows without having to press Fn?

Apple > System Preferences > Keyboard > Tick Use all F1, F2, etc. keys as standard function keys.

image

  • How to select text (<ctrl> <shift> <right> in Windows).

<cmd> <ctrl> <shift> <right>.

Friday, 19 October 2012

Jabs for South-East Asia

jab According to Fit For Travel this is the list of vaccines/medications I should get on top of tetanus/typhoid/hepatitis A/diphtheria to travel to South East Asia:
Fit For Travel recommends going to my GP but that's going to take years. There is a place called the Travel Clinic where you can make appointments even at the weekend.

Classic vaccines are free but exotic ones are about £50 a shot (see prices) and for each vaccine you need between 2 and 3 shots. This is the list of vaccines paid for by the NHS.
To get an appointment with my GP, all I need to do is go there in person and ask for a travel vaccination appointment (can’t be that specific on the phone).
More resources: NaTHNac

Wednesday, 17 October 2012

Learning plan for a 6-month break

If you were taking a 6-month break off work, what would you start learning?

This is what I put on my plate:

  • CSS\Javascript\HTML5

I haven’t touched CSS and HTML in a while. It’s about time to have a refresh. Microsoft now has certifications for those.

  • One CMS (Wordpress or Drupal)

…because my blog looks quite boring in Blogger.

  • One no-SQL technology

…because I worked with Relational Data Models for too long…

…sometimes it’s good to learn about Microsoft technologies independently of a project. The material for certifications –without making you proficient- gives you a healthy overview of everything that’s available. So when you’re back on projects, you know what tools to consider.

  • C++ 11

…to lose old habits and re-learn new ones.

  • Risk calculation in finance

Some financial calculations basics: statistics, value at risk, options valuation, portfolio valuation… I will prepare the FRM exam to write it in May.

And those will be mostly for fun….

  • iPad + iPhone development
  • High Frequency Trading

 

That could be too many things to learn for 6 months, it’s likely I am biting more than I can chew. I will see in 1 month how much I’ve done and I might review the list.

Monday, 1 October 2012

The most exciting novels I've read in years


Very very gripping books, don’t read on if you’d rather avoid spoilers…

WIFI WPA hacks, phone tracking, drones, armies of self-driving cars, hypersonic weapons, plasma weapons, distributed software able to kill people remotely, GPS-enabled glasses with augmented reality overlay controlled by motion-detection gloves… Stealth processes running on unreachable servers in China scanning RSS feeds for a text pattern and sending instructions when a match is found, therefore reacting to events in real-time... People and machines controlled using basic AI available in computer games, a bit like a giant SimCity or a lethal MMORPG where the player is a program and characters are actual people… Encrypted APIs allowing whoever decrypts it to wipe out a company’s entire data backup just by passing the company name as a function argument… entire companies fall under the control of an unstoppable distributed computer program whose mad creator died before triggering it. It recruits people through coercion at first until it grows powerful enough to be the best employer in a country ravaged by 25% unemployment. It’s a computer program that kills spammers, hedge fund managers and anything that gets in its way and simultaneously builds self-sufficient communities based on renewable energy and sustainable farming…

What makes this book powerful is that everything is based on technology available now. There is little that the author made up, it all exists. You end up thinking: that could happen if someone smart with unlimited funds decided to put his mind to it (Eric Schmidt maybe?). Of course a lot of the tech in the book works a little too well. Suarez’ technique consists in taking a bunch of technologies currently in the R&D stage and imagine what would happen if they actually were fully developed. This is the kind of sci-fi I like: grounded, realistic, credible and very very close to us. 

You could make such a good film out of this plot… There is enough material to build a very cool tech action-thriller trilogy.

Sunday, 23 September 2012

My Huawey E585 does not work with T-Mobile any more

I can't use mobile internet any more with T-Mobile using my E585 Huawey mifi device. For the past few weeks it fails to connect. It displays the operator (T-Mobile), says "connecting" then "disconnected" and that's it. I talked to phone support, restored the factory defaults, no success.

I brought my SIM to a T-Mobile shop to try out the data feature with another device: the data download was still ok. So my SIM and my account are fine.

EverytingEverywhere will be soon available in the UK. A T-Mobile assistant told me this would involve getting a new SIM, a new contract and new hardware. If they still use Huawey devices, I guess they will go for the E589, the one that supports LTE...

Until then I'll get myself an unlocked E586es (the model T-Mobile actually uses). It supports HSPA+ so I should get faster speeds than with the E585.

Tuesday, 11 September 2012

Using Reactive Extensions with Bloomberg

 

2012-09-17 15.44.26Lately I had a chance to use the Bloomberg API to build a price capture service. In the context of finance the Bloomberg API -when run on a PC where the Bloomberg terminal is installed- allows you to read prices and rates for financial instruments. The “Bloomberg terminal” is an expensive piece of software that looks like nothing you’ve seen before unless you are old enough to have used the French Minitel. It comes with a funny-looking keyboard and a Mission Impossible-style fingerprint authentication system.

The API is straightforward and fully asynchronous. When opening a session you specify a single delegate that processes all notifications received from Bloomberg.

Bloomberg provides several services, some for real-time market data, others for reference static information, another for historical data… When you start a session, Bloomberg sends you a  SESSION_STATUS message confirming the session is up. If you open a service you get SERVICE_STATUS messages . If you start subscribing to an instrument’s updates Bloomberg sends SUBSCRIPTION_DATA messages with the price updates as well as SUBSCRIPTION_STATUS messages containing subscription errors if something went wrong.

When writing such a client you find yourself waiting for a message before taking action. For instance you wait for a service to open before subscribing with instruments, you wait for subscription updates to arrive in order to save them to memory…

If you take action following the reception of a message, you run this action in the same call stack as the delegate you passed to the API. Is that a problem? Yes it can be: if your action takes too long, you slow down the Bloomberg thread consuming the messages and the system starts sending you ‘Slow Consumer’ warning admin messages.

So in the end you have to do things such as:

  • redirect execution from a worker thread to the main thread (to avoid blocking the consumer thread)
  • fire off a timer at regular intervals to display stats,
  • schedule tasks at a set time (to schedule snapshots for instance)
  • wait for several tasks to complete before starting a new one

Of course you could do all this using threads/handles/message loops, or the BackgroundWorker pattern which I used a lot when building windows UIs but it’s just not practical. So I started looking up MSDN to get familiar with the latest tools that make async programming easier (in .NET 4.0) with BeginInvoke / EndInvoke, thread pooling, the TPL

@smwhit told me “Stop being such a C++ tard and take a look at Reactive Extensions”

Indeed RX is spot-on for this. One of the very very nice things with Reactive Extensions is that you can parameterize the scheduler. For each delegate you register you simply set a parameter to decide whether you want the code to run on a new thread, a thread pool, a dispatcher, an event pool or on the current thread the next time it’s available. You can even replace the scheduler with a TestScheduler, which makes unit-testing concurrent code possible.

Resources: