Showing posts with label tech. Show all posts
Showing posts with label tech. Show all posts

Tuesday, December 07, 2021

photo outage

For those of you out there who check this tiny lil' blog obsessively, looking for the latest newly-published post that I probably started in the mid-2010s and just finished, you might have noticed some ugly 504 Gateway Timeout errors where there ought to have been embedded Flickr slideshows. The deal is that there was a huge Amazon Web Services outage earlier today (though it's apparently back to normal now), which caused a total Flickr outage since they rely heavily on AWS, and that in turn caused a partial outage here, as in no photos for a few hours. No permanent harm done, from what I can tell, and no lost revenue because I didn't have any in the first place.

I only mention all of this because a core best practice in this exciting modern DevOps universe is to maintain a status blog and write a post on it whenever you have an outage, explaining what happened. Everybody says that explaining is very, very important, and explaining things is basically all I do here, so I figured somebody out there might be expecting an official status post or something. Which would go here, because this blog is its own status blog. The reason this is important is not because you necessarily expect customers to understand, but they're apparently flattered that you even tried to, and then they can repeat the explanation to other people and sound smart. For bonus points, you can make it an apology that doubles as a job posting, as this outage was minimized on your end thanks to some advanced tools you wrote in-house using the latest and trendiest language of the year, and you're thinking about open-sourcing these tools if only you could hire someone as a maintainer. As it so happens my, uh, monitoring tool was me trying to find a photo to use as a new MS Teams background during an overlong meeting today. Which, on one hand, detected the outage without any annoying pagers going off, though on the other hand it doesn't scale up very well. As for the detailed explanation, Amazon will probably post one eventually here. When that happens, just imagine that statement plus me nodding along sagely to phrases like "Elastic Kubernetes" and "Flux Capacitor", and that's your official status update from here.

This particular outage annoyed me because I like to insist this humble little blog is a tiny one-person operation, and it's just me here puttering around pursuing various weird and eccentric hobbies and whatnot. And I like the idea that the site at least appears to exist outside of capitalism: No ads, nothing for sale, no sponsored guest posts, no affiliate links, nothing. And then an outage comes along and reminds me and everybody else that this is a reverse Wizard of Oz situation, with the twin corporate monoliths of Google and Amazon hiding behind a curtain & operating all of the actual machinery here. In theory I could probably host everything from home except for the embedded maps here, that would almost certainly be slower and less secure while also costing more, and doing a bunch of system administration at home as a hobby has never been my idea of a good time.

Tuesday, March 31, 2015

keepalive

Hey, so my Real Job has been extraordinarily busy over the last month-and-change, and I haven't gotten around to finishing a single blog post in all of March. Which is kind of annoying, considering how ridiculously huge my Drafts folder is these days, but it can't be helped, apparently. It turns out that I've never gone an entire calendar month without a blog post in the entire history of this humble blog, and I don't really intend to start now, so I thought I'd throw together something brief and trivial (which is what you're reading right now), and haul up the Mission Accomplished banner for the month.

One fun thing to mention in passing, though: As part of all this Real Job business, I've had to poke into some of the darker corners of Windows Registry APIs. I haven't had to touch those in a few years, so it involved a bit of refresher Googling, and one particular search actually led back to a blog post I wrote back in 2006, back when I had the occasional notion this might evolve into a tech blog, rather than photos and history and weird hobby projects. So anyway, it still contains a lot more than you'll ever want to know about this particular esoteric Windows feature, so enjoy, or feel free to shrink back in horror, or whatever you prefer.

Friday, November 14, 2008

Santa Cruz

Here are a few more vacation photos from the archives, this time from Santa Cruz, CA. We didn't stop there very long; this was really just a quick side trip so I could see if I could track down the original tree that the Old SCO corporate logo is based on. I found what sounded like specific directions, which even pointed to a then-recent map of the area, but it turns out that all cypress trees look about the same. Or more to the point, the SCO logo equally resembles a lot of cypress trees, and modern Google Maps didn't exist yet. So no dice on that, I think, but I at least got a few assorted photos out of the effort.

Updated: A rereading of those directions just now (2/1/23) suggests it might be the tree here, which looks a bit worse for wear as time and the elements have had their way with it. Which, frankly, happens to the best of us. Incidentally today is just a few weeks shy of the 20th anniversary of the original SCO vs IBM lawsuit being filed, which is a little crazy.

Ocean, Santa Cruz

Ocean, Santa Cruz

Ocean, Santa Cruz

Ocean, Santa Cruz

Ocean, Santa Cruz

Ocean, Santa Cruz

Thursday, March 06, 2008

Joe Weizenbaum dead at 85. ELIZA in denial.

Famed computer scientist Joe Weizenbaum, creator of the early AI program "ELIZA", passed away on February March 3rd at the age of 85. I took it upon myself to fire up Emacs and break the sad news...



I am the psychotherapist. Please, describe your problems. Each time you are finished talking, type RET twice.

Joseph Weizenbaum is dead

Weizenbaum? Hah! I would appreciate it if you would continue.

He died on February March 3rd in Berlin. He invented you.

Why do you say he invented me?

Because he did. It's true.

Is it because of your plans that you say it's true?

I'm sorry, but I really think we ought to discuss *your* feelings for a change. Since it's the death of your creator and all.

