March 2006 Archives

IHTFP

|

Good, amusing stuff from MITWorld.

Also, here's a great talk by MIT Media Lab co-founder Nicholas Negroponte about his One Laptop Per Child (OLPC)
foundation's initiative to give every school-age child a laptop for under $100 US. The Hundred Dollar Laptop-Computing for Developing Nations. Actually, an initiative like this is underway in Maine, as it turns out - all seventh and eighth grade kids got apple iBooks. That is, until recently:

Maine's $37.2 million dollar One-to-One laptop program for seventh and eighth graders is set to end early next year, with critics citing misuse by students. .... Studying the program revealed that students do use the computers for purposes other than education: some joined a group that followed election results online during lunch, while another student writes fictional stories during her free time.

Wow, I can see why critics would want to put a stop to this! On a more serious note, I assume that the critics have observed that some kids (probably a lot of the kids) use their computers to play video games and the like. It's too bad that these critics haven't recognized an opportunity here, in which they can develop compelling content through this medium. Part of the problem, of course, is a narrow conception of education. And, let's not forget, economic incentives towards just such narrow conceptions of education (or, should I say, conveniently testable implementations of "education") have been legislatively mandated by the federal government.

Back to the topic, a better critique of this program would hinge on its expense. Negroponte recognizes this as the fundamental problem, and his foundation has proposed a machine that would run on very little power, and would be able to run via human-generated electricity (via a hand-crank). Interestingly, but predictably, the OLPC foundation opted to use a light-weight (and free) version of Linux instead of Windows, for example. The way in which the foundation plans to leverage scale and diminishing component costs in favor of the children is also interesting. You'll have to watch the video to get the whole story.

Teen Repellent

|

Due to concerns about the possibility of infringement on human rights, police in Britain have forced a shopkeeper in London to stop using the Mosquito, an electronic teen-repellent device. I'm not joking. The device operates by emitting a high-frequency sound that is audible and very annoying to young people, but inaudible to most people above the age of thirty.

The Spar grocery shop on Caerlon Road in Newport, south Wales said anti-social behaviour had plunged by 84 percent outside the premises since it was installed earlier this year.

Eightly-four percent decline in anti-social behavior. Sounds effective. I wonder exactly how they defined "anti-social behavior." I wonder whether the "pro-social behavior" segment declined or advanced.

I guess this product has been around for a while. I wonder if this is the first legal challenge against it? Also, I wonder how - if at all - products like these will be extended. Will commercial human repellent hinge on sensations other than sound in the future? Will there be yuppie repellent? Senior citizen repellent? Woman repellent? Repellent targeting people that have comparatively high (or low) melanin in their skin? Sounds like science fiction, but I'm willing to bet that all of these are realizable. And what would be the legal and social consequences of the usage of these devices - especially as they become more miniaturized and invisible? Is there a legal precedent in place for something like this?

I found two complete episodes of Spider-Man and his Amazing Friends on youtube. As it turns out, they're two of my favorite episodes. A lot of people who grew up at the same time as me might remember this cartoon, which aired on Saturday at around noon on NBC.

One episode features Spider-Man, Iceman and Firestar at the X-Mansion. The other is kind of an "origin of Iceman" episode (one of my favorite characters), and it also featured Video Man, another of my favorites. Now, if someone will only post the Origin of Video Man, the Sandman, and the Miss Angelica Jinx episodes!

Video Man's background is kind of hokey. Some kid played too many video games, and then there was a power surge or something, and he became this old-school two-dimensional video game character (I guess the message was kids, if you play too many video games, this is going to happen to you. Which made me only want to play more video games.) I remember at the time being really impressed about how Video Man got around - he could feed his body into electrical outlets, light fixtures etc., and he travelled the power cables only to emit himself from another electrical outlet, possibly hundreds of miles away. Video Man had effectively neutralized physical distance barriers. He could be anywhere he wanted to be instantly (at least, anywhere that was connected by the power grid). I thought that was pretty cool.

As an added treat, both episodes are heavy on "the human agenda" (or I should say the anti-robotic agenda, as the mutants are regarded as a separate species). The other episode featured a cyborg who had "lost his humanity" because his brain was part computer. It was made clear that this fusion was the root of his evil; there were several scenes in which the human side was trying (futilely) to win out over the computer side. So, where did these knee-jerk reactions against machines come from? To this day, no computer has been responsible for the murder of a human being. It seems to me that, through media like this, we're pre-programming our culture to be racist against robots, and scenarios spelled out by cartoons like Spider-Man and his Amazing Friends will come to fruition exactly because we've [pre-] created these negative stereotypes.

