The new edition of my book Mastering Regular Expressions was reviewed on Slashdot today, where the reviewer generously granted me a rating of “11 out of 10.” In looking over the comments people left during the course of the day, I appreciated the kind words many chimed in with about the book.
I found it amazing, though, even by Slashdot standards, the amount of ignorance displayed in a few of the comments. Here's an excerpt from such a comment:
Now, if you know much of anything at all about modern-day scripting languages and their regular-expression implementations, you know immediately how outlandishly stupid the comment is.
The problem with comments like this is that if the reader doesn't already understand the situation, they'll not necessarily know that the comment is ignorance incarnate, and perhaps be lured in by the fancy mathematical words like “context-free” and actually think that the comment has some validity.
I'll be the first to warn that regular expressions are just one tool and that they are certainly not the hammer for every programming nail, but comments like this are basically saying that only pure DFA implementations circa 1979 are worth using, and the use of any features added since then is bad. Geez, even before I wrote my book, few would have espoused such an opinion, but it's lamentable to see it now 10 years after the first edition, in a discussion of the new edition, by someone who's clearly never read either but even more clearly needs to. (One of the reasons I wrote the book in the first place was to try to clear up this ignorance-borne foreboding of regular-expression technology that one occationally sees.)
To my family and regular readers more used to posts about Japan, Anthony, or with pretty photos, who may not understand anything of this post past the first paragraph, I offer this cute picture of a just-turned-one-year-old Anthony sweeping the floor:
The trick will be getting him to do it when he's 13! ![]()
Every so often I look at my server logs to see by what means people find their way to pages on my blog. One thing that's long bothered me is that people's Yahoo! and Google! searches often bring them to my blog's home page, rather than to the post-specific page containing the text that was matched by the their search.
For example, my previous post contains the text “There's a camera collector in Massachusetts....,” and because my blog home page contains my five most-recent posts, that post and its text will stay on the home page until I've written a few more posts. If the search engines index my blog home page, someone searching for, say, “camera collector” will be directed to my blog home page. That's all fine and well.... until a few days from now and that post has been bumped off the home page, at which point users following a link from a search-engine search-result page end up at the then-current home page and wonder where their content is.
The solution for this is fairly simple: tell the search engines to index only the permalink pages (the individual per-post pages), and not the blog home page, the index continuation pages, category pages, etc.
I finally got off my rear and implemented this on my blog, so starting today, the search engines won't index my non-post pages. What got me going was Fazal Majid's excellent writeup on blogging etiquette, How to Show Respect for Your Readers, which I found today (having only discovered his generally excellent writing yesterday). I'd already known the general approach on how to implement the “don't index me!” directives (one soaks up these things working for Yahoo! for eight years), but I'd been too lazy to look up the actual incantation needed. Fazal kindly included it in his post, and so I'd lost my last excuse for not going ahead and getting it done.
Having done this now, I'm sure I'll see my blog's Google PageRank go to zero (from it's currently dizzying value of 5), but as the title of Fazal's post indicates, it's all about respecting the reader.
There's real satisfaction in seeing that someone did a search on such-and-such, and it brought them to a page I've written exactly on that subject. My photo pages are particularly common, with people arriving via Yahoo! and Google! searches for “japan temples”, “presidential limousine”, and “snowfall” (to list just a few actual examples from the hundreds that arrive every day).
Even more so than with the photos, it's really gratifying to see searches like:
“nikon d200 compact flash tested”
“transcend compact flash for Nikon d200”
“test transcend flash”
“transcend 4GB 120x”
“transcend 4Gb CF card”
“transcend compact flash review”
“Transcend 120x Compact Flash Card review”
land on my “Timing a Transcend 80x 4GB
Compact Flash card with a Nikon D200” and
“Update
on Transcend 4GB 120x compact-flash card” posts, as happened
today. Those having done the search certainly found exactly what they were
looking for.
Most of my posts are just for keeping overseas family up to date on our lives here in Kyoto, but some of my posts have a broad appeal, and I'm happy to have them read and (hopefully) be helpful.
There's a camera collector in Massachusetts who often finds undeveloped film in the cameras he acquires, so he develops it and posts the pictures. They're often from the 50s or 60s, but some are much older. In any case, I found his page of “found” photos to be interesting.

Anthony's First Bento of the Semester
Hand-made rice balls, octopus-shaped fried wieners, broccoli and carrots, and a cheese snack
Today was Anthony's first “bento day” of the new semester. His preschool started last week, but they were all short days. Finally today the kids could bring lunch (“bento” means “boxed lunch”) to eat at school.
As I wrote in the post “It's All About the Bento” when he has his first bento day last May, the bento is a big deal, and Fumie puts a lot of effort into making them fun, easy, and healthy. Today was no exception.

Tasty Left-Overs After Bento Preparation
As is normal, Anthony ate the thing clean, down to the last piece of rice. His bento box is not washed at school, but comes back as if it had been:

You can see all his bentos, updated each morning one is made, at the Anthony's Recent Bentos page.
A Japanese brokerage company mis-entered a stock sell order on their computerized trading system. They transposed the number of shares they wanted to sell with the price-per-share at which they wanted to sell, offering to sell 610,000 shares of such-and-such a stock for 1 yen each, rather than the intended offer to sell one share for 610,000 yen. In dollars and cents, that's an offer to sell over half a million shares of a stock worth over $5,000 for less than a cent each.
Ouch.
Doing the math (¥610,0002) one calculates that it could have been “ouch” to the tune of about 3.25 billion dollars, but the trade was apparently canceled after a loss of “only” $351 million.
I thought “ouch” when I first saw this in December when it happened. It's in the news again because the Tokyo Stock Exchange rejected the brokeage house's claim for damages. It seems that the brokerage house noticed the error and tried to cancel the order at a point when the loss was only about $3 million, but the exchange computer system wasn't working or something, and it went on to the $350 million loss.
I don't think this could happen in The States, as I'm sure such an order would be rejected out of hand by any exchange. Besides the price being so far away from the bid/ask, the number of shares was 41× the entire shares outstanding for the company, an impossible number to sell. (Why the brokerage house's computer system allowed the trade to be entered in the first place is another question.)
Anyway, as someone who has the experience of being a bit sloppy on my order-entry form and ended up doing a “buy” when I intended a “sell,” I feel their pain.

