Learning Chinese through Japanese

It has been said, perhaps by Mark Twain, that confusing sinology and Zionism would be a little bit like confusing astrology and astronomy. Anyway, about three weeks ago I finally gave in to the craving and starting studying Chinese.


As I’ve written before, Chinese was among the alternatives when I decided to start studying Japanese. But Japanese seemed even more weird and hard, and the selection of courses at my university was better, so I chose Japanese instead. But I promised myself years ago that once I passed JLPT 1, I could start studying Chinese. And I did pass JLPT 1.

So I went to the huge Kinokuniya book store in south Shinjuku – you know the one located next to the NTT Docomo Yoyogi Building, the tallest clock tower in the world. The supply of language-learning books in Japan is just overwhelming! Especially, of course, for English, but the supply of books on other popular languages is tremendous as well. I can only surmise that this is because foreign things are superficially fashionable in Japan, combined with a school system that teaches kids that foreign language acquisition is impossible. So everyone buys the same kind of miracle cure beginner-level language books every year, and every year the miracle breakthrough doesn’t happen, so the cycle repeats itself.


Anyhow, my philosophy on language learning is the antithesis of that kind of books so I bought the most boring-sounding ones I could find: one called 文法から学べる中国語 (“Chinese that can be learnt from grammar”) and one called 中国語の教科書 (“Chinese textbook”). Still quite fancy books, but the content seemed serious, and they follow different approaches: the grammar one obviously focuses on grammar, and the textbook one is more focused on listening, pronounciation, and conversation, so they should complement each other, I think.

As you notice, the Chinese language study books I bought are in Japanese. This is an important point, since that allows me to keep learning Japanese while enjoying studying Chinese (it is rather enjoyable as a change from years of Japanese studies). In fact, out of the first approximatly 100 words I harvested from the “textbook” book, 5 were new to me in Japanese as well. Double-win! Once you pass JLPT 1, there aren’t really any language study books available for your level, so this I think is a good method to ensure there aren’t any holes in my basic Japanese vocabulary.

I believe in setting goals, just as I did both when I decided to pass JLPT 1 in 2008 and JLPT 2 in 2006. So I have set my overall goal of my Chinese language studies: to be able to read a book in Chinese by the time I turn 30 (i.e. in about 2.5 years from now).

That seems challenging, yet doable. I don’t have any specific type of book in mind, but I imagine it would be some normal top-selling book. Actually come to think of it, the only book I’ve read in both English and Japanese is Haruki Murakami’s after the quake (神の子どもたちはみな踊る) so maybe that would be a good one to use as a reference standard.


Software Architecture – What Is It? Down To The Monkey’s Balls

This morning just as I had left the house and turned left into one of the roads that make up the maze of narrow roads between the haphazardly built, tightly packed houses of Kami-meguro, from the far end of the road came flying, at full blast, a small budgerigar. I could feel the flapping of its wings as it swooshed above my left shoulder, just barely missing my head.

I don’t know what the little fellow was up to, but imagine the destruction, had it hit me in the face (I walk pretty fast too). I suppose it had escaped from one of the houses. It probably won’t survive very long, considering it won’t get warm for a while yet and the abundance of cats in the neighborhood. Not to mention its suicidal tendency of flying towards people on the street.

By the way, did you know there’s a population of wild parrots in Tokyo? Escaped parrots have taken up residence in the trees lining the south side of the French Formal Garden of Shinjuku Gyoen. Yes, they are very particular about where they live. They’re larger than budgerigars though, and manage to survive.

© MzePhotos.com, Some Rights Reserved

Anyway, I was going to write about software architecture, not parrots. The last couple of days I’ve been thinking about what software architecture is. The word gets thrown around a lot, and people even carry the title “software architect”.

In my work there’s talk about architecture as well. We’re doing architecture.

Now, I’ve figured out that what gets called software architecture can, in down to the monkey’s balls practice, be classified as one out of five tangible things. I might at some point come up with more, and if you have any suggestion then please leave a comment. Anyway, here they are:

  1. Build-time composition
    Can be in the form of invasive composition done by a proper composition system, as outlined in the book Invasive Software Composition, written by my favorite professor Uwe Aßmann. But more often in the form of simple #ifdefs, or link-time selection of different libraries.

  2. Design patterns
    This is probably my favorite one. Design patterns are powerful not primarily because the pattern in itself is clever, but because they communicate the intention of the programmer to others quickly. If someone knowledgable reads a piece of codes that says it’s doing a visitor pattern, say, then you immediately know what to expect.
  3. Naming conventions
    This might be the most common excuse for an architecture. And I’d count object oriented languages’ attempts to hide things behind (often long) namespace and (often nested) class names as just another naming convention (often termed “object oriented design”). Architecture often seems to take the meaning that things that belong to one part of the system starts with a certain prefix (such as a class name). It’s useful for finding things in the source tree, though.
  4. Function pointers
    … in one form or another. All programmers use function pointers, often termed callbacks, handlers, functors, virtual methods, delegates, etc. Function pointers allows control of flow during runtime, but more often they seem to be used as a bad substitute for build-time composition. At some point there seems to be a line where this common code monkey tool turns into architecture.
  5. Layers of indirection
    It has been said, perhaps by Mark Twain, that any programming problem can be solved by adding another layer of indirection. It is often implemented in the form of function calls, or by using function pointers, often in combination with naming conventions. Of course any code monkey can do function calls. But by doing small transformations of values and data types, and perhaps branching depending on the data, and letting the next layer do this in succession, one can seemingly achieve architecture.
-

Barring further bird attacks, I will consider these five items to be the fundamental building blocks of software architecture. Next, I intend to write about how these can be used to create good architecture. Because one man’s architecture is another man’s code bloat.