Friday, June 6, 2014

Custom gestures in Windows 8 (AKA middle mouse button on a touch screen)

Another departure from all things Japanese, today I want to give a shout out to the people at StrokesPlus for their free gesture program. Why? Because customization of gestures on Windows 8 is terrible, despite the limitation that loss of a keyboard and mouse has on a windows environment. Yes, you can use Metro apps, but frankly that isn't why people buy a Windows machine. Custom gestures are a valuable tool for making up for the lack of peripherals essential to many programs past and present.

Doing a Google search for "custom gestures in Windows 8" brings forth a wall of results about the Windows 8 default gestures*, which is punctuated by the odd reference to "TouchMe Gesture Studio" a piece of "free" software that requires you to pay out for the "gesture engine" that actually allows the program to function. Ahhh, how I miss the old days when "free" used to actually mean just that. Anyway, anyone who has read this blog knows I'm a miser when it comes to supporting apps where a free alternative exists (Aedict3 being the notable exception**).

StrokesPlus is free, which is great. It perhaps loses out on some functionality against its rivals in that it isn't really built specifically for touch, but for mice, and so there is no multi-gesturing. However, it remains powerful: after all, we're all so used to using pen & paper, that we're generally comfortable with one finger on the screen. I suspect our brains are also more used to memorizing single-touch gestures in the same way it takes time to learn to use both hands on a piano etc. but that is just my speculation, and certainly multi-gesture might be more elegant.

My particular use for StrokesPlus was to allow middle-mouse button clicks*** without having to plug in a mouse. It only took a short while to work out how to implement this in the StrokesPlus framework (some scripting experience is handy here, but not necessary as everything is annotated). And now I can initiate the gesture with the RMB (long-touch from the Win8 default), and drag a simple symbol which I assigned to the middle mouse button (MMB) down*4*. I then assigned a simple click with a modifier for the MMB held down to call the middle mouse button up *5*. This way I can drag the MMB after making my gesture, then just long-touch the screen again to stop using the MMB. If I wanted to I could have just done a single MMB click using the following function: acMouseClick(gsx, gsy, 1, 1, 1), which sends both the down and up command, but I wanted to be able to drag with the MMB too. This explanation is probably a bit cryptic, but once you've downloaded StrokesPlus and played with it for a minute or two, it should be pretty clear.

In summary, StrokesPlus adds some useful functionality and customization, and while by no means fills the gap entirely, it does help bridge the gap between tablet and PC functionality.


*and frankly, who isn't frustrated by these stupid gestures? In desktop mode I have no need for the charm menu, and since Metro apps now appear in the taskbar, I have no need for the app switcher when I'm in desktop mode. Generally what happens is that I'll accidentally activate one of these stupid gestures while trying to type on the onscreen keyboard, something I never have to worry about on Android. Then again, Android can't run 99% of my games.

** I say that, but to be honest, I've yet to see a free alternative that can do half of what Aedict3 can do.

*** The game Tropico 3 requires a middle mouse button or keyboard to rotate the camera around, a bit frustrating if you don't have a mouse!

*4* in StrokesPlus speak: acMouseClick(gsx, gsy, 1, 1, 0)  -- with no modifiers
*5* that is to say: acMouseClick(gsx, gsy, 1, 0, 1)

Monday, May 26, 2014

Japan and China: get outta my airspace!

Recently, a Japanese surveillance plane was tailed at close proximity as it flew within the overlapping area of Japan and China's Air Defense Identification Zones (ADIZ)*.

The Japanese media is very keen to point out the more ominous points of this encounter: Namely, the exceptionally close proximity of the Chinese fighter aircraft (approximately 30 m), the lack of radio communication (despite supposedly having been hailed by the Japanese pilots), and the interpretation of these events as the implementation of China's recent expansion of its ADIZ. These reports are often mentioned in the same breath as the expansion of China's influence in the South China Sea, and paint China much like a dangerous animal that needs to be contained..

