The T-Files


Sun, 30 Jan 2005

95 points

We went bowling again with Jing and Ted yesterday and I arrived at a positively acceptable score of 95, but we somehow managed to lose the score sheet on the way back home, so there is no detailed breakdown of the frames this time.

Sat, 22 Jan 2005

Bruce Sterling: Crystal Express

It seems that every time I go to the library, I come back with a collection of science fiction short stories. This one contains stories by Bruce Sterling written in the eighties (but no foreword, not by Sterling, not by the editor, not by anyone else), and is divided into three parts.

The first part is called Shaper/Mechanist, and has five stories set against a common dark future background, where humanity has evolved into two competing factions, the genetically engineered Shapers and the mechanically enhanced Mechanists, with the Investors, a superior space-faring race playing them off against each other for their own commercial benefit.

The second part (Science Fiction) consists of three independent stories set in the not-so-far future, the longest one telling the story of a Chinese-Canadian engineer who tries to escape the triad background of his corrupt bad cop grandfather by taking a job in Brunei, which isolated itself from the rest of the world after the oil wells ran dry.

The third part (Fantasy Stories) has four stories about an eighteenth century natural scientists whose increasingly popular theories draw the anger of Ignorance and her three daughters Faith, Hope, and the Church, about a little magic shop in New York City and its most loyal customer throughout the decades, about the changes brought upon Tokyo and its citizens when the country opened itself to the West in the Meiji Restoration, and about the downfall of a great West African city in the eleventh century.

There have been calls for me to rate books with points, just as I rate movies. No can do. Everyone can be a movie critic, but literature is another league and I have to leave this to the professionals (i.e.: people who do not only read on trains). However, since I start reading about twice as many books as I finish, and only report on the latter type, you can be sure that I did not totally dislike the books mentioned here.

Fri, 21 Jan 2005

New low

It is very difficult to organise an after-work bowling with co-workers as everyone is so busy. So when it finally happens, and I hurry everyone to leave office early at 8:30 pm on a Friday (sometimes I hate Japanese working hours), then coming up with my worst score in recorded history is less than stellar.

Frame: 7/2 1/- 4/X 8/X 5/1 6/- 5/- 8/- -/8 7/2
Score:   9  10  28  43  49  55  60  68  76  85

Frame: 7/- 3/3 6/3 3/- 3/3 6/- 3/4 9/- XX -/3
Score:   7  13  22  25  31  37  44  53 66  69   

TextWrangler

A programmer is always looking for the perfect text editor, and today I found a new candidate.

For the last two years or so, I have been working with either SubEthaEdit (lean and mean, for general work) or JEdit (for heavy lifting).