It's changing, though, isn't it? Movies like The Matrix and I, Robot have human beings and robots coexisting in peace. But there are lingering exceptions. Star Trek: The Next Generation - a show that heavily, blatantly had a value-promotion agenda (by the way, I love that show - I don't mean this in a necessarily negative sense) portrayed The Borg as a terrible, inexorable menace. And yet, "full" robots like Data were portrayed in a positive light. I'm still struggling to understand the intended takeaways with the whole Borg thing.

Anyway, enjoy the episodes before they're taken down!

Japanese programmer humor

|

I was refactoring some code today and I came across this gem. I removed company-sensitive parts, but I kept the funny bits in.

private: bool doSaveAs() {
   if ( saveAsDialog_->ShowDialog() == DialogResult::OK ) {
      if ( ... ) {
         MessageBox::Show(
            "Hooray! It's curry today!",
            "ProjectName",
            MessageBoxButtons::OK,
            MessageBoxIcon::Information );
                return true; // saved successfully
      }
      MessageBox::Show(
         "God damn it!",
         "ProjectName",
         MessageBoxButtons::OK,
         MessageBoxIcon::Error );
   }
   return false; // failed,cancelled
}

MITWorld

|

I just finished watching the most recent MITWorld video lecture: Placing Words: Symbols, Space, and the City. In it, William Mitchell describes the changing relationship between technology, humankind's quest to increase our quality of life, and architecture. This is the first MITWorld lecture that I've watched, but if every lecture is as good as this one, I'm going to be watching a lot more.

Startling statue in Harajuku

|

Yesterday we had a cherry-blossom viewing - hanami - party in Yoyogi Park. It was a beautiful day and a great time. I saw my old friend and college dorm-mate Dan for the first time in, well, I guess five years? I think that's right. It was great to hang out with him and everyone else. Heather couldn't make it this time because of a wedding in Niigata. It was a little chilly yesterday at times, but luckily it wasn't too crowded.

On my way to the park I had a little adventure. Outside of Harajuku Station, I saw a large, man-sized metal statue standing near the bridge connecting the Omotesando exit to the walkway to the park. The statue was a businessman, and his necktie was curled up as if - and his posture also suggested that it was - a very windy day that day. "What the hell is this doing here?" I thought to myself. "Has this always been here? I don't remember seeing it." At this point a little girl, at the urging of her mother, put a coin in a jar by the statue. The statue then bowed to her. I jumped. "Whoa!" I wasn't as surprised as the little girl, though. She ran screaming away, periodically looking over her shoulder at this monstrosity. It was only then that I could see the jar in more detail. "Place a coin in the jar to make me move!" the label read. I don't know how the statue guy kept from laughing at all these people jumping away from him.

A few years ago my Mom and Dad visited San Francisco, and they told me they saw hundreds of these kinds of public performances in the street. In fact, they described one performance featuring metal robots very much in line with what I saw yesterday. So I quickly realized what this was all about, and so had a good laugh about it. I decided to stop for a minute or two to see how other people reacted to the statue dude.

It was fascinating to see everyone's reaction. You very rarely see this kind of thing in Tokyo. It's just not that kind of city. Some people would slow down and stare at the guy with scrunched eyebrows but then just pass him by and forget about him. Others would stop and scrutinize him in detail. One guy poked him in the rids with his finger with a quizzical expression on his face, and then put his arm with him and had his buddy take a picture. The "statue" then bowed. I wish I could say that the guy looked surprised, but nothing registered on his face. Other people standing nearby were very surprised.

Walking into Yoyogi Park is a lot like walking into someone's home. Literally. Yoyogi Park is the home to many homeless people. When cherry-blossom viewing season comes, a lot of these people are exorcised by the police or park officials from their normal living spaces to less desirable, less popular areas. It's a bit of a bummer. They're compelled to move domiciles for our amusement.

Earlier I characterized Toyko as "not that kind of city;" that is, not the kind of city in which you would normally see one person acting silly. However, in Yoyogi Park, you'll see many groups of people acting silly. Silly, of course, is the wrong word, but perhaps "counter-culture" might be used to describe them by some people. My take on it is completely different - I think they are culturally expansive.

In any case, it got me to thinking that maybe, in many cases, one person doing something "weird" by herself or himself is too much to bear, whereas if two or more people are participating, it kind of legitimized the activity. One weird guy - like the statue guy - might be completely ignored. A pair might fare much better, I think, but then again the feeling that that the guy was trying to elicit might be lost a little bit. I don't think that this phenomenon exists only in Japan, I hasten to add. I mean, you might see one guy in San Francisco doing this kind of thing, but it's in the context of a large group of people doing their own things. I doubt you'd ever see a statue guy on the streets of Cleveland, for example.

The Book Vultures

|

I went to the post office today to send a package to America - we're gearing up, little by little, to move back - and it was closed! I got up at 8:30 on a Saturday all for naught. I guess I'll have to send it before work one day next week.

On my way to and from the post office, I passed this old used book shop in Koenji. Most of the shop is outdoors and covered by an enormous projecting awning. This morning, in preparation for store hours, the clerks were, as usual, carrying pile after pile of books from inside to outside. It was still closed, and so it was gated by a big, unopened metal fence. Outside, there were about three dozen people - book nerds, by the looks of it - peeking over and through the fence to see what kind of books were available today. Salivating. It was great to see.

Koenji has a reputation as being a bit of an inexpensive area. There are many discount stores here. I wonder if that shop is a discount book retailer? I'll have to go in and see sometime.

Perhaps it's a breach of blog etiquette, but I want to gush about Alan Watts some more.

Then you feel terrible after that, because you got rid of God, but that means you got rid of yourself. You're nothing but a machine. And your idea that you're a machine is just a machine, too. So if you're a smart kid, you commit suicide. Camus said there is only one serious philosophical question, which is whether or not to commit suicide....

But still, should you or not commit suicide? This is a good question. Why go on? And you only go on if the game is worth the gamble. Now the universe has been going on for an incredible long time. And so really, a satisfactory theory of the universe has to be one that's worth betting on. That's very, it seems to me, elementary common sense. If you make a theory of the universe which isn't worth betting on, why bother? Just commit suicide. But if you want to go on playing the game, you've got to have an optimal theory for playing the game. Otherwise there's no point in it.

If nothing else, you have to respect the candor and the honesty with which Watts treats his subject matter. I've never seen anyone anywhere else say, in all seriousness, "But still, should you or not commit suicide? This is a good question." Almost everyone, for some reason, is afraid of talking about suicide. Alan Watts was not.

You and I are all as much continuous with the physical universe as a wave is continuous with the ocean. The ocean waves, and the universe peoples. And as I wave and say to you 'Yoo-hoo!' the world is waving with me at you and saying 'Hi! I'm here!'

I just love this. What a beautiful conception of the universe.

I also found this really amusing:

When I was a child, I used to ask my mother all sorts of ridiculous questions, which of course every child asks, and when she got bored with my questions, she said 'Darling, there are just some things which we are not meant to know.' I said 'Will we ever know?' She said 'Yes, of course, when we die and go to heaven, God will make everything plain.' So I used to imagine on wet afternoons in heaven, we'd all sit around the throne of grace and say to God, 'Well why did you do this, and why did you do that?' and he would explain it to us. 'Heavenly father, why are the leaves green?' and he would say 'Because of the chlorophyll,' and we'd say 'Oh.' But in he Hindu universe, you would say to God, 'How did you make the mountains?' and he would say 'Well, I just did it. Because when you're asking me how did I make the mountains, you're asking me to describe in words how I made the mountains, and there are no words which can do this. Words cannot tell you how I made the mountains any more than I can drink the ocean with a fork. A fork may be useful for sticking into a piece of something and eating it, but it's of no use for imbibing the ocean. It would take millions of years. In other words, it would take millions of years, and you would be bored with my description, long before I got through it, if I put it to you in words, because I didn't create the mountains with words, I just did it. Like you open and close your hand. You know how you do this, but can you describe in words how you do it?'

OK, last one. I don't really have an excerpt like this - I remember hearing it on one of his lectures, and it really resonated me. It goes something like this:

One way to look at the universe is that, because we're all composed of matter and our bodies and brains are nothing more than [extremely complex] chemical and electrical interactions, we're all just sophisticated forms of dirt. All humankind - and everything else in the entire universe - is just a bunch of rocks. Blerggh. Another way of looking at the universe is that human beings are examples of higher orders of intelligence, and also that rocks and dust and things and everything else that composes the universe are expressions of intelligence as well - extremely primitive forms of intelligence, perhaps, but forms of intelligence nonetheless. Hooray!

source

The transcripts are fun to read, but I think one gets a lot more from listening to him speak. I urge interested parties to subscribe to his pod show.

OK, I'm done for today. Would love to hear what anyone things about this.

Chuo line blues

|

I was lazy today and decided to take the train to work instead of cycling. Third straight day. I don't know what's wrong with me; Wednesday was excusable because it was raining, but it was fine - if a little windy - yesterday and today. It may be because somebody stole the front light off of my bicycle. I guess they were in such dire need of a bicycle light that they couldn't be bothered to go out and buy their own. It's not like mine was gold-plated or anything.

In any case, it turns out that taking the train this morning was not such a hot idea. The Chuo line was down, so everyone was packed in so tight that, even if you were just standing on the toes of one foot, you couldn't fall if you tried. So I ended up wasting 150 yen (300 when you factor in round-trip) for a really unpleasant commuting experience.

On my walk to the station, I did see something pretty interesting. There's this lot where construction crews have been tearing down an old house nearby where we live for the last couple of weeks. Now the lot is bulldozed and empty, and this morning there was a small ceremony - about eight people or so - of construction workers, guys dressed in suits, and one Shinto priest, dressed in traditional ceremonial garb. I assume that he was consecrating the land before construction begins on whatever is destined to replace that old house. I wish I could have seen the whole ceremony.

God in the machine

|

Alan Watts was a genius. I've been listening to his lectures for quite a while now, and I've been thinking a lot about them. Good stuff. Even though Watts died in 1973, his ideas about philosophy and spirituality are both fresh and piquant, and will become much more relevant and applicable as our civilization becomes more and more technologically sophisticated.

Among Watts' many interests were the interaction between religion and linguistics, and the resulting implications upon contemporary society - particularly western contemporary society - and technology.

And so in the book of Genesis, the lord God creates Adam out of the dust of the Earth. In other words, he makes a clay figurine, and then he breathes into it, and it becomes alive. And because the clay become informed. By itself it is formless, it has no intelligence, and therefore it requires an external intelligence and an external energy to bring it to life and to bring some sense to it. And so in this way, we inherit a conception of ourselves as being artifacts, as being made, and it is perfectly natural in our culture for a child to ask its mother 'How was I made?' or 'Who made me?' And this is a very, very powerful idea, but for example, it is not shared by the Chinese, or by the Hindus. A Chinese child would not ask its mother 'How was I made?' A Chinese child might ask its mother 'How did I grow?' which is an entirely different procedure form making. You see, when you make something, you put it together, you arrange parts, or you work from the outside in, as a sculpture works on stone, or as a potter works on clay. But when you watch something growing, it works in exactly the opposite direction. It works from the inside to the outside. It expands. It burgeons. It blossoms. And it happens all of itself at once. In other words, the original simple form, say of a living cell in the womb, progressively complicates itself, and that's the growing process, and it's quite different from the making process.

source

According to Watts, there are two fundamental myths underlying all western contemporary thought. The first is the notion that the universe - and humankind - are kinds of artifacts. Implicit in this notion, of course, is that somebody created the artifacts - a creator. Watts believes that it is no accident that Jesus Christ - the son of god - had a [human] father who was a carpenter. A maker of artifacts.

According to Watts, The Chinese espouse more organic conceptions of the universe. "You didn't come into this universe; you came out of it." Or better yet:

Look, here is a tree in the garden, and every summer it produces apples, and we call it an apple tree because the tree apples, that's what it does. Alright, now here is a solar system inside a galaxy and one of the peculiarities of this solar system is that at least on the planet Earth the thing peoples. In just the same way that an apple tree apples.

Now maybe, two million years ago somebody came from another galaxy in a flying saucer and had a look at this solar system, and they looked it over and shrugged their shoulders and said, "just a bunch of rocks," and they went away. Later on, maybe two million years later they came around and they looked at it again, and they said, "Excuse me, we thought it was a bunch of rocks, but it's peopling, and it's alive after all. It's done something intelligent."

source

The second major myth is the idea that the universe is guided strictly by Newtonian mechanics; that is to say, everything in the cosmos is a kind of enormous billiard ball simulation, and thus that every piece of matter is merely following a trajectory set in motion at the beginning of the time. The universe is one gigantic machine, and intelligent beings inside it are merely automata. This is fatalism taken to its extreme; notions such as free will have no place in this conception of the universe.

Watts has argued that these two myths - that is, the conception of God as a creator, and the universe as a giant billiard-ball simulation - have profoundly influenced virtually all societal constructs, even though, by virtue of their ubiquity, we no longer see any except what we consider to be obvious. Despite our (to some extent) discarding of the origin of these myths, the vestiges live on in the very foundations of logic, mathematics, and science. Or so Dr. Watts argued.

I find this proposition very interesting, especially in relation to the first myth. For the sake of argument, suppose there is no God. Maybe, through this constant technological and societal reinforcement, we're actually creating God, or an almost all-powerful being that is the incarnation of our perception of God-like qualities, in the Judeo-Christian sense. Ideas about God and Judeo-Christian values have been imprinted upon us and constantly reinforced until they become second-nature. In time, we project back these imprints onto the environment through value programming of our children, and the values and ideas that we strive to incorporate into what we create. Even manifestations that seem to be actively counter-Judeo-Christian really only reinforce these basic ideas. Satanism cannot exist in a vacuum; Satan would not even exist were it not for God, and so Satan implies God.

The idea of humankind creating God is not a new one, but I think that most interpretations of the humankind created God idea is simply that we created the idea of him - and not that we actually realized God's being, through technological means. Maybe that's about to change.

The Economics of Religion

|

Excellent inteview with Dr. Chuck Zech about the economics of religion last week on Radio Economics.

Dr. Zech puts forth that, just like private enterprises, our spiritual pursuits are heavily influenced by economic factors. He asserts that individuals' spiritual needs are much better serviced when there is a variety of religious alternatives in a community rather than, for example, a single church.

Drs. Reese and Zech discuss at length the current financial crisis of the Catholic church, and potential extrication strategies. Zech cites some fascinating facts about the economics of Catholicism, and of religion in general, including:

-For every ten Catholic priests that retire from the clergy, only four enter to take their places.

-Catholics in the U.S. contribute about one percent of their income on average to the church. Contrast this with protestant congregations, whose members contribute about two percent.

-In some European countries, a portion of taxes levied by the state go directly to the Catholic church. I was not aware of this. States in which these "contributions" are state-mandated unsurprisingly manage the money much more poorly in which no such mandate is present. Spiritual efficiency - what a concept!

-According to Dr. Zech, the United States is one of the most religious nations on Earth. He cited freedom of religion and the wide variety of spiritual options as the major contributors to this phenomenon.

There is a $1.95 price tag on audible.com to listen to that interview, but you should be able to listen to it for free by grabbing it from FeedBurner or the iTunes store.

| | Comments (5)

Anyone who has spent any amount of time living in Japan soon learns what a profound influence that 桜, or sakura (cherry blossoms) figure in Japanese culture. Every year around this time hundreds flock to gardens, parks, and public spaces for 花見 - hanami, or cherry blossom viewing.

sakura1.jpg

Naturally, cherry blossoms figure prominently in advertising in Japan. Above is a tourist ad in which sakura and ancient Japanese castles are arragned to evoke nostalgia and yearning. Notice the figure underneath the word 弘前. It's a stylized cherry blossom.

Nostalgia and idealizions of youth are tightly linked to sakura in Japanese culture. Take a look at another ad, this time for a camcorder. We see kids about to enter school for the first time - for the year or ever I am not sure, but the month of March does mark April marks the start of the school year in Japan.

sakura0.jpg

That's a lot of cherry blossoms! Many more than one would actually see at hanami, in fact.

The coupling of sakura and youth is really what fascinates me about the whole sakura and hanami phenomenon in Japan. Sakura-viewing season is startlingly beautiful, but it is also agonizingly brief - perhaps at most two weeks. This, I think, lies at the heart of why Japanese regard sakura so highly. In Japan, sakura are a metaphor for life. Life, especially at one's prime, seems beautiful and fleeting. I believe that the traditional notion of one's prime in life in Japan is very early compared to the west; it occurs before one even graduates from high school, or at most shortly thereafter.

There's an extraordinary exhibit at the museum at the controversial Yasukuni Shrine in Tokyo with a small, non-engined single-manned plane filled with explosives - really, just a guided missile. These planes had no landing gear, of course, and were launched from larger bomber planes to glide down to their targets. These were normally piloted by young men around twenty years old. Take a look at the emblem on the side of the plane. Their lives were fleeting indeed.

I'm looking forward to hanami this season.

DotQuest

|

Matt has created a new twist on an old game. Very entertaining!

Huang He - China's Sorrow

|

Great article about the Chinese Huang He river - also known as China's Sorrow - and the periodical havoc it causes in its vicinity on Damn Interesting today. The water in the river, it seems, is loaded with a type of sediment that accumulates on the riverbed over time. Despite the construction and maintenance of levies, this accumulation raises the level of the river, and in the past millions of deaths have been attributed to flooding.

Here's a sobering excerpt:

Unfortunately the risk of catastrophic flood has never been higher. Since the end of World War II, the Chinese population has doubled and enormous new metropolises have sprung up along the banks of the Huang He. In 1996, the level of the river reached an all-time high despite river flow being much lower than it was in 1958. Were widespread flooding to occur, there is nothing that could be done to stop it from inundating much of north-eastern China. We can only hope that the sprawling cities above which China's Sorrow literally stands suspended in the sky can be evacuated in time.

The reference to Richard Cowen's Yellow River essay is also fascinating:

A Minister of Works was appointed to take preventive measures after a disastrous flood in 2297 BC, but to little avail, because there was another great flood a few years later. ... [I]t has been a feature of Chinese administration that for over 4000 years there has almost always been a major official charged with flood control.

So humanity has a long history - over four thousand years - of dealing with potentially deadly flooding, and yet we continue to settle around these hotspots. I guess we never learn.

|

Matt has a good explanation of the word moe (萌) in an old post on his blog. Over a year old, but worth a read. I'm interested in this mainly because I've heard the term at work in the context of potential game designs, but I could never get my head around it.

Kojima-sensei has an interesting post about Barbie and Rika-chan, the Japanese Barbie equivalent. You can really see how cultural priorities are made manifest in the physical expressions of the dolls.

My last entry reminded me of this high school psychology class I had in which the teacher supplied IQ tests to all of the students "so they could get an idea what it was all about." It didn't occur to me at the time, but what a terrible idea. Our culture places such a premium on mathematical, spatial, logical, and linguistic intelligences at the expense of others. "Your brand of intelligence," these tests seem to suggest to some students, "is worthless." I feel bad for students whose feelings of self-worth were deflated because of this stupid assignment.

I guess that teacher's intelligence didn't venture too far out into the empathetic area that day. Jesting aside, I'm sure the teacher just didn't think it through.

Inferential Programming...?

|

All this recent examination of testing frameworks and test-driven development has gotten me thinking... are we at the brink of entering the age of practical inferential programming?

For example: according to the tenets of test-driven development, for a given entity, we write our tests first. Then and only then do we begin to implement the entity. What if we were able to skip this second step? That is to say, can we automate the actual generation of the program? The answer is yes - the technology, in fact, is already here, in the form of genetic programming.

With traditional evolutionary algorithms, we normally employ some kind of mathematical fitness function that evaluates against the output - or, in more sophisticated implementations, expressions of the output. This is extremely primitive. Our experience suggests that quantifying intelligence as a scalar or (low-rank) vector produces systems that aren't intelligent except in a very specific way. Similarly, archaic human intelligence measures such as IQ tests might provide measure of spatial or logical ability. However, they do not select for expressions of artistic or empathetic intelligence at all. How can expressions like these be measured? We don't know. Intelligence, we have learned, is highly multidimensional.

Enter the test suite. Here, we have a framework that can potentially test many dimensions of an application - orthogonally. Granted, it still might be useful to use a numeric value for the passage of a test, but we can approach it in a more semantically meaningful way. For example, if a program agent in a simulation passes test A, it might be allowed to iterate for an additional five turns. Or, we could allocate a greater or lesser quantity of simulated resources to our simulated agent based on passage or failure of tests - resources that semantically parallel real, physical resources - that is to say, resources that human beings in the beginning of the twenty-first century experience on a daily basis. As a more concrete example, imagine we're simulating a lion in the wild. We want our lion to survive as long as possible, and so one of the tests might be testEatZebra(). Instead of a simple true or false, perhaps the success of this test is returned in the form of a number of units of food, say 8. Thus, the lion can survive longer...

The problem, of course, is trying to implement this. As you can see even in our simple lion example, there might be a lot of overhead in constructing the context in which our programs operate. It would be a truly formidable task to try to implement a practical inferential programming system for C++. Furthermore, actually running the system would take forever - quite possibly literally, at today's level of technology, and if the computational complexity is exponential enough. But we might be able to pare this time and weight down by orders of magnitude by, for example, abandoning languages like C++, and adopting, for example, domain-specific languages with very limited grammars. We'd be creating applications, once again, for rather specific and narrow domains once again, but I think that we'd be surprised at the richness and breadth of these programs. My intuition is fed by my own experimental evolutionary programming applications that exhibited extraordinary intelligence despite my incredibly unsophisticated implementations. However, these applications will inhibited by an inherent narrowness. That is, until the next stage of development.

That next step might take place by self-applying inferential programming techniques upon two (or more) very narrow domains indeed. The first: create an application that can in turn create tests suites that are better reflections of how we want our programs to express themselves. The second: create an application that can create our domain-specific languages - and the appropriate bindings - that are near-optimal for good expression in a variety of domains.

Just like language or OS bootstrapping, we can iterate this process ad infinitum. One more layer of abstraction, one more layer of intelligence.

CodeSermon.org

|

This is in the same vein as the last post. I just listened to another podcast devoted to software engineering that Heather downloaded - the Code Sermon Podcast. The first episode is about unit testing. Well worth a listen. I especially like the discussion about the uses of mock objects to tackle the difficult problem of testing GUI components etc.

One of my coworkers alerted me to the presence of a fantastic article by Noel Llopis on the Games From Within site entitled Backwards Is Forward: Making Better Games with Test-Driven Development. In addition to being an excellent introduction to test-driven development in general, it addresses a lot of the sticky situations that can arise when writing unit tests for games and game tools.

I like this excerpt:

What's worse than uncommented code? Code with outdated comments. We all know how easy it is for comments to get out of date, yet there is very little we can do about it. The unit tests created through TDD serve as a very effective form of documentation. You can browse through them to see what kind of use a class is intended to have, you can look up a particular test to see what kind of assumptions a function makes about its parameters, or you can even comment out some code that makes no sense and see what tests break to give an idea of what it does. The best thing about unit tests as documentation: they can never get out of date. We have found that in codebases that are developed with TDD, comments have almost disappeared, being used only to explain why something was done in a particular way, or to document what paper an algorithm we implemented came from.

This is a very telling excerpt that resonated very strongly with me. Martin Fowler has advocated, and I have followed, the practice of getting rid of comments as far as possible by replacing poorly-worded function, class, and object names with ones that better reflected their roles and interactions. Of course, there are definitely diminishing returns for excising too many comments, but in general, the fewer the comments, the more real estate on the screen. I can get my head around more code at once since I can see more.

I especially like how Noel regards unit tests as a form of code documentation. Better that mere textual documentation, we have found at my company that unit tests serve to convey the way in which to interact with objects to our teammates better than any other method. Furthermore, they are executable descriptions of our ideal interfaces. We've also found that we can delegate tasks to other programmers by providing them with header files and unit tests, and they code the implementation. (Of course, the development of both of these should be done via pair-programming, but that practice has fallen by the wayside at my company lately...)

One thing I would add to the article is the necessity sometimes to have an in-application testing suite in addition to something like CxxTest or CxxUnit. Ideally, we would like to have a suite that is accessible both in the application and as a separate project. My main responsibility at work is the development of computational geometry algorithms, and the in-application constant validation of my code has been a real boon and confidence booster, and it has ensured that I develop bullet-proof code. Of any programming practice that I have ever adopted, the one that has increased my productivity and reliability most dramatically - and most quickly - has been the adoption of test-driven development. I will never go back, if I can help it.

In practice, my tests are much more than 15 or 20 lines long... some exceed 100 lines because we're constructing complex geometry in the tests. However, I'm using these tests not merely as unit tests but also as regression tests, so I figure I can get away with it. :)

