subtext, blog, aspnet, sql, downloads comments edit

Last year about this time I posted a database maintenance page that I created for cleaning up Subtext database things. Since then I’ve upgraded to Subtext and, while the old page still works, my blog has become more popular so the referral cleanup is more difficult. There are so many records coming in that even with a long timeout set, there’s too much and the delete operation times out. That leaves a huge amount of junk in the transaction log and is just problems.

I updated the page so you can select which referrers you want to delete using a checkbox list and the number of referrals deleted at any given time is 1000 so you don’t have to worry about the timeout issue. Again, this page will let you:

  • Clear the error log. Yes, you can do this from the error log page, too, but it’s nice to have all of this in a central location.
  • See how many referrals you have in your database vs. how many of those are from search engines. The page lists out what qualifies as a search engine or spam referral so you’ll know what this means. It’s basically just a list of expressions that the page tries to match the URL against - nothing fancy. This new version only shows you the matches from the selected search engines, though.
  • Remove search engine referrals from the referral log. Qualifying spam referrals are also removed.
  • Reindex the referrals table and shrink the database. Do that after you clear out the garbage referrals.
  • See some size statistics on your database.

Download the zip file, then drop the enclosed ASPX page in your Subtext “Admin” folder. It’s an administration page so you do have to be logged in as an admin to use it. It doesn’t add any navigation links to the admin site, so you do need to manually enter the URL to the page to get to it.


General Ramblings comments edit

We put up our fake, pre-lit Christmas tree this past weekend in preparation for the holidays. It looked a little sad once we got it up because it’s seen better days. The whole bottom row of branches was bent down very noticeably due to our three cats running around the base and riding the branches.

The evening we put it up, we went to bed and I had to get up around midnight because it sounded almost like someone breaking in. Really loud clinking of the ornaments. Came downstairs to find three ornaments on the floor in the hallway, one of which had been pulled clean off its hook. I replaced the ornaments, but higher than they were before so they wouldn’t be tempting. I have a feeling the entire bottom third of the tree will be bare before we hit Christmas.

Tree longevity is definitely a concern. I came downstairs this morning and heard a tinkle-tinkle sound and suddenly I saw our largest boy cat come from out of nowhere and land on all four feet. I don’t know where he was - near the tree, in the tree, or whatever, but I know wherever he came from, he jumped out. He wasn’t just standing there.

The star doesn’t stay on top of the tree straight. I’m not sure why. Probably the weight of it combined with the cats moving the tree around. Yesterday evening it was rotated all the way around so it looked like we put it on backwards. I’m not even sure how that happened.

The tree skirt is pretty much just a tangled wad of fabric around the base of the tree. It’s not worth fixing anymore because the second you do there are three cats running around it as fast as they can go… and then it’s wound around the base of the tree.

The bottom row of branches now touches the ground and the second row is on the way down. I’ll be having to get some pliers out to try to bend them back into shape when the holidays are over.

I’m hoping these cats grow out of it. It’d be nice not to have to consider wrapping the tree in chicken wire or something to stop the inevitable destruction. Hey, at least we’ve not seen puke with fake pine needles in it. Yet.

net comments edit

If you have a business of 25 employees or less and you’re looking for a great unit testing mock/isolation product, Typemock has a screamin’ deal running until December 17: Get five developer licenses for Typemock Isolator and one build server license for $80/month.

That’s a pretty awesome deal. At current prices, it’s $799 for a developer license and $2499 for a build server license. It’d cost you $6494 for five dev licenses and a build server. A year of the same licenses at $80/month is just $960. Not bad, eh?

Go check out the deal for more info, or just pick yourself up some licenses while you can. Again, it’s just running until December 17, so get in while you can!

General Ramblings comments edit

Thanksgiving is my least favorite holiday.

I don’t like turkey. (Yes, it’s OK to gasp at that, and I know it’s hard to believe, but I’m not the only person out there who doesn’t like turkey.) I don’t like most of the trimmings that go along with a traditional Thanksgiving dinner. Stuffing? No thanks. I’ve even been talked about on the How Stuff Works podcast during “Listener Mail” time because of my turkey loathing. I usually end up in one of two situations, neither of which are good:

  1. Eat only mashed potatoes and rolls for dinner. Maybe sweet potatoes if there are some, but generally, the potatoes and rolls are the only bits of the traditional Thanksgiving dinner that are remotely palatable to me. This isn’t a good dinner and it’s not super tasty.
  2. Eat a one-off meal totally different from everyone else. This is bad in a different way. It means I’m eating something I like, but it also means I get to - yet again, and many times to the same people - explain why I’m eating something different. Not just a pain in the ass, but psychologically troubling as I get the looks and questions from around the table.

