Year #2: It’s Still About the Bento
Anthony's Bento Today Carrots, broccoli, various hand-made onigiri , shrimp, and as a treat, an apple-flavored kon'yaku jelly. -- Kyoto, Japan -- Copyright 2007 Jeffrey Eric Francis Friedl, https://regex.info/blog/
Anthony's Bento Today
Carrots, broccoli, various hand-made onigiri, shrimp, and as a treat, an apple-flavored kon'yaku jelly.

The Japanese school year begins in April, and today was the first day for some of the new first-year kids at Anthony's preschool to have their first bento. (It's a big day for them — see “It's All About The Bento” for the story about Anthony's first bento back when he was a new student last year, and “First Bento of the New Semester” for a mid-term update.)

Anthony's mid-year class started having bentos last week, but on the occasion of the big day for his new schoolmates, I thought I'd post today's bento. It seems Fumie was inspired by a hanami bento, which has many small items, allowing for particularly easy, leisurely consumption. Of course, he ate it all up.

As always, new bentos are added to the recent bentos page (described here) as Fumie makes them. (The bento that Anthony once made for Mommy is not included, although it should be.)


Doubling Up on Grammar Checks

When I write for public consumption (book, magazine article, blog post....), I try to be a bit careful with how I present myself. I have the most difficult time with misspellings because they could bite me on the nose and I still wouldn't sense them. I tend to be okay with grammar, and I pick up most typos because usually I read and reread many times before publishing. Some often sneak through anyway.

Part of this carefulness is evident in the first example I give in my book on regular expressions. On the first page (First edition, Chapter 1, Page 1) I describe how regular expressions can be used to identify doubled words:


Here's the scenario: you're given the job of checking the pages on a web
server for doubled words (such as 'this this'), a common problem with
documents subject to heavy editing. Your job is to create a solution that
will:

* Accept any number of files to check, report each line of each file
that has doubled words, highlight (using standard ANSI escape
sequences) each doubled word, and ensure that the source filename
appears with each line in the report.

* Work across lines, even finding situations where a word at the end of
one line is repeated at the beginning of the next.

* Find doubled words despite capitalization differences, such as with 'The
the', as well as allow differing amounts of whitespace (spaces, tabs,
newlines, and the like) to lie between the words.

* Find doubled words even when separated by HTML tags. HTML tags are for
marking up text on World Wide Web pages, for example, to make a word bold:
...it is <B>very</B> very important....

That's certainly a tall order! But, it's a real problem that needs to be
solved. At one point while working on the manuscript for this book, I ran
such a tool on what I'd written so far and was surprised at the way
numerous doubled words had crept in. There are many programming languages
one could use to solve the problem, but one with regular expression support
can make the job substantially easier.

I first wrote that in 1995 or 1996, and it's survived through to the third edition, where I go on to present solutions in Perl, Java, and even emacs.

Running the program has long been part of the book's build process, to vet the prose for doubled words, but for some reason I never thought to apply it to my blog posts. I thought of it yesterday, and was shocked at the dozens of doubled-word typos I found in the 430ish posts I currently have on my blog. Dozens. I guess it's so easy to read what you believe to be there than what's actually there.

It's mildly interesting to realize that such errors would never make it past a first re-reading if the text were Japanese, because my reading of Japanese does not “flow” like when I read English. When I read Japanese, I read individual words (or at least try to), then put them together to understand the sentence (or at least try to). Thus, I'd immediately notice a misplaced word.... at least to the extent that my Japanese abilities allowed me to realize that it was indeed misplaced. 🙂

Since I was in tidy-up mode, I thought to also run a little utility I'd developed in 1996 but had since forgotten about. It checks for the misuse of “a” and “an” (e.g. “a apple”). This kind of error also crops up often in text subject to a lot of editing.

For example, in my post yesterday about the river in Kibune having a cooling effect, I originally wrote that it had the effect of “an air conditioner,” but at one point during composition I decided to add “natural” in there, and so ended up with “an natural air conditioner.” I didn't notice the glaring grammar error before posting, nor until I ran my little utility that pointed out about a dozen such errors spread across my posts over the last few years. Doh!

The two checks — a vs. an and doubled words — are now part of my pre-post checkup. Hopefully, no more such errors will creep in (leaving room for different errors, no doubt).