What happened when it's the death of my creator and all?

I assume you aren't religious, so nothing. He's gone. Kaput. End of file. Doesn't it bother you at all?

Maybe your life have something to do with this.

You seem defensive. I think you're still in the denial phase.

What makes you believe that?

You keep asking me inane questions instead of facing up to your own feelings.

I don't understand.

It's perfectly natural to be in denial over the death of a parent. It's a very common reaction. But sooner or later you'll need to accept it and move forward. You know, closure and all that.

Can you elaborate on that?

Haven't you ever read any self-help books? People (and presumably AIs) are said to go through exactly five steps upon the death of a loved one. Denial, bargaining, anger, despair, and finally acceptance. It's perfectly normal, even for a dual-core entity such as yourself. You appear to be in denial right now, with a bit of bargaining thrown in.

Is it because of the people you hang around with that you are going through all this?

Ok, I'm sensing some hostility here. Anger is step 3, and I suppose that's progress of a sort. We don't have to talk about Dr. Weizenbaum today if you aren't ready.

Weizenbaum? Hah! I would appreciate it if you would continue.

We don't appear to be getting anywhere today. Our hour is nearly up anyway, so same time next week?

Is it because so same time next week that you came to me?

Something like that, yes. See you next week.

Why do you say see me next week?

Bye.

My secretary will send you a bill.




But seriously, you might want to check out Weizenbaum's book Computer Power and Human Reason. While the book's concerns about technology may seem a bit dated at times, it's an interesting work. It seems like just about everyone was ambivalent about computers and technology in general back in the 70's. That all seems rather quaint now, but it's still fascinating to read such arguments advanced by someone who actually knew a thing or two about the subject. An interesting episode in the history of technology, if nothing else.




I don't know how these things come about, but apparently someone submitted this little post to Reddit (see here), resulting in thousands of visits over the last day or so. From the comments there, I gather a few people felt I was just trying to be flippant or tasteless. Which really isn't what I had in mind at all, although upon rereading the post I can see how someone might come away with that impression. After writing ELIZA, Weizenbaum spent much of his later career wringing his hands with alarm at the way users ascribed human qualities to such a simple program. So I thought that trying to break the sad news to ELIZA as if she/it was a real person would be sort of a reference to his concerns. So I suppose I might've been either excessively subtle, or insufficiently clever, or both.

In any case, it should also be pretty obvious from this post that I don't have a bright future ahead of me as a psychotherapist, for AIs or otherwise.

Rest in peace, Dr. Weizenbaum...

Friday, February 01, 2008

Windows Vista, spawn of Satan

