almost universal

Instead, I think[,] like most people, the[y]se developers are cursed with an agenda of selfishness. So long as they have an unrestricted ability to play in their little sandbox, they’re content. Start throwing up barriers, and they’ll elect or adopt any philosophy convenient to their case.

That it’s often libertarianism seems more a coincidence of convenience than anything else.

They also have the weird habit of saying “we” when they mean “me.”
.

(flammable gas + open flame) – common sense = BOOOOM!

Not like we haven’t see this before . . .


Man blows up apartment spraying for bugs?
| Oddly Enough
| Reuters

.

NEW YORK, July 21 – A New Jersey man trying to exterminate insects in his apartment blew it up instead, the New York Daily News reported on Monday.

Isias Vidal Maceda was unhurt in the incident, but 80 percent of his apartment was destroyed, Eatontown, New Jersey police told the newspaper.

The accident occurred as Maceda was spraying for pests in his kitchen. Somehow the bug spray ignited a blast that blew out the apartment’s front windows and triggered a fire that quickly spread, the newspaper said.

Police told the newspaper that the Saturday blaze also caused smoke damage to the apartment above.

Can you say, aerosol propellant and stove pilot light?

Water water everywhere but nary a drop to keep.

The story could have been better written: the central issue is that the law is archaic and doesn’t reflect today’s reality (who in 1917 could have predicted how we live now?). I have 5 water barrels at my place and am re-doing how they are filled and drained: I don’t expect to be arrested for that.

Saving rain: How much is too much?.

Harvesting rain water is illegal? I think I am missing something here. If I collect water and use it to water my crops (which then flows into the ground or evaporates off), where is the harm? It’s not like a dam, if you really want to bring up a resource diversion with serious impacts.

Crazy.

The story could have been better written: the central issue is that the law is archaic and doesn’t reflect today’s reality (who in 1917 could have predicted how we live now?). I have 5 water barrels at my place and am re-doing how they are filled and drained: I don’t expect to be arrested for that. In fact, I suspect if more people did harvest water in some kind of containment system, we would have less street flooding in winter. It all flows downstream eventually . . .

iTunes library, fixing a broken one or moving one

find your Music folder/directory where these files live: you are looking for iTunes Library and iTunes Music Library.xml The XML file is a backup of the other file, which is the one iTunes uses: iTunes Library: data iTunes Music Library.xml: XML document text Move the iTunes Library file aside (rename it, put in your home directory, whatever)…. An example: <key>Location</key><string>file://localhost/private/Network/Servers/shuttle/usr/local/share/mt-daapd/media/Abbado_Berliner%20Philharmoniker/Mahler_%20Symphonie%20No.%205/01%20Trauermarsch.%20In%20Gemessenem%20Schritt.%20Streng.%20Wie%20Ein%20Kondukt.m4a</string> A quick and dirty way to do it on the command line, ie, in the Terminal?


I see some discussion about fixing busted iTunes libraries, either when moving one on the same computer or migrating to a new one. Here’s what I have found works for me.

Bonus: no slow AppleScripts or payments (donations cheerfully accepted and squandered). After almost 3 1/2 years more than four years, this continues to be a widely-read posting and still seems to work. I thought it was made obsolete with iTunes 8 or somewhere along there… As it’s been viewed more than 111,000 times and been found useful a few of those times, I wouldn’t object to a donation. But rather than spend your money, you could do me a favor and help yourself at the same time. Click that link and if you buy something at Amazon.com, they’ll send me a penny, maybe more. No obligation but also no cost to you.

As an aside, if you are going to comment along the lines of “I just moved my music from one Mac to another and nothing broke so why is this so complicated?” please don’t bother. The title specifically mentions a BROKEN library, you dig? Or perhaps your library has outgrown the current location and you want to move it but retain access to it as your primary library and keep all your playlists and history. That’s what this post deals with, not replicating a working installation, but changing one to suit a new environment or fixing a botch attempt at it. Peace.
And for goodness’ sake, read all the comments: some good stuff down there. Sadly, I had to throw away all the comments, as I disconnected them from the posts they were in response to.