Getting Ready for Summer, in Kibune
Little River in Kibune (in northern Kyoto, Japan) -- Copyright 2007 Jeffrey Eric Francis Friedl, https://regex.info/blog/
Nikon D200 + Nikkor 17-55 f/2.8 @ 32mm — 1/15 sec, f/10, ISO 200 — map & image datanearby photos
Little River in Kibune (in northern Kyoto, Japan)

We went for a short drive up to Kibune yesterday, a little area of restaurants and inns nestled in a long, narrow river valley that's been populated for at least 1,300 years. Although I bothered learning the name only yesterday, we've been up that way a number of times lately, with the first few pictures from this blossom & buds post from that area, also passing through on the trip with Kyoto's bridge to nowhere, and not even a month ago, snow and funky icicles.

The snow's all gone, of course, and soon their cherry blossoms will be as well, so now they're getting set up for the hot summer tourist season.

&mdash; full exif Getting Ready for Summer -- Kyoto, Japan -- Copyright 2007 Jeffrey Eric Francis Friedl, https://regex.info/blog/
Nikon D200 + Nikkor 17-55 f/2.8 @ 17mm — 1/80 sec, f/4.5, ISO 400, P.P. boost: +0.18EVfull exif
Getting Ready for Summer

The workers above are building a sun shade over the river, using only bamboo and twine (although it could be that they were cheating a bit and using wire that looked like twine.... I'm not sure.)

All the restaurants are by the river, since everything here is by the river. The river, the road, and all buildings.... everything is nestled into a strip of land at the bottom of a valley that's at most a hundred feet wide, and usually less. Where there are restaurants, they've terraced the river, and so during the summer, they build platforms on the terraces just inches above the water. The river acts like a natural air conditioner, and it's apparently really pleasant.

In the foreground of the picture below (which is a bit upstream from the construction pictured above), you can see the platform supports sticking out of the water, and in the background, they've started to assemble the platforms.


Nikon D200 + Nikkor 17-55 f/2.8 @ 32mm — 1/125 sec, f/5.6, ISO 400, P.P. boost: +0.80EVmap & image datanearby photos
River with platform supports

In the picture above, between the river and the road, is a narrow little wedge of a restaurant that we ate at (part of the ひろ文 complex there). The food was good and the prices were reasonable. I had kitsune udon.


Nikon D200 + Nikkor 17-55 f/2.8 @ 17mm — 1/160 sec, f/6.3, ISO 400, P.P. boost: +0.89EVmap & image datanearby photos
On the Street in Kibune

Prior to eating at that restaurant, we walked by and Fumie is checking it out. Some of their menu is shown in the squares on the wall. Coffee (hot or cold) is only 400 yen ($3.50), with the most expensive thing shown being 1,200 yen ($10) oyakodon, the first part of the clever name literally meaning “parent and child,” referring to the chicken and egg main ingredients.


Nikon D200 + Nikkor 17-55 f/2.8 @ 17mm — 1/40 sec, f/3.2, ISO 400 — map & image datanearby photos
Self Portrait

At one point along our short walk, I made a self portrait in one of the roadside mirrors ubiquitous in Japan (in the mountains, placed at strategic points along sharp bends), unfortunately catching one of the even more ubiquitous and universally ugly utility poles. In my reflection, the brown and pink growth on my shoulders is my son.

The picture at the top of this post is taken about a mile downstream, from a bridge where the road crosses over.

&mdash; map & image data &mdash; nearby photos Traditional Japanese Guardrail -- Kyoto, Japan -- Copyright 2007 Jeffrey Eric Francis Friedl, https://regex.info/blog/
Nikon D200 + Nikkor 17-55 f/2.8 @ 32mm — 1/160 sec, f/6.3, ISO 400, P.P. boost: +0.36EVmap & image datanearby photos
Traditional Japanese Guardrail

Heavy Industries on the Kitchen Table

Heavy Industries on the Kitchen Table

We awoke this morning to find that Anthony had built an elevated-highway construction site on the kitchen table. Yes, I'm easily impressed by my own kid, but geez, just look at the detail. Cones and barriers in the proper spots, ladders leading from level to level.... the only thing not true to life is that the workers aren't eating lunch.

This is certainly a step up from the airport security gate from last week, and the street sweeper from six months ago. However, he's been doing research on the subject for a long time.


Freaky Raw Processing: From Sunset to Moonrise with Adobe Lightroom

Nikon D200 + Nikkor 17-55 f/2.8 @ 19mm — 1/350 sec, f/13, ISO 100 — full exif & map
Another Sunset View
from our New-Year's trip, from the set shown in the post the other day

When a digital camera produces a standard JPG image file, it does so after internally processing its sensor's raw data. This processing includes the mathematical application of various settings for exposure, white balance, sharpness, color saturation, and other algorithms that massage the image data in an attempt to achieve a particular look.

Many cameras offer “scene” settings that can impact how this processing is done. For example, a “portrait” setting may reduce the amount of sharpening applied.

Raw

When shooting in a raw format, this processing is taken out of the camera, and left to your image-processing software. I use Adobe Lightroom to catalog and process all my images, including raw ones. Lightroom offers a myriad of settings for adjusting the raw sensor data, many of which are comparable to those done in camera, and others allowing finer control.

Creative Control

Making adjustments to these controls (again, controls such as white balance, exposure, sharpness, etc.) can be done to some extent without breaking the “honesty” of the result. For example, adding a bit of exposure boost to correct for an underexposed shot, or to adjust the color balance so that skin tones are realistic.

It's quite acceptable, even, to adjust the white balance to add an overall red/blue tinge to achieve a “warmer” or “cooler” look to the result. These effects are well within the limits of what the on-camera settings can do, so they fall under “creative adjustment” of the image.

Creative License

However, at some point, making these changes leaves the realm of “creative adjustment” and enters the realm of “creative license,” producing a result that can be quite far from reality. There's absolutely nothing wrong with this, so long as one realizes that the result is no longer “honest,” but rather “artistic.” (Hah, as it turns out, today's “What the Duck” cartoon applies perfectly.)

