The T-Files


Sun, 30 May 2004

1Z0-032 Oracle 9i: Database Fundamentals II

Just in time to make my quarterly performance review look a little more favourable, I cleared this last exam in the DBA track in my second attempt. I was much more confident with my answers to all those questions about database recovery than in the first time round, and most of them were correct, too. Still, I prefer not to have to exercise those new skills, recovering databases is a very stressful business.

Two years ago, I would have been able to call myself an Oracle Certified Professional now. Unfortunately, Oracle has in the meantime introduced a new requirement to attend one instructor-led hands-on course. I have to find out how to do that in Japan (in English), which is probably not such big a problem as the class can also be attended online somehow, and if there is a budget for me to take part in this rather expensive event.

Fri, 28 May 2004

Glückaufkampfbahn

Porto reached the European summit for the second time with three brilliantly taken goals to seal an emphatic victory at the Arena AufSchalke stadium but they will begin their defence of the trophy with a new man in charge.

Mike Collett, Reuters

Arena AufSchalke. This is even worse than BayArena. Sometimes CamelCase and WikiWords are seriously OutOfPlace and JustSilly. Der Spiegel seems to be making fun of it, too:
Der Erfolg AufSchalke war das Ergebnis einer mannschaftlich geschlossenen Leistung, Abwehrstärke und Clevernis.
On a related note, I wonder if I can see anything of Euro2004 here.
Sun, 23 May 2004

The Ladykillers

The Coen Brothers' (The Big Lebowsky, Fargo) latest work has received mixed responses from their regular viewers and drawn a lot of criticism for foul language and vulgarity from people who took the whole family to see a Tom Hanks movie. Well, I think it works quite well as a dark screwball comedy, think A Fish Called Wanda. Sure, the plot is simple, the characters are completely one-dimensional, exaggerated, unrealistic and without background, and some of the jokes could offend sensitive people, but it is funny and the actors (especially Tom Hanks as the professor) are doing a great job.

7 points

Wed, 19 May 2004

The thousand and one reasons to love Perl: [6] Command line mode

Another great thing about Perl is that it can be used for a wide range of programming tasks. On one end of the spectrum, you can write complex applications with thousands of lines of code spread among dozens of files. On the opposite end, Perl can also be used for small shell scripts, or even directly from the command line (for ad hoc tasks). Here is a real world example.

The first rule of content management: If you have more than five pages to maintain, use some sort of content management system.

Suppose you have a web site with sixty static HTML pages. You chose to ignore the first rule of content management, and the only way to edit the pages is to, well, edit the pages (by opening them one by one in a text editor). Now you need to change some common part consistently on all pages, let us say to update the copyright message. Enter the Perl.

First, we need to write Perl code to find the string we want to replace (© 2003) and substitute it with the updated version (© 2003-2004):

s/© 2003/© 2003-2004/

That was trivial, but we already know that Perl is great for working with text. Today's lesson is about Perl's support for being a command line tool and that, in consequence, your work is already done. The other things that need to happen (opening all HTML files in the directory, reading them into memory, applying above substitution, and writing the modified file back to disk) can all be dealt with with command line switches:

perl -pe 's/© 2003/© 2003-2004/'  -i *.html  

So what do these options do?

-e
This switch is the heart of all Perl one-liners and lets you specify the program to be run (the one-line substitution snippet) on the command line (rather than reading it from a source file).
-p
This tells Perl to loop over all the specified input files, executing the program for every line (the line becomes the special variable $_) and print the (possibly changed) line afterwards. An alternative is -n, which does the same, but omits printing.
-i
specifies in-place editing, so that what we print is written back to the original file (instead of going to stdout). This rather dangerous switch can be instructed to make an optional backup.
*.html
Any files you name after all other options will be read and processed one by one.

See also the Perl manual about all the other interesting command-line options.

Sun, 16 May 2004

New personal best

It was raining today at the company camp in Atami, so we had to replace the outdoor sports with bowling. I pushed my previous record of 128 to 129 pins.

Frame: 8/- 6/2 G/3 9/- 7/-  XX  XX 1/2 3/5 7/2
Score:   8  16  19  28  35  56  69  72  80  89 

Frame: 6/- 6/X 8/- 8/1  XX  XX 9/X 6/2 9/- 6/-
Score:   6  24  32  41  70  90 106 114 123 129
Sat, 15 May 2004

E3 Expo