The last few years my family and I have gone to a buffet for Thanksgiving so they can have their turkey, but there are plenty of other things to eat and no one really notices because, well, it’s a buffet. This year, due to some scheduling trouble and other circumstances, that didn’t happen and it would have ended up being one of the above two situations. Again. I’m tired of that, so this year Jenn and I got together with a couple of friends… and some friends of friends… and their families… and had dinner with them.

While I am grateful to have met some very nice new friends and have been invited into their home for a meal of tasty shrimp scampi… it ended up being scenario #2 as mentioned above, which is not quite what I thought I was getting into. Again, no reflection on our friends, as they were wonderful and hospitable.

I think next year I’m just boycotting the whole Thanksgiving thing. It would be different if my family lived more than about 45 minutes away and I didn’t see them all the time, but they do, and I do, so the only real value Thanksgiving has is the dinner, which is the bit I’m not interested in.

The holiday weekend got a little better when we went to see Ninja Assassin. Great fight scenes and a little over-the-top gore never hurt anyone. It was only OK, as I wish the actual plot bits didn’t seem so… flat… but it was fun and nothing says ‘Thanksgiving’ like people getting their asses kicked.

The rest of the long weekend was spent playing a little Xbox 360, getting stuff done around the house, and generally relaxing, which always makes for a nice time. It looks like next weekend we’ll be decorating the house for Christmas, which should be fun.

media, music comments edit

A few days ago I was listening to some music on my iPod and noticed that a couple of tracks had metadata filed as “Firstname Lastname,” which is not how I file my music. I think I picked them up off AmazonMP3, and it kind of irritated me that I had to fix it, so I tweeted:

Wondering why so many folks file their music “Firstname Lastname” instead of “Lastname, Firstname.”

That actually brought a lot of responses (more than some questions I have where I actually really need to know the answer). I got a couple of responses from folks who wondered the same thing, but the opposition to the idea cited basically two problems:

  1. Most metadata out there is stored this way so it’s easier to just use it as-is than it is to fix it for your own collection.
  2. There could be confusion if you have a solo artist who also has a band. For example, “Ben Folds” should show up by “Ben Folds Five” if you have music by both.

My logic in storing “Lastname, Firstname” is pretty simple.

  • When I go looking in the store (or at the library) for “Michael Jackson,” I don’t go looking under “M.” I don’t think that should be different on my iPod.
  • I have no desire to store separate “display data” and “sort data,” though that possibility exists. Doing it that way means double-metadata to manage and makes the list look messy.

I looked around at how libraries file things and, while I couldn’t get my hands on a copy of the Library of Congress filing rules I did gather that, generally speaking, the accepted convention for Folks Who File For a Living is:

  • If it’s an individual person: Lastname, Firstname (e.g., “Folds, Ben”)
  • If it’s a collective, corporation, or group: Firstname Lastname (e.g., “Ben Folds Five” or “Steve Miller Band”)

That’s actually how I have my music filed, and that makes sense to me. I contacted a good friend of mine who actually went to school for this stuff and he concurred. He also mentioned that there are interesting edge cases to consider - for example, “Alice Cooper” was not originally the name of the singer but the name of the band, so you could argue it either way.

That would, in fact, mean you would not normally see solo work by Ben Folds sitting alongside his group work in Ben Folds Five, and you’d see Dave Matthews Band under “D” not “M,” but if Dave Matthews had solo work, it’d be under “M.”

My friend pointed me to DMOZ, the Open Directory Project, which is a place some folks feel is a good starting place to look if you don’t know how something would be filed. This general premise - individuals as Lastname, Firstname and groups as Firstname Lastname - appears to hold there.

Of course, I see why online music stores chose to skip this - so there are no edge cases. Trade potentially “incorrect” metadata to avoid forum flame wars about why individual artists don’t appear right next to their bands and such. I guess I’ll just have to continue fixing it manually.

Now to figure out the best way to store artist collaborations - duets, for example. If only there were multiple artist fields in the ID3 spec. Oh, wait, ID3 does support that. Too bad iTunes doesn’t. (Yeah, I know, MP4 doesn’t directly support ID3 but atoms… I still think it’s possible to support multiple artists.)