The two big selling points of SubEthaEdit are its real-time collaborative editing mode, which allows for a distributed editor session over the network (unique feature, but I have never used it), and instant HTML preview, which is quite snappy (updated as you type) and accurate (it uses Safari's rendering engine, so it also does CSS). The problem with SubEthaEdit is that it opens every file in a new window (which is not good if you have 50 files to work on) and that I am stuck with the old version because you have to pay for version 2.0 and up (did I mention I am only considering free-as-in-beer editors)?

I am quite satisfied with JEdit, but it is a little overkill to use outside of project work. Since it is written in Java, and packed with useful extensions, it is not really fast (although still much better than Eclipse, which is totally unusuable on my poor iBook). It also does not make use for Mac OS built-in goodies (like System Services, or spell checking), but those are minor complaints.

I have to edit files in different encodings (sometimes UTF-8, sometimes Shift-JIS), and so far every program I tried failed to auto-detect the encoding, so that having two different editors with two different default encodings is also useful.

The new kid on the dock is TextWrangler, by Bare Bones Software. Bare Bones is famous for BBEdit, which has always been the number one programmer's text editor on the Mac. The only problem with BBEdit is that it is not free. Back in the day (the OS 9 days, that is) I used BBEdit Lite a lot (the freeware cousin), but on OS X there have always been other, better free editors. TextWrangler is also a stripped-down version of BBEdit, and with version 2.0 became freeware. It replaced SubEthaEdit in my dock minutes after downloading. Except for the advanced web developer functions of BBEdit, TextWrangler inherited almost everything from its big brother, such as

  • Open and edit files on remote servers (via FTP and SFTP)
  • Syntax coloring and function navigation for ANSI C, C++, HTML/XHTML, Fortran, Java, JavaScript, Object Pascal, Objective-C, Perl, PHP, Python, Rez, Tcl, TeX, Unix shell scripts, and XML
  • Runs shell scripts
  • Integration with the Perl runtime (see POD, syntax check, debugger)
  • Multi-file search and replace with (perl-compatible) regular expressions
  • Can manage many files in a single window

One thing is strange about PerlPad and TextWrangler. While PerlPad appears in the Servives menu (even with its default hotkeys, which is rare these days and good luck considering how many keys are already defined by the application itself), for some reason it does not work. I have to look into this.

Tue, 18 Jan 2005

The thousand and one reasons to love Perl: [12] __DATA__

Sometimes your Perl script is just that: a small script for a specific task that is contained in a single file. Because a single file is easier to deploy and track than applications that span many files (program, configuration and so on) you want to keep it small. However, at the same time, you want to have the script read something from a data file, for example a template for the report it produces, or a list of people to email the report to. Using Perl's many quoting functions (especially for multi-line strings) you could just throw that data into a variable. But sometimes a file handle is more convenient, if only because you can easily loop over it line by line. No problem, you can just include that data in the same file right after the script and the special __DATA__ keyword. You can read from this __DATA__ section just like you would read from a file:

printf '%03d> %s', $., $_ while (<DATA>)  # special filehandle DATA
__DATA__
Once upon a midnight dreary, while I pondered weak and weary,
 Over many a quaint and curious volume of forgotten lore,
 While I nodded, nearly napping, suddenly there came a tapping,
 As of some one gently rapping, rapping at my chamber door.
 `'Tis some visitor,' I muttered, `tapping at my chamber door -
 Only this, and nothing more.'
Mon, 10 Jan 2005

Empty house

We lost most of our furniture today. Cissy's long time roommate Saya left us her fridge, laundry machine, microwave oven, TV (with VCR), study desk (with lamp), unwieldy closet (with mirror), futon (with blanket), vacuum cleaner, TV shelf, and curtains when she left to study in Europe three years ago, but she has recently returned to Tokyo and after living a few weeks with us found job and apartment and took back her stuff this afternoon (minus the microwave, which broke down last year, and the unwieldy closet, which none of us really wants to have).

So now we are left with the new microwave we bought last year, a small foldable table, an office chair and small shelf that we picked up from the street, an electric heater, an ergonomic chair, a portable stereo, our own futon (with blanket), an inflatable sofa (which deflates frequently), no guest futon, no TV (will not be replaced if we can help it, the iBook can play DVD just fine and we can stop paying NHK), a DVD player with nothing to connect it to, no study desk, no fridge (will be replaced when we move to the new house, or perhaps earlier, eleven weeks without it could be too hard), no vacuum cleaner (replacement already ordered, should arrive this week), no laundry machine, a lot of catalogues about laundry machines, curtains to cover half of our windows, the unwieldy closet (with mirror), and another mirror (that Marek left here when moving back to Prague) behind it.

Sun, 09 Jan 2005

Monday is Porn Day

Tsutaya in Shibuya has had Ladies' Day once a week (where girls can rent movies with a discount) for quite a while now, and now they also have Men's Day, which is a similar offer, but with one strange and significant restriction: it only applies to adult videos. And they openly advertise it throughout the shop. Now, we all know what kind of content was the driving force behind rental video (and DVD and the Internet) and how the classical video shop is structured, but Tsutaya Culture Convenience Club is a big family-friendly chain store with large, modern stores in prime locations and rental video is only part of their business (Tsutaya also sells DVD, audio CD, games, movie tickets, books). In other countries they would probably not have an adult video section at all. But Japan is a very macho island with women's rights not as developed as in Western countries. One just has to look at the comics and magazines and even news papers salarymen read on commuter trains. It does not seem to bother anyone that they are enjoying to learn about very weird things happening to fictitious school girls, all the while sitting just an arm's length away from a real one. Tsutaya's Men's Day is just a natural result of this culture.

Oh, and just for the record, in preparation of the farewell session for our TV (more on that later) I got Hedwig and the Angry Inch, Undercover Brother, and Very Bad Things, none of which qualifies for the discount.

Mon, 03 Jan 2005

New Year's rice cakes kill four, leave fifteen in critical condition

One of the web sites I am working for has a news headline section on its top page, and it looks like Marvin the Depressed Robot is selecting articles here. Below is today's edition (unfiltered), and I can tell you it is like that every day:

  • Newborns at lowest level for 4th year running
  • Thief shoots plastic bullet through 7-Eleven clerk's lungs
  • 4 die in house blaze in Akashi
  • New Year's rice cakes kill 4, leave 15 in critical condition
  • Policeman arrested for making girl cop an eyeful
  • Red-White contest slumps to worst ratings ever
While anyone can read the headlines, only registered members can access the full article. And who would not want to read more about these entertaining topics?

Moved into the Google Cache

Wow, Google is fast. Less than a week ago, I set up a web site that only exists in Google's cache, which at that time meant it did not exist at all. But now it is already all indexed and cached, and probably even updated once a day.

Sat, 01 Jan 2005

Naritasan Shinshoji Temple

Naritasan Shinshoji is one of the most popular Buddhist temple in the Kanto area. Let me say that again: Naritasan Shinshoji is one of the most popular Buddhist temple in the Kanto area. It is not a Shinto shrine, as I wrote yesterday. Unfortunately, under a spell of total disorientation, I had the goshuin entered in my Shinto album, which I suppose invalidates the whole collection. Now I have to start over again and get a new album at the Meiji shrine.

The Incredibles

Another movie with unique visuals about a mad scientist controlling big robots from an isolated tropical island who wants to launch a rocket. But where Sky Captain fizzled, Pixar's new movie shows how it is done: It is funny, looks great, has a story with many twists and interesting characters. There is even a short movie with a message before the main feature.

8 points