First, what I have discovered about how iTunes manages music collections. There are two files it uses, one that is binary (ie, machine readable for faster performance on searching, sorting, add/edit/delete operations) and one that has the same information but in a human readable format (for a certain subset of humans who can read XML natively). The XML file is written from the binary file as a backup (check the dates to confirm).

Picture 16.jpg

iTunes will try to open the binary file when it starts up and if it’s not readable, it will re-create it from the XML file. That’s what we’re using to fix the damage or make any sweeping changes.

First, close iTunes. You’ll be working with files it uses/writes to and you’ll muck things up if you makes changes to files it has open and then your changes get clobbered, leaving the binary and the backup unusable. Don’t do that.

  1. find your Music folder/directory where these files live: you are looking for iTunes Library and iTunes Music Library.xml
    The XML file is a backup of the other file, which is the one iTunes uses:
    iTunes Library: data
    iTunes Music Library.xml: XML document text
    [NB for Windows users: you will be looking for iTunes Library.itl and iTunes Music Library.xml.]
  2. Move the iTunes Library file aside (rename it, put in your home directory, whatever). Create an empty file with the same name (or simply mangle a copy of it: seriously: this is where the backup copy comes in). If you are in the Terminal, you can just use touch(1), as in touch iTunes\ Library. You can also just open a file in whatever other editor you like and save it as iTunes Library.
  3. You’ll need to edit the XML file, in a text editor, not a word processor (not Word, as if I have to explain that). vi, emacs, pico, nano, TextWrangler, BBEdit, TextMate on the Mac side, NotePad/WordPad, et al on the Other Side. You are going to search and replace the current location with the new one. Every file/track/song has it’s own stanza in that file and within that, there is a Location key. You need to replace the old one — as an absolute path — with the new one.
    An example: <key>Location</key><string>file://localhost/private/Network/Servers/shuttle
    /usr/local/share/mt-daapd/media/Abbado_Berliner%20Philharmoniker/Mahler_%20Symphonie%20No.%205/01%20
    Trauermarsch.%20In%20Gemessenem%20Schritt.%20Streng.%20Wie%20Ein%20Kondukt.m4a</string>
    Picture 17.jpg
  4. A quick and dirty way to do it on the command line, ie, in the Terminal?perl -pi -e.backup s|oldpath|newpath|g iTunes Music Library.xml
    perl -pi.backup -e s|oldpath|newpath|g iTunes Music Library.xml

    This will create a backup file (cleverly called “iTunes Music Library.xml.backup”)

  5. Now, test it. iTunes needs to find that iTunes Music file and since it can’t read it (it’s empty or damaged), it will create one from the backup you just edited. Give that a minute or three to complete. See if your files are found and playable. This should also keep your playlists (which are just another XML stanza with the elements being track ID numbers).

This has worked for me more than once and if it’s reproducible, it should work for you. But note that I recommend a backup copy of the XML file. You can go back and re-do it from scratch if you get into trouble.

And I expect this is extensible in many interesting ways, like merging libraries from different users (something with diff and patch, perhaps?), switching from one repository to another (maybe a large home repository and a smaller traveling one). I’m not clever enough to figure those out, but if anyone else does, I’d love to hear about it.

[update] This looks interesting:

I had to do some more things with my iTunes library lately – like extracting all that ratings and exporting them into a new music player software I liked to test. I therefore wrote myself a little tool in C# that does the job of reading in the whole iTunes library and giving you programmatically access to that library. It only needs to have read access to the Mediathek.xml file iTunes stores in it’s music folder and you from there on can work your way through the bazillions of music tracks you may or may not have in your library. It even does the find-and-replace job a bit easier than the solution mentioned in the article above.

quote of the day

