found_drama


Exist as a single unrepeatable moment in time.


    Archive for November 2004

    #monday eve blues.

    i’m sure it’s mostly just the exhaustion kicking in, but that side project is kind of a downer right now. i’ve determined that #2 on the “room for growth” list is vaguely irrelevant b/c I can safely use backticks as to enclose the fields. (my test w/ some sample data went swimmingly.) #3s thru #5 however are where the headaches are at. for whatever reason i’m finding myself having a hard time w/ PHP’s MySQL API. A lot of these methods/functions are counter-intuitive to me. was it that long ago that i was last working w/ all this? or did i just not get it in the first place? it seems to me like a simple enough function to whack together: “does this exist already? no? create it! yes? gimme the ID!” alas, my ass feels bitterly kicked.

    yes, blame it on the exhaustion.

    currently playing: sasha “immortal”


    #iTunes ish (part 453).

    James Duncan Davidson has a neat little post about how iTunes actually kind of sucks in the LAN environment. His three major points:

    • When playing from a remote iTunes, play counts and last played information isn’t kept. This breaks the “Recently Played” and “Top 25 Most Played” smart playlists.
    • It’d be nice to manage playlists from any of the computers that I connect up to my master copy of iTunes.
    • In fact, it’d be nice not to have a concept of a master copy of iTunes. I want all of my music on all of my machines to sync up. It’d provide a great back up and I could buy music from any machine without having to remember to move it back to my main machine.

    Which I can relate to. How many times have I looked at the play count of the shared “master” library and said this doesn’t seem right… Or else sharing from that library and having to jump onto VNC to make sure that the track actually gets tagged w/ the 5-star rating I want it to have.

    I suppose I can see the logic behind why sharing libraries does none of the above. Keeps the punks at the office from incrementing my play counts, I guess… But if iTunes is able to authorize and de-authorize different computers from being able to play different “protected AAC” files then one ought to be able to authorize or de-authorize different client instances of iTunes from interacting with those finer points of the meta-data. Seems to be a perfectly reason solution to me.

    Oh — and in the tradition of just tacking on some semi-related point at the end — I should be able to share my iPod library over the LAN, too. WTF?


    #iSpy (v.0.2-alpha).

    A little PHP buggery from the “just-for-fun” department, found_drama is … if not proud, at least delighted to present: iSpy (alpha version 0.2) — a random generator for “Eye Spy” style personals ads. (You all know the type…)

    Example:

    You: all leathered up with nowhere to go at the gym, like about a month and a half ago. Me: non-stop dancer with an unfortunate lack of rhythm. Would have said something then but didn’t have my Binaca. Wanna go to church?

    …and other assorted randomness.

    Where to go from here? Take the clunky, somewhat-less-than-elegant arrays that we’re using to drive the thing now and construct a series of objects to represent the $you, $me, $whenNwhere, $whyNot, and $whatNext… Should be fun…


    #gift.

    right-click, save as…


    #T-day Miscellany.

    1. First and foremost, my best wishes out to everyone. Especially those poor schmucks who (like me) find themselves working today — even if it is “just on-call”. For your sanity, and for the sake of everything that is still good and true in this sick, sick world, if you are working today, do something subversive. Take a couple of whisk[e]y shots on the job. Punch out early, except forget to punch out. Ask a customer point blank why they’re hassling you today instead of hassling their uncle or otherwise spending it with their family. Anything at all.
    2. All I want for Xmas is one of those mini Apple stores in the Burlington Mall. I mean seriously… People from Montreal are in Burlington to shop all the time anyway. So between that and Small Dog’s presence (or maybe that’s why there’s NOT one here…?), I would think this would be an ideal location for one. C’MON — FEED MY ADDICTION!
    3. Currently struggling with: getting XSL to escape particular characters that it finds in the input file during the transformation. In other words: process … process … change newline character to “\n” … process … change ” to ” … process… That sort of thing. Roadblocks so far though. Thinking that the answer might instead be to just wrap the output “just so” in backticks or some other “safe” character and then pipe-delimit the fields (like I planned to in the first place). More to follow…

    currently playing: “Body Count” by Front Line Assembly


    #google.com?q=’banana dog’

    Someone and I mean SOMEONE has an unhealthy obsession with bananas. (And it’s not me, I swear…) Truly some bizarre material here. And surprisingly, the link to the movie about the banana before the firing squad is still active.

    Banana what?

    Now is probably the time when you’re asking yourself: “What the hell are you doing Googling “banana dog?” Well, I know of only one person that can truly understand my response to that. Now if you’ll excuse me, my fortune awaits!


    #worst jobs in science (part 2!)

    Popular Science posts their 2nd annual Worst Jobs in Science list.

    ormally, researchers would use a centrifuge to extract fluids to be tested. But this is the one way in which the tampon is not an optimal specimen-collecting tool, because its true purpose is to hold liquid in. “Optimal recovery,” Garland says, “requires manual squeezing.” Wearing gloves, of course.


    #fighting the good fight.

    Via Boing Boing, we hear of one man’s quest to get vinyl ripped to MP3 and out onto the P2P nets since most of it is now apparently public domain. First problem that jumps out is:

    …need a record player with component outputs…

    …which just says (to me at least) that this guy doesn’t know thing the first about how the musical information is encoded onto that wax in the first place. Paranoid conspiracy theorists would speculate that the RIAA was protecting itself far in advance but anyone who knows better realizes that the raw output from a record needs some serious transforms (via a mixer or phono pre-amp) to get the levels right. If the raw signal went onto the record, you could get about 2-3 minutes of music on a 12″ b/c of how much physical space the bass waveform requires. Don’t believe me? Try phono pre-amping twice — turntable > mixer > phono input on your receiver. Pretty gnarly, huh?

    Yeah so… Uh, the rest of the obvious criticisms are all comments on that page.

    Currently Playing: BT – “Shame” (original album mix)


    #iTunes2MySQL2…

    As this project expands and meets head-on with this neat little nuance of Apple’s “plist” ish, I find myself at a fun little x-roads. To start with, there’s a whole lot of MySQL and PHP being re-learned at the moment. The funny part is, being an iTunes user, so much of my music collection is already quite well coded, accessible, and searchable. Why bother with creating a database version of it? Or re-inventing an XML standard to mark it up? Or anything along those lines?

    Because it seemed like the right thing to do.

    Anyway… To briefly re-cap: Creating a meta-data system for music libraries was easy and frankly kind of fun. Take the XML idea, whip up a fairly comprehensive DTD and blamo! But it’s no fun w/o wrapping it all up into a MySQL database, is it? So define a few tables and get yourself off and running!

    A few tables? (Well, it wouldn’t make sense to just store it all in one table, would it?)

    Perhaps the point all along was to create more work for myself — to create projects within projects… Once I’d set up the tables in the database, I said to myself Why bother entering 5,394+ songs by hand? Recall, iTunes stores most (if not all) of the relevant information at:

    • Mac OS X: ~/Music/iTunes/iTunes Music Library.xml
    • Windows: …\My Documents\My Music\iTunes\iTunes Music Library.xml

    What this means in practical terms is that I’ve already entered all those data. And so why re-enter it or copy/paste it 5000 times? Instead, would it not be a far better idea to code up some kind of XSL stylesheet that can run on the file and output something that can then be fed into MySQL via something along the lines of LOAD DATA INFILE 'records.cdf' INTO TABLE songs FIELDS TERMINATED BY '|' ENCLOSED BY '"' LINES TERMINATED BY '\n'; Or else have it spit out (NULL, 'blah', 'blah', 'blah', NULL) type lines and figure out some way of having the system use those.

    So, we came up with the iTunesLib2SQL.xsl XSL stylesheet… (credit where credit is due, much of this was gleaned from this example … but since I hate Perl so damn much…)

    Go ahead, give it a whirl. OS X’ers out there, make sure you’ve got Xalan and then stab this out:
    $ java org.apache.xalan.xslt.Process -IN ~/Music/iTunes/iTunes\ Music\ Library.xml -XSL ~/Library/XSL/iTunesLib2SQL.xsl -OUT ~/Desktop/iTunesLib.txt
    (where “~/Library/XSL/iTunesLib2SQL.xsl” is wherever you dropped the shared XSTL file…) (sorry Winfolks… don’t do Java on XP!)

    Any of that look familiar?

    So yeah… I’m pretty stoked about this so far. Not terribly difficult. And fun fun fun. Not sure about useful yet but whatever. “Useful” is for someone that gives a damn. Current room for growth:

    1. Converting iTunes ratings to single-digit integer values that work w/ this database format  DONE
    2. Figuring out how to get certain characters escaped during the XSL transform. It’d be nice if I got this far and then didn’t have the whole thing come crashing down around me b/c a song name has an apostrophe in it. Or an artist that goes by ‘Frankie “0″‘. Or carriage returns that snuck into the comments field. Or something like that.
    3. Getting the output album title to translate into the corresponding “album_id” for when the INSERT statement actually runs on that track…
    4. Likewise for the “artist_id”.
    5. Coming up with an efficient function that will detect the missing artists and album titles and create them (along with their IDs) on-the-fly.
    6. Controlling for silly screw-ups in the original data entry such as “Zero 7″ vs. “Zero 7 ”… (/sigh)
    7. Some other crap I haven’t thought of yet…

    CURRENTLY PLAYING: mix by Dan Cuthbert & Timo Rotonen — “Cranberry Juice and Ice” (check the download about halfway down that linked page)


    #better off, alright…

    Woke up with my left eye swollen shut… Stayed home trying to deal with that and yet still managed to spend my whole day doing work-related stuff but at least I have music here. And then this comes on via an old kozu mix. Damn you Ben!




    Creative Commons License This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License.