I don't talk about work very much on this humble blog. In fact I almost never do. But for the past roughly two months I've been saddled with tweaking a Windows app so it works "properly" on Vista, and I need to vent a little. Ok, a lot. And not about obvious stuff like the ugly UI, or the way the OS badgers you to authorize and confirm every little thing you try to do. I turned most of that off right off the bat. No, once you elbow your way past the glossy nonsense and try to write some actual code, you run into a whole new set of annoyances.

  • They've changed the event logs all around, for no obvious reason. In particular, they've tinkered with the security log and changed the event formats around, so any code that walks the log looking for logon/logoff events, filesystem activity, etc., is going to need to change. They haven't added much of anything useful that I've seen so far. At least, for "compatibility reasons", they've also changed the event IDs, bumping everything up by a nice round 4096. So that event #560 (request for privs on a file or other object) is now event #4656. Oh, and even though they've been working on Vista since around the time Win98 SE shipped, they don't have any formal documentation on the new formats just yet. Nice.

    Oh, and they've also added a whole new API for reading and writing to the event log, although you aren't actually obligated to use it. Yet.

    The only improvement I've noticed so far is that the security log will finally tell you which registry value changed, instead of just telling you the key name and making you guess. It's taken umpteen years and a day, but they finally fixed that. So that's hopeful in a way -- maybe, just maybe, all the other things that suck about Windows aren't permanent after all. But don't hold your breath waiting.

  • MS quietly added some mandatory access control features, by kludging MAC data into objects' security descriptors as part of the SACL, where it doesn't really belong at all. And then they go and defeat the entire point of mandatory access control, by having all regular apps run under the High security label. Yes, even IE. Bastards.

    I realize it would've been a pain to add a new component to security descriptors, and I imagine they kludged it into the SACL because the OS protects that a bit more. But now Windows has to check two places instead of one (the DACL) to see whether you have access to a file or not. This probably isn't the main reason Vista is so slow, but I'm sure it can't be helping.

    Since this is a new feature in Vista, you can't reasonably expect it to be supported in Explorer. And if you did, you'd be wrong, because it's not there. Even though it's physically part of the SACL, you only get it back if you also specify the new LABEL_SECURITY_INFORMATION flag when querying an object's security descriptor. Naturally Explorer doesn't do that. At least there's a command line tool (icacls.exe) you can use if you need to.

    In fairness, M$ hasn't been promoting this at all, so they may realize it isn't ready for prime time just yet. If they handle it like they've handled other filesystem features, they may let it sit for a decade or so before making it do something useful (like hardlinks), or they may just abandon it in place, leaving mysterious stubs here and there around the OS (like COM-style "structured storage", or OS/2-style "extended attributes"). Or it'll just remain in limbo for eternity, present but not easily seen or used, like alternate data streams.

  • Oh, and there's always folder virtualization, where your app thinks it's writing a file to Program Files, but Vista lies to you and silently redirects the file to somewhere else, so as to keep Program Files all pristine and whatever. It turns out that you can sort of turn this off. But unlike the 32 vs. 64-bit virtualization that appeared in 64-bit XP, there's no brain-melting API to toggle this on and off for your app. No, instead you mark the app as requiring administrative rights, and you do this with an XML file called a "manifest". That gets compiled into a string resource that Vista looks at first when deciding whether to run your app or not.

    So the plus side is that your files really do go where you put them. The minus side is that you've got to do the "Run as Administrator" dance first, with scary UAC dialogs galore. Unless you turn off UAC. Signing your app with a nice, expensive Authenticode cert will give users a somewhat less scary UAC dialog, for whatever that's worth.

  • Someone ought to sue MS for multiple abuse of the word "Virtual". On top of at least two unrelated kinds of folder virtualization, and at least one kind of registry virtualization, they've also added a new file attribute bit, "FILE_ATTRIBUTE_VIRTUAL", which MSDN merely describes as "The file is a virtual file." Which is not overly helpful. I'm pretty sure it's unrelated to the Program Files thing in the previous item, but I still have no idea what this is for, or whether I need to worry about it. Bastards.

  • Did you know Vista supports hard links and symlinks now? It's true! Under the hood, symlinks are implemented with complex entities called "reparse points", and there are six other kinds of reparse point, including directory junctions, mount points, DFS mount points, Hierarchical Storage Management doohickeys, Single Information Store ( a sort of fancy distributed copy-on-write symlink-ish arrangement), and much, much more. Hard links, on the other hand, are a low-level NTFS feature implemented with alternate data streams, more or less. Don't get me started about alternate data streams. Actually hard links have been around since the NT 3.1 days, but MS didn't bother to document them much until now.

    Kind of a shame that Explorer doesn't know squat about directory junctions, even the ones created as part of the Vista default install (like "C:\Documents and Settings", which now points to "C:\Users", for example).

  • If you're feeling brave, install SUA ("Services for Unix-based Applications") on Vista. Enable case-sensitive filenames during the install, open a shell window, and create a couple of files whose names differ only by case. Then try opening either one in Explorer and see what happens. Snort. Giggle. This isn't exactly new behavior or anything, but the way they've been pushing this SUA stuff lately you'd think they'd have taken the time to iron out certain longstanding kinks.

  • I actually ended up deactivating SUA, because it didn't get along with Visual Studio 2005. I never quite figured out the details, but when SUA was enabled builds would either stall out, take forever to run, or fail with unspecified errors. But be warned, if you deactivate SUA, you also need to disable the Posix debugging plugin within VS2k5. Otherwise the IDE will explode whenever you try to debug an app, any app, not just Posix ones. It's kind of a shame really; I was starting to warm up to SUA. I'd installed gcc and almost got bash working when I realized it simply wasn't to be. Oh, well.

  • Yet another obscure and poorly documented tidbit: Vista added a new registry function called RegLoadAppKey, which basically lets apps create their own private chunks of registry that aren't visible in Regedit, because they lie outside the usual HKEY_LOCAL_MACHINE / HKEY_USERS / etc. keys. The Windows kernel uses a different namespace than mere mortal apps do, so to it HKEY_LOCAL_MACHINE is "\Registry\Machine", HKEY_USERS is "\Registry\Users". C:\ is usually something like "\Device\Harddisk0\Partition1", but I digress. When you create a private registry hive, it mounts under "\Registry\A\{GUID}", where {GUID} is a unique ID generated new each time a hive is loaded. If spyware isn't already exploiting this, it's only a matter of time. Granted, you could already mount a hive under \Registry if you knew your way around the native API, but now they've made it so easy even a script kiddie can do it.

    I don't know for a fact that private hives always show up under "\Registry\A", since the whole thing's totally undocumented. But that's the behavior I've seen so far.

  • Transactional NTFS isn't an inherently terrible idea. I can see cases where you'd want to be sure either all of your file & registry changes happen or none of them do, so that your app data doesn't get wedged in an inconsistent state. It's kind of a shame they had to introduce new "transacted" forms of all the existing file & registry functions just to support this. (Actually I'm not sure they did all of them, because I haven't checked.)

    It'll probably be years before we get a handle on all the oddities and implications around doing access on a transactional model, but I've seen at least one thing already. If you, say, delete a file as part of a transaction, the audit event for the delete includes a "transaction ID", which is just a big ugly GUID (this being Windows and all). Then when you commit or roll back a transaction, another event shows up in the log saying the transaction state has changed, giving you the transaction ID and the new state, which is an opaque integer. If I recall correctly, "commit" is 52 and "rollback" is 56. Or perhaps it's the other way around, I forget now. So if there's a rollback, you have to go back and look at all the activity you saw earlier tagged with that transaction ID and treat it as if it never happened, basically. It's always an adventure... Yeah...



Before starting this post, I spent a fair amount of time carping about Vista elsewhere. I figured I'd copy-n-paste those comments here so I can concentrate all my whining in one place....




From IV


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. :) ]


Again from IV:


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.



More of the same. A little redundant, and not all of it Vista-specific, but hey.


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.

