I went to the UK :-). The real story is that I went to Japan only thinking of staying for 1 year. After a couple of months, I knew I was going to stay forever. At that point I quite happily made the decision to give up writing software professionally, do something else and write free software in my spare time. After 5 years, I was actually planning on starting a brewery (I've been a homebrewer since I was 18), but I got married and my wife wanted to learn English (she's Japanese). We ended up going to the UK since I can get a visa to work there. I needed to do something to pay the bills, so I tried to get a software job.

London is chock-a-block with programming jobs. There are also meetups pretty much every day of the week (often with free beer and pizza). I basically went to as many meetups as I could and I also invested in going to some conferences in areas I was interested in (another good way to meet people). I screwed up my first interview very badly and I'm sure that the people involved are convinced I can't program at all :-). But in the end I got lots of interviews and was able to land a job in about a month (though I started a month later).

Of course the biggest question people had was, "Can you still program?" I'd been out for 5 years. Luckily I had been working on a side project in Ruby for that time period. The code was pretty awful (I was experimenting with a few different ideas) and definitely not idiomatic Ruby, but it helped a lot (i.e. it got me a foot in the door). I also needed to create a narrative for my career where teaching English for 5 years made sense. Of course, people don't plan out their lives like that in reality, but it helps people understand that there is some continuity -- you aren't just bumbling around from job to job. In the end, I had to adjust my salary expectations (because London pay is quite low compared to similarly expensive cities in North America and also because my employer was legitimately taking a risk in hiring me). But I've always been more interested in doing interesting work than receiving a large paycheck, so I had no problem with that. If you do good work and are successful, your employer should bump you up the next year. If they don't, you can very reasonably leverage your "I am working in the industry now" status to find a higher paying job.

I'm currently back in Japan, working remotely on contract for that same company. Being married to a Japanese national made it very easy to return. When I was looking for work before I left Japan, I found that recruiters and what-not wouldn't touch me. I suspect that they thought (reasonably) that I didn't have access to a visa. As soon as I touched down in the UK, they were all over me.

I couldn't quite tell if you are working in high tech now or not, but if you are looking, that's my advice (for work outside of Japan) -- work on your portfolio, etc while you are in Japan. Find a busy centre with lots of jobs and an active meetup scene and go there to meet people. Going to the UK still cost me an obscene amount of money, but I'd been very careful about saving while on JET, so it was fine. If you are short on cash, I'd say try to save up -- having enough money to scrape by for 6-8 months in the centre you pick will really help you (and you can live on beer and pizza in the mean time :-) ).

I can't give you any advice on working in Japan, since I haven't tried to get a job here. However, probably the same advice will work. Likely it means working in Tokyo or Osaka, though. Remote work seems to be picking up steam these days, but it's pretty hard from Japan. The timezone is basically the worst. I put in a lot of days where I work to midnight or later so that I can overlap with London. If you were trying to overlap with the west coast US, it would be baker's hours (starting at 3-4 am) and you are a day ahead (so probably you are best working from Tuesday to Saturday). For me, that's by far the hardest part. My current employer is quite liberal about what hours I work, but I find that I'm most effective if I overlap as much as possible, so that's what I generally try to do (taking a week here and there to work Japanese hours to recover).