Listening a little closer reveals that the Chinese and Russian forces were doing military drills in the area, and China has painted the issue as a kind of invasion of military privacy. This made me laugh at first: So far as I can tell, the Chinese and Russians had every right to do their drills there (I believe it was international waters.. My world politics isn't great), but given the Chinese ADIZ was only extended in the last year, it seems pretty hypocritical to complain of Japanese surveillance planes peeking at your naval tactics when you are conducting drills near/inside the Japanese ADIZ.

The next little tidbit, that I've yet to hear mentioned in the Japanese news**, is the fact that the Japanese unilaterally expanded their ADIZ in 2010, to encompass Yonaguni island. To be fair, Yonaguni is inhabited by Japanese citizens, whereas the Chinese expansion does not increase the Chinese ADIZ area to encompass any of its inhabited islands, so far as I'm aware. But it does include the Senkaku islands, which it does claim. Additionally the Japanese expansion of the ADIZ caused the Japanese ADIZ to overlap the Taiwanese ADIZ, apparently causing some upset (see above link).

So where does distilling the whole ADIZ business leave us? Both countries have expanded their ADIZ unilaterally in the past 5 years; however, the ADIZ is basically just a courtesy, like "knock before entering", except rather than being the door to your room, its a door at the end of a long hallway (an ADIZ generally expands well beyond the territorial waters). The problem is that neither country is really obliged to recognise the creation of an ADIZ. Generally its a good idea, because it minimises the chance of getting yourself shot down just for doing surveillance***, but an ADIZ doesn't appear to actually have any basis in international law.

My interpretation is that the Japanese forces were effectively just being rude, by failing to knock on the door. I'd go as far as to say they may as well be rude, given the fact the ADIZ was unilaterally constructed by the Chinese government; however, I think the Chinese response (to scramble fighters) is fair enough, in fact it is standard procedure for encroachment of an ADIZ (they need to make an identification of the "invading" aircraft). The fact these fighters flew within 30-50 m (and out of view) of the Japanese plane can be seen as the Chinese forces being proportionately rude in reaction.

Of course, the fact the incident occurred where the Chinese and Japanese ADIZ overlaps left plenty of room for escalation, but we didn't see that, and I don't think we will. The main escalation was done (as ever) by the media. Exactly what could have been expected to happen happened: an ADIZ was trespassed*4*, and a response was incurred.

The fact that China has been expanding its influence is relevant, but given no blows have been exchanged, and the relative balance of power between China and Japan isn't changed by the incident, this remains, as is so often the case between these two countries, another petty exchange.

What I will say is this kind of thing is awfully convenient for Shinzo Abe's designs for reinterpretation of Japanese Constitution, and I wonder whether the Japanese media's reaction is influenced by this. After all, on the scale of international incidents, this is practically a non-event: the UK does this all the time *5*, and I didn't hear about it until it hit the news following the whole Russia-Ukraine thing...


*An ADIZ is just an area in which a country claims any aircraft that enter must submit their flight plans to the claimant country.

** Though, given my inexperience, I'll be lucky to catch it, even if it is mentioned..

*** No idea if that ever happened..

*4* There must be a better term, seeing as a crime wasn't committed..

*5* Dear Russia, if you're listening, you make beautiful aircraft, but do you really need to do flybys of the North Sea in tactical nuclear bombers? I don't doubt pilots get pretty bored without a few hours in the sky, but you have the whole of Russia to practice in! In any case, you'll make our Tornado pilots jealous..

Tuesday, April 15, 2014

Swype vs Google vs Wnn. The best Android Japanese input method?

To summarise this needlessly long blog post:

Google Japanese Input
+Excellent intelligent 12-key keyboard
+Integrates with other apps
+Japanese style emoticons
-English autocorrection non-existant

Wnn Keyboard Lab (best for phones?)

+Good intelligent 12-key keyboard
+Good English autocorrection/prediction
+Integrates with other apps
+Japanese style emoticons

Swype  (best for tablets? Or if you always have 2 hands on your phone)

+Superior English autocorrection/prediction
+Superior Japanese handwriting recognition
+Copy/paste functionality
-Costs money
-Writing Japanese time consuming with 1-hand
-Quirky Japanese autocorrections

(EDIT: Other input methods summarized at the bottom of this post)

I've used a few Japanese input methods for Android both on my tablet and my phone, but having recently had to use these on a daily basis for messaging friends and looking up words, I wondered which method was the fastest.


I've seen others using the 12-key "flick" systems, which I suspect is the main contender to the QWERTY layout. Other layouts exist, such as those that display ALL the hiragana (but this necessitates a lot of buttons, and I've shied away from them because of the tiny screen on my phone).