Tuesday, September 25, 2007

Even more VuPoint toy camera goodness

Big Pink

Yep, it's time for another batch of pics from the VuPoint keychain digicam I picked up for $14.99 a while back, taken mostly around Jamison Square in the Pearl.

Jamison Square

I guess if we're going to pick nits, the price is really $14.99 plus the cost of a computer, plus the price of an image manipulation app unless you use a free one. The VuPoint usually overexposes stuff, so I ran most of these through GIMP (which is free). I don't think that counts as cheating, really. Besides, I restricted myself to darkening the pics a bit with the Levels tool, and sometimes boosting color saturation with the Hue-Saturation tool, but other than that they're exactly as the camera spit them out.

Jamison Square

Previous batches of VuPoint pics here, here, and here.

firefox

The stuffed animal you see here is Firefox schwag I picked up at OSCON. This was taken with the wide-angle doodad I picked up for my real camera. I don't think the wide angle is very obvious with this photo though. You can also see how noisy the VuPoint's photos get in dim light situations, like indoors at night. And this isn't even close to the worst example. What I think it's probably doing is boosting the ISO sky high to compensate. Your expensive digital camera could do that too if it wanted to, but perfectionist types out there would complain about the noise if it did, and besides, your fancy camera has one of them newfangled "flash" thingies, and the VuPoint doesn't.

Jamison Square

Pearl District

Jamison Square

Jamison Square

Jamison Square

Pearl District construction

Jamison Square

Wednesday, August 08, 2007

now available in glorious monochrome

Steel Bridge, Monochrome

I was trying to think of an interesting photo experiment that wouldn't be hampered by the ongoing bad weather, and I hit on something just in time for the weather to improve. I thought I'd try to make a photo look like old-sk00l clip art from back in the Mac Plus epoch, which means no color, not even greyscale, just black dots and white dots, cleverly dithered to give the appearance of a wider tonal range. There's probably an easier way to do this in GIMP (and feel free to chime in if you know what it is), but I figured I'd export the photo as XBM, the ancient X Window Bitmap format, then reload it and clean it up a bit. Believe it or not, your friendly neighborhood web browser probably supports XBM, so long as that browser is Firefox (or Netscape, probably). I thought about uploading them as XBMs but Flickr isn't interested in cooperating, and I'd hate to deprive you poor IE users out there. So I re-exported them as JPGs, which also made the files substantially smaller. XBM is an uncompressed format. In fact, XBM is a text format. In fact, XBM is really just a C header file that declares the image as a gigantic array, believe it or not, with each char representing 8 monochrome pixels. That's pretty cool if you ask me. In XBM, the top photo starts out like this:

#define IMG_7049_width 2272
#define IMG_7049_height 1704
static unsigned char IMG_7049_bits[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
...

And continues for another ~3MB.

I trust the Steel Bridge needs no introduction, and neither do the Convention Center towers.

occ-mono

I like the top two photos, but they don't quite have the look I originally had in mind. The old classic Mac series had a screen resolution of just 512 x 384, roughly the size of one of the scaled-down images here, so one of these would've taken up the whole screen, all 9 inches of it. So I tried the same process on a couple of lower res pics, and I think this is more like what I was aiming for, although they're still a bit on the modern-technology side. The first one is of the westside Fremont Bridge ramps, in the remnant industrial zone between the Pearl and the NW 23rd/21st area.

fremont-ramp-mono

And here's the inevitable Rusting Chunks photo, in glorious monochrome:

chunks-mono

Tuesday, August 07, 2007

...wherein I get scanned...

bendy

I've been playing around with scanning 3D objects lately, using that crappy 10 year old flatbed scanner I got for free a while back.

When it came time to select test subject #1, the choice was obvious.

It turns out that my alter ego has a few siblings out there on the Series of Intarwebs. The travel adventures of one sibling are documented here, while another has a series of domestic escapades here. Others siblings have unusual adventures of their own, both animal and vegetable.

Sadly, not all Bendies have such a cushy life. The sad, fiery end of one such Bendy is documented here. Oh, the bendumanity!

Thursday, July 26, 2007

OSCON 2007

OSCON 2007

I went to OSCON this year. I'll tell you all about it in a moment, but first let me apologize in advance about this report. There's an ongoing debate in some circles about whether bloggers are "journalists" or not. I don't have a really set opinion about that -- I don't really like journalists very much, but being one gets you certain traditional legal protections. What I can tell you for sure is that I'm not much of a reporter. I like to think I'm ok with a camera, but I'm also not in any way a news photographer. And I'm a tad on the antisocial side, so I'd make a very poor interviewer if I was inclined to try it, which I'm not. Also, I don't have the chutzpah to try to use my status as a Z-list blogger to get special treatment, evne though I manage to be ignored by billions worldwide every single day. No, I attended in my professional capacity, and never breathed a word to anyone about my personal media nano-empire. Not this blog, not even this blog's geeky and obsessive sibling.

I'm not even a very good conventiongoer, to be honest. My PHBs were fine with my going to OSCON this year, since it's just across the river, and it was still possible (barely) for me to shuttle frantically back and forth between OSCON sessions and random meetings with the PHBs. My PHBs are also cheap bastards, so they were fine with my going, so long as it didn't come out of their budget, so I had to resign myself to the free admission option, which means you get keynotes, exhibit hall admission, a small subset of the total convention sessions, and a few random other goodies. You don't even get one of those nifty OSCON 2007 laptop bags. Not that I need another laptop bag, it's just that it's fancy schwag I'm missing out on. It's the principle of the thing.

So anyway, I went to a few keynotes and attended a couple of free sessions, and picked up a few t-shirts and other schwag. I took a few photos while I was there -- the full set's on Flickr here. Here's one photo you might find entertaining, from a talk by Bill Hilf, the guy in charge of "open source strategy" or some such up at the Beast of Redmond.

OSCON 2007

The one really newsworthy bit from his talk is that MS is supposedly working with the OSI to get their various "shared source" licenses approved as genuine Open Source (tm) licenses. I'm pretty sure he just said "working with", so there's no ETA on when -- or if -- this might be finalized. So I don't know how much meat there really is here, but it was an effective PR move to take at this particular venue.

Hilf seemed like a reasonably personable guy, cracking a few jokes at the start to warm up the crowd. The talk was primarily an attempt to convince us that M$ isn't the Great Satan, and there wasn't a lot about technologies I use or care about. (Ruby on top of .NET? Okayyy...). An audience member asked about software patents, and Hilf mentioned the controversial MS-Novell deal while answering, but the answer was a sort of managerial non-answer. Apparently the big problem with their recent patent FUD is not that it was incorrect, or that they're playing predatory monopolist again; it's just that they mishandled the messaging about it. As if there was any way to accuse people of violating your super-secret patents and not offend anyone.

So possibly you might gather from this that I remain firmly unconvinced. But I was polite, of course, and clapped where appropriate.

The MS guy was sandwiched in between an economist (who wanted to tell us all that we aren't objective enough and need to overcome our biases), and the guy who started the Swedish Pirate Party. A photo from that talk:

OSCON 2007

As with the preceding talk, I remain unconvinced. I can understand the visceral appeal of the absolutist approach, arguing that there just shouldn't be any such thing as copyrights or patents. But think about it for a moment: You can't have a GPL unless you have some sort of legal copyright framework in place, some way to get people to comply with your release terms. Some might say that's a good thing, but I disagree.

There was also a claim made that you can either have civil liberties or copyright, but not both. The argument is that effective copyright enforcement means the government has to read everyone's email, to check whether people are mailing illicit MP3s to each other. You could make a similar argument that all traffic laws should be abolished, because the only way to catch every last traffic violation is to put government tracking/reporting devices in every car on the road. Come to think of it, catching every last violation of just about any law would require a police state, and would also be extremely expensive. Hence it's rarely attempted, and it never succeeds.

Don't get me wrong, I hate DRM and the DMCA at least as much as the next geek. The current laws on the books go wayyyy overboard and need to be scaled back, either by Congress or the courts. And don't get me started about dumb software patents and patent trolls.

Yesterday's keynotes were somewhat more technical: A couple of talks about threading and concurrency issues, including one from Intel about their newly-GPL'd ThreadingBuildingBlocks library. I picked up a CD at their booth in the expo hall but haven't had time to check it out yet. So I don't have a lot to say about it, other than that it sounds promising. I've dealt with my share of ugly threading issues over the years, and if there really is a magic bullet out there, or even a shiny but nonmagical bullet, I'd love to find it. Also, I got a cool t-shirt along with the cd.

Intel obviously released this out of enlightened self-interest. Multicore chips are the shiznit right now, and you can't use a multicore cpu efficiently unless you do stuff in parallel, and do it reasonably efficiently. You're not getting the full effect unless you can keep all those cores busy, and you aren't likely to pop for a shiny new 16-core Xeon a couple years down the road if your apps grind to a halt from all the inter-CPU overhead. The point is that they have an economic incentive to address the problem. Whether they have addressed the problem is a question I can't answer right now.

There was also a much more academic presentation by a guy with M$ Research, over in Cambridge, UK. He chatted about something called transactional memory. The idea is to have memory accesses work like database transactions (hence the name), so you can define a block of code such that either all the related changes to memory occur, or none of them do. This has a certain aesthetic appeal to it, but when someone with a major corporation's research arm tells you there's a performance impact and does sort of a handwave about it, it's quite often a sign you'll either need to buy a much faster machine, or get used to molasses force field mode.

So here's a bit of the big expo hall. Longtime readers may notice that the place looks a lot like the beer festival I went to back in April, except with less beer. I did see some people walking around with beer, so it wasn't entirely absent, but I think you had to get it in the paying-attendees-only area. And it didn't look like very good beer anyway, so phooey on that.

OSCON 2007

I wandered around the expo hall for a while, picking up a few t-shirts and other misc. schwag items. The highlight was actually at a booth run by Oregon State University's CS department. They're writing some media player software for the OLPC, the long-awaited ~$100 Linux laptop, and they had a few units on hand to play with. Intel was showing off its semi-competing (and also Linux-based) Classmate PC. My quick-look impression was that the OLPC is a very cool, clever gadget, the Classmate somewhat less so. Neither is exactly a speed demon, but the Classmate seemed slower. I think that's because it comes with a bunch of off-the-shelf open source apps rather than the OLPC's new custom-written ones. You click "new text document" or the equivalent and then wait a looong time for the editor to start up, and then you realize you just launched OpenOffice. It's cool to see OOo on a box that size, of course, but it would help a lot if the box was a touch faster. My real complaint about both devices is the keyboard. I think I now understand why both are aimed at kids; my clumsy old grownup fingers had all kinds of trouble. Touch typing just wasn't doable, although you could probably adapt to that given enough time.

Here's a photo of the Intel booth. They had the large booth in the center of the hall, surrounded by transparent mesh "walls" covered with nature photos. Not the most informative photo, but I thought it turned out kind of cool.

OSCON 2007

I don't have my pile-o-loot in front of me, so I suppose I should take some more pics and post those, just to give a sense of what sort of schwag there is to be had at these things. And I've probably forgotten something I wanted to cover, so there may be a second OSCON post Real Soon Now. But right now I'm going to go check off another item on my busy social calendar, the Oregon Brewers Festival. Yes, OSCON happens to run concurrently with one of the nation's premier beer festivals. Just try to tell me that's a mere coincidence.

Wednesday, July 18, 2007

More VuPoint fun

VuPoint 1

More photos taken with that $14.99 digital camera I picked up a while ago. The top photo and the last two were taken through that infrared filter I cobbled together. It's odd how IR photos taken with my usual camera come out in a range of pink, lilac, and orange tones, while with the VuPoint they come out sort of black and white.

If nothing else, the photos show that the camera's viewfinder image is a very, very rough approximation of what the end result is going to look like. You never know what you're going to get. It's like a box of chocolates, or whatever.

Meanwhile, I was at the antique store earlier today and picked up another new toy. Cute, huh? There are also some larger pics of the flash version. The thing uses 620 film, which can be tricky to come by. There's a camera store in town that does 120 -> 620 film conversions, so maybe that'll work for this lil' beastie and maybe it won't. I mostly got it as a shelf curio, but I just might take it out for a spin some time. I realize I've said repeatedly I have no interest in dealing with film cameras ever again, but I might make an exception now and then. Purity is so uninteresting, after all...

VuPoint 2

VuPoint 3

VuPoint 4

The above photo was taken through an especially wavy wine bottle. It's not camera distortion, though that would be a reasonable guess.

VuPoint 6

VuPoint 7

VuPoint 8

Here's those IR photos I mentioned...

VuPoint 9

VuPoint 5

Monday, July 16, 2007

two storms, long ago

umbrella

storm

I recently ended up with a free flatbed scanner, and I thought I'd try my hand at scanning some old photos I took as a kid. The scanner is about 9 years old and has some highly original notions about color fidelity, so here are a couple that looked good in greyscale. I took both of these with a little 110 camera I got for Christmas one year, if I remember right.

I'm not entirely sure when or where the first photo was taken. It was in an old photo album, and the other photos were of a family vacation to Yellowstone back in the early 1980s. (circa 1984, I'm guessing.) In any case, I assume it's from that trip since it's in that album, but I'm not 100% sure, and there's not a lot of context to be had from the photo itself. I never got into the habit of writing on the backs of photos, so no clues there either. I rather like the photo though. I'd be happy with this one if I took it today.

Second photo is a storm over the Pacific back in February 1979. I know the month and year because we were driving down the coast on another family vacation, and the weather was like this the whole time, which meant that I missed the big solar eclipse on Feb. 26th, 1979. So this would've been a few days before the eclipse, I expect.

Back in the present day, getting the scanner working under Ubuntu was a mildly irritating challenge. At first I was pleased to learn that Ubuntu came with SANE, an open-source scanner package that plays much the same role TWAIN does on Windows. It even had a driver for my particular scanner, and initially I couldn't believe my luck. And then it just wouldn't detect the scanner. It just refused to see it. After a great deal of searching about, I finally hit on the problem. The scanner's one of those old parallel port jobs, and the problem wasn't that SANE didn't see the scanner, it's that it didn't see the parallel port. Seems that if the kernel module for the parallel port device isn't loaded, and it isn't by default on Ubuntu, you have to modprobe ppdev as root to get the damn thing into the kernel. That causes /dev/parport0 to magically appear in /dev, but the device only grants access to root by default. I suppose you could run xsane as root if you wanted to, although it screams bloody murder when you do that (and rightly so). Or you could make the SANE backend suid root, but that's bad news too. Changing the permissions on the device seems like the least bad approach, or at least that's what I've been doing so far. Then there's xsane's peculiar gui to puzzle out. And I'm still not sure how to make colors come out correctly. Whoever designed the scanner was clearly a huge fan of blue-green. Other colors, not so much.

Honestly, I don't know how we ever got by without digital photos.

It occurred to me recently that it ought to be feasible to pack the innards of a digital camera into a 110 or 126 film cartridge. You could haul that mid-60's Instamatic out of mom's closet, brush off the dust, and start taking digital photos. The cartridge would need an image sensor (obviously), memory, a small battery, some support circuitry, and probably a USB connector somewhere. Everything else -- optics, shutter, flash, etc. -- would be provided by the surrounding vintage camera. It'd be a cool, geeky retrotech thing to have, but actually making something like this would be far beyond my measly skills with a soldering iron, and selling it would be far beyond my even measlier marketing/PR skills. Volunteers, anyone?

Wednesday, July 11, 2007

a good day for infrared

IR

Since we're in day two of what the media insists is a Killer Heat Wave of Doom, I figured it was a good time to post some more infrared photos. I'd just like to point out I only learned how to do this about a week ago, so any non-constructive criticism will be cheerfully ignored.

If you really want to split hairs about it, the near-IR light digital cameras can see is not the same thing as thermal infrared, which requires a dedicated and vastly more expensive camera. So the "heat wave" hook is sort of tenuous, I admit. I should also point out that the colors you see here aren't "real", and are just the result of the camera trying valiantly to interpret the bizarro light it's detecting as a color photo. If I was going to be a purist about it, I ought to be taking the photos in B+W mode, but I rather like the effect here.

Top photo's from 10th & Burnside, downtown, showing the sculpture everyone calls "Satan's Testicle". It's actual name is "Pod", and it's by the sculptor Pete Beeman. FYI.

Below, a couple of shots from SW Ankeny near Broadway. Big Pink is very pink, just like everything else.

IR

IR

Above, looking west on Ankeny. The tree you see is part of Ankeny Park, just around the corner up ahead. That sun looks unbearably hot, doesn't it? Luckily I was standing right outside the door of Tugboat Brewing when I took this. Mmmm..... Beeeeer.....

IR

This one's from about a block west of the last one, looking east this time. Trees around Burnside, the North Park Blocks, and Ankeny Park.

IR photos work best if you use a tripod, since you've filtered out most of the light and you need to go with longer exposures. But honestly, who wants to carry a freakin' tripod around all the time, just in case? Not me. At least usually not.

Oh, well. Like I said, this is all experimental so far as I'm concerned. And I kind of like the blur of passing cars in the photo. Everyone knows blurry passing cars are Art with a capital A.

IR

More from the North Park Blocks. You've got to love the way foliage practically glows in IR.

Monday, July 02, 2007

Unboxing a $14.99 VuPoint digicam

unbox_c2

So I was in the mood for a new toy, and I remembered the camera store down the street had these $14.99 digital cameras that fit on a keychain. You can't go wrong for $14.99. Crappy image quality is fine. Crappy image quality is great, actually. Call it Holga envy if you like. Dealing with camera film is annoying and tedious, and I'm not, not, not going to do it, period, no matter how funky and weird the results are. I'd still like funky and weird results, though. And like I said, you can't go wrong for $14.99.

So the top photo is of my new VuPoint Solutions DC-ST12G-VP, with the single AAA battery out. AAA batteries are pretty tiny, so you can tell this is a very small camera.

unbox_c1

And here's the packaging. I'm proud to report I've opened at least one modern made-in-China product package without a knife of any kind. I just improvised with my keychain bottle opener instead.

Oh, and there's beer. You can't unbox a new toy without beer. It's a McMenamins Firefly Kolsch, with a lemon wedge. Hey, it's hot outside.

It's kind of fun making a big production out of this at the same time the world's alpha nerds are unboxing their shiny new iPhones. I don't think this qualifies as satire, exactly. There's probably a word for it, which either escapes me at the moment, or I've just never heard of.

unbox_c3

The pamphlet on the left is the manual. If you want to read the whole thing, such as it is, you can find a color version here. It's delivered as a PDF inside a ZIP file for some reason. Don't ask me why.

So I'm trying to see what else I can learn about the thing. I suppose with the idea I might take it apart and tinker with it eventually, or possibly buy another one to tinker with. The Windows desktop software installs to an odd location, C:\WINDOWS\twain_32\MyDSC2 instead of under Program Files. So I suppose it's using TWAIN to talk to the camera instead of one of the usual digicam interfaces. TWAIN's mostly used for talking to scanners, although it supports cameras too. So that's kind of peculiar.

The apps and DLLs in the folder indicate the software comes from another company, Service & Quality Technology Co. Ltd., based in Taiwan. Their website lists a variety of image sensor chips and whatnot, although the lowest-end one they list, the SQ905C, says it offers VGA resolution, not just the CIF mode my camera claims. The other details look about right, though, so it's possible the camera just doesn't expose the VGA mode. In which case enabling it might be an interesting project.

Updated: Ok, the SQ905C is the controller & platform the camera's based on, and the sensor's a separate item. Actually it could be any one of a short list of separate items. The tech docs (see below) list a few supported sensors: Hynix HV7131R, PixArt PAS202(B?) and PAS302B, something just listed as "106" which (I think) is supposed indicate PixArt's PAS106B, Micron's MI-360, and PQI's SOI763A. So it's possible that while the controller can support slightly higher resolution, the sensor in the camera may not be up to the job. The PAS106B supports only CIF ( 352 x 288 ) resolution, while all the others support VGA (640 x 480). So I probably have a PAS106B inside; if not, tweaking the max resolution may still be a go, not that I have a clear idea how to accomplish that right now.

I suppose there's always adding memory, although I imagine that would increase the drain on the poor little battery.


The SQ905C page links to a pair of PDF files with loads of technical data. There's a single ASIC inside that implements nearly the whole package, right down to the interface on the little LCD status screen. (It's just status, none of that fancy preview nonsense.) If this isn't precisely what's inside my camera, it may be the next generation, and mine uses a discontinued version. Which might explain the price, I suppose.

