A few photos of Sen. Obama, leaving the Benson Hotel on his way to today's campaign appearance in Portland.
Naturally this was the one day I didn't bring my good camera along. I think I'd make a really poor paparazzo.
In any case, here are the rest of the photos:
Just got back from a much-needed vacation, which explains a.) the lack of new posts here over the last two weeks, and b.) this post full of vacation photos.
These were taken in a small garden near the Custom House Plaza in Monterey, CA. The full photoset is here, if you're interested. Or whatever.
A few photos of the railroad bridge in St. Johns. The bridge is officially known as "Burlington Northern Railroad Bridge 5.1", the 5.1 being the distance in miles from Union Station. I've always liked this bridge, first because it's so obscure, and secondly because it just looks cool, in a muscular, heavy-industrial sort of way. Just looking at it, you'd never guess the central lift span only dates to 1989. You'd just sort of expect anything build in 1989 to be all mauve and teal and loaded with silly postmodern crap, I mean, "pastiche", and it'd look as dated as parachute pants and big hair.
Anyway, I originally wanted to get closer to the bridge than this, but it's quite hard for mere mortals to get close to it on either side of the river. On the east bank there are, technically, roads down to the vicinity of the bridge, but there are also signs informing you that the whole area is a federal Superfund site. I think it has something to do with creosote manufacturing, which sounds kind of icky to me. I imagine that even if you could get down there as a mere mortal, you might very well leave as something else entirely. Longtime Gentle Reader(s) of this blog have probably noticed how I often say I really go to the mat for you guys, and I think I do on occasion, but I do draw a line at "Superfund". This post on Sprol names the old McCormick & Baxter site as one of the "Worst Places in the World", and talks about what's down there. More at Portland Public Art, believe it or not, since apparently there's some interesting graffiti around the place.
There's been talk of eventually putting a city park on the site, if they can ever get it cleaned up to everyone's satisfaction. Which I think may be a big if. In any event, we'll probably end up with luxury condo towers instead, since that's what always seems to happen.
So I have an idea about the bridge that I've been batting around, and I thought I'd toss it out in case anyone with power and influence happens to read this. A few years ago when the city revamped the Eastside Esplanade across from downtown, they added a pedestrian/bike path to the lower deck of the Steel Bridge, next to but completely separate from the railroad tracks. It might be a good idea to do the same with Bridge 5.1 here. We're forever hearing about how dangerous the St. Johns Bridge is for cyclists, and I'm sure that's true. I once knew a guy whose bike hit some bad pavement on the St. Johns, causing him to crash and break his arm in three places. And it would've been much worse if the semi behind him hadn't swerved out of the way just in time. We're told there's nowhere to put separate bike lanes on the St. Johns, and again, I'm sure that's true. The lanes are narrow as it is, and I don't see how you could safely narrow them any further. What's more, the St. Johns is the only game in town right now if you live up in that part of town and need to cross the river. So wouldn't it make sense to have a safer alternative in place? I'm not a civil engineer, so someone else would have to figure out whether a walk/bikeway is even possible with this bridge, much less how much it'd cost. I'm just saying it sounds like a good idea. Hint, hint.
So at the office I just (sorta) wrapped up a Linux coding project that's been sucking up most of my available cycles for a while now. And fresh of that, I've been tasked with tweaking a different app to make it play nice with Vista. Understand that 90% of my coworkers are Java & web folks who know zilch about underlying operating systems, and I wear both the Unix and Win32 guru hats in these parts. Which is good, most of the time. It certainly makes for great job security.
It's even convenient to start on Vista now because I just got a shiny new Core 2 Duo box, which may be just barely fast enough to run Vista halfway decently. But there's a problem. Corporate IS has decreed that Vista is Verboten companywide. I can't blame them, of course, and I think I actually crowed about that policy here once upon a time, but now it's becoming a problem. The official line is that I *can* install it on my new box, but if I do I can't connect it to the network. I may have to go to IS in the near future, hat in hand, and beg them to bend the rules just this once on my behalf. For stupid freakin' Vista, of all things.
[ I've used Vista exactly once before, while trying to fix my mother's fancy new HP touchscreen machine. Ten minutes of that, and I concluded that Vista is evil and everything about it is wrong. But mom likes it because of the flashy graphics. When I told her my home is Windows-free, she looked at me like I was from Neptune. But at least I fixed the problem, which turned out to be the lack of a USB cable between the computer and the printer. :) ]
So, as you might be aware, I'm stuck with Vista, and every day it sucks worse than the day before. Today I came in to the office and noticed Firefox had gone haywire, in a way I haven't seen it do on any other OS. Somehow it had picked up a memory leak, and was using 1.4GB memory and 50% cpu. Or at least that's what Vista said it was doing. Possibly this is a genuine problem in FF, but it's also possible a certain predatory OS+browser monopolist is messing about with a certain competing browser. It's happened before, and nothing would surprise me at this point.
But that's not the really cheesy part. I went ahead and killed FF, and Vista -- the OS with the fancy gee-whiz graphics and all -- can't seem to figure out that I no longer require a grey outline of where my FF window used to be. It's not just an artifact of lazy screen drawing or anything; it redraws over top of all other windows. You move something around, and the big grey outline is still there. I thought they'd sorted out this crap back around Windows 2.11 or so, but apparently not.
"Fortunately", Windows Update has downloaded the latest set of critical bug fixes and security patches and such, and every few minutes it pesters me to reboot. So reboot I shall.
Stupid Vista.
Ah, the weird, wonderful world of Windows filesystem oddities. As I've mentioned before, I'm currently in the midst of tweaking an existing Windows app so it runs properly on Vista, so I've been forced to remember a bunch of ugly details I'd happily paged out.
A few of my favorites, just off the top of my head:
- If you want to know the access & write times on a file, the value you see depends on how you ask. My theory is that Windows flushes metadata updates to disk on a very lazy, periodic basis, although I don't believe they've ever documented this. GetFileTimes() appears to return the in-memory values, in the disk cache or somewhere, while FindFirstFile/FindNextFile always hits the disk and returns whatever's there. I've seen the two out of sync by up to an hour at times. Naturally there's an obscure registry setting that lets you turn off updating of file access times entirely, and this seems to be the default on Vista. Although again, this is completely undocumented.
- Filenames are not case sensitive, except when they are. There are several ways to get two files in a directory whose names differ only by case: Unix drives shared via Samba, or files created under Services for Unix, or files created with plain old CreateFile() with the FILE_FLAG_POSIX_SEMANTICS option (although the latter doesn't work by default on XP & later). Explorer gets deeply confused when you try to open one of these, and opens whichever comes first alphabetically (I think), regardless of which one you actually clicked on.
- Paths are limited to MAX_PATH (260) characters, except when they aren't. 260 characters too restrictive? Just prepend "\\?\" to your path and away you go, up to around 32000 chars. Except that nearly all Windows apps don't know about this trick either, so you can create directory trees that almost nobody can see into. To be fair, you can do something similar on Unix too. It's easy to write a little program that creates a directory with a long name, chdir's into it, creates a subdirectory with a long name, chdir's into it, and so forth, and do a getcwd() at each iteration. Eventually getcwd() starts failing, but the OS is quite happy to go on creating subdirs for you until you fill up the disk.
- The registry has a different trick for creating keys nobody can see into. The underlying (and little-known) Native API refers to object names with counted strings, not null-terminated ones, so you're free to use embedded null characters in the names of things. Well, some things. I don't think NTFS accepts null chars in names, at least. But the registry's just fine with it. The regular Win32 API everyone uses *does* use null-terminated names, though, so if you create a key with an embedded null in the name, there is simply no way to open it with RegOpenKeyEx(), because its name is basically "unspeakable" as far as Win32 is concerned. MS actually used this trick to secure sensitive bits of the registry, like parts of the local SAM db. Which works great so long as nobody learns the trick. Security through obscurity...
- Vista introduced a new twist on "unspeakable" registry names. There's a new function called RegLoadAppKey(), which promises to give your app its own private chunk of registry nobody else can see. And it's true, you get a bit of registry that can't be located with HKEY_LOCAL_MACHINE, HKEY_USERS, or any of the other predefined keys.
A bit of background is in order here. The NT kernel uses a different path scheme than what people are used to seeing in Regedit, or Explorer for that matter, and the names of things you encounter are not their *true* names. HKEY_LOCAL_MACHINE is really \Registry\Machine, HKEY_USERS is \Registry\Users, C:\ is usually something like \Device\Harddisk0\Partition1, and so forth. I rather like this unified namespace, actually, as it makes things feel just a little more Unix-like. So of course it's completely invisible to end users, with occasional exceptions such as registry audit events.
So the new trick from Redmond is to mount "private" registry hives under \Registry\A\{GUID}, where GUID is newly assigned each time a hive is mounted. Once you know where to look, "private" isn't quite so private anymore. Still, Regedit and other apps using Win32 functions can't see this stuff, so I expect it's only a matter of time before the spyware crowd starts exploiting this "feature".- Vista now offers symlinks, which are not the same thing as hardlinks, or directory junctions, or shortcuts. Symlinks are implemented as "reparse points", and the symlink data is stored as an alternate data stream. Directory junctions are "reparse points" too. Actually there are at least seven different kinds of reparse point, and counting, and there's a complex API that lets you define your own types too, like you'd really want to do that. Hardlinks are a low-level NTFS feature that's been around since the beginning, although poorly supported until recently. Shortcuts are a higher-level feature, belonging to the UI part of the OS, and are implemented with COM.