via email: It’s kind of like how I remember when the only place you could get organic cellphones was at the neckbeard freetard web site, and the phones kind of sucked. But there were people who bought them anyway, because they believed that things could be better.

via email:

It’s kind of like how I remember when the only place you could get
organic cellphones was at the neckbeard freetard web site, and the
phones kind of sucked. But there were people who bought them anyway,
because they believed that things could be better. [RJL20/elsewhere.org]

zealotry

[From 5 reasons to avoid iPhone 3G – Free Software Foundation ] The FSF is something I would like to support but the claims they make are so extreme , I just can’t. There’s an underlying elitism there, that only people who can program computers should have them (can anyone argue that without shrinkwrapped software, we would see fewer computers and likely a lot of industries might never have been born (is there a freeware DTP application that rivals PageMaker or it’s successors?

[updated Fri Jul 18 12:36:24 PDT 2008]: As the comments illustrate, I can’t argue against a position I don’t understand. Don’t like the iPhone, iPod, whatever? Don’t buy one.

Some helpful hints:

  • Tell people what the trade-offs are when they “buy” these new devices/services (buy is in “quotes” since increasingly, we are buying access or a license to use something, rather than an actual thing).
  • Explain what happens (not what might happen or what it means in moral terms) when these fail or the hidden pitfalls of the relationship are exposed.
  • If possible, show people where they lose money, as opposed to freedom or other philosophical principles: the man in the street understands one better than the other and being unwilling or unable to frame your argument in terms that are mutually understood means you’re wasting your time.

As skeptical as I am of the free market and consumerism, it makes me itchy to find myself defending it against an agenda I don’t understand. I don’t think the free market is an unalloyed good, as I don’t believe it is truly free. It’s a rigged game. The Invisible Hand is in my wallet.

As best I can tell, the LPF/FSF/GNU folks admit to no such weaknesses or trade-offs. The response will be that I need to read all their back-catalog of position papers and manifestos. <sigh>

Gruber points to this from the FSF:

Wait, locked up? Prison? It’s a phone. Aren’t we being a little extreme?

[From 5 reasons to avoid iPhone 3G – Free Software Foundation]

The FSF is something I would like to support but the claims they make are so extreme, I just can’t. There’s an underlying elitism there, that only people who can program computers should have them (can anyone argue that without shrinkwrapped software, we would see fewer computers and likely a lot of industries might never have been born (is there a freeware DTP application that rivals PageMaker or it’s successors? For that matter, I’m still looking for an office suite that works as well as the Leading Brand . . . ) Would the internet be as ubiquitous as it is without the millions of commodity (read: Windows) PCs out there? Hmm, maybe it would be better if it wasn’t . . .

I think the bottom fell out when I saw the bit about Steve Jobs hating competition. He introduced a new phone platform in a mature market against a whole array of entrenched players — Nokia, Motorola, LG, Samsung, RIM, Palm — and seems to be doing quite well. There were digital music players before the iPod: where are they now? I think he craves competition, or he might have been content to run Pixar and count his money. And there is something a little disingenuous about a MacArthur grant winner arguing about business models. $240,000 over 5 years isn’t a bad wage. For someone obsessed with fairness, how fair is it for a grant recipient to offer products and services that compete against organizations that are not grant-subsidized?

Seriously, I think there is a need for the work the FSF is doing but I wish they could make their case without the exaggerated claims.

Continue reading “zealotry”

Jack Shedd is an honorable man.

The author and proprietor of Big Contrarian just sent me an Amazon gift card for the simple act of noting a small error on one of his recent posts. A simple “thank you” would have done (he says, as he greedily lingers at Amazon.com) but I’ll make good use of this.

The author and proprietor of Big Contrarian just sent me an Amazon gift card for the simple act of noting a small error on one of his recent posts. A simple “thank you” would have done (he says, as he greedily lingers at Amazon.com) but I’ll make good use of this.

Thanks.