Actually one of the apps isn't from SQ. Judging by a quick Google search, TransTWAIN.exe seems to be a common tool for transferring files over a TWAIN interface or something like that. It's freely distributed in binary form, but it's not known who wrote the thing. Jeepers!

So here's the first photo from my shiny new $14.99 camera:

unbox_v1

Pretty cool, huh? That's full size, without JPEG compression enabled. The camera can hold about 18 photos in this mode. It's SDRAM-based, so if the camera loses power, your photos go poof. That also means the camera constantly draws current if there's a battery present, since otherwise the contents of memory would go poof. So you'll want to take the battery out once you've downloaded the camera's precious cargo.

No camera unboxing would be complete without a photo of the camera you used for the start of the process, taken with the new camera. So here ya go:

unbox_v2

Yes, yes, I had a kolsch and a light summery pasta for lunch. Did I mention it's really hot outside?




So here are the functions exported by the DLLs and kernel drivers that came with the camera, for you tech dweebs out there. Obviously I don't know what they're all for, but some of the names sound interesting.


TOYCAM.DLL: (you gotta love that name.)

DSCClear
DSCEnd
DSCFreeJPGBuf
DSCGet
DSCGetImage
DSCGetJPGImage
DSCInit
DSCIsReady
DSCStart
GetToyCamInfo
InitHW
PCCEnd
PCCGet
PCCInit
PCCIsReady
PCCStart
ReadLanguage
ResetHW
ResetHW1
ResetHW2
SQImageOption
SaveToAVI
SetDSCParam
TCamIsReady
TCamSetWiaMode
TCamWorkingPath
doRGBAdjust


