(identity 'myron)

Wed, 31 Dec 2003

Clubs and Missions [/Japan]

Researching papers on Japanese culture for my work term report, and I stumbled on this quote:

Of course, the clannish, parochial outlook of the Japanese is not unique to that nation. One longtime student of Japan divides the world into two types: clubs, and missions. "France and China, for example, are missions: if you conform, if you learn the language and adopt their customs, the people accept you entirely.... Britain and Japan, on the other hand, are clubs: you can be accepted and belong to them as corresponding associates, but you are never really a standing member.... In fact, for foreigners it is more difficult socially in England than it is in Japan."

Interesting view that I mostly agree with, but don't think it's quite that clear-cut. It's also more interesting to note that getting in, if I ever counted as being in, feels like being part of the Borg collective or something, especially when it comes to a company where you're around the same people for up to 12 hours a day. By virtue of all being in the same company, the same living arrangements and essentially the same mindset, you acquire this strong social network around you, and leaving it feels like you're leaving the collective: all the voices are gone.

// posted at 07:47. permalink   comments

divider symbol

Sun, 28 Dec 2003

Yasukuni [/Japan]

Another year, another ultra-publicized visit by Koizumi to Yasukuni Shrine to pay homage to dead war criminals. This time, the visit's been decided 8 months in advance! How thoughtful! That gives the Chinese and Koreans 8 long months to ready their insults and protest banners.

*sigh* This isn't half as fun as when I was in Japan, but I'm gonna continue keeping an eye on Japanese news. RSS feeds are tracking their newspaper headlines anyway, no sense in removing them from the aggregator. It'll be even better when I can finally read their language....

// posted at 19:55. permalink   comments

divider symbol

ダイソーひゃっきん [/Japan]

daiso hyaku en shop

Daiso opened up the equivalent of a 100Yen shop (Japan's equivalent of a dollar store) recently in Vancouver while I was away. It's almost creepy walking through the store seeing the exact same products as I saw in Japan, all made in China, of course. Instead of 100Yen though, it's $2 cad. And instead of hearing the polite "sumimasen" of people that might've even remotely gotten in your way, it's the hustle and bustle, elbow to elbow madness of Canadians all trying to get a cheap deal.

Amusingly enough, some of the exact same products I ended up bringing back with me from Japan like cheap pencils and notebooks are all in there. Go Daiso.

// posted at 19:21. permalink   comments

divider symbol

Sat, 27 Dec 2003

Japan Japan [/Japan]

Lots of drinking and tearful goodbyes--I miss Japan already. Anyway, as you can see I'm not and won't be blogging for some time as I rush to finish writing a report. I'll post my last set of pictures from Japan later.

// posted at 13:23. permalink   comments

divider symbol

Fri, 19 Dec 2003

初雪 [/Japan]

snow-tipped trees

snow-topped roofs

Began snowing lightly last night. Very timely. :)

// posted at 14:27. permalink   comments

divider symbol

And here it ends [/Japan]

Work is finished. Tough to say goodbye as always. Interestingly enough, today there was a huge change in my company too. It merged back with Panasonic, becoming a subsidiary citing reasons of increased cooperation between the two companies. For those who don't know, National and Panasonic split off as Matsushita Electric Works and Matsushita Electric Industrial some time in the 40's. And now 60 years later, they're back together.

// posted at 01:45. permalink   comments

divider symbol

Wed, 17 Dec 2003

Closures [/tech]

After writing a fairly long post on closures, I decided to google for more info. And it turns out to be pretty interesting.

For those who puke at the sound of "functional programming", Perl implements closures, and there are sections devoted to it in both Programming Perl and the Perl Cookbook. The latter has this to say about using closures instead of objects: "You want records with private state, behavior, and identity, but you don't want to learn object-oriented programming to accomplish this."

The two are evidently very similar. Some Perl lecture slides (12 and 16) say much the same: "Closures are 'inside-out objects'. Objects are data that have some subroutines attached to them. Closures are subroutines that have some data attached to them." Page 16 of "Lambda: The Ultimate Declarative" says similar things from the functional world-view.

There's also a post about it on the ll1 mailing list that looks at it Zen koan style:

The venerable master Qc Na was walking with his student, Anton. Hoping to prompt the master into a discussion, Anton said "Master, I have heard that objects are a very good thing - is this true?" Qc Na looked pityingly at his student and replied, "Foolish pupil - objects are merely a poor man's closures."

Chastised, Anton took his leave from his master and returned to his cell, intent on studying closures. He carefully read the entire "Lambda: The Ultimate..." series of papers and its cousins, and implemented a small Scheme interpreter with a closure-based object system. He learned much, and looked forward to informing his master of his progress.

On his next walk with Qc Na, Anton attempted to impress his master by saying "Master, I have diligently studied the matter, and now understand that objects are truly a poor man's closures." Qc Na responded by hitting Anton with his stick, saying "When will you learn? Closures are a poor man's object." At that moment, Anton became enlightened.

Almost seems like the pinnacle of OOP-fu vs Functional-fu: almost the same idea expressed in completely opposite ways. And more and more now, languages have both.

// posted at 17:35. permalink   comments

divider symbol

Tue, 16 Dec 2003

Quickies [/personal]

Some quickies. Kuro5hin has a story, Through an Iraqi's Eyes. Careful of the k5 troll crowd though, that and the story doesn't amount to anything much more than "I am happy", but still interesting nevertheless.

Also there's an online book for programming languages that looks interesting, including chapters on domain-specific languages and metaprogramming. Continuations are in there too, relating briefly how they can be used for web-programming situations.

Here is an updated intro to SBCL and Common Lisp in general, including how to set up an integrated interface to Common Lisp in Emacs "without going mad". Horray.

// posted at 17:29. permalink   comments

divider symbol

Google News [/tech]

Anyone else find it funny when Google News associates the wrong pictures with news articles?

Flash memory makers and Hussein

// posted at 16:00. permalink   comments

divider symbol

Mon, 15 Dec 2003

Just a little more [/Japan]

8 days till I fly, and only 4 left of work. It's funny, in software engineering classes they always talk about software disasters and I think this project was a mini-software disaster of its own. The only thing I gain from it is better understanding of things that can go wrong in software projects. I got a little more experience working with C++, but just enough to know that it probably takes a lot more projects under my belt to be fully proficient at it.

Apparently I'm supposed to give back my work uniform by Friday--it's almost like I'm being defrocked. All the better anyway, though, I think I've done everything I wanted to do here. After a combined 15 months of work, it's certainly time I got back to full-time school.

It's funny, cause doing co-op is almost like a strange game you play where every 4 to 8 months you switch from work to school or vice-versa. Going from school to work, you're apt to use the things you'd just learned in class and apply them to real-world projects. From work to school, you bring all your honed skills back and try to lay the smackdown on all your course projects. And in total, it all feels like some kind of incubation period where you're constantly growing up towards being a practical programmer ready to wield math and theoretical principles in one hand, skills won by experience in the other.

*shrug* In other news, we all know Hussein was captured, yadda yadda. But volokh.com points out that the ensuing media frenzy shuts out another bit of news that General Musharraf came less than 30 seconds of being assassinated. Pakistan, nuclear power, Islamicists wanting to overthrow their U.S.-friendly president, probably to install an Islamicist in his place--you connect the dots. Story is here, free NY times login required.

// posted at 16:41. permalink   comments

divider symbol

Sun, 14 Dec 2003

Functional JS [/tech]

In the ongoing quest of being as incompatible with everything but the latest browsers.... While looking through JavaScript documentation yesterday, I ran across this definition of function: "The function operator defines an anonymous function inside an expression." Had to do a double-take to make sure I was reading it right, but after a little tinkering, it's true and it turns out JavaScript supports closures:


// create a closure around the hl[] array stored in source form in cookieStr
function makeCookieReader(cookieStr) {
    eval(cookieStr);
    return function (postID) {
        if (typeof hl != 'undefined')
            return hl[postID];
        else
            return null;
    }
}

var postsReadFor = makeCookieReader(getCookieVal(cookieName));

So who knew? Maybe JavaScript, once the gimped up mutant programming language that Netscape and Microsoft couldn't each stop adding 5 different arms and 5 different legs at a time to is better than I thought it was? Though the syntax really looks sorta funny here.... And the example is a little contrived, but completely understandable if you know the context of what's going on in the rest of the script.

// posted at 14:29. permalink   comments

divider symbol

Sat, 13 Dec 2003

New stuff [/announcements]

Strange persistent headache today, so I've been home all day tinkering with things, including this site, as you can see in the last post. I've coded up a new chunk of javascript to set cookies and tell you if there's any new comments on stories. So um, turn on javascript and cookies. And uh, as always, use Mozilla and nothing else. Hmm, well there goes my readership, eh?

Anyway, that was sort of fun. Javascript is a @#$%! to code in sometimes what with the lack of almost any decent builtin functions at all. There's not even any way of traversing an associative array properly unless maybe you store the keys in another indexed array and use it as a lookup table. What's more is that there's no way to serialize objects. And of course, this is a purely static site except for the comments system hosted on a public service, HaloScan. So now I'm storing bits of code in a cookie that gets eval'ed by javascript when you visit the site, telling you how many comments are new. Funky eh?

Still testing it all out though. Already it seems that it doesn't work in any browser but Mozilla. Oh well. It's set to die gracefully at least.... Send feedback to let me know what browser you're on and whether or not it works. Code is here if you wanna help me out.

// posted at 22:50. permalink   comments

divider symbol

Thu, 11 Dec 2003

Essay, part deux [/personal]

Ok, now this is interesting. I met with JETRO people this morning, the readers of the report I'm writing, and it turns out it's due on the 15th. What's more is that I think I"m in trouble cause they seem to be expecting a flat description of what I did at work rather than learning what insights I came up with during my time here. But I'm not giving up. I have half a page of space left, where I'll throw in a compacted summary of all that I did, and leave the rest untouched. Stubborn as I am, I'm gonna get my word in on this issue, even if no one reads it.

// posted at 17:41. permalink   comments

divider symbol

Treatise [/personal]

Crap, I'm writing a report for tomorrow about my thoughts on my internship here in Japan, and by paragraph two it turns into a damnation of the belief (on either side, Western or Japanese) in cultural superiority. Heh, it'll be fun to see if they actually put this in their brochure for next year.

// posted at 01:12. permalink   comments

divider symbol

Wed, 10 Dec 2003

Swing and stuff [/tech]

Just wanted to point out a neat and very short article about making Java Swing widgets look native. I don't program Java much anymore these days, but it's quite amusing that an article hosted on Sun's java.net points out that the default Swing look is "considered quite ugly".

In other news, we had 4 hours of office rearranging fun, including moving one of the extra domes we don't use anymore (looks like this one, but ours is without the attached projector and a bit bigger). So after 4 hours of moving, I now have my desk smack in the middle of the office, back facing a major foot path with my screen open to all passers-by for viewing. Thankfully I can do most things I want still, in my own privacy with the use of an ssh session in a 7pt font cygwin window.... But definitely no more pr0n at work. :P

// posted at 21:23. permalink   comments

divider symbol

Mon, 08 Dec 2003

Counting down the days [/personal]

Just a fortnight left.

In other news, I happened upon this article somehow, I'm guessing through comp.lang.lisp, but I don't really remember. It's an article about choice of language and programmer availability, arguing that it's the opposite of what most people think. The interesting bit is that it links to another article, The Assignment Operator Revisited, which if you're a C++ programmer, you'll instantly sympathize with:

I dont know about you, but theres something really scary to me about a language where copying state from one object to another is this complicated. By now, I suspect at least a dozen or two programmers have contributed something new to this discussion. If it takes this many programmers to write a simple assignment operator, think how complicated writing code that actually does something meaningful must be!

The devil truly is in the details, especially in C++ programming.

Also, from another blog, I came upon the notes to a debate on "Objects Have Failed". Notes and slides available for the pro side, along with opening remarks for both pro and con.

Though the title might make you think otherwise, the pro side doesn't argue that OOP sucks. Rather, it attacks the attitude it has been supported with for its "totalizing discourse": that it would solve the problems of software development to the exclusion of all other paradigms. Careful if you're a staunch OOP advocate though, there's some very eloquently phrased flamebait like, "Encapsulation is the most miserable failure of all. It's utterly the wrong idea." Also, "Abstraction is layering ignorance on top of reality." *grin*

There are some gems, though, especially the comments about the persistence of the relational model: "OOP is all about encapsulating state and behavior, while databases are all about separating state and behavior. Some people (usually programming language people) say that databases will go away. They will not. But I don't think the DB people are worried--if you don't look out, it is more likely that programming languages wil go away, or at least be diminished in scope."

// posted at 17:50. permalink   comments

divider symbol

Thu, 04 Dec 2003

The Queen and some other stuff [/misc]

Just a few bits in the news I found interesting. This piece about the Queen's visit to Nigeria certainly made me laugh....

Ngozi Ajuonu, the president of the Rural Women Foundation, told the Telegraph's correspondent it was a shame that the Queen would not see a genuine village. Although she disparagingly suggested that reality might distress the Queen. "She might collapse."

And here's a second article I found via volokh.com, posted on the National Review. It's about civil liberties in Canada and how increasingly Canada cracks down on politically incorrect speech, with backing from courts. A professor is quoted there as saying, "Canada now is a totalitarian theocracy. I see this as a country ruled today by what I would describe as a secular state religion [of political correctness]. Anything that is regarded as heresy or blasphemy is not tolerated."

FWIW, I think it's a lot grayer than this article makes it out to be. First of all, it makes little sense to compare the two countries in phrases like, "Look at what's happening in Canada. If we don't watch out, we're next." The fact is that unlike the US Bill of Rights, the Canadian charter emphasises collective rights over individual rights. This is seen in action with how we've upheld our model of a tolerant mosaic society. The consequence being that our rights and freedoms are always a tricky tug-of-war that favours not allowing one part of the mosaic to attack and disparage the other on unfair grounds or deny them any rights that would be granted to other pieces of the mosaic. Is this true of America? I don't believe so. In emphasising individual rights, their view on rights and freedoms is necessarily different from ours. In practice, this means that US courts would probably rule differently than Canadian ones over things like the mentioned high school teacher or other examples in the article. Hence, to ring alarm bells for the American reader pointing out Canada as a warning doesn't make much sense.

Taking the issue back on home turf, the reality isn't so much that some Canadian thought police is crashing down on our party of freedom as it is the more subtle problem of needing to decide what rights to grant one group with respect to another, keeping our idea of a tolerant society in mind. This certainly isn't something to be feared as a means of thought control, rather, it is a normal part of societal progress. Jokes of totalitarian theocracy aside, if we feel strongly about what the courts decide, then we are still free to protest such decisions and respond in kind with our votes.

// posted at 18:22. permalink   comments

divider symbol

Wed, 03 Dec 2003

Continuations [/tech]

A few days ago I posted a list of wikis I've been checking out, but forgot one important one, which is apparently the original wiki: the Portland Pattern Repository. Some very neat discussions to be found there on almost all aspects of programming, anything from SmugLispWeenies (*grin*) to ThreeStarProgrammers:

A rating system for C-programmers. The more indirect your pointers are (i.e. the more "*" before your variables), the higher your reputation will be. No-star C-programmers are virtually non-existent, as virtually all non-trivial programs require use of pointers. Most are one-star programmers. In the old times (well, I'm young, so these look like old times to me at least), one would occasionally find a piece of code done by a three-star programmer and shiver with awe.

Some people even claimed they'd seen three-star code with function pointers involved, on more than one level of indirection. Sounded as real as UFOs to me.

After a little wiki digging, I also ran into an explanation of continuations, which links to a tutorial (pre-req: basic Scheme)--one I actually understand, no less! So after a little reading, I'm finally starting to get a leg up on what continuations are. Unfortunately it's still a little fresh in my head and the later examples really hurt my brain. The wiki page lists another paper about continuations that looks interesting, but I haven't looked through it yet.... There's also a wiki page that specifically covers call/cc in Scheme. All very interesting, if you're really into programming languages. Call/cc also exists in Python and Ruby, I believe....

In case you're wondering what something so odd is used for, check the wiki articles above, or take a look at how it's used in Apache Cocoon, transforming web application programming from the tedious state machine style, passing state from script to script, to the more fluid and regular control flow of function calls....

// posted at 22:06. permalink   comments

divider symbol

RSS feed on comments [/announcements]

Added a link to the comments rss feed on the left panel of button links. Subscribe if you wanna keep up with comments as they come in. Dunno why I didn't post this up before.... Oh well.

// posted at 04:18. permalink   comments

divider symbol