Asji's Various Rantings

Thursday, 21 August 2014

Bonds of Citizenship

There's an argument that occasionally surfaces in the Scottish independence debate which has been annoying me for a while. Namely that if Scotland was no longer part of the UK, then somehow families would be driven apart. Nick Clegg touched upon it again today, with this article in (ironically enough) the Independent.

"For centuries we have crossed each other's borders, married each other, raised families together. What Scot doesn't have any English, Welsh or Northern Irish in their family tree? ... I believe the bonds that bring us together are stronger than the forces that would tear us apart." There was also that well-meaning open letter from celebrities earlier this month, which talked about the "Bonds of Citizenship" we'd be breaking, and ultimately served only to illustrate how completely out-of-touch they really are. Then there's sentimental opinion pieces like this one, again harmless enough, you might think. I could go on, but I'm sure you all know how Google works.

So, why does it irritate me?
A couple of reasons:

Johnny Foreigner

Firstly, it's the pernicious undercurrent of xenophobia. The argument is, in essence, that family members might end up a different country (!)

Well, so fucking what? My sister left Scotland years ago and now she's living in Australia with a New Zealand passport (long story). None of that diminishes our relationship in any way whatsoever; she will always be my Big Sister, that's how family works.

My wife is Japanese, my two wee boys have dual nationality, and my daughter has British+Japanese+American. Is anyone seriously suggesting that our family is in any way diminished because we've got a bunch of different passports?

Hypocrisy

But what really makes my blood boil is this: the coalition government changed the rules about immigration, in a way which actively ripped families apart. There was no debate in parliament about it, Theresa May just went ahead and changed the rules.

Well, to be fair, there was some debate, but it was after the fact and nothing resulted from it because the Home Secretary can do whatever the hell they like. Maybe if there was, I dunno, some form of written Constitution which defined the role of government and limited their power, then they might not be able to get away with stuff like this, but that's another blog post.

Thursday, 14 August 2014

The "Better Together" campaign in the Scottish Independence Referendum raise some interesting points.

But surely, taking their argument to its logical conclusion, wouldn't we be even better together with a much more powerful nation?

If we're going to give our country away, let's raise our sights!

Even Better Together with China!

FACTS:

They’d totally be up for it.

They’re always interested in securing more territory.

They’re so desperate for oil that they've been prospectingin Vietnam purely within the scope of China's territorial sovereignty and jurisdiction!

We’d be a Super Power again!

If it's okay for Britain to take a chunk of China, surely it’s only fair for China to take a chunk of Britain in return.

Moar Pandas!

In all honesty, their political ideology is a lot closer to ours than England's is.

Just think how much more our pensions and investments would be worth in twenty years if they were all in the Yuan instead of the Pound!

Moar History! 300 years of Britain? Pffft!

Their trains go at 268 mph - imagine Edinburgh to Inverness in 32 minutes instead of 3½ hours it currently takes!

We could re-industrialise and actually start making stuff again!

We'd get stars on our flag!

We could keep the nukes, but stick them in the middle of the Gobi Desert instead of the Glaswegian suburbs. So when an accident eventually happens, as accidents are wont to do, it won't wipe out half of Scotland's population.

They could build us a massive wall to keep the English out!

REFERENDUM 2.0

Actually, there's probably enough time left to change the wording on the ballot, just to make things clearer. I propose something along these lines:

Wednesday, 16 July 2014

JNI

When calling Java functions from C++, you have to use the Java Native Interface. This is a pretty cool piece of software but it can be fiddly to get it working.

The one thing that seems to trip people up more than anything else is: finding the function that you want to call.

To do that, you need to know its name (of course) and also its signature. The signature is the tricky bit. You have to convert the normal, human readable, sensible version into the considerably more cryptic format that Java uses internally.

Monday, 16 June 2014

The Japanese writing system is the most complicated one in existence, possibly ever.

There are two phonetic alphabets. Hiragana is a nice cursive one which is used for writing particles, conjugated verb endings, and things like that. Katakana is an angular one which looks a bit like Norse runes and used for writing noises, such as onomatopoeia and foreign people's names. These two are straightforward enough.

Then there's an ideographic syllabary called kanji, which is just mental. No, seriously.

Readings & Meanings

Each kanji can have a variety of meanings and pronunciations depending on context. For example, one of the very first ones you learn is 日:

日曜日 = Sunday

The first 日 is pronounced "nichi" and means "sun", the second one is pronounce "bi" and means "day"!

They can also have multiple pronunciations for the same meaning, take the kanji for "one":

一人 = One person

一羽 = One bird or rabbit

The first 一 is pronounced "hito" the second one is pronounced "ichi". It's the exact same character with the exact same meaning!

And, of course, they can have multiple different meanings with the same pronunciation:

参る = To go (humble)

参る = To come (humble)

参る = To call

参る = To be defeated

参る = To collapse

参る = To die

参る = To be annoyed

参る = To be nonplussed

参る = To be madly in love

参る = To visit a shrine or grave

These are all pronounced "mairu", you have to figure out which one given the context!

Radicals

Kanji are comprised of component parts called "radicals", and some of these radicals are actually other kanji:

家 = 宀 + 豕

If you were learning 家, then it would be a lot easier if you already knew the other two.

家 = House

宀= Roof

豕= Pig, hog. (archaic term)

So, a pig under a roof is a house. Sure, it's a little bit weird, but it's certainly a lot easier to remember than a collection of random scribbles.

Unfortunately, the order in which kanji are taught understandably pays more attention to the needs of Japanese children than it does to foreign adults. So kanji for simple words which a five-year-old could understand are taught early on, and more complex words come later.

Kanji Tree

Faced with the daunting task of learning a few thousand kanji, I naturally turned to my computer for help. The result is "Kanji Tree".

It's an application for mobile devices, being developed primarily on Android but I'll upload for iOS too when I can get the auto-builder outputting IPA files. It's still a work in progress, but it's usable right now.

I'm writing it in Unity (of course) and I'll be digging into the problems and solutions I discovered on the way.

Thursday, 24 April 2014

It's so nice working for a company which actively encourages you to share ideas and code with the wider community. I'm talking, of course, about Unity Technologies (the engine people) who's attitude contrasts in so many ways from those of my previous employers.

Until now, the standard position has been "we own everything you write, scribble, say, or even think while you're here", leading to a career of reinventing various wheels over and over again.