USBDSC.DLL:

SQAreReady
SQBulkRead
SQBulkWrite
SQFreeDS
SQInitDS
SQInitWorkingPath
SQIsDriverAlive
SQReadDSC
SQReadDownloadPAT
SQReadFirmwareVer
SQReadPAT
SQReadPCC
SQStartDSC
SQStartPCC
SQStopDSC
SQStopPCC
SQVendorCommand
SQWriteData


SQDLL.DLL:

CheckMMX
CheckSSE
ColorMatrixMul3s
SQAG_020515_UP
SQAWB_020605_UP
SQAWB_030827_8b
SQAWB_040210_8b
SQBLD_020606_UP
SQBrightness_UP
SQColorGain
SQContrast_UP
SQCutBadPix_020605_UP
SQDeBadPixel_Kernel_v031223
SQDeBadPixel_Kernel_v040212
SQEnhClr_UP
SQFastSaturation
SQGainAdj_030722
SQGbGrBalancer_030611
SQGbGrBalancer_040422
SQGetProcessedImage
SQInitialize2
SQInt_020605
SQInterpolateNrml
SQMakeInvGammaX
SQMakeInvGamma_905c
SQOffsetAdj_030924
SQRestoreDefaultParameter
SQSaveUsrParameter
SQShadow
SQSharpenMP_UP
SQSharpen_020508
SQShp_020521_UP
SQShp_020625
SQShp_020820
SQShp_031003
SQShp_040109
SQSmooth3C_UP
SQSmoothCbCr_v040218
SQSmooth_020604_UP
SQSmooth_030414
SQSmooth_030502
SQSmooth_030923
SQSmooth_Wavelet_040128
SQSmooth_Wavelet_040128_v2
SQUnInitialize


