Strange Ideas in Grammar

I don't know whether there are any natural languages that do these things, but my brain just comes up with this stuff...

What if there were a language with both prepositions and postpositions? Would certain words always be prepositions, and others always be postpositions? Would some words be able to function as either? If so, what would determine when it could be used each way? Would a given word have a different range of meaning as a postposition from what it would have as a preposition? Perhaps the surrounding grammar would determine the word order. Perhaps prepositional phrases would function as nouns or adjectives, but postpositional phrases would function in other ways (e.g., adverbially). Or perhaps some other factor would determine the word order. Maybe prepositions would introduce their phrases when the speaker is happy or content, but follow their objects in postpositional fashion when the speaker is angry, sad, or nervous. Or maybe postpositions would be more formal and polite than prepositions. Or vice versa.

Then there's case. Natural languages have a fair variety of different case systems. Some languages, like English, barely even HAVE a case morphology, because everything is determined by word order. Greek is practically the opposite: word order has pretty much nothing to do with case, so it's all determined at the individual word level by case endings. In Greek, case is determined pretty much just by function: direct objects are in the accusative, for instance, irrespective of the rest of the structure of the sentence. There are exceptions to that simple rule, of course. Certain Greek verbs, for instance, take what we think of as their direct object in the dative case. Still, though, it's the role of the noun as the verb's object that is determining its case, and that selection doesn't change to accommodate other aspects of the grammar of the sentence. I think I would say the same of ergative-absolutive systems: even if the subjective case varies depending on the transitivity of the verb, it is still the role of the noun as subject of a given verb that drives its case selection, so while it's more complex than a straightforward subjective/objective case system, it is guided by the same basic principle. However, what if there were languages that determined a noun's case by not just its role in the sentence but also other factors? What if the mood of verb, for instance, determined case roles, so that e.g. in a subjunctive clause the subject were in the case that would be used for the indirect object in an indicative clause? Or what if a combination of case and word order determined function, so that if the first major noun in a sentence were the subject it would be in a certain case, but if the second noun were the subject it would be in a different case? (There could be whole systems of word-order/case patterns, so that SVO sentences would, say, put the subject in the A case and the direct object in the B case, but OVS sentences would put the direct object in the B case and the subject in the D case. This sort of thing could even be combined with mood-driven case selection as above...)

And what if there were a language with an extremely small number of verbs, perhaps just one (a linking verb, presumably), with actions specified periphrastically using other grammatical constructs, such as adjectives? I can just imagine the kinds of sentences you could get... Instead of saying that someone ran, you would say they were fast. Instead of saying that Bob gave Mary a box of chocolates, you would say that Bob was generous and then there was a box of chocolates in Mary's hands. Replacing verbs that carry more meaning would require more acrobatics, but I'm convinced it would be possible to say just about anything in such a language, with sufficient noun and adjective vocabulary, once you got used to it.

Book Review: A Thousand Splendid Suns

First off, let me preface this review by saying that this is pretty far removed from the kind of book I normally read. It's basically Romantic (in the older sense of that term) fiction. However, the setting sort of reached out and grabbed me: the book is set in the historical twentieth-century third world. When I discovered that the public library had it on audio, I went ahead and checked it out.

