April 2005 Blog Posts

Still Torn On Blog Migration

I'm still torn on whether I should convert from pMachine to dasBlog as my blog software.

  • There's some odd stuff with caching going on behind the scenes in dasBlog because it's a filesystem-based package. pMachine doesn't do that. Stuff like creating a second copy of all of the metadata attached to all of the comments on the entire site. If it's stored with the comment, and it's only used as a cache, why is it a physical file to begin with? Does it ever get rebuilt? Having a separate cache that is, in effect, a disparate data source from the actual data is asking for integrity problems.


  • The templates really bug me. The more I think about it, the more they bug me. I appreciate that the idea is to allow for folks that "just know HTML" to code up a template and run with it. As such, they use sort of a string-macro-substitution scheme where a huge set of undocumented "magic words" can be used to insert a bunch of stuff in an undocumented format into your page using undocumented CSS classes that you don't get to choose. It's an ASP.NET app - what happens if I want to add, say, a textbox to it? Or a treeview? Or any other ASP.NET server control that I could dream up? Right now, I've got to do some fancy tap-dancing-and-jazz-hands to put the server control into a user control and... uh, no. Seriously.


  • If the templates were made for a user who "just knows HTML" to use, how come the setup and upgrade procedures take an ASP.NET guru to figure out?


  • I shouldn't have to modify the administrative interface to get it to do things I want. Nor should I have to manually log in to the server, download a config file, edit it, then re-upload it due to lack of an administrative interface. Ever. If you add the feature and it requires config, you add the admin interface.


  • If everyone using dasBlog is using some external application (i.e., BlogJet) to post entries, it occurs to me that this means not one, but two things: First, that BlogJet is cool and convenient to use. Second, that there is a dire shortcoming in the built-in interface to create new entries that needs to be addressed. If it's so inconvenient to use, what is it that makes it inconvenient? Address that.


  • While we're on the topic of the built-in new entry interface, the usage of text editing components must be questioned. I know the dasBlog guys weren't responsible for FreeTextBox or the way it munges up HTML. That's fine. But here's the deal: clean HTML isn't important to some folks, but it really is to others, particularly when trying to apply complex CSS. Seriously. As far as I'm concerned anymore, it's XHTML compliant or bust. (No, my current blog does not adhere to XHTML standards; that's part of why I want to update. To get a nice, clean template that does.) Even if that means I enter a new entry in a plain old textbox manually (which is what I currently do anyway).


  • I might want the ability to upload images into one folder and other content, like downloadable software, into another folder. I, further, might even want a file browser so I can see (without having to FTP) what I've got up there and delete or rename files as I see fit. Hook me up, guys. It's not rocket science.


  • If it doesn't just work without tweaking, don't put it in. If it's not going to be documented so people can take advantage of it, don't put it in. If you have to know how to create a nuclear accelerator out of duct tape and toothpicks in order to use it, don't put it in. (This sort of goes back to the trouble with the administrative interface - complete configuration of the site can't really be achieved through the admin interface right now, so you have to know where/how certain things work - undocumented - in order to get things configured just so.


  • Where was the common sense when writing some of this stuff. If you have a class called DayEntry and that class has a static method like OccursBefore(DayEntry entry, DateTime dt), then it occurs to me that, since you have to have a DayEntry instance anyway, the method should be an instance method, not a static one. Am I wrong? (There's a lot of that kind of stuff in there.)


  • I know what's going to happen here. I'm going to convert over to dasBlog and get pissed off that there are weird things in there. I'm going to rewrite the thing and have to run a fully custom implementation just so I can get things done. I guess I should just accept it now. Unless you dasBlog folks want to go on a major cleaning spree? Stop adding new features and make the existing product solid. Not just solid, but solid.

    .NET Profilers Suck

    I've heard that the CR_Documentor plugin is a little sluggish on some folks' machines so I decided to run a profiler on it and see what's slowing me down.

    The profilers out there for .NET suck. A lot.

    The problem with the majority of them is that they only profile executables. You can't just profile a satellite assembly that you've written that gets used by an executable, and you can't just attach to a process that's already running and using your assembly.

    Well, as an add-in, my assembly's technically running under Visual Studio itself - devenv.exe. So there's your host app...

    I tried DevPartner Profiler Community Edition. It blue-screened my box twice before I gave up. I never successfully even got VS started up to be profiled.

    I tried nprof, the Red-Gate ANTS profiler, and the CLR Profiler. No luck.

    DevExpress tech support recommended AQtime, since that's what they use. It seemed the best of the bunch, being able to attach to existing running processes and select specific assemblies to profile, but it wouldn't allow me to attach to an existing running instance of Visual Studio, nor was it able to start one up for me (I got a bunch of Access Violations and VS would puke). So the best of the bunch (that I tried out) never worked.

    Long and short of it is, I never got the thing profiled. I'm thinking I may have to add some sort of trace-style instrumentation and/or performance counters to get this done. Hmmm.

    In other news, I made a few Amazon purchases today: C++ Primer, 4th Ed. (I need to re-learn C++... it's been too long); Joel On Software; and Red Dwarf, series 5 and 6 (can't get enough of the Red Dwarf).

    I've also made quite a bit of progress in my pMachine-to-dasBlog conversion program and may try to transfer over in the reasonably near future. Of course, after having experienced what I have thus far with dasBlog, I can see that there's some work I need to do on that in order to accommdate the stuff I'd like to do in a reasonable fashion (for example, the templates being of the "macro substitution" fashion need to be fixed to actually work like master pages so I can design them using real controls and not just string replacement... not to mention there are far too many moving parts behind the scenes there for the amount of stuff it's actually doing...). We'll see.

    JavaScript and Unicode Character Validation

    I'm struggling right now with the fact that JavaScript/ECMAScript doesn't allow for Unicode character classes in regular expressions. For example, if I want to set up a client-side JavaScript validation expression on a numeric field, I'd want to do something like ^\d+$ as my regular expression, right? Match one or more digits?

    The problem is that in JavaScript, \d expands out to [0-9], which technically isn't all of the digits, if you think about all of the other alphabets out there that exist and don't use 0 through 9 to indicate numbers.

    In .NET, they solve this by mapping to Unicode character classes. So \d maps to \p{Nd}, which is the Unicode character class for digits. Much more global, right? So how do you do that on the client side?

    Well, I figure you have to expand the character classes on the server side and then feed those to the client. JavaScript supports Unicode character codes with a hexadecimal character code, so you can say like \uFFFF or whatever to specify a particular character. So you need to take \d and expand to the full set of Unicode characters.

    Using \d as our example, a C# snippet that expands the digits looks like this:

    static void Main(string[] args){
      string Nd = UnicodeExpansion(System.Globalization.UnicodeCategory.DecimalDigitNumber);
      Console.WriteLine(Nd);
      Console.ReadLine();
    }
    
    /// <summary>
    /// Expands a Unicode character set into an ECMAScript compatible character
    /// range string.
    /// </summary>
    /// <param name="category">
    /// The Unicode character category to expand.
    /// </param>
    /// <returns>
    /// A <see cref="System.String" /> that can be used in an ECMAScript regular
    /// expression.
    /// </returns>
    /// <remarks>
    /// <para>
    /// ECMAScript (JavaScript) does not inherently understand Unicode in regular
    /// expressions, which results in incorrect validation when using character
    /// classes (\w, \s, \d, etc.).
    /// </para>
    /// <para>
    /// This method expands a <see cref="System.Globalization.UnicodeCategory" />
    /// into a string that can be used in an ECMAScript regular expression.  For
    /// example, the category <see cref="System.Globalization.UnicodeCategory.LetterNumber" />
    /// expands to <c>\u2160-\u2183\u3007\u3021-\u3029\u3038-\u303a</c>.
    /// </para>
    /// </remarks>
    public static string UnicodeExpansion(System.Globalization.UnicodeCategory category){
      // The fully expanded block of characters
      string expansion = "";
      // Low-end of the character block
      int blockLow = -1;
      // High-end of the character block
      int blockHigh = -1;
      // Marks whether the current block has been written
      bool blockWritten = false;
    
      for(int charVal = 0; charVal <= Char.MaxValue; charVal++){
        // Get the category of the current character
        System.Globalization.UnicodeCategory charCat = Char.GetUnicodeCategory(Convert.ToChar(charVal));
    
        // We haven't written anything this loop; used to ensure
        // all blocks get written at the end.
        blockWritten = false;
    
        // Ignore characters that don't match the category.
        if(charCat != category){
          continue;
        }
    
        if(blockLow == -1){
          // Handle the very first block
          blockLow = charVal;
          blockHigh = charVal;
        }
        else if(
          // charVal skipped some characters OR
          blockHigh + 1 != charVal ||
          // We're at the end of the set of characters
          blockHigh + 1 > Char.MaxValue 
          ){
    
          // Write the block to the expansion string
          if(blockLow == blockHigh){
            // This is a one-character block
            expansion += String.Format(@"\u{0:x4}", blockLow);
          }
          else{
            // This is a multi-char block
            expansion += String.Format(@"\u{0:x4}-\u{1:x4}", blockLow, blockHigh);
          }
    
          // Start a new block
          blockWritten = true;
          blockLow = charVal;
          blockHigh = charVal;
        }
        else{
          // We're still in the same block; increment the high end of the block.
          blockHigh = charVal;
        }      
      }
    
      // If we didn't write the last block, write it now
      if(!blockWritten){
        if(blockLow == blockHigh){
          // This is a one-character block
          expansion += String.Format(@"\u{0:x4}", blockLow);
        }
        else{
          // This is a multi-char block
          expansion += String.Format(@"\u{0:x4}-\u{1:x4}", blockLow, blockHigh);
        }
        blockWritten = true;
      }
    
      return expansion;
    }


    For \d, it expands out to:

    \u0030-\u0039\u0660-\u0669\u06f0-\u06f9\u0966-\u096f\u09e6-\u09ef\u0a66-\u0a6f\u0ae6-\u0aef\u0b66-\u0b6f\u0be7-\u0bef\u0c66-\u0c6f\u0ce6-\u0cef\u0d66-\u0d6f\u0e50-\u0e59\u0ed0-\u0ed9\u0f20-\u0f29\u1040-\u1049\u1369-\u1371\u17e0-\u17e9\u1810-\u1819\uff10-\uff19

    Which means that rather than ^[\d]+$ to validate, you'd use ^[\u0030-\u0039\u0660-\u0669\u06f0-\u06f9\u0966-\u096f\u09e6-\u09ef\u0a66-\u0a6f\u0ae6-\u0aef\u0b66-\u0b6f\u0be7-\u0bef\u0c66-\u0c6f\u0ce6-\u0cef\u0d66-\u0d6f\u0e50-\u0e59\u0ed0-\u0ed9\u0f20-\u0f29\u1040-\u1049\u1369-\u1371\u17e0-\u17e9\u1810-\u1819\uff10-\uff19]+$.

    You can try this out at http://www.regular-expressions.info/javascriptexample.html. Seems to work pretty well.

    I'm using numbers as my example here, though the same thoughts could be applied to letters or any other character classes. Like in JavaScript, \w maps to [a-zA-Z_0-9], which is obviously not all the possible letters out there.

    You could even take this a further step and pre-calculate all of the Unicode character blocks at application start time and cache the common character class expansions for use in regex translation on the server side.

    Updated 9/9/2005 for boundary condition logic error and again on 9/11/2005 to fix accidental omission of the last block (thanks cougio); modified the method to be a standalone static for easier cut and paste into applications; added comments for readability.

    My Status

    My current status

    Apple Customer... Service? Or Something...

    I bought a new 4G 60GB iPod Photo a while ago, and it's just slightly larger than the 3G iPod I had (thanks, Apple!) so now I gotta buy a new dock that fits the new iPod, a new case, etc.

    I bought the CEO Classic case from Marware. I got it yesterday, and I dig it, but it's a pretty snug fit.

    I ordered a new dock and power converter for the iPod directly from Apple's online store.

    They don't tell you during that order process that they require an in-person signature when your stuff is delivered.

    I mean, I understand if you're delivering my new $5000 computer or something, but this is $50 worth of crap I would have bought at the local Apple store if they weren't out of stock.

    So I got this stupid FedEx sticker on my door that says I have to be there in person and can't just sign to have it released. I called FedEx to inform them that I have, you know, a job, and I can't be home all day, so can they please tell me when it'll be delivered.

    They gave me the window of "sometime between 8:00a and 8:00p." You thought the cable company was bad. That rules, FedEx. Even UPS will hook me up with a decent window.

    That, plus FedEx Ground doesn't have any customer service in my area, so I can't just go pick it up at the drop center.

    My only option was to call Apple support, which I did, and I think I got connected to Australia because the guy's accent was super thick and the telephone ringing sound was definitely not US. I talked to the guy and he said they absolutely could not let my stuff out without an in-person signature.

    Fine, buddy. Get me your supervisor. I don't care - get me fucking Steve Jobs. Someone best be delivering my shit or I'm going to go postal.

    I get the Apple guy's supervisor, who gets on another line with FedEx, and after like 10 minutes on hold (I think they were trying to wait me out - "put the guy on hold... is he still there? yeah... stick him back on hold, see if he hangs up") they somehow got FedEx to promise to deliver this evening after I get home from work.

    How come that wasn't an option when I first called?

    Sigh. I guess we'll see how this comes out when I get home tonight.

    Junction Icon Overlay in Daily Grind

    I Must Have This Shirt

    I don't think I can live without this bad boy. Might just have to order it in a couple of seconds...

    Domokun on a shirt!

    Inductive Mouse Exists!

    Okay, I thought of this one back in August, and now it's come to fruition: Somebody built the induction powered rechargeable mouse.

    They'd best send me a damn t-shirt or something. You're welcome for the idea, fellas. :)

    Solvent 1.1.1 Released - With Source

    Solvent 1.1.1 is out with a minor bug fix allowing for "Command Prompt Here" to open the command prompt to drives other than the one VS.NET is installed. (Oops!)

    I've also (finally) put the Solvent source out there for folks curious how it works. You'll see a lot of stubbed-in stuff where I was/am trying to get the Windows "Send To" menu to show up in there, but it'll probably just forever be stubbed since there's no great way to interface with "Send To," particularly in a managed code world.

    Anyway, the update's out, so go get it.

    Mr. Hygiene

    There's this guy at the local video store who seems to be in there every time we go. I'm sure you've got one of these guys at your video store, too.

    He's maybe 25. His fingernails are half an inch long and dirty underneath. His hair has been neither washed nor combed in... well, ever. That Grizzly Adams beard has got to go. When you check out, he talks to you in a monotone voice and asks things like "wouldyoubeinterestedinourtwoforonepreviouslyviewedmovies?"

    Oh, and he snorts and clears his throat repeatedly while he stands there behind the register.

    Ugh.

    We call him "Mr. Hygiene."

    Junction Shell Extensions

    UPDATE: Hermann Schinagl has a Link Shell Extension that provides a lot of excellent functionality that incorporates my icon overlay and property sheet, which basically obsoletes this package. Definitely check this out if you want a very robust shell integration for reparse points.

    That said, if all you need is an icon overlay and a property sheet for junctions, read on...


    I use junction points (aka "reparse points") a lot in my daily tasks. I'm originally a Unix guy; I love hard and symbolic links. Very cool, very flexible. Windows offers a sort of hard link equivalent but doesn't directly provide tools to manipulate them or otherwise deal with them. Instead, you have to use tools like junction to create them.

    Even when you do create them, when you're browsing in the Windows Explorer you'll never know they're reparse points because there's no visual cue. The only way to see is if you drop to a command prompt and run a directory:

    Command prompt illustrating junctions

    See the JUNCTION up there? That's the only indicator you have a reparse point. And, of course, if you're not paying attention in Windows Explorer and checking for that, you'll end up accidentally deleting something you didn't want to delete.

    I decided I wanted a visual cue in Windows Explorer. Enter the Junction Icon Overlay. You know how you see little icon overlays for things like shortcuts (or, when using TortoiseCVS, things under CVS control)? Wouldn't it be cool if you could see something on junctions? Now you can:

    A Windows Explorer folder showing junctions with icon overlays

    The "source" folder is under CVS source control and I've got TortoiseCVS, so you see a little green checkmark overlay. The "build" folder is just a standard folder. The "tools" folder is a junction - see the little "link" overlay?

    I also added a property sheet that shows up just for junctions so you can easily see where your junction points to. Right-click the junction, select "Properties," and find the "Junction" tab. You should see the path the junction points to in the text box.

    Junction property sheet

    You can get this as a setup (MSI) or you can have the source. It's free, but use at your own risk and all that. I'm also not offering support on this one, so if it doesn't work for you or trashes your machine or gives you nightmares or something, I'm sorry - can't help ya.

    One drawback: It seems you can only have one overlay on an icon at a time. So if "tools" was both under CVS control AND a junction, you'd only see the junction icon (I cranked the priority up on it because I'm more concerned with junctions than CVS status).

    You will have to reboot after you install before the shell extensions will show up.

    Download Junction Shell Extensions 1.1.0 (Setup - MSI)
    Download Junction Shell Extensions 1.1.0 (Source - ZIP)

    For more on how icon overlays work, check out lallous's article on CodeProject (which is how I got this going). Also, a special thanks to Mike Nordell, whose CodeProject article on junction points provided some code that I modified and am using here, and to Michael Dunn, whose series on writing shell extensions was absolutely invaluable.

    Version History:
    1.0.0: First release. Included only icon overlay.
    1.1.0: Renamed from "Junction Icon Overlay" to "Junction Shell Extensions." Added property sheet for junctions.

    Amped Up

    Jenn worked yesterday, so I called up Stuart to see if he wanted to hang out. He came over and we decided to play some video games, since neither of us really have had the free time we'd like to dedicate to such things as of late.

    We played some Time Crisis 3, which is a great PS2 Guncon game, but the shortcoming is the way it plays two-player: split-screen. Good luck shooting stuff you can barely see, and this is on a 32" TV. I have no idea how people with smaller sets pull it off.

    We moved on to Ninja Assault, which is also a decent PS2 Guncon game, where you play as ninjas... who have guns... who shoot at... uh... robotic spiders... who have guns... and...

    OK, I can't really justify that it has really anything at all to do with ninjas, other than the backgrounds with, like, trees and old Asian looking buildings. I think you shoot at some ninja-looking guys, but it's "ninja" in the loosest sense of the word I've ever dealt with.

    Stuart's total Amp aftermathAnyway, this whole time, Stuart's drinking Amp, a Mountain Dew-based energy drink. He's downed his first, and halfway through the second he turns to me with a crazed Cornholioesque look in his eye and says, "You know what would be cool? Bongos. We should go get some of those Donkey Kong bongos and that game. We should get four sets of bongos so Jenn and Tiff can play, too. That'd be cool. We should get bongos."

    Seriously, how can you say no to bongos on a Saturday afternoon?

    We figured we'd go after a quick game of two-player Katamari Damacy that lasted about three hours.

    Jenn came home before we had a chance to leave. Stu called Tiff and told her to meet us at my house and we set off for the store. A little while later, we had four sets of bongos, two copies of Donkey Konga, some more Amp for Stu, and a soul-level need to beat drums.

    When we got back, Tiff was already at the house waiting for us. We pre-empted the drive to drum long enough to go eat at McMenamin's Grand Lodge (tasty!), then we got back and plugged those bad boys in.

    Holy crap, that's fun.

    It took a little while to get used to, but very quickly we were drumming with the best of them. For those unaware, the premise of the game is to beat the bongos and clap along with a song that's playing in the game based on symbols you're shown. There are four symbols: hit the left bongo, hit the right bongo, hit both bongos simultaneously, and clap. There's a microphone in the drum set that captures the clap sound.

    We discovered (long after the fact) that the sensitivity of the microphone can be calibrated, which is a good thing since the largest issue we had was that when one of us would clap, it might register on another person's bongos simultaneously, causing for poor scoring. Or if the TV was up too loud, you'd get "clap feedback," where you clap, then the "clap" sound fires on the TV, which gets picked up by the bongos as a clap, which then gets played back by the TV... pretty soon it sounds like firecrackers going off. Definitely gotta turn that sensitivity down.

    All in all, though, an absolute blast, and much needed after the grinder work has been lately.

    The game room, post bongos

    Surging Protector

    I went to the store and bought a couple of surge protector power strips last night to clean up some of the cord mess we have going on with the 20 bazillion power strips and cables and crap behind the TV upstairs.

    Unpacked it, unplugged the old power strip, plugged the new one in, plugged in the cable modem, plugged in the wireless router -

    - and honest-to-God fire shot out of the surge protector.

    Just as quick, it was out, with a slight puff of smoke coming out the back of it. It wasn't enough to be really worried about, just enough to make me scream like a little girl and drop it in fear for my life.

    It also took down one of my circuit breakers, so I had to go downstairs and flip that back on.

    Guess I'll be taking that back.

    Entranced

    I went to the store last night and picked up Best of Trance, Vol. 5 because, well, I dig the whole trance music thing.

    It did bring up an interesting thought, though, as I was ripping it onto my iPod: I have my music classified by genre (as do most of you iTunes users out there) and I'm finding that it's really hard to classify electronic music. I mean, like, trance, dance, techno, house, drum and bass...

    I look at the way I have things in the ol' iTunes library, and I'm irritated with the inconsistency. I can see why the default iTunes classification is "Electronica/Dance."

    After I finish putting the album art into all of my tracks, I guess I'll have to go back and reclassify.

    Comcast Working Again

    On the way back in to work from the car dealership this morning, Jenn called me to tell me that, prior to calling Comcast to complain about crappy DNS, she fired up the computer.

    Everything works fine.

    I'm hoping they fixed whatever was wrong and that's that. But I'm prepared to go home tonight and find it down again. It never fails, right?

    Working From Car Dealership

    Okay, I realize I'm going to sound like I'm so living in 1996 or something, but I have my car getting worked on this morning at the dealership and they have free wireless networking. This is crazy shit. I can get stuff done while I wait. Can't beat that.

    Speaking of Internet access, our Comcast cable 'net access seems to be giving me fits in the last couple of days. The DNS lookups... don't look up. Like, it just times out. Sometimes you can get common sites - google, Yahoo! - to come up, but that's about it. I tried resetting my router and my cable modem (just in case it was a hardware problem; I hadn't rebooted either for like a year) but to no avail - DNS still lags. Jenn's calling Comcast today.

    Third Generation (3G) iPod Won't Charge From USB

    I bought one of the fourth generation (4G) iPods - the 60GB iPod Photo - and it came with a USB charger and a USB-to-dock connector cable. I plugged it in, attached the iPod, and it charged right up.

    Later, I tried to attach Jenn's iPod (my 3G 15GB iPod) to that charger to charge it up, and it doesn't charge - it stays on, but it doesn't charge.

    Turns out this is a known issue. The Apple Store page for the USB charger says it "supports iPod shuffle, iPod mini, iPod photo and iPod with click wheel." Which subtly excludes 3G iPods (they don't have a "click wheel").

    Interesting that they don't outright say anything about this anywhere in the official Apple support section. You'd think more people would wonder about this.

    Mr. T Sings

    Holy crap. When did this come out? And you all thought William Shatner was bad.

    Stupid Headlights

    My damn driver's side headlight is out. This happened in September, which I fixed, then again in January. So this is the third time in six months I've had this shit.

    I called the Acura service department and I'm going in on Thursday to have them look at it. I told the guy I was using the Sylvania Silverstar headlights and he says he has them, too, but he had to rewire his truck to handle them.

    I most certainly did not rewire my car, and he thinks it's probably too much. I'm going to get the factory headlights (which previously lasted me like two years), have them do a cursory check, and call it a day.

    iTunes Art Importer

    Just a quick note: I'm working with iTunes Art Importer 0.9.2 and I gotta say, it rules. (I'm not doing the "automatically apply the best guess" style import; I'm doing it album by album... but it's still the bomb.)

    Multi-User iTunes

    1/3/08: Updated for Windows Vista and clarified the instruction set so it's easier to see the intention of each step.

    I fully intended on getting Jenn a present for our anniversary. I really did. I wanted to get her an iPod Shuffle, sort of as a starter MP3 player, since I have an iPod and use iTunes to manage my music library (and have a lot of AAC encoded music).

    I took her to the local Apple store and after seeing all the options, she determined she wanted a player with a UI (which I can't really blame her for). The problem is, the first player up from the Shuffle is the iPod Mini, which isn't a bad little player, but for $50 more you can get a straight-up iPod with five times more space, so why go for the small one? Then Jenn says she'll kick in some money to offset, which puts us into a new price bracket...

    ...and so the justification goes. Point being, I went in to get her an iPod Shuffle but walked out handing her my 15GB iPod and buying myself the 60GB iPod Photo. I'm not sure how that happened, but it did.

    Which means now we have two users on a Windows computer, both of whom want to use the same music library and such. So for folks in a similar boat, here's how you do it.

    IMPORTANT NOTES:

    • This is all at your own risk.  If it doesn't work for you, I'm sorry, but I can't offer individual support.
    • You may not be able to follow this verbatim. If these steps don't work precisely, I recommend looking at the intent of the steps - putting the iTunes library in a central location and creating links to it from individual user profiles - and adjusting things according to your setup.
    • As new versions of iTunes, Windows, etc. come out, I may not always update or catch all the little "gotchas." I originally wrote these back around iTunes 4 time frame (but I just followed these with iTunes 7.5 on Windows Vista)... things change, versions change, OSes change, and I can't keep these up to date for every possible combination of software.
    • You must have Administrator privileges to set this up. You don't need Admin rights once you've got it set up, but some of the stuff you do here needs to be run as Administrator, so make sure you can do that. 
    • You need to be comfortable at a command prompt. If you're not, this may be very frustrating for you.

    Now... here's how to get it running:

    1. Get the required tools. You'll need a tool that allows you to make symbolic directory links.
      • On Windows Vista, this is built in - the mklink command.
      • On Windows XP, you need to go to SysInternals and download a copy of "junction" if you don't already have it and put it somewhere in your path (like the C:\WINDOWS\System32 folder); you're going to need to use it from the command prompt later.
    2. Make sure everyone runs iTunes once. For each user you want to set up, make sure they've run iTunes at least once so they've accepted the EULA and iTunes has created their initial/empty library file.
    3. Choose the iTunes library you want to share. Decide which user's iTunes library you want to be the main one that everyone else will share. You'll be manipulating this library. I will call it "the main iTunes library" from now on so you know what I'm talking about.
    4. [Optional] Consolidate/move the main iTunes library into a shared location. iTunes has the ability to automatically manage your music folder and ensure it stays organized. Allowing it to do this as well as consolidating all of your music into one place will save you a lot of headache when you find that one user can't access all the music that another user can due to security restrictions. Move your library into a shared location (like create a folder called  C:\Users\Public\Music\iTunes Music in Vista or the C:\Documents and Settings\All Users\Documents\My Music\iTunes Music in XP and move it there) using the Consolidate feature to save some pain later.
    5. Find the main iTunes library. The iTunes library for each user is stored in a folder called "iTunes" inside each user's "My Music" folder. It has an "itl" extension and is generally called iTunes Music Library.itl. You will probably see an iTunes Music Library.xml file in there, too. Both of these are part of the library, so when you're working with the library, copy them at the same time and keep them together.
      • In Windows XP, it will be in C:\Documents and Settings\username\My Documents\My Music\iTunes.
      • In Windows Vista, it will be in C:\Users\username\Music\iTunes.
    6. Back up the main iTunes library. Copy the main iTunes library files somewhere safe for backup purposes. Just in case something goes wrong.
    7. Create a shared iTunes library folder. Create a new iTunes folder that all users have access to. I recommend putting it in the "Public" or "All Users" areas so you don't have to worry about security issues. If you consolidated your library like in step 4, you'll have an "iTunes Music" folder in the "Public" or "All Users" music folder (given your version of Windows). Make a parallel folder to that called "iTunes Library."
      • In Windows XP, this will be C:\Documents and Settings\All Users\Documents\My Music\iTunes Library.
      • In Windows Vista, this will be C:\Users\Public\Music\iTunes Library.
    8. Copy the main iTunes library files into the shared iTunes library folder. As simple as drag and drop - copy the .itl and .xml files from the main iTunes library into the new shared library folder you just created.
    9. Create symbolic links to the shared iTunes library. You're logged in as Administrator (or otherwise have Administrator rights), right? Here's where you really need them.
      • Open a command prompt. In the Start -> Run box, type cmd and hit Enter. A command prompt should pop up.
      • For each user who needs to share the iTunes library...
        • Change to the user's music folder.
          • In Windows XP: cd "\Documents and Settings\username\My Documents\My Music"
          • In Windows Vista: cd "\Users\username\Documents\Music"
        • Delete the old iTunes library folder and all of its contents. (This is why you backed the main library up earlier.)
          rmdir /s iTunes
        • Make a symbolic link to the new shared iTunes folder. This will replace the old iTunes folder and will "fake out" iTunes so it thinks it's talking to a local user's iTunes library.
          • In Windows XP: junction iTunes "C:\Documents and Settings\All Users\Documents\My Music\iTunes Library"
          • In Windows Vista: mklink /d iTunes "C:\Users\Public\Music\iTunes Library"
    10. Verify the settings by logging each user in. Everyone you just set up should now be working off of the same iTunes library. Have each user who's sharing log in and verify they can see the shared library. Do not use "Switch Users" - you must fully log off each user and log the next one on. They will all have to set up their own preferences (like their iTunes account, their shopping preferences, etc.) but they will all have access to the same music library and the same playlists.
    11. [Optional] Update music library/import settings for each user. You may need to set up each user account to import music to the new shared music location. You also may need to update the settings in iTunes to keep the library organized (if you're using that). I've had hit-or-miss luck getting these settings to come along for the ride. By default, people will be set up to rip music to their personal iTunes folder (you probably don't want that) and to keep the music library organized (you probably do want that).
    12. That's it! You're done!

    There are a couple of interesting caveats to note when working in this scenario. Some good, some not so good.

    • Everything is shared. Literally everything - playlists, ratings, etc. If one person changes a song rating, it gets updated for everyone sharing. If you're anal like me, that means you'll tell everyone else not to rate anything.
    • You can set up different users with different iPods. So I can sync my iPod with playlists X, Y, Z and Jenn can sync hers automatically with playlists A, B, C. No problems there.
    • Authorization for music is shared. It doesn't seem to matter which user's iTunes account purchases music, everyone on the computer has access to it and can play it on their iPod. For example, Jenn bought a song last night using her account, but when I log in and sync the song to my iPod, it plays just fine. QTFairUse and myFairTunes can also will take care of un-DRM-ing music for multiple accounts.
    • You can't have multiple users simultaneously logged in and using iTunes. That includes the "fast user switching" thing Windows provides. If one person is using iTunes, no one else can be using iTunes on that computer.

    I haven't run into any other issues.

    AGAIN, PLEASE NOTE: Your mileage may vary. You may need to adapt folder/file paths to match your system; this set of instructions is pretty simplified so it should work with the out-of-the-box default sort of system. Also, you definitely need to run this with an account that has Administrator privileges. If you're set this up with limited accounts, you probably won't get too far. (You don't need Administrator privileges once it's set up, just while you're setting up.)

    All instructions here are provided for your UNSUPPORTED use and AT YOUR OWN RISK.

    posted @ Sunday, April 10, 2005 12:19 PM | Feedback (15) | Filed Under [ Media ]

    Electronic Thumb Twiddler

    Someone needs to make a combination of the Powerball Gyroscope and a thumb-twiddler. An electronic thumb-twiddler, sort of. You could have it twiddle your thumbs for you. There could be a web site where people post their TPM (twiddles-per-minute) measurements. "Hey, check this out - I can twiddle my thumbs at 11,000 times per minute!" Work meetings would take on a whole new dimension. There'd be a constant subtle hum as everyone in the room worked on their twiddle rankings.

    A revolution, I tell you!

    Stream of Near-Consciousness

    Screw that whole "Stairway to Heaven" thing, man. It's all about Ozzy's "No More Tears."

    Bought a 32" TV from a friend of mine at work and, with help from another friend, got it up the stairs into my game room. (I seem to be doing a lot of television related operations lately, don't I?) Went to the store after work and, with the measurements of the TV from the TV's manual, I picked out an entertainment center (corner unit) to put the thing on because the one we already had in the game room wasn't big enough (or weight-bearing enough).

    It's pretty cool. It's got the base with a couple of shelves under it that you can put components on, then a couple of shelves that sit above the TV you can put CDs or whatever on. The box said "fits most 32-inch TVs," which is what I bought, and the measurements were right. Fine.

    Got the thing home, put it together, and, with Jenn's help got the TV up there.

    TOO SMALL. Well, technically the right size, but the TV's more front-heavy than anything and was sitting there sort of precariously. If the cat jumped on it, it'd all be over.

    Well, can't take it back now, and I don't have anywhere else to put the TV, so....

    ...unscrew the top part (with the shelves and the CD rack and all that) so we can push the TV back a bit (so the back of the TV hangs over the back of the stand) and... presto! Sits perfectly.

    Of course, now I've got the top half of a corner entertainment unit that I have no idea what to do with.

    But it looks great!

    Lots to try and get done this weekend. I want to adjust my awning so the motor doesn't try to over-extend the awning when it rolls out. I also want to get the cord mounted so we can just leave it plugged in.

    I had a dream last night that I was in this Disneyland-style theme park and had lost my ushanka. There were all sorts of them on the ground, there were vendors selling them... but none of them were mine. I went to the lost and found, right near the skee-ball game, but they didn't have my hat, either. Never did find it again.

    It Is SO Reproducible

    I went down to Sharper Video (the TV repair shop) at noon to verify with my own eyes that the problems I was seeing aren't there anymore. I took my test DVD along with me.

    All that shit is so right there. 100% reproducible.

    I pointed it out to Terry (the repairman on the case) and then he finally saw it. With a moving picture on there it's harder to tell; but when you get something like a commercial where it's all white background with just the company logo or something like that, BAM! there it is.

    Then Terry ran some of his own tests and, sure enough, it's there. Apparently he wasn't the one that proclaimed irreproducibility, just the one who was showing me what's going on.

    I don't know what the next steps are, though, and neither does Terry. He says that it's a combination of several parts that do what the set is doing and just replacing the tube isn't going to fix it. He's going to call Sony to see what they say. If Sony says the TV is still within factory spec (even with the image defect), I'm hosed, because that's the best it'll get (even though that's not how it was when I bought it). However, if it's not within factory spec and Sony can't provide a way to fix it... well, then I'm also hosed because I'm going to have to fight the warranty company for a new TV.

    Terry showed me that at this point the best they can do is try to adjust the picture with various pincushion and other adjustments to make the picture as good as possible, but every time they adjust one thing, something else goes out of whack. They don't have the equipment to "refocus" it (or whatever the TV-tech-speak term for "refocusing the TV" is) at the repair shop; apparently Sony does that at the factory with some serious computer-controlled equipment.

    In all honesty, I'd just as soon have a new TV and not hassle with this. I'd even be willing to settle for a check (or store credit at an electronics store) for the same amount of money that NEW authorized the repair for. I'll get one of those DLP sets. I guess we'll see.

    Even though it's not fixed, I felt pretty good going down there and seeing that I wasn't just crazy - the problem really is there, and it's not "environmental."

    I was so stoked (again, not pleased that it's not fixed, but pleased that it's reproducible and is something they can now aim to fix) that I went to Target and bought myself a copy of Elektra. While I was there, I saw that 13 Going On 30 (another Jennifer Garner movie) was only $10, so I picked that up, too. Oh, and Star Wars Episode III figures were only $5 so I got Yoda (with "spinning attack" action) and R2-D2 (with "droid attack" action). (I get the Yoda figure from every movie. I just dig Yoda. But I didn't have R2, and I needed him to fly in my Millennium Falcon, didn't I?)

    They Still Can't Reproduce It!

    Well, the TV repair shop called again. They still don't see what I'm talking about. No problems over there.

    I'm going in today at noon to check it out and verify with my own eyes that this thing isn't messed up. I'll stop by home to get my test DVD to see, once and for all, if it's just environmental.

    If it's environmental, honestly, I have no idea what I'll do. I guess I'll have to sell it or something and get some TV that's not affected by "my environment." Or I'll have to do a load of experiments to see if I can determine what the environmental effect is. I have no freaking clue. If it's seriously not reproducible, basically, I'm hosed.

    Anyone interested in a 40" Sony TV?

    TV Issues Not Reproducible?

    The TV repair shop just called me and they say they've been playing the set for four days now and haven't seen the problems I've been talking about. No distortions, no color changes, no nothing.

    They can't reproduce that shit?

    Unbelievable. I told them precisely what to check (solid colors on the screen, straight lines like the bars that show up in widescreen mode, etc.) - and how I illustrated it to the guy who came to my house - and they're going to ensure the tech who's working on the set has checked all that. I also mentioned that we used to live in the same area as the TV repair shop and if the North Pole plays a factor in this thing, that's going to be less of an issue in the same geographic region.

    If they can't reproduce it, I'm going down there to see with my own eyes that the problem isn't there.

    If it turns out it really isn't there when it's in the shop... well, it looks like I'm screwed. They will claim it's "environmental" (sure it is - the North Pole is environmental) and they can't reproduce it, at which point I have to fight with the National Electronics Warranty company to get them to replace the tube, which, I'm told, rarely happens for environmental issues.

    So I'd have to get a new TV, which I'm not anxious to do. Or try moving this TV into a different room, which really isn't going to work. Or try changing things around in that same room to guess and see if I can figure out what's going on.

    If the guy calls me tomorrow, they're sending the TV back to me next Tuesday. If he doesn't, then they're checking into it some more.

    Let's hope he doesn't call me.

    Sin City

    On Sunday we went to see Sin City with Stu and Tiff.

    Hands down, that movie rocked.

    I was always a big fan of the comics (and have all of them) but when I saw they were making a movie I could hardly wait to check it out. I wasn't disappointed.

    They combined the original Sin City story (with my favorite character, Marv) with That Yellow Bastard and The Big Fat Kill. The really cool thing was that they sort of intermingled them so you could see how the timelines overlapped (which is also in the comics, but not quite as obvious if you're not paying attention).

    I didn't really picture Mickey Rourke as Marv, but he did a great job. I was also pleased to see Nick Stahl (who I've grown to love through Carnivale) as the Yellow Bastard.

    The best part of the whole thing was that they stuck dead on to the comics. I mean, so dead on that you could hold the comic up to the screen and match the various shots with panels in the book. The dialog was word-for-word out of the comics. That was awesome. I hate it when they adapt a book for film and then totally deviate from the original work. This was everything I hoped it would be.

    Check it out. It's worth full price. Especially if you liked the Kill Bill series, this is right up your alley. I can't wait until it comes out on DVD. I'm getting the super-mega-ultra version (in whatever form that takes). Too cool.

    posted @ Tuesday, April 05, 2005 11:49 AM | Feedback (0) | Filed Under [ Media ]

    Interesting Stuff To Buy

    This new Visual Studio Hacks book looks kind of interesting. I might have to pick that up. I wonder how relevant it is to VS 2005. Eric J. Smith reviewed it and gave it 5 stars, which holds some weight (even though he did contribute to the book...).

    Elektra is out on DVD today. Might have to pick that up this weekend. It wasn't terribly faithful to the comic, but it was reasonably entertaining, and how can you pass up Jennifer Garner?

    Comics Price Guide

    I'm trying to figure out the best way to track my comic collection. In order to get a rider on my homeowner's insurance policy, I need to be able to provide them with a complete inventory and estimated value of each issue.

    I thought about how you could have a bar code scanner that you could use to easily scan comics into a database, but not all comics have bar codes on them, so you'd have to go by ISBN or some other unique number... but then, you also need to have the database to look the information up in, which is not something I'm eager to start maintaining.

    I searched around for a while and found ComicsPriceGuide.com, which seems to be as close as it gets. You can track your comics online (which is a little disturbing to me from a backup perspective, but I guess you gotta trust folks) and they keep a running tally of what you have and what each is worth. I signed up for the free membership which will let me track up to 50 books just to see what they offer. If it's any good, maybe I'll sign up for the $45/year premium membership and just start tracking things there.

    The Awning Goes Up

    I bought, from Costco, one of those Sunsetter retractable awnings. 18 feet long, motorized with remote control and protective cover.

    It showed up on Thursday, March 24, in a 19 foot long tube. Not super duper heavy, but definitely not a one-man job. Even if it was light, 19 feet long is far too awkward to manipulate by yourself. I was gonna need help.

    My dad and my friend Stu said they'd help, so I decided to plan on putting it up on the next sunny weekend.

    It rained the next weekend, so this weekend was it. Not really sunny so much as "not actively raining."

    We got started at about 11:00a, figuring (from the video that Sunsetter distributes and the constant claims that putting up such a thing is an easy task) it'd take us a couple of hours. We pulled the awning out of the tube and set to work.

    Problem one: finding the wall studs. Hanging pictures in the house isn't really a problem for me. I can find the wall studs without any issues. Finding them through the siding and facing for the wall is quite another story. The stud finders we had (two different ones) seemed to be reasonably unreliable. Not only that, but the studs themselves seemed to be sort of haphazardly located - sometimes they were on 16-inch centers (standard for construction around here) and sometimes not. We sort of figured out the builder's logic by a combination of measuring and trial and error (which meant poking small nail holes in my siding in order to get test to see if we were right about the stud's position).

    Finding the studs took probably two hours. Seriously. It was ridiculous how difficult it was. In some cases we found them via measuring from the last place we confirmed a stud location; in some cases we figured that being near a door or window or light fixture indicated a stud's location; and in some cases we found the studs from the inside of the house and measured the corresponding distance outside.

    Problem two: determining the mounting bracket positions. Less an issue of "where along the length of the awning do the brackets go?" and more "how do we put these huge mothers flat against a house where the siding isn't flat?"

    The awning came with all sorts of helpful things: an installation video (which we did watch), a set of written instructions, hardware to mount the awning to either a masonry or wood frame house, a stud finder, a drill bit the correct size for pre-drilling the holes for the screws in the house... but no shims to level out the brackets being mounted. Also no chalk line to mark along the house where the awning needs to go. Off to Home Depot.

    Stu and I picked up some shims and a chalk line. Brought them home to find my parents sleeping on the couch because "we took so long." Woke my dad up and got back to work.

    Dad test-mounted a bracket to see what sort of work we'd need to do with the shims. After some trial and error, we determined a sort of system involving some reasonably complex cutting and drilling of various shim combinations that would yield a level mounting for a single bracket against the house. Stu got on marking up the shims (where to cut/drill) while I cut and drilled and Dad mounted the first bracket. So far, so good.

    We got a second bracket up and while Stu was mounting that one I started pre-drilling the rest of the holes for the other brackets (seven total brackets).

    Problem three: nails. What are the odds that you find a stud (using the very complex "guessing" system we had) and at the exact spot you want to drill there's a nail? Turns out, pretty good. That happened to me twice. In all honesty, had it happened a third time, we'd have been screwed - at the place where it was, we were running out of studs to mount the brackets (towards one end of the awning). We'd have had to move all the brackets up or down to compensate for the problem, and then... Actually, let's not think about it. Not good.

    Problem four: rain. We got three or four of the brackets mounted when it started to rain. Not hard, but enough to make it cold and miserable. Enough to probably make it pretty dangerous to be using power tools. And enough to soak down the instruction booklet so it had to be treated like the Dead Sea Scrolls or something.

    Dad had long since gone inside, but Stu and I are cut from similar cloth - we weren't about to get this far and just give up. We needed closure.

    We finally got all seven mounting brackets up when the rain stopped.

    Dad came out and helped us lift the awning into place on the brackets and screw the retaining bolts in to hold it into place. One of the bolts was a little tricky and reluctant to work, but some persuasion with a hammer and a pair of channel locks did the trick.

    We plugged it in and hit the button on the remote: Success! The awning rolled itself out and looked great. It's big enough to cover almost my whole back porch, finally making it usable in the summer (it's really hot out there and there's no shade). It rolled back in just as well. Awesome.

    In all, it took us probably six hours to get the thing up and running - much longer than we anticipated. But it works, and we were all very happy about the accomplishment.

    We didn't get the protective cover mounted (it's a cover that wraps around the awning when it's retracted and protects it in the winter) but that's a job for another day. I'd call that trivial in comparison.

    And today... I am so sore and stiff it's not even funny.