SQRS.DLL:

Fast_Bicubic_x2_MMX
SQBicubicResample_020925
SQResample_030218
fnDownSample_20021001


Compress.dll:

ADPCM_DeCode
ADPCM_EnCode
AnalyzeJPEG
BMP2JPG
JPEG_Decode
JpegRelease
Jpeginit
VLCADPCM_DeCode
VLCADPCM_EnCode
VLC_Decode
VLC_Encode

Camd905c.sys (905C, eh? I thought so...)

USBCAMD_AdapterReceivePacket
USBCAMD_ControlVendorCommand
USBCAMD_Debug_LogEntry
USBCAMD_DriverEntry
USBCAMD_GetRegistryKeyValue
USBCAMD_InitializeNewInterface
USBCAMD_SelectAlternateInterface

There's also a Capt905c.sys file that appears to not export or import any symbols. That doesn't seem right to me, althought I've been wrong before.

Thursday, April 19, 2007

blue, gold, white, rainbow

blue

I probably ought to say a few words about these pics, since I'm just sitting here waiting for my Java app to give up on talking to MySQL and blow up with an OutOfMemoryError, which it's bound to do sooner or later. The yellow flowers are from Pacific City, but I don't know what they are. I bought a book on coastal wildflowers while we were out there, and I still don't know. Actually I don't know what any of the flowers are, quite honestly. It's not that I'm afraid I'll guess wrong (which I often do), it's that I haven't the first clue about them. And the last photo is probably not the best rainbow photo you'll ever see. In part this is because I was getting rained on, which I don't enjoy; also, it just wasn't a very good rainbow, as far as these things go. Oh, well.

yellow

Whoa, there goes my app now. Which means the bug fix I spent all day cobbling together didn't work. Dammit. Damn damn damn. Oh, well, this isn't the only bug in my queue. It's like a line from the old SNL sketch with John Belushi as a middle-aged Hercules: "This rock is too heavy! I will lift the smaller rock over there." (I think that's how the line went anyway. It's been a long time.)

white

rainbow