As historical fiction, however, I found the book disappointing. The book jacket information raves that "personal lives are inextricable from the history playing out around them", but I find this to be less than altogether true, as the main characters are two very reclusive women. During the bulk of the story they almost never leave the house and so have almost no opportunity to directly observe anything going on outside its walls. The history is reported almost entirely through the men in the story, who are really side characters, and through intermittent narration largely irrelevant to the story. We hear about the Soviets through Laila's father, and about the Mujahideen and the Taliban through Rasheed, a man so distant (and poorly detailed) that he is himself almost a part of the setting rather than a character. There are two notable times that the history really has a direct impact. One is when a stray rocket serves as a plot device to keep Laila from leaving the city with her family. Historical fiction is not a genre that I've read extensively, but in what I have read of it, the history was much more integrated into the story than this. (The other instance, admittedly, is better writing, if a bit macabre: the hospital conditions for the delivery of Laila's second child.)

The two main characters are developed thoroughly and well. They are multi-faceted, dynamic, interesting, and reasonably realistic, and the reader can identify with them and feel sympathy for them. Most of the other characters, however, are relatively underdeveloped: flat, largely uninteresting, and in many cases static. The story suffers for this, particularly from the poor development of Rasheed. Here we have a major character, around whom the plot is wrapped like a glove, so that virtually everything that happens to the other major characters is a result of some action on his part, and yet he is so poorly developed, so distant, that I found myself completely unable to identify with him at all, unable to care at all what happened to him (for good or ill). The parents of the four women all also have important roles in the early part of the book, but of the four, only Jalil has more than one facet of his personality explored in any depth. Later, Aziza is a fairly important character, or could be, but we know almost nothing about her.

The plot writing is, in my estimation, better than the characters. Although it is predictable and even obvious at times, there are a number of unexpected turns. Most of these turns are created by actions taken by Rasheed, not by the "history playing out"; nonetheless the story has a satisfying complexity and completeness. This had to be difficult to achieve, with characters who spend nearly all of their time at home, but the author manages it surprisingly well.

Windows 7 timeline updates

There have been some significant developments apropos the Windows Blackcomb/Vienna/7 development timeline, which I've discussed in the comments there.

MT Tech Rally

Yesterday I attended a Tech Rally in Mansfield, hosted by a local reseller-and-servicer business there with the word "typewriter" in its name (or, at least, that's what it used to stand for).

The Sophos presentation on network security was a real eye-opener for me. A lot of what the guy said made sense, on some level, but he was talking mostly about kinds of networking we don't even have at the library. In particular, the whole mindset of the talk was deep in Microsoft think. When he spoke of not allowing a system "onto the network" if it doesn't meet your requirements (e.g., for having certain antivirus software installed), I'm pretty sure he was actually thinking mostly in terms of not allowing it to access certain services on the network, e.g., application servers. There were also a lot of highly-Microsoft-centric things that were fairly central to his talk, not least Active Directory. (As an administrator of OS-agnostic/heterogenous TCP/IP-style networks, I only just barely know what AD even *is*. It's not really relevant to any kind of computer network I've ever worked with.)

This doesn't make everything he said invalid, it only makes it irrelevant to me, at this time. (If I'd known that was the kind of network he was going to be talking about, I wouldn't have attended the talk, but it was just labelled "Network Security", and I work with network security (I write firewall rulesets, for instance), so how was I to know?)

I did catch the presenter in one mistake, which he made presumably because he is thinking at a higher level (specifically, at the application layer on the OSI model) and mostly looking past or ignoring the details on lower layers (notably the data link and network layers). The specific mistake he made (which I swear on Dave Barry's life that I'm not making up) was in speaking of DHCP as an enforcement mechanism. As anyone who understands TCP/IP at even a basic level can tell you, it fundamentally isn't that. (DHCP is a convenience mechanism; it doesn't enforce squat.) If the system doesn't meet your requirements, he was saying, then the DHCP server can hand it a 32-bit subnet mask, and so then it "can't go anywhere" on the network.

Yeah, he really said that. The reader may now laugh heartily at the prospect of an attacker that does not know how to change the TCP/IP settings on his computer. What kind of threat are we protecting against here? Great Aunt Mildred? Dilbert's boss?

However, he also talked about other enforcement mechanisms, including access control lists, among other things. To fully evaluate the correctness of his talk I'd have to know more about things like LDAP and NT's non-DNS "domain"-based networking, but I didn't get the impression that it was all bogus like the DHCP thing. On the whole the talk seemed coherent and mostly sane. Not that any network administrator should ever swallow anything said by any security vendor without a large helping of salt, mind you.

I also got to see one of the Microsoft "across America" vehicles (sort of like a converted bookmobile or mobile home with a lot of computer hardware crammed inside). On feature, of course, was Vista, which I got to see up close and personal for the first time. (Previously I'd seen screenshots on the web and a couple of short promo videos.) The demo guy (whose name I didn't catch) did a really nice job and seemed to be pretty well informed.

First, I want to say that the Aero Glass visual enhancements are quite slick. As someone who generally sets XP systems to the Classic look because it's just less goofy and dumb-looking than the default appearance in XP, I must say I'm pleased this time.

Some of the improvements to the Start menu in Vista also appear to be quite worthwhile. Expanding folders vertically (right into the list, albeit with an indent, sort of like in the left pane of the Explorer view in the Windows Explorer file manager) rather than horizontally seems like it will overall be an improvement (less mouse movement is required, for one thing), and the Start Search appeared to be really slick. I don't know what kind of hardware they were running it on, but it did perform really well. Impressively well, compared with XP on any hardware I've ever seen it on. These are small things, but it's often the small things that determine the quality of the user's experience. I am optimistic now about Vista being a real improvement over XP.

Not that I'm going to rush to deploy it right away, mind you. I'd like to hold out for SP1 if possible, or at least wait until next year when it's been out for a while and the first round of post-release bugs found and fixed. Nonetheless, I'm now kind of looking forward to it.

Lastly, I want to talk about the panel applets. (Microsoft has another name for them, which I forget at the moment, but I'm talking about the little applications that run embedded in that panel on, by default, the right side of the screen, updating the display in realtime.) As I predicted, it *is* more than just a fancier clock: it's a real panel-applet capability, or at least the beginnings of one, and thus a major step forward for Microsoft. I asked specifically about biff, and the demo guy confirmed that yes, there is one. Although he specifically used the word "Outlook" (which suggests to me that it may be specific to that (highly undesirable) mailreader, rather than doing POP3 or IMAP checks itself), it is nonetheless a good beginning. That's one of the major things people use panel applets for, so it's important that Microsoft thought to include it. It means they're thinking in the right directions. Also there was a system monitor of sorts (showing CPU usage and a couple of other things; gkrellm it is not, but for a ships-with-the-OS component it is a worthwhile inclusion) and something that looked like it might have been an RSS reader, though I don't actually know where it was getting its data. I didn't ask about the availability of third-party ones, but I imagine they will appear in time.

The bad news is that these panel applets cannot be placed on the regular panel (the taskbar in Windows parlance), only on the special panel dedicated to them. I asked specifically about this and the demo guy confirmed my suspicion. I didn't get a chance to find out how resizeable it is. Nonetheless, it's a beginning, and a good one. Hopefully now that it's a core feature of the Windows UI it will see improvements in future releases.

Vienna Timeline Update

An MS exec has announced that the next version of Windows will be "fundamentally redesigned" to take better advantage of multi-core processors. I discuss this further in my Windows Vienna Development Timeline thread.

Turning the Users Loose

You never find all the bugs in anything until you turn real users loose on it.

Yesterday at work, while the library was closed, I made the changes to our network infrastructure that have been in the planning and testing stages for several months now. Instead of one firewall protecting our network from the outside world and the subnets from one another, we now have two firewalls: an outer firewall that protects the whole network from the outside world, and an inner firewall that protects mission-critical systems from the rest of the local network. At both points there is no ethernet path past the firewall, so the isolation is at the physical level, and the only stuff that goes through is what the firewall expressly forwards.

I tested everything I could think of to test, of course. My testing checklist, which I spent weeks compiling, was a full page, and many of the lines read along the lines of "Test foo, bar, and baz on all of the staff workstations". I tested ICMP echo. I tested ssh. I tested the web. I tested the ability to access our web catalog. I tested the ability to access our cgi server, and whether each of several internal databases thereon automatically authenticate the user by IP address (which they *are* supposed to do for staff workstations, and *not* for anything else). I tested ftp. I tested the ability to print, to each printer. I tested all of that on each and every computer in the building.

But I forgot to test encrypted websites (https). Naturally, this morning at 9:30 (we open at 9), about five users discovered this oversight at more or less the same time (within the space of a couple of minutes).

I had to actually go in to find out what was wrong, because my coworker who was describing the problem to me on the phone was too flustered (what with several people hounding her about it at once and everything, and not being very technically inclined anyhow) to explain it very well.

So all the way there I was thinking that the internet was completely not working, and I'm like, but I *tested* that right before I left. I tested *every* computer. They could all access the internet last night...

When I got there, of course, I walked over to a patron, who promptly explained that she could access Yahoo mail, but when she tried to "do anything" (which she demonstrates by clicking a "log in" button), ... Ah, yes. I did indeed forget to test any encrypted sites. (I even tested sites that have you log in, but the ones I tested were low-security sites where the only thing at stake would be a little public profile information, so they didn't bother with SSL...)

Sure enough, port 443, although I had intended for it to be forwarded, wasn't. Well, it was from some parts of the network, but not from the patron subnet. Oops. Fixing it, once I figured out what the problem was, was a simple matter.

You never find all the bugs until you deploy.

No, Your Child is Not at the Library

Earth to parents:

No. If you have to call the library and ask if your child is here, the answer is no. I know your child probably told you he'd be at the library, but what that really means is he didn't want to tell you where he was going to be, either because he hadn't decided yet, or because he just doesn't want you to know. This is true for children of all ages, but of course it goes double for teenagers. The library is the number one leading lie American children tell their parents about where they are going to be. This was true even before the Spiderman movie a couple of years ago gave the idea to the other 7% of kids who hadn't already come up with it on their own or picked it up from a friend.

Almost all kids who come to the library come with their parents. If you aren't here, then your kids almost certainly aren't here either.

Yes, we do have kids in the library all the time who are not accompanied by their parents, but it's the same two or three dozen kids all the time. (Some of them are here almost as much as they're in school.) If your child were one of them, you would know.

Let me reiterate that: if your child were one of the ones who comes to the library, you would know. If you have to ask, then he's not here. Please stop calling the library and asking if your child is here. Your child is not here.

Most Abused Scripture Passages: Ephesians 5

I have for some time intended to document my frustration with the carelessness and disregard with which some people treat the scriptures and, in particular, certain famous passages. In his Mother's Day sermon, Pastor Simpson used Ephesians 5. He handled it correctly (our church is fortunate), but I was reminded of some of the ways I've seen the passage handled in the past, and of my intention to write about this subject.

Marriage too has been on my mind of late, primarily since this May-July this year see me attending three wedding ceremonies in as many months (which is rather unusually many for me).

Note first of all that this passage (and the entire book of Ephesians, really) is primarily talking about the church. The passage certainly does speak to marriage, but people who ignore the larger context often get confused about what it says about marriage. The worst offenders quote just verses 22-24:

Wives, submit to your husbands as to the Lord. For the husband is the head of the wife as Christ is the head of the church, his body, of which he is the Savior. Now as the church submits to Christ, so also wives should submit to their husbands in everything.

These three verses, out of context, have been used to prooftext all manner of dire heresy. I will not dignify most of it with specific responses, except to say that anyone who quotes just these three verses in isolation from the rest of the context is invariably up to no good.

The bare minimum you can quote at one go and have a reasonable chance of doing the passage anything resembling justice is verses 21-33:
Submit to one another out of reverence for Christ. Wives, submit to your husbands as to the Lord. For the husband is the head of the wife as Christ is the head of the church, his body, of which he is the Savior. Now as the church submits to Christ, so also wives should submit to their husbands in everything. Husbands, love your wives, just as Christ loved the church and gave himself up for her to make her holy, cleansing her by the washing with water through the word, and to present her to himself as a radiant church, without stain or wrinkle or any other blemish, but holy and blameless. In this same way, husbands ought to love their wives as their own bodies. He who loves his wife loves himself. After all, no one ever hated his own body, but he feeds and cares for it, just as Christ does the church— for we are members of his body. "For this reason a man will leave his father and mother and be united to his wife, and the two will become one flesh." This is a profound mystery—but I am talking about Christ and the church. However, each one of you also must love his wife as he loves himself, and the wife must respect her husband.

You can see there the mutual nature of the relationship. It's not entirely symetrical, but it is very much cooperative on both sides. And yes, I have looked at verse 21 in the Greek, and it says the same thing as the English translation I quoted. If there is a word there that someone could reasonably take issue with it is "reverence", which could also be rendered "fear". Doing a detailed study on fearing the Lord would take us far off track, and in any case it would not change the basic meaning of this passage. People have been known to take issue with the word "submit", but again any wording that can reasonably be chosen (e.g., place yourselves under one another) would not change the basic meaning of this passage. "One another" is the part of this verse that we cannot get around, and it is borne out in any case by the verses that follow.

Now with that said, the wording and emphasis are quite different on the two sides of the relationship, because the man fills one role in the family and the woman another. And it is true that the man is to be the head of the household (and this is even more clear in other passages). Yet the relationship is very much reciprocal in nature, and if a man is treating his wife as some kind of servant or lesser partner, he is absolutely missing the mark.

It is worth mentioning too that the very closeness of relationship herein implied is fundamentally alien to popular culture's concept of marriage, wherein a much greater separation and individuality is retained.

But we still have not touched upon the main point of the passage. Paul explicitely states in verse 32 what should be obvious to anyone who has been paying attention to the general flow of the whole letter: he is talking about the church. A proper treatment of this passage really should look at 5:21 — 6:9 as a unit. 5:21, in particular, is a concise statement of the whole passage, which is expanded then in three main parts: 5:22-33 (wives and husbands), 6:1-4 (children and parents), and 6:5-9 (slaves and masters) — all of which is talking primarily about proper relationships among believers within the church, and all of which also ties back into what was said in chapter 4.

So if you see a man use Ephesians 5:22 as an excuse to live his live selfishly, making decisions without consulting with his wife, expecting her to work a side job in addition to doing all the cooking and laundry and whatnot while he sits in a chair, and generally treating her badly, tell him to go back and read it again.

Wow, it feels good to vent. There are plenty of other frequently abused passages in scripture. Perhaps I should write up a few more in the coming months.

Scripture taken from the HOLY BIBLE, NEW INTERNATIONAL VERSION®. Copyright © 1973, 1978, 1984 International Bible Society. Used by permission of Zondervan. All rights reserved. The "NIV" and "New International Version" trademarks are registered in the United States Patent and Trademark Office by International Bible Society. Use of either trademark requires the permission of International Bible Society.

Lightening and Brightening: Color-Safe Bleach for Digital Photographs

I recently mentioned the technique of using an unsharp mask to brighten a dark image, and someone asked me how "sharpening" can compensate for underexposure. This post is an attempt to explain. First, I should note up front that it's better to get a good clear photo in the first place. For the example, though, I have chosen one that is, in a word, not. The end result would be a bit better if the starting photo were a bit better, but using a really poor photo makes it easier to see what is going on, so for the sake of example, that's what I'm doing. This photo was taken using a cheap old consumer-grade digital camera. Here it is in mostly undoctored form:

I say mostly undoctored because I've cropped it. The curious can see more of the context here (this is part of the second photo there), but this much will do for the sake of explanation.

When a photo is terribly dark like this, the first thing most of us want to do (assuming we don't want to just throw it out) is lighten it up. There are various ways to do that, each with advantages and disadvantages (brightness/contrast, gamma correction, channel curves, ...) but the method I usually use in this kind of situation is the levels dialog box. (I'm using Gimp here, but other photo editors presumably have something similar.)

This photo was so underexposed, a significant band of values at the bright end was entirely unused in the original. So I brought the rightmost of the three sliders left to the point where the graph tapered off into nothing. Additionally, the darkest values are over-represented (note the giant spike on the left side of the graph), so I dragged the middle slider to the left a bit in an attempt to compensate. There is, however, a limit to how far you can go with this. After a little experimentation, these are the positions I ended up with:



The color is now rather dull, especially in the background. It was dark, and we've lightened it a bit, but lightening it too much more would wash it out. Instead, at this point I opted to use the unsharp mask filter. Again, I'm using Gimp, but other photo editors (well, ones serious enough to have filters) probably have something similar. Note that I ran the radius up to 50 pixels:



With a small radius (the default in Gimp is five pixels) the unsharp mask exaggerates changes in color across short distances, which helps blurry edges to seem sharper (though, technically, they aren't actually made sharper as such). With a larger radius like this, though, the changes in color are measured, and exaggerated, over larger distances. Rather than picking out edges, this picks out whole areas of the photo and makes them seem more distinct from one another. This has an overall brightening effect, making the colors seem bolder. Again, it can be overdone, but this image really needed it. Look at the difference in the woodwork around the windows from the image above to the one below. The snowflake also now looks white instead of dingy gray.


Finally, this image, in addition to being dark, was also rather grainy. Fortunately, it was taken at a larger resolution than I needed for the web, so I was able to solve this problem simply by scaling it down to a factor of its original size. Note the use of the cubic interpolation: chintzier scaling algorithms like nearest neighbor are not recommended, as they can actually exacerbate image quality problems. Here is my result:



It's still not the best photo ever, but if you scroll back up and look at the original again, you will notice how much worse it was. This really is an improvement. Of course, starting with a better photo initially will yield better results.