In any case, excellent article. Please check it out if you have an interest either in software or in game development.

Today I got an error in my C++ compiler that stumped me. The error list emitted something along the lines of the following:

Compiler Error C2059: syntax error '<cv-qualifier>'

My C++ grammar is not great, and so I didn't know what a cv-qualifier is. But according to this C++ learning blog, cv-qualification describes a class of attributes of data types - namely, those data types that have been declared as either const or volatile.

I hope this helps someone out with their inexplicable errors.

Potions on sale now!

|

MC Hammer has a blog.

Lawson Station (as well as loads of other stores) have begun selling Final Fantasy XII potions. I haven't bothered to buy one, but they juice that these potion bottles contain is reportedly 不味い (disgusting), at least according to my coworker H-san. That hasn't stopped him from buying three bottles, however - all of different shapes but the same dark blue color. At 600 yen a pop, Square Enix must be raking in a lot of おたく dough.

JLife

| | Comments (1)

Heather picked up a JLife the other day. This is a magazine targeted to foreigners, written in Japanese.

jlifecover.gif

As you can see, a multicultural group of four people is socializing around a kind of table. This is a kotatsu, which is a kind of electrically-heated table often used in winter. They're all drinking green tea and eating mikan, a kind of delicious, seedless tangerine that's in season this time of year. The table is low, so you have to sit on the ground in order to keep warm. If you fall asleep underneath a kotatsu, it is said that you will catch cold!