I've used lots of input methods of the QWERTY and 12-key layout, my favourites when I started this were the Swype keyboard for the former, and Google Japanese Input for the latter. I also added the Wnn Keyboard Lab halfway through, since it had a nice blend of features from both of these. But which is faster? I did a little test on the following sentence:

ことしは、はしかの患者が例年よりも多くなっていて、すでに去年1年間の患者数をこえたことが、国立染病研究所の検査で分かりました。

Computer QWERTY keyboard: 40 s
Samsung Galaxy Fame
    Swype Keyboard (2-handed): 115 s
    Swype Keyboard (1-handed): 161 s
    Google Japanese Input 12-key (1-handed): 126 s
    Google Japanese Input 12-key (2-handed): 107 s
    Wnn Labs 12-key (1-handed):  118 s

Turns out that Google is just a tiny bit faster, especially for 1-handed input. I should point out I was NOT using the swiping method, but was punching the Swype keypad, because the swype functionality is actually pretty awful for Japanese. Also, there are probably some fairly large error bars on these figures (no, I didn't do this test in triplicate!), so no input method is really standing head and shoulders above the rest.

Most people reading this far will probably also be doing a lot of typing in English. So I thought I'd do another test with the following text, typing each word in full..

The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog.

Computer keyboard: 26s
Samsung Galaxy Fame

    Google Japanese Input QWERTY (2-handed): 96 s

    Google Japanese Input 12-key (1-handed): 119 s

    Google Japanese Input 12-key (2-handed): 107 s
    Swype Keyboard (1-handed): 63 s
    Swype Keyboard (2-handed): 50 s
    Wnn labs QWERTY (2-handed): 67 s

Here, on what I guess is its home ground, Swype keyboard puts Google Japanese Input to shame, mainly because English for Google Japanese Input has no autocorrect! Ouch. Of course, you could argue that for English I should be using the English Google input (which would probably fair similarly to Swype), but switching between input methods has always been a bit clunky on Android, and with the 2 programs above, I don't need to change input methods. The additional advantage of this is that I don't swell the RAM usage (which is a critical point for a budget phone like mine). Noteably, Wnn labs' keyboard performed almost as well as Swype in this instance, just a few seconds behind due to the less accurate autocorrection.

So speed-wise, Wnn labs and Swype are pretty much tied.

What about other functionalities?

Swype has superb Japanese handwriting recognition. Possibly the best handwriting recognition for Japanese on Android, in my experience. For looking up unknown characters, this is great stuff, and having it built-in to the keyboard, and thus usable within just a second or two, makes it great at quickly looking up words. Great if you're reading a paperback, or especially if skimming new words from the TV, since they'll only be around for a very short time in most cases.

However, if you're not in a rush, there are other handwriting recognition programs that will get the job done. Google translate can be coerced into this role by copying text, as can kanji draw (which will do so without an internet connection). Neither of these options are quite as nippy as Swype, though.

Both Wnn Labs and Google have the Japanese style emoticons, which are missing from Swype. I have to admit to missing these on Swype..

Swype makes some strange autocorrect choices. Swype's autocorrect is the best (overall); however, there are some quirks that you wont find when using the other available options, such as "mo" never wanting to be converted into "も". You can choose "もう" instead, and delete the "う", or add a newline, but it seems very strange, considering "も" is a spectacularly common particle, for it not to default to the hiragana upon pressing the space bar... Additionally, the proximity of "u", "i" and "o" to each other on the keypad makes autocorrection very difficult for Swype in some cases. Using Wnn labs or Google's 12-key keypad mostly negates the need for autocorrection, because the keys are big enough that you'll not miss a button. Nonetheles, Swype's English autocorrection is near flawless.

Wnn Labs and Google can launch external apps. For me this means aedict3. Your current text gets sent automatically to whichever programs you have set up to receive, effectively turning any textbox into a dictionary shortcut when you need it.

Wnn Labs and Google have intelligent 12-key keypads. 12-key keypads (as shown above) are actually pretty fast for Japanese input. This is facilitated by intelligent prediction of characters, so that one can type "しやない" instead of "じゃない" (which would require 50% more keypresses to change the し into a じ, and to make the や small), and pull the correct phrase from the predictions bar. Swype has a 12-key keyboard hidden in the settings under "日本語", but is not intelligent. For Swype, you're better off with the full keypad.

Swype has easy copy-paste functionality. You can swipe from the swipe button to C (to copy) or V (to paste). Intuitive and effective, perhaps occasionally saving you a second or so?


To conclude, I recommend both Swype and Wnn Keyboard Lab. Swype is spectacular for English, and handles Japanese fairly well. Additionally, Swype will make character look ups a breeze with its superior offline character recognition. Wnn Keyboard Lab is great if you're using a phone to write Japanese 1-handed, and certainly isn't a sloth when it comes to English either (which is where Google Japanese Input fails pretty badly). On top of this, it integrates into aedict3. I can see myself using Wnn Keyboard Lab for my phone, which often gets used 1-handed, and Swype on my tablet, where 2 hands is a given.



P.S. You know your procrastination is getting really bad when you spend the best part of an hour typing the same thing into a phone again and again and again.. Still, maybe this will be of use to someone. (^^;

EDIT:
Here are some other input methods I tried at a later date.

Simeji 2015/03/03 - looks great, and integrates into the aedict dictionary (nice!) but the predictive text isn't as good as Google's and Wnn lab's
IQQI 2015/03/03 - Intriguing - has a full hiragana/katakana keyboard in addition to the normal keyboards; however, the "predictive text" again doesn't match up to Wnn or Google.
Go Keyboard 2015/03/03 - Pretty standard, same criticism as above.
I'll also add the criticism that Swype seems to load up much slower than the other keyboards.
KK Keyboard 2015/03/03 - Not bad; has advanced predictive text like Wnn and Google, but no flick input, and the English prediction is fairly terrible, like Google's
Swiftkey 2015/03/03 - Comes up in searches on the play store for Japanese keyboard, but doesn't actually have Japanese support (there is a beta, but you have to sign up - I don't have the time right now)
Multiling/O-keyboard 2015/03/03 - a complete pain to install, as you need to install each of the dictionaries individually (so 3 packages if you want multiling, and an EN dic and a JP dic - a 4th if you want handwriting.. I understand the desire for modularity, but this is a little awkward for the user) Has advanced predictive text for the 12-key JA keypad, as well as highly predictive text for the 12-key EN keypad

Still, as of March 2015, Google seems to be the only input method that can guess how to dice a Japanese sentence so if you type "かつこうにいく",  "学校に行く" appears as a candidate. Add to this the fact that the Google keyboards seem to be switching more fluidly between each other now, and it seems that going with the Google keyboards is the way forward now.



Friday, April 4, 2014

Japanese Radio & Android part 2

Some time ago, I reviewed some internet radio apps for Android. In particular, I was keen to point out the ability of MediaU to run on my old HTC Tattoo.

In attempting to set something similar up with my Samsung Galaxy Fame, I was surprised by the poor quality of the TuneIn app, unlike my previous experience with this on my Nexus 7, I found it would cut- out- every- few- seconds.

Finding a replacement for TuneIn was (as before) a complete pain, probably because of my ridiculous necessity that my radio apps can play a selection of Japanese stations (this selection, to be precise). MediaU worked well; however, there are a number of stations from simulradio.jp that do not make an appearance..

I found a couple of apps to bypass this problem. Firstly, VLC for Android beta, which handily adds file associations that allow you to click on the links from the simulradio.jp site and automatically start streaming. However, VLC takes an eternity to actually start playback, during which time you're left guessing whether VLC has crashed, as there is no visual cue to tell you buffering is occurring (I assume that is what is happening anyway).

My current favorite app for listening to Japanese radio turned out to become FlowAudio, which (despite being almost invisible in the Play store [probably due to its low user base]) boasts very nice presentation, and the ability to search, find, and play all my favourite simulradio stations, as well as some stations such as FM Kushiro, which appear to stream in a format that leave most apps baffled (VLC is another exception here, so long as you're patient enough to wait for the playback to start).

Critically, the playback is very good (I don't recall any cutouts so far). However, some basic functions like saving a station to a list of favourites, appear to be missing. On the upside, FlowAudio will also play music stored on the device, keeping all my audio in one app, if I so wish.

I should also point out that the Fame, as imported from the UK, does have an FM radio, but this radio is locked onto the UK frequencies, and consequently the only station I can pick up sans wifi is NHK Okayama..

Saturday, March 29, 2014

Japanese and the Samsung Galaxy Fame S6810

So, I decided that, nice though the tablet/keitai phone setup was, having a working smartphone is much more handy when moving around. As much as it excels at documents and surfing, I don't terribly like using my old Nexus 7 tablet as a mp3 player. Also, its not as convenient a dictionary as a dinky smartphone you can quickly whip out whenever you spot an offending word*.

For my last trip to Tokyo, I resurrected my old HTC Tattoo by I rooting it, and swapping in my Softbank SIM card (Rooting it was a complete pain, as all the rooting instructions I could find (supposedly specifically for the HTC tattoo) didn't work**). The advantage was that I gained the ability to run programs like LINE and aedict3. However, the Tattoo simply doesn't have the required oomph to operate newer versions of Android, or the apps that run on it. Both the aforementioned apps ran terribly slowly.

So, I spent a couple of days mulling it over before deciding on a Samsung Galaxy Fame S6810 *3*. My primary concerns on purchasing were: Price, a version of Android where I could use the aforementioned apps, and a decent-ish camera. Despite numerous reviews complaining about the sluggishness of the Fame, I anticipated that compared to the 2009 smartphone technology that I was used to, that the Fame would feel nippy enough for me.

Having dabbled with the Fame for a day, I think my anticipations were on the mark. The device feels very powerful in comparison to the Tattoo, and my bread-and-butter apps (currently aedict3, ankidroid, and LINE) run very smoothly, almost as smooth as on my Nexus 7. The budget price only really became much of an issue for me when switching between applications, but the lag-times there are only on the same order as the Tattoo, despite using more intensive applications.

The disparity between the cameras is considerable, as one would hope. This makes optical character recognition very viable on the Fame, which is something that didn't really cross my mind before (I've not been using it up 'till now because the Tattoo sports a terrible camera, and the old Nexus 7 doesn't have the forward facing camera). Google Translate appears particularly competent here, and while I don't go much on some of the machine translations, you can select the source text and paste it into aedict3, or ankidroid, so it remains very useful. Google Translate's handwriting input also seems fairly friendly to slap-dash kanji stroke orders, and again can be copied. I somehow overlooked this feature previously, but may be using it a lot in future.

So in summary, the Fame excels as a handy pocket dictionary, while seeming able to cope with my other modest demands. Certainly a phone I would recommend to anyone after a cheap device that gets the job done.



*ie any word that I don't happen to know..

** that said, anyone with a working knowledge of the linux command line can solve the conundrum with a little thinking. Unfortunately I didn't document the efforts, but I doubt anyone still uses the Tattoo now.

*3* For the record, I purchased from Eternal Communications Ltd. via Amazon.co.uk. Unlike most of the suppliers in England their prices and delivery rates were both reasonable.

Friday, March 28, 2014

Tracking Royal Mail deliveries to Japan

Just a quick pointer, if you have something sent from the UK, and have a 13 digit tracking number (of the form ○○##########GB, where ○ is a letter, and # is a number), you can use this with both Royal Mail Track and Trace, AND the Japan Post tracking service. I believe Royal Mail will track the parcel from beginning to end, whereas Japan Post will only track your parcel once it arrives in Japan. Nonetheless, the Japan Post service seems to offer more detail. As to the utility in knowing that my parcel is in an "inward office of exchange", I don't suppose it makes much difference; but somehow its nice to watch the cogs turning, even if you know the clock will chime at noon...

Example:

Royal Mail tracking:

"Your item, posted on 24/03/14 with reference ○○##########GB has arrived in KAWASAKI and is being processed for delivery."

Japan Post tracking:

State occurrence date
(In local time if occurred overseas)
Shipping track record Details Office Prefecture / Country
ZIP code(Postal code number)
03/27/2014 23:54 Arrival at inward office of exchange
KAWASAKIHIGASHI KANAGAWA
219-8799
03/28/2014 09:00 Held by import Customs
KAWASAKIHIGASHI KANAGAWA
219-8799
03/28/2014 10:20 Departure from inward office of exchange
KAWASAKIHIGASHI KANAGAWA
219-8799


EDIT: added some more detail



Tuesday, March 25, 2014

Trains in Japan > Trains in the UK

When heading for Heathrow by train, ready to head out the following morning, I had the pleasure of bumping into some of the people from South West Trains management (at least, that is who they purported to be, and given the reaction of the guard, I don't have any reason [or am too apathetic] to doubt them much). They overheard me asking the guard whether the next stop was Woking (for the airport), and asked where I was going. When I told them Japan, they said some of them had been on a business trip to Japan to have a look at how things were done in the Land of the Rising Sun. The general consensus was that things were OK in Japan, but not really any better than in the UK. Oh yes, this talk about Japanese railways is all very exaggerated... This struck me as a somewhat odd standpoint at the time, even with my relatively sparse experience of the Japanese railways.

Lets start with reliability, and fast forward to February. I had my flight from Tokyo to Takamatsu cancelled by snow. My initial reaction was to phone what felt like every hotel in Tokyo (actually it was about 15-20), and sit put (particularly easy to do in Tokyo, it seems: there is a lot to do, and its not that expensive). Unfortunately, this turned out to be impossible as everywhere I phoned was fully booked. I decided instead I'd risk using the trains.

To be honest, just the fact that Japan can operate train services when there is actual snow on the ground is a novelty in and of itself.. But exaggeration aside, I got from Tokyo to Kagawa in just a few hours (arriving before the time the flight was due into the airport, although I did leave Tokyo 2 or 3 hours early). I suspect a similar feat would be impossible in the UK given the level of snowfall.

Next, cleanliness. Japanese trains are kept in far better shape. Seems the general rule here is the faster the train, the cleaner it is. But perhaps that isn't surprising.

Price. A last minute trip into London from West Dorset is going to set you back upwards of 60 GBP and take almost 3 hours for a ~200 km journey. A journey from Kagawa to Tokyo by bullet train is about 120 pounds, takes 4hrs 20 minutes, and covers a distance of around 700 km. I'll do the maths for you; you pay 30p for each km in the UK, versus ~17p in Japan, while traveling almost 3 times faster, on average (I'll also point out median household incomes are comparable between Japan and the UK, so direct comparison like this isn't unreasonable, but I'll admit the caveat that I'm not sure how the cost-of-living burden differs between the two).

Speed. See above with regards to the bullet train. Perhaps not a fair comparison, though. Most trains in Japan don't seem overly speedy compared to what I'm used to in the UK. But fair or not, Japan has a bullet train, the UK hasn't even started laying track, so far as I know... I could try and weight things back in favor of Blighty by pointing out the UK high speed rail is going to be a good 80 km/h faster than the current Japanese bullet trains; however, just a couple of years after the UK line is due to open, Japan may have superconducting maglev train services between Tokyo and Nagoya. These could go an extra 100 km/h faster at 500 km/h*...

In conclusion, Japan is a very rich country, and has a high population density, it makes sense this would lead to railways that are more efficient. Clearly I think Japanese trains are the better. I suspect the opposite opinion I got on my way here back in November was not in any small part weighted with national pride. Then again, when its so plain to see that the grass is greener on the other side, I can see the merits in taking the good ol' British attitude of sticking up a middle finger, and not giving a damn. A way of life much under-used over here.