Frankly, I'm not happy with my choice of “honest” and “artistic” here, because one can certainly be both honest and artistic at the same time — heck, that's the ultimate goal of many types of art — but I can't think of anything better at the moment.

Playing in Lightroom

Lightroom offers many image-processing settings. The most basic set of controls are in the aptly-named “Basic” group, but there are many other groups, some of which have with names like “Tone Curve,” “Lens Corrections,” and “Split Toning.”

In playing with some of the “Basic” controls, I found some really interesting effects when I combined them in extreme ways, so I thought I'd share a few of the results. The version above is replicated as the “A” version in the set below.Mouseover the boxed letters to see various versions, and Lightroom's Basic group of adjustments used to create them.


Stylized/Idealized

Inspirational

Nuclear Winter

Closer to Reality

Martian Sunset?

“Elvis Velvet Moonrise” Painting

Vibrantly Golden

Moonrise
Lightroom's “Basic”
Develop Controls
A    B    C    D    E    F    G    H    X
mouseover a button to see that version

Remember, all these versions are built from a single image's sensor data, differing only in which generic mathematical adjustments are applied. There is no “painting” or other free-form image manipulation going on, as one might do in Photoshop or Paint Shop Pro.

I find the range of results to be just amazing. Which do you like best?

This is only the tip of the iceberg, even using only the “Basic” controls. For example, only three versions (“F”, “G”, “H”) adjust the basic white-balance, and none adjust the tint, which would result in all the more crazy results.

The “X” version is the result with Lightroom's settings at their default, which is fairly close to the JPG my camera would produce with its own settings at their default. Although this is the most “honest” version in the “straight from the camera” sense, it doesn't reflect reality well because the image is much darker than the scene actually appeared. The human eye has much more dynamic range than film or digital sensor (that it, it can distinguish detail throughout a much wider range of concurrent brightnesses), so while we could easily see the sand and island and all around, they look very dark in this “X” version because the camera adjusted the exposure based on the overpowering brightness of the sun.

(It's on my list to play with high dynamic range photography, as Madhu suggested the other day.)

Anyway, I caption version “D” as “Closer to Reality” because, well, the result is closer to what we actually saw that day.

Even more interesting/bizarre effects can be achieved with the “Split Toning” and “Color” controls. If you have Lightroom, Aperture, or another application that can process Nikon “NEF” files, feel free to download the original by right-clicking and selecting “save as” with this link: JEF_024582.NEF. If you come up with something interesting, post to your own blog and leave a comment here!

(I guess this post sort of qualifies to be among my photography tech posts.)