April 21st, 2005


Windows Wide Open

I found another bug in the markup code for POUND. It's not worth figuring out its exact nature and fixing it though, because that entire module is ugly and can be done a lot better. I'll probably rewrite it this weekend. There are a lot of ways to write parsers, programming-wise -- there's the Right Way, which is bulletproof, but stops you from doing some tricks and is hard to understand until you warp your mind into the right place to understand the parse tree. I don't like writing formal grammars, so I generally try to avoid that, and do one of the Hackish Ways, using a number of regular expressions to progressively mutate the source stream into the target document, perhaps storing some state along the way. Sometimes it's slower, sometimes it's faster, than using a grammar. Regular expressions are too hard to use casually in C, so if I were back in the stone ages, I'd probably write a grammar (or, shudder, use the primitive string operators to do it).

As a snippet of random wisdom I just dispensed to a friend on AIM, it's a very bad idea to read/write text files from a CGI/ASP/Servlet/etc, for many reasons. It's easy to have multiple instances of your code overwrite each others data, and even if you make it session independent, if the user opens multiple tabs, they will be hosed. It's bad for performance as well. Using a database is a much better idea -- you get transactions, atomicity, and retrieve exactly and only what you need. Of course, performance can still suck, but if the text file is of any size, usually less than parsing text.

One thing I've been disappointed to find is that with a number of disks I've been buying recently for work, if I do a looong, read-write-test format on them (takes about 24 hours), almost all of them show some bad sectors somewhere on the disk. A lot of companies that make laptops say that they won't replace a LCD that has a few dead pixels -- the error rate is too high, and so only if you have a line or a region that's bad will they replace it under warranty terms. Are modern hard drives the same way? Suckage! It's especially bad seeing that most people, as far as I can tell, don't do these very long hardware tests before putting equipment into use.

Last night, the Zets watched Ice Pirates, a really really bad movie. The film was like a MST3k version of Star Wars (itself a pretty poor series, but nothing like Ice Pirates). In a world where there are guns, lasers, and the like, apparently they thought that having a number of people having swords and wearing chain mail would make sense. There are also clumsy robots that use kung foo, giant space herpes straight out of Alien, knights, and castrated, lobotomized servants that wear silver spandex suits. In a way, it's like a number of films from the 80s collided to make this one that fits together less well than the worst of the buildings on CMU campus. We actually only made it halfway through before three people fell asleep, two of them having just gotten engaged to each other. Mazel Tov to them!

Justin heads back home tonight -- I'm hoping I get a chance to take him to India Garden before he goes. So far, Debb, who I'm on speaking terms again with, has not shown up to do any visiting. Hopefully that'll still happen. Frustratingly, I haven't heard anything on Qatar yet -- I'm actually rather keen to go after having chewed on it.

Regardless of whether Qatar happens, I am beginning to think that having someplace to live outside the United States, just in case, would be a good idea. The United States has been an active source of damage to the world for awhile, exporting bad laws, dumb ideas (abstinence-only sex-ed), and bad companies. The current waves are also making us eat our own dogfood, and I don't like the taste of that very much. A lot of people are upset with BushJr, even conservative folk, for the speed at which he is moving things, but I think they're fine with the direction things are going. I would hope that eventually we would begin to approach the Netherlands in our level of cultural development, but we are perhaps going the other way. If, right now, I were given citizenship in some western/central European country and a nice (ideally university) job over there, I would probably go. I'd be happy to (re)learn German or learn Dutch or French or one of the other languages.


It's all in the Sleeves

Sometimes we're told things in confidence, and unless we decide that it's more importantto protect other interests, we can't talk about them outside that context, or at least must censor ourselves. It might be nice if we could avoid those situations, but part of interpersonal ties, and getting close to people, is sharing these private bits of information. Ironically, we love truth, but can't share it freely with society - we love it so much we don't use it except with those we trust. This is deep, but for purposes here, let's just note that one can't avoid being told secrets, and avoiding them keeps us distant from a lot of people. In fact, investing one's secrets with someone one trusts feels good. I probably have fewer secrets than most -- I'm willing to post quite a lot of things on my BLOG here that I wouldn't talk about in public, although it's a bit strange sometimes when some people read them and want to talk to me about them (which is why, to members of my family, if you're going to read my BLOG, I'd prefer you not comment to me about things you see - I'm more ok with friends commenting than family, oddly). If anyone were to dig through my entire blog, they'd find out a lot of things about me that they probably wouldn't learn from just knowing me (although they'd probably eventually learn close to all of it plus just about everything else by dating me). Bottom line is, while secrets are a sign of safeness and comfort between people, that's a side of human nature I don't particularly like. I further think it's part of my philosophical ideal to live life more openly than others.

Meandering slowly back to one of the points I'm making, I have a pretty active role for my conception of justice in my life, and ended up giving the name of a person who did a wrong said person has a propensity to do frequently. I did it for the good of the wronged, but the source of my information was actually private. I'm not sure if I knew so when I made available the information or not, and it has been pointed out to me, so I removed said information. It bothers me that said person is free to continue unimpeded along the path they are, but so it goes. In many ways, they're the antithesis of me. It would take considerably more to cause me to breach confidentiality, so I guess they get the green light. I think this illustrates in some ways what exactly I got from Stanley Fish's book, The Trouble with Principle -- I've come to accept his notion that nonliberal means must occasionally be used to protect a liberal society, because it's the society that's important, not as much the means (I want to read some of Pim Fortuyn's books on the topic, but unfortunately, they don't appear to have been translated from Dutch). I disagree with him though that we should feel free to avoid an attempt to have virtuous relations with the nonvirtuous. To me, virtue is something we strive for both for its affect on society and on us. Far from the trivial examples in his book, I think something must at least, by my value system, be an ethical value, if not a moral value, for us to weigh it against many of the particulars of my ideas of virtuous interaction.

And, of course, to the pleagiver, it doesn't matter to me if you really hate me or not, given what you did. Until/unless you were to take steps to fix yourself and what you did, it's uninteresting to me.

A question for my readers -- what kind of secrets do you have about yourself that would be the most damaging to you if revealed? Do you think that BLOGs are causing society to open up more? Do you ever feel bound by privileged information? When would you breach a confidence? If you had one friend tell you that they were betraying another friend of yours, in confidence, what would you do? What if the betrayed were a stranger? What's the difference?

In other words...

China is making a number of rather interesting moves in international relations, given the current climate of shifting meanings. As you may have read, the United Nations, partly because of Kofi Annan's political weakness, is talking about expanding the security council, opening a hornet's nest. China, one of the current members, is courting Germany in its bid to be included. Meanwhile, Brazil and a number of other South American countries are hoping to have their country represented and fight amongst themselves for admission. The United States could not be more delighted at this turn of events, as the United Nations made visible that the US is standing alone in its recent agressions, and things that make the UN look unstable and broken are thus a win. China is also courting a number of other players in order to maintain support as it ramps up its rhetoric against Taiwan. It's worrying. Of course, one stupid thing that could happen would be for the security council to grow to the point where it either is the size of the United Nations itself, or for it to grow to the point where membership in it becomes part of a bitter rivalry. I believe its original role, more or less, was to give special representativeness to the countries where the security of world civilization would be threatened were they not to be pleased. If it's moving another direction, I wonder what its new role is to be.