You can see the guy on the lower left laughing his head off about something. What is it?

jlifecoverclose.gif

He's placed a mikan on the dog's head. 可愛い!

I didn't really watch the Olympics this year; in fact, I'm somewhat ashamed to say that I wasn't even aware that they were going on until just recently. That ignorance came to an end when Shizuka Arakawa won the gold medal for women's figure skating in Turin.

Somebody pointed out to me that expectations this year for Japan were extremely high after this nation's performance in the Summer Olympics in Athens two years ago. 37 medals were awarded to Japan that summer. This winter, Japan earned a single medal - Ms. Arakawa's gold medal.

Since Arakawa's victory occured later in the games, Japan clenched onto that victory with all its media might. Constant and heavy analysis were the order of the day, and Arakawa's performance was replayed time and again, at every available angle. There were camera zoom-ins of Arakawa's blade technique - she favored leaning slightly forwards for her pirouettes, then backwards, and then forwards again - a feature that was highlighted by a faint blue oval on the television screen. Detailed charts and figures were drawn and annotated so as to dissect her technique. So as to break it down into fundamentals in such a way that some future hopefuls among the viewship might repeat this incredible success.

"Perfect," the television announcers remarked. Arakawa has been ordained as a national hero. ( Ironically, it was fellow skater Miki Ando - and not Arakawa - who was the odds-on favorite for Japan. ) The media outlets also featured the highlights of the silver- and bronze-medal winners as well - and by highlights, I mean their falls or their serious technical mistakes. And nothing else. Over and over.