Because of our unfortunate schedule, we had only one day to see E3 Expo. Almost the whole show was dedicated to showing video games (for PC and consoles), with very little else to see (most of the rest are video game press and products for the retail industry, such as CD repair machines). We did manage to find an Israeli company that streams regular Windows software over the Internet (mostly for game subscription services), a Swedish developer of high-end mobile games (for handheld consoles, palmtops, and powerful mobile phones), another Swedish companies with Java-based mobile phone and web games, and a Taiwanese MMORPG producer we are already in business with.

As for the video games, I have to admit I have completely lost touch with the recent developments. I am sure there were many exciting new titles being showcased, but it did not really capture my attention. All I noticed was that most games these days are either first-person-shooters or multi-player online fantasy games, and that the quality of the graphics is really impressive nowadays, which makes the level of violence in some (most?) of the games even more troublesome.

Probably the two biggest E3 news were the presentation of Sony's handheld PSP system (able to play PS2 games and movies, although probably not directly from the regular disks, since those are too big) and Nintendo's next generation, double-screen GameBoy (also backwards compatible). Both looked very interesting, will be released later this year (at least in Japan) and I would have loved to take a closer look, but there were seriously long lines in front of their booths.

One thing I was counting on that did not materialise were dozens of give-away T-shirts. As it is, I only got one from a video game TV show, who would give a free iPod Mini to a lucky handful they spotted wearing their shirt later. We met one such winner on the Metro platform on the way back to the hotel (which reminded me that we forgot to visit Apple's booth). All I could salvage was a couple of demo CDs and a Magic starter deck.

Sun, 09 May 2004

... you're gonna meet some gentle people there

I spent the weekend at Ashley's and Maciej's place in Richmond, which is a very nicely located residential area on the West side of San Francisco. A five minute walk (across a golf course and past a museum) takes you to the coast with a great scenic view of beaches and cliffs. They let me stay in their basement (bed room / Buddhist temple), gave me a tour of all the main attractions (excluding Alcatraz, but including an over-hyped burrito that once again demonstrated why I should stay clear of Mexican food), Maciej took photos, and all of us (including Ashley's parents and their impressively wooly cat) had a good time, I think.

Fri, 07 May 2004

Time Travel

It just occured to me that one of the reasons for the strict US immigration checks are that they have to deal with visitors from the future. I, for example, left Tokyo at 3 pm today and arrived in Los Angeles at 8:30 am, more than six hours before I left. But just for the record, I was neither fingerprinted nor photographed (at least not that I am aware of).

Thu, 06 May 2004

... be sure to wear some flowers in your hair

Every year Gaiax sends some members to the E3 Electronic Entertainment Exposition to get inspiration for new products and meet potential business partners. This year the lucky ones to go to Los Angeles are Kojima-san and me. Before that, we will visit two companies in San Francisco and nearby Palo Alto to learn about micropayment technology. So tomorrow, I am leaving for a week in California. Together with the Golden Week holidays in Western Japan last weekend and the country-side company camp in Atami the following weekend, this month sure sees a lot of travelling around.

Mon, 03 May 2004

Miyajima

The island of Miyajima (near Hiroshima) has been known for centuries as one of Japan's three most scenic places (Nihon Sankei, Three Views of Japan). It is probably most famous for its floating torii gate, which stands in the middle of the sea in the morning and becomes accessible later during the day as the water withdraws. It belongs to the Itsukushima shrine, although it is obviously difficult to enter the shrine through the gate (and yes, I did get a stamp there). There are also a lot of other shrines and temples on this sacred island (Daisho-in is probably the most beautiful Buddhist temple I have seen so far), as well as many deer (which are much more relaxed than those in Nara).

Sun, 02 May 2004

Himeji Castle

Himeji Castle is the best preserved castle in all of Japan. Unlike many others, which were destroyed by war or disaster, the White Heron Castle has never been invaded or damaged and kept its original form for four hundred years. It is included in the UNESCO World Heritage list. We were very lucky to have been given a guided tour (in English and for free) by the friendly and competent Komoto-san of the Volunteer Guide Association of Himeji Castle, who runs an electronics store during the week and explains the castle on his holidays. We learned that despite the beauty of the castle, it was a purely military structure for the Tokugawa shogunate. Its white colour is actually plaster intended to stop the wooden castle from catching fire. The main tower was never inhabited and intended as the last line of defence. During peace time, it served as a storage room.

Shoshazan Engyouji

I met some serious collectors of temple stamps in Engyouji temple on Mount Shosha near Himeji. They did not have an album to contain the seals but instead had them put on both a cloth scroll and an ornamental robe, drawing my immediate admiration. Being conscious of the fact that I have not yet advanced to their level, however, I started another album. Engyouji is number 27 of 33 holy places in Western Japan (the westernmost of them actually). I also decided that three concurrent Buddhist albums are my limit and I will not start one more before I finish one first.