Just a few comments about things

2010 June 13
by qkslvrwolf

So, nothing really to report. Helped Jessica move, which was about the easiest move ever…she doesn’t have very much stuff, so there wasn’t a lot to carry. It was fun though. She also took me for a swim in one of the ponds around her house, which was AWESOME. Crystal clear water, sandy bottom. The way swimming should always be.

Also, I set up her wireless internet. She had a cisco/linksys E1000. I gotta say, I have never used their installation programs in the past, but this time, it was worth it. It was secure by default, and it didn’t install any crap-ware or set itself up to reside in memory on her box. It set up her home network with a random SID, a randomly generated strong password and WPA key, and even set up a guest network that is unencrypted, but requires a password to log in to. It was awesome. I may have to see if the trendnet that I bought for our house has anything similar, because It Just Worked, AND it was secure. I don’t know how the router is going to work out, but kudos to cisco for the setup.

When I got home today, and started to work on chores and errands, I talked to Regina about my plans for the bed loft. She suggested that I just go with a custom closet organization, and I have to say, it should work, and be easier to get set up then doing the loft, if not as cool. So I guess I need to go to that organization store, whatever it’s called, with measurements for my closet so I can start moving into my new room.

NOT doing the bed loft gives me some time to work on my other organizational project: digitizing my files, encrypting them, syncing them to the cloud, and reducing my filing cabinet from 4 drawers down to 2, so I can fit it in my room. That’s what I’m starting on tonight: finding out if I can happily encrypt and sync to a cloud storage.

Finally, I put up some pictures from the trip to St. Louis.

Bunch of new pictures in the gallery

2010 May 16
by qkslvrwolf

I finally put pictures from, oh, I dunno, the last 6 months or so up in the gallery. Bunch of stuff from Europe (be sure to check out the Becky’s visit gallery…I had a bunch I hadn’t posted), my last trip to norway (which is all already up at facebook anyway), and finally, the first few months here in Boston. So go check it out!

Multi-computer Amarok, Part 1

2010 May 15
by qkslvrwolf

For a very long time, I’ve been wanting to be able to use the same amarok database from all my computers in a relatively seamless fashion. I’ve hacked it before by moving the underlying single-file database (collection.db) to the network drive that also housed the music. That worked ok, except that for some reason, it updated far too slowly and I couldn’t get it to play music. The other thing is, I also eventually want to have a multi-user amarok, one where multiple users listen to the same music database. The options that opens up are endless. Let’s say several people are in the same room playing games; now you can have a dynamic playlist that only plays music everyone likes. Or you’re having a party. Now you can play music that you don’t usually like without it screwing up your personal scores, but still taking advantage of the power of the dynamic playlists. Maybe you’re having an impromptu eighties party, and you want to play lots of 80′s music without taking hours making playlists, but you don’t like 80′s music, so you don’t want it to effect your own score.

You could, with a multi-user amarok.

Anyway, that’s why I started down this path.

So, step 1 was to enable the external database and move my data over. Since I haven’t listened to music on amarok 2.2.2 (the version I’m going to be using) very much, that means all my statistics are still in my 1.4.x database. That actually makes things a little easier.

Following this guide, I got started. There’s a couple of things missing from the guide. First, you have to actually create a database. Then, you can create your user and grant them rights to it. However, when you grant them rights, don’t use localhost. Use %. So: grant all on amarokdb.* to user 'amarokuser'@'%' rather than amarokuser@localhost.

Then, you go into amarok, set up your external db as stated. But don’t do anything right then. It won’t actually create the db tables. So you have to exit amarok, then start it again. That will cause the tables to be created assuming you’ve everything correctly set up. Which I did, so I can’t give you any infos about it not being set up.

Then, you go through the import process for your old collection. This will mostly go fine. BIG NOTE: there is info on the web about making sure that all your versions of amarok are the same, and that your music is mounted on the EXACT SAME PATH on all the computers that are going to connect. For the import, this is also true in that all the music has to be mounted on the same path for the mysql database doing the import that it was on the computer using the 1.4.x sqlite db. SAME PATH!

Anyway, the collection seems to import just fine, but in my case, it’s missing all the scores. I’ll get to that in a minute.

Great, now it’s working on one computer. So how do we get it working on another?

I’ve been dealing with this off and on for awhile, so my computers all share the same mount-point and are running the same version of ubuntu, so no worries there. I checked to make sure that all the versions are the same, just to be safe, and then set up the external db on the second box. Nothing. So, I started searching the web, and low and behold, you have to modify a couple of mysql settings to get it to work. so you edit /etc/mysql/my.cnf and change bind_address to your actual IP. And, if and when your IP changes because you’re using dhcp like mine is sure to, this is going to blow up on you. Not sure how to fix that one, actually. Well, gain control of your router and set a static ip for the mac address of your server, but I have to get regina to let me do that.

Anyway, there was also an instruction for changing mysql.db(host) to %, but I don’t think that’s necessary. We’ll see if I ever change it back. I did it. I haven’t undone it. But I don’t think it’s necessary.

So, finally, I”m able to connect from my other computer. It’s got the rows there. Now to solve the scores issue. I’ve been using amarok for 3 years now. I’m not about to give up my scores.

After digging in for a couple of hours and playing with it, here’s what I did. First I exported the data from the old sqlite database, following the instructions here:

sqlite3 collection.db .dump | \
egrep -vi '^(BEGIN TRANSACTION|COMMIT|CREATE|INSERT INTO "devices")' | \
perl -pe 's/INSERT INTO \"(.*)\" VALUES/INSERT INTO \1 VALUES/' > temp.sql

Then, I used a little grep magic strip out the statistics info, and a little sed to change “statistics” into “tempstats” for the insert statements. Next, I used sqlite3 collection.db .schema statistics > tempstats.sql to get my create statement. You have to change the table name again to tempstats or whatever, and reduce it from 1024 to something less for the url field. I used 256, you might be able to get away with like 384 if you need the extra characters.

Then, back in your mysql instance, you can do source /path/to/tempstats.sql
source /path/to/temp.sql
to import the statistics table.

I should note now that this is NOT efficient. It’s a dirty, unoptimized hack. If you have a better way of doing it, please, for the love of spaghetti, let me know.

Anyway, at that point, you can do a really ugly update on join to get your scores back:
update statistics right join urls on urls.id = statistics.url right join tempstats on tempstats.url = urls.rpath set statistics.score = tempstats.percentage;

It took my nettop about 7 minutes to do this on about 4k rows updated. That join is NASTY. I just don’t know enough about db’s to make it cleaner.

I’m thinking about learning enough python to do this that way, but let’s be honest. It’s working now, so I’ll probably never get around to it.

Next step, I gotta sit down and change the database schema to handle multiple users.

Interesting Flight Pattern, another run

2010 March 31
by qkslvrwolf

Last weekend I went down to texas to visit my family, all congregating on my sister’s place. I flew US Airways, as opposed to my normal airtran or southwest, because Dad had volunteered to get my ticket with point, rather than have me pay the extra $400 so that I didn’t have to take any leave by flying back on Monday, since, having started another job, I have no spare paid time off again.

It turned out to be a long weekend of aircraft first and worsts. Things started out smoothly, but then at USAirways’ hub in Charlotte, the plane had an engine problem and the mechanics wouldn’t clear it to take off. Now, I’m all about not flying with engines that don’t work. Kudos for grounding the plane. But I would expect, and I’m sure many of my three readers would agree, that at an airlines major east coast hub, they would have a spare plane. Not USAirways. But! They did hook me up with a hotel room, some meal vouchers, and got me to my destination only 12 hours late or so. My mental voice was somewhat sarcastic as I typed that, but to be fair, that really isn’t too bad for not having a spare plane. They did they right thing.

So, 27 hours after I got to San Antonio, I left again. In Charlotte, they were asking for volunteers to give up the flight, which was overbooked, and I went ahead and volunteered, which netted me a $325 voucher. Another first. I had to fly through pittsburgh to get home. And the weather was the worst that I’ve ever flown through (tornado watch! yay!), so that was actually kind of like getting an amusement park ride to go with the airplane ticket. (Really, I enjoyed it. The plane didn’t fall out of the sky, and it was very much like a roller coaster. A wooden one that slams you around in your seat.)

So, I got my first airline provided hotel voucher, my first airline provided meal voucher, my first seat give up for a mostly free ticket, AND I got to visit 5 airports, 4 of them twice, for a total of NINE airport visits in 3 days! Woohoo! (Boston, Charlotte, Dallas, Dallas, San Antonio, San Antonio, Charlotte, Pittsburgh, Boston.)

This evening I went for another run on the vibrams. I ran for about 3 miles (a little walking, here and there). Lungs and legs felt FANTASTIC…I could’ve gone for at least twice as far on those. My feet got tired, which is why I walked, and I developed a blister on my left foot, so I’ll have to toughen my feet up some more. But it felt really good. I have a feeling this summer I may almost get into real shape. If I get my back waxed, I might even be willing to take my shirt off again! ;-) (OVERSHARE! YAY!)

Also, I keep thinking I should post up my thoughts about creating healthy competition in government programs to realize efficiency, performance, taxpayer satisfaction, and constant program improvement. This blog has been WAY to personal, and not nearly thoughtful enough for the last few months. When I bother to post, of course.

First run with the vibrams

2010 March 9
by qkslvrwolf

I went for the my first run tonight on my vibram five-finger sprints.

After talking with my dad some, running on my nike frees, reading online, and enjoying over the past couple of years running barefoot in the grass and on beaches, then hearing about the vibrams, I decided to take the plunge and bought myself a pair so that I could try running barefoot in the city (where lots of asphalt and glass shards make running barefoot a really bad idea).

Tonight was my first run. I went about 1.4 miles (according to google maps, anyway). I had been intending to go for two, and after reading about it when I got back, that’s probably a good thing. :-) They actually recommend on several sites starting off with 1/2 a mile or less. But I listened to my feet, and turned around when they started complaining about the new workout.

What was cool was I didn’t have to run slowly. In fact, I’d say I ran at least as fast as I normally do in shoes, which was nice. There are a number of sites which have suggestions for strengthening your calves before you start, but mine have always been pretty strong, between good genetics, dancing, and paying attention to them when I lift, so I feel like that wasn’t necessary.

Anyway…this post probably could’ve been a facebook update, but I feel like I’ve been neglecting the blog, so I put it here. I’ll get more up later. :-)