I happened to be in the Niigata countryside that weekend - last weekend - and I had the opportunity to ask two young people about their impressions of Ms. Arakawa - a twenty-year-old university woman and her eighteen-year-old brother, soon entering university. Two really great kids, M and K. "She's great," M-chan waxed enthusistically. "We and all of Japan are very proud of her," K-kun beamed. The staff at the hotel where we were staying had similar sentiments; there were hypnotically transfixed to their television screens all evening.

Arakawa bugs me. She has a certain kind of arrogance, I guess, that really gets under my skin. Not the level of arrogance of the Americans, certainly. Nor does she approach the levels of her male counterpart, Russian Yevgeny Plushenko. It's a different kind of arrogance altogether - not a personal arrogance, but a national arrogance.

My friend remarked that this whole episode disgusts her because Japanese culture is so tied in with the notion of the Japanese race, and notions about racial superiority. I agree with the first part of her assertion, but I think that it is lingering, festering, deep-seated notions about racial and cultural inferiority that took root after the end of the Second World War that drives these national emotions rather than cultural supremacy.

For the Japanese reader, I want to stop here and provide a bit of context about the Olympics from one American perspective. Every Olympics, Americans win a ton of medals. The thing is, nobody cares. Or few do. From my perspective (and admittedly I don't care for sports), it doesn't make one whit of difference if an American wins an event or if it is instead won by, say, an Iranian. Americans often do win, and when that happens there is a lot of fist-pumping, hollering, chest-thumping etc. I think a lot of people interpret this to be nationalism, but I really think it's just Americans being Americans - ebullient, boisterous, proud -- maybe even arrogant. No, definitely there's arrogance. After all, it's unamerican not to be arrogant.

This whole Arakawa phenomenon calls to mind an episode related by Robert Whiting in his excellent book, Tokyo Underworld : The Fast Times and Hard Life of an American Gangster in Japan. This particular episode relates the story of Rikidozan - 力道山 in Kanji, literally "power road mountain" - widely regarded as the father of Japanese Pro Wrestling. There is an interesting interview of Whiting in which he expands on Rikidozan here. For some more context, this was happening during the occupation of Japan by American forces, shortly after the end of the war. Tensions were running high, and resentment of the Americans was palpable. The wounds of Japan's pride were still fresh. Here's a salient excerpt from the interview:

In 1954, the Sharpe Brothers (Ben & "Iron" Mike), both 6’5” and over 250 pounds, the world tag team champions, come to Japan. The first day is aired by both NHK (Japan Broadcasting Corporation, the semi-govermental broadcasting network) and NTV (Nippon Television Network). NTV also aired the second and third days. The tag matches between Rikidozan & Kimura (6 inches shorter and 50 pounds lighter) and the Sharpe Brothers, main event of the first and the last days, are still talked about today. In front of the "street television" that NTV setup for people who couldn't afford television, there were hundreds of thousands of people just to watch Rikidozan.

As we all know, pro wrestling is (ATTENTION: small children and wrestling fans .. do NOT read the rest of this paragraph!) rigged .. a fake! (Ahhh, too bad!! You read it anyway, huh??) But no one knew it then. The plan was for the Sharpe Brothers to pull every dirty trick in the book against Rikidozan and Kimura. The referee would turn his back, and both brothers would gang up on poor Rikidozan. The crowd went crazy, wondering how the ref could be so blind! The Sharpes would gouge and bite and kick, and the ref would be looking the other way.

This event caused a sensation in Japan - and, as related in Tokyo Underworld, created a television buying boom so massive it virtually created the industry overnight. Everyone was glued to their new televisions. Hey, we can do it too! was the feeling, perhaps, of every viewer of those wrestling matches. We can stand up to these guys! Rikidozan instantly became a national hero - a role model to all young Japanese. Sound familiar?

Incidentally, Rikidozan was ethnically Korean who hailed from what was to become North Korea - a sworn enemy of Japan. The only reason he entered Pro Wrestling was to escape the serious discrimination he faced in the Sumo domain.

Seen through this filter, I wonder if the Olympics aren't a bit antiquated? We've created an event in which we've incentivized nationalistic competition. Nations reinforce their definitions as apart from the rest of the world through these events. I'm wondering if we can't destroy the Olympics, in its current form, and reforge it in the spirit not of competition, but of cooperation? Instead of winner-takes-all, maybe we can make non-zero-sum games and sports that can serve as a model to the world community? The games need not even suffer in terms of their compellability (is that a word?), and in fact it may even be enhanced. Sports in which cooperation and competition both figure prominently might be especially compelling.

I'd be very interested in